.compare-wrapper {
    background: #fff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.compare-title {
    text-align: center;
    margin-bottom: 30px;
    font-weight: 600;
}
.compare-table {
    width: 100%;
    border-collapse: collapse;
    /* border: 1px solid #ddd; */
}

.compare-table th,
.compare-table td {
    border: 1px solid #ddd;
    padding: 15px;
    text-align: center;
    vertical-align: top;
}

.compare-table th {
    background-color: #111;
    color: #fff;
}

.feature-col {
    width: 18%;
}

.product-col {
    width: auto;
}

.feature-name {
    font-weight: 600;
    background: #f8f9fa;
}

.product-cell,
.price-cell,
.desc-cell,
.spec-cell,
.stock-cell {
    padding: 20px;
    vertical-align: top;
}

.compare-img {
    max-width: 130px;
    margin-bottom: 10px;
}

.product-title {
    font-weight: 500;
    font-size: 14px;
}

.spec-item {
    margin-bottom: 6px;
    display: flex;
    /* justify-content: space-between; */
    gap: 15px;
}

.spec-label {
    font-weight: 500;
    color: #444;
}

.spec-value {
    color: #666;
}

.price-cell {
    font-size: 18px;
    font-weight: 600;
    color: #28a745;
}

.in-stock {
    color: #28a745;
    font-weight: 600;
}

.out-stock {
    color: #dc3545;
    font-weight: 600;
}
/* REMOVE BUTTON */
.product-col {
    position: relative;
    text-align: center;
}

.product-header {
    display: flex;
    align-items: center;
    justify-content: space-between; /* pushes them apart */
    gap: 10px; /* space between title and icon */
}

.product-name {
    flex: 1; /* take remaining space */
    padding-right: 10px;
}

.remove-btn {
    flex-shrink: 0; /* prevent shrinking */
    background: transparent;
    border: none;
    cursor: pointer;
}

.icon-remove {
    position: absolute;
    right: 5px;
    top: 17px;
    background: #dfdcdc;
    border: none;
    color: #0b0a0a;
    font-size: 14px;
    cursor: pointer;
    transition: 0.3s;
}

.icon-remove:hover {
    color: #dc3545;
    transform: scale(1.1);
}
/* #toast - alert box */
/* Remove icon image */
#toast-container > .toast-success {
    background-image: none !important;
}

/* Remove left padding space */
/* #toast-container > .toast {
    padding-left: 15px !important;
} */

/* If icon added using ::before */
#toast-container > .toast::before {
    display: none !important;
    content: none !important;
}
#toast-container.toast-top-center {
    top: 20% !important;
    left: 50% !important;
    transform: translate(-50%, -50%);
    width: auto;
}

#toast-container > div {
    margin: 0 auto;
}
.my-wide-toast {
    width: 400px !important;
}

/* empty compare */
.empty-compare {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 60px 20px;
}

.empty-compare h3 {
    font-weight: 600;
    margin-bottom: 10px;
}

.empty-compare p {
    font-size: 14px;
}
.compare {
    position: relative;
}
#compare_count {
    position: absolute;
    top: -8px;       /* adjust small value */
    right: -8px;     /* adjust small value */

    width: 18px;
    height: 18px;
    border-radius: 50%;

    display: flex;
    justify-content: center;
    align-items: center;

    font-size: 12px;
    font-weight: 500;

    background: #ec7a5c;
    color: #fff;

    z-index: 10;
}
.compare-header {
    position: relative;
    text-align: center;
    margin-bottom: 20px;
}

/* Center heading */
.compare-title {
    margin: 0;
}

.clear-compare-btn {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    
    background: #28a745;
    color: #fff;
    border: none;
    padding: 10px 30px;
    font-size: 15px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    min-width: 140px;
    transition: 0.3s ease;
}


/* Hover */
.clear-compare-btn:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0,0,0,0.2);
}


/* Click */
.clear-compare-btn:active {
    transform: scale(0.96);
}
/* compare-add to cart */
.compare-add-to-cart {
    background: #ec7a5c;
    color: #fff;
    border: none;
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.3s ease;
}
.compare-add-to-cart:hover {
    /* background: #ec7a5c; */
    transform: translateY(-2px);
}

.compare-add-to-cart.disabled {
    background: #ccc;
    cursor: not-allowed;
}


/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 768px) {

    /* Product header layout */
    .product-header {
        flex-direction: column;
        align-items: center;
        gap: 6px;
    }

    .product-name {
        font-size: 13px;
        text-align: center;
        white-space: normal;
    }

    .remove-btn {
        margin: 0;
    }

    /* Image size */
    .compare-img {
        width: 90px;
        height: auto;
    }

    /* Add to cart button */
    .compare-add-to-cart {
        width: 100%;
        font-size: 13px;
        padding: 8px 10px;
    }

    /* Feature column */
    .feature-col,
    .feature-name {
        min-width: 120px;
        font-size: 13px;
    }

    /* Enable scroll */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .compare-table {
        min-width: 800px; /* required for horizontal scroll */
    }
}

/* Scroll container */
.table-responsive {
    width: 100%;
    position: relative;
}

/* Scroll shadow indicator */
/* .table-responsive::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 15px;
    height: 100%;
    pointer-events: none;
    background: linear-gradient(to left, rgba(0,0,0,0.1), transparent);
} */
/* MOBILE FIX */
@media (max-width: 768px) {

    .compare-header {
        position: static;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 12px;
        text-align: center;
    }

    .clear-compare-btn {
        position: static;
        transform: none;
        width: 50%;
        max-width: 250px;
        margin-left: auto;   /* 👈 pushes it to right */
        display: block;      /* important */
    }
    

}
@media (max-width: 768px) {

    #toast-container.toast-top-center {
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%);
    }

}

/* product-details- compar iocn */
.product-compare-icon {
    position: absolute;
    top: 66px;
    right: 15px;
    z-index: 99;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: #333;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    cursor: pointer;
    transition: all 0.3s ease;
  }
  .product-compare-icon:hover {
    background: #ff3d3d;
    color: #fff;
  }
  .product-compare-icon .w-icon-compare {
    font-size: 16px;
  }
/*     .wishlist-mobile  */
.compare-mobile {
    display: none;
}

/* MOBILE + SMALL TABLET */
@media (max-width: 991px) {

    .compare-mobile {
        display: flex;
        position: absolute;
        top: 45px;
        right: 10px;
        z-index: 10;
        color: #333;
        width: 36px;
        height: 36px;
        background: #fff;
        border-radius: 50%;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    }

    .product-action-horizontal .wishlistadd {
        display: none !important;
    }

    .product-media {
        position: relative;
    }
}
/* MOBILE VIEW */
@media (max-width: 767px) {

    /* show mobile wishlist */
    .compare-mobile {
        display: flex;
        position: absolute;
        top: 45px;
        right: 10px;
        z-index: 10;
        color: #333;
        width: 36px;
        height: 36px;
        background: #fff;
        border-radius: 50%;
        align-items: center;
        justify-content: center;

        box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    }

    /* hide desktop wishlist */
    .product-action-horizontal .wishlistadd {
        display: none;
    }

    /* ensure positioning works */
    .product-media {
        position: relative;
    }
}