/* Compare Page Styles */

/* Add new icon and product placeholder styles */
.icon.add-new {
    background: url("../assets/icons/user-interface/Add New.svg") center/contain no-repeat;
}

.add-product-to-compare {
    color: #1f9a17;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    line-height: 32px;
    transition: all 0.3s ease;
}

/* Compare page subject box */

.select-product-compare .subject-box .title {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
}

/* Product items container */
.select-product-compare .items .item {
    height: 95%;
    min-height: 360px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
    transform: translateY(20px);
}

/* Loading state while adding product from search */
.select-product-compare .row.items.is-comparing {
    opacity: 0.6;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

/* .select-product-compare .items .item:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(31, 154, 23, 0.15);
  border-color: rgba(31, 154, 23, 0.2);
} */

.select-product-compare .items .item.empty {
    border: 2px dashed rgba(31, 154, 23, 0.3);
    background: linear-gradient(135deg, rgba(31, 154, 23, 0.02) 0%, rgba(31, 154, 23, 0.05) 100%);
}

.select-product-compare .items .item.empty:hover {
    border-color: rgba(31, 154, 23, 0.5);
    background: linear-gradient(135deg, rgba(31, 154, 23, 0.05) 0%, rgba(31, 154, 23, 0.1) 100%);
}

/* Product category links */
.select-product-compare .items .item .category>a {
    color: #1f9a17;
    text-align: right;
    font-size: 14px;
    font-weight: 600;
    line-height: 18px;
    padding: 6px 12px;
    background: rgba(31, 154, 23, 0.1);
    border-radius: 20px;
    display: inline-block;
    transition: all 0.3s ease;
    text-decoration: none;
}

.select-product-compare .items .item .category>a:hover {
    background: rgba(31, 154, 23, 0.2);
    color: #0d7010;
}

/* Product titles */
.select-product-compare .items .item .title {
    color: #2c3e50;
    text-align: right;
    font-size: 17px;
    font-weight: 700;
    line-height: 24px;
}

/* Product prices */
.select-product-compare .items .item .price {
    color: #000;
    text-align: right;
    font-weight: 700;
    line-height: 24px;
    padding-left: 5px;
}

.select-product-compare .items .item .price .currency {
    color: grey;
    text-align: right;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
}

/* Remove buttons */
.select-product-compare .items .item .remove {
    color: red;
    text-align: right;
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.05) 0%, rgba(220, 53, 69, 0.1) 100%);
    border: 1px solid rgba(220, 53, 69, 0.2);
    border-radius: 12px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    padding: 4px 8px;
}

.select-product-compare .items .item .remove:hover {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.15) 0%, rgba(220, 53, 69, 0.2) 100%);
    border-color: rgba(220, 53, 69, 0.3);
    color: red;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.2);
}

.select-product-compare .items .item .remove .icon {
    width: 20px;
    height: 20px;
    margin-left: 2px;
}

.select-product-compare .items .item .remove-2 {
    border-radius: 49px;
    background: #ececec;
    width: 50px;
    height: 50px;
    padding: 8px;
    display: inline-block;
    color: #fff;
    text-decoration: none;
}

.select-product-compare .items .item .remove-2-box {
    position: absolute;
    top: 4px;
    left: 4px;
    display: none;
}

.icon.red {
    filter: hue-rotate(0deg) brightness(0.8) saturate(2);
}

.icon.add-new {
    background: url("../assets/icons/user-interface/Add New.svg") center/contain no-repeat;
    filter: hue-rotate(90deg) brightness(1.1);
}

/* Add product to compare text */
.add-product-to-compare {
    color: #1f9a17;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    transition: all 0.3s ease;
}

.select-product-compare .items .item.empty:hover .add-product-to-compare {
    color: #0d7010;
    transform: scale(1.05);
}

.select-product-compare .items .item .icon.add-new {
    width: 48px;
    height: 48px;
    filter: hue-rotate(90deg) brightness(1.1);
    transition: all 0.3s ease;
}

.select-product-compare .items .item.empty:hover .icon.add-new {
    transform: scale(1.1) rotate(90deg);
    filter: hue-rotate(90deg) brightness(1.3);
}

/* Clear All Compare Button */
.js-clear-compare-list {
    border: none;
    border-radius: 12px;
    color: #000;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.js-clear-compare-list .icon {
    margin-right: 8px;
}

/* Animation keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.select-product-compare .items .item {
    animation: fadeInUp 0.6s ease forwards;
}

.select-product-compare .items .item:nth-child(1) {
    animation-delay: 0.1s;
}

.select-product-compare .items .item:nth-child(2) {
    animation-delay: 0.2s;
}

.select-product-compare .items .item:nth-child(3) {
    animation-delay: 0.3s;
}

.select-product-compare .items .item:nth-child(4) {
    animation-delay: 0.4s;
}


.select-product-compare .items .text-an-btn {
    padding: 32px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 200px;
}

/* Product group titles and table content */
.compare-product-group-title,
.select-product-compare .items .product-group-title {
    color: #2c3e50;
    border-bottom: 3px solid rgba(31, 154, 23, 0.2);
    padding: 16px 20px;
    margin: 16px 0;
    font-size: 20px;
    font-weight: 700;
    text-align: right;
    background: linear-gradient(135deg, rgba(31, 154, 23, 0.05) 0%, rgba(31, 154, 23, 0.1) 100%);
    border-radius: 12px;
}

.select-product-compare .items .product-group-title::before {
    display: none;
}

.select-product-compare .items table td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(31, 154, 23, 0.1);
}

.select-product-compare .items table td .c-title {
    color: #2c3e50;
    font-size: 16px;
    font-weight: 600;
    line-height: 24px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.select-product-compare .items table td .c-value {
    color: #4b5563;
    font-size: 15px;
    font-weight: 500;
    line-height: 22px;
    margin: 0;
}

.select-product-compare .items .item del {
    color: red !important;
    font-weight: 600 !important;
    line-height: 24px;
}

.select-product-compare .me-2 {
    margin-top: -8px !important;
}

/* Compare page product card styling to match content-product.php */
.select-product-compare .items .item.item-desktop {
    background: white;
    border-radius: 16px;
    /* box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); */
    /* border: 1px solid #e0e0e0; */
    transition: all 0.3s ease;
    min-height: auto;
    height: auto;
}

/* .select-product-compare .items .item.item-desktop:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(31, 154, 23, 0.15);
  border-color: #1f9a17;
} */

.select-product-compare .items .item.item-desktop .img-box {
    position: relative;
    padding: 16px;
    background: #fff;
    border-radius: 16px 16px 0 0;
}

.select-product-compare .items .item.item-desktop .img-box img.pic {
    width: 100%;
    height: 200px;
    object-fit: contain;
    border-radius: 8px;
    background: white;
}

.select-product-compare .items .item.item-desktop .vertuka-product-category-row {
    padding: 14px 16px 8px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.select-product-compare .items .item.item-desktop .title {
    padding: 8px 16px;
    margin-bottom: 0;
}

.select-product-compare .items .item.item-desktop .title h3 {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
    color: #333;
}

.select-product-compare .items .item.item-desktop .title h3 a {
    color: inherit;
    text-decoration: none;
}

.compare-brand-name {
    font-size: 14px;
    color: #48ae42;
    font-weight: 600;
    margin-bottom: -4px;
}

/* Remove button styling for compare page */
.select-product-compare .js-remove-from-compare {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid #000;
    color: #000;
    transition: all 0.3s ease;
}

.select-product-compare .js-remove-from-compare:hover {
    transform: scale(1.1);
}

.select-product-compare .js-remove-from-compare .icon.close {
    margin: 0 !important;
}

.select-product-compare .ticket {
    margin-right: 15px;
}

.btn.btn-sm.btn-outline-danger.js-remove-from-compare.position-absolute:hover:active:visited {
    background: white;
    border-color: #000;
}

.select-product-compare .vertuka-rating-number {
    font-weight: 600;
}

/* Modern comparison table styling */
.compare-table .grid {
    display: grid;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 5px;
    margin-top: 5px;
}

.compare-table .bg-gray-50 {
    background-color: #f9fafb;
}

.compare-table .bg-white {
    background-color: #ffffff;
}

.compare-table .grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.compare-table .grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.compare-table .grid-cols-4 {
    grid-template-columns: repeat(4, 25%);
}

.compare-table .grid-cols-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.compare-table .gap-x-3\.5 {
    column-gap: 0;
}

.compare-table .border-r {
    border-right: 1px solid #d1d5db;
}

.compare-table .border-gray-300 {
    border-color: #d1d5db;
}

.compare-table .py-5 {
    padding-top: 20px;
    padding-bottom: 20px;
}

.compare-table .pr-4 {
    padding-right: 5px;
    padding-left: 5px;
}

.compare-table .pl-6 {
    padding-left: 5px;
}

.compare-table .text-base {
    font-size: 16px;
}

.compare-table .font-semibold {
    font-weight: 600;
}

.compare-table .leading-7 {
    line-height: 28px;
}

.compare-table .text-gray-800 {
    color: #000;
}

.text-base.font-semibold.leading-7.text-gray-800 {
    margin-top: -10px;
}

.compare-table .text-sm {
    font-size: 14px;
}

.compare-table .font-medium {
    font-weight: 500;
}

.compare-table .text-gray-600 {
    color: #4b5563;
}

.compare-table .gap-y-2 {
    row-gap: 8px;
}

.compare-table .flex {
    display: flex;
}

.compare-table .flex-col {
    flex-direction: column;
}

.compare-table .w-full {
    width: 100%;
}

.compare-table .h-7 {
    height: 28px;
}

.select-product-compare .subject-box {
    padding: 30px 0px;
}

/* Responsive adjustments */
@media only screen and (max-width: 576px) {
    .select-product-compare .items .item.item-desktop {
        padding: 5px 5px 30px 5px;
    }

    .select-product-compare .items .item.item-desktop {
        height: 340px;
    }
    .js-clear-compare-list {
        padding: 12px
    }

}

@media only screen and (min-width: 577px) and (max-width: 1399px) {
    .select-product-compare .items .item.item-desktop {
        padding: 30px 5px 45px 5px;
    }
    .js-clear-compare-list {
        padding: 12px 24px;
    }


    .temporary-product-title {
        line-height: 22px !important;
    }

    .select-product-compare .items .item .title {
        height: 85px;
    }

    .select-product-compare .number {
        font-size: 17px;
    }

    .select-product-compare .items .item del {
        font-size: 14px !important;
    }

    .select-product-compare .items .item .price {
        font-size: 20px;
        height: 28px;
    }

    .select-product-compare .items .item.item-desktop {
        height: 445px;
    }
    .select-product-compare .subject-box {
        padding-right: 8vw;
        padding-left: 7.5vw;
    }

}

@media only screen and (min-width: 1400px) {
    .js-clear-compare-list {
        padding: 12px 24px;
    }
    .select-product-compare .items .item.item-desktop {
        padding: 30px 5px 45px 5px;
        height: 440px;
    }

    .temporary-product-title {
        line-height: 24px !important;
    }

    .select-product-compare .items .item .title {
        height: 70px;
    }

    .select-product-compare .items .item .price {
        font-size: 20px;
        height: 28px;
    }

    .select-product-compare .items .item del {
        font-size: 14px !important;
    }
    .select-product-compare .subject-box {
        padding-right: 8vw;
        padding-left: 7.5vw;
    }

}

@media (max-width: 768px) {
    /* Prevent whole page horizontal scroll; only inner sections should scroll */
    html, body { overflow-x: hidden; }

    /* Ensure content starts below global site header */
    .select-product-compare {
        padding-top: calc(var(--site-header-height, 64px) + 8px);
    }

    /* Sticky compare header on mobile, below the site header */
    .compare-page-header {
        position: sticky;
        top: var(--site-header-height, 64px);
        z-index: 900;
        /* keep below global header */
        background: #ffffff;
        /* box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06); */
        padding: 0px 15px;
        margin-top: -10px;
    }

    /* No extra margin necessary; header remains in normal flow when sticky */
    .select-product-compare .container-fluid,
    .compare-table {
        margin-top: 0;
    }

    .select-product-compare .items .item del {
        font-size: 13px !important;
    }

    /* Mobile: Make entire page horizontally scrollable */
    .select-product-compare .items .item .price {
        font-size: 15px;
        height: 28px;
    }

    .select-product-compare .items .item .title {
        height: 50px;
    }

    /* Container spans viewport; inner content sets its own min-width */
    .select-product-compare .container-fluid {
        max-width: none;
        width: 100%;
        margin: 0;
        padding: 15px 15px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .select-product-compare .subject-box .title {
        font-size: 22px !important;
    }

    #ChooseProductModal {
        width: 100% !important;
        max-width: 100%;
    }
.select-product-compare .items .item {
    height: 94%;
    min-height: 345px;
}

    /* Product cards row - force 4 columns in a horizontally scrollable row */
    .select-product-compare .row.items {
        display: flex;
        flex-wrap: nowrap;
        margin: 0;
        min-width: 1070px;
    }

    /* Each product column - fixed width */
    .select-product-compare .row.items>div {
        flex: 0 0 270px;
        /* Fixed 300px per column */
        min-width: 270px;
        max-width: 300px;
        width: 300px;
        padding: 0 10px;
    }

    /* Product cards inside columns */
    .select-product-compare .items .item.item-desktop,
    .select-product-compare .items .item.empty {
        width: 100%;
        min-width: auto;
        max-width: none;
    }

    /* Comparison table scrollable as well; stays in sync via JS */
    .compare-table {
        width: 100%;
        margin: 20px 0;
        overflow-x: auto;
        /* -webkit-overflow-scrolling: touch;
        touch-action: pan-x;
        overscroll-behavior-x: contain; */
    }

    .compare-table .grid {
        min-width: 1070px;
        grid-template-columns: repeat(4, 300px);
        /* Match product columns */
        gap: 0;
        margin: 0;
    }

    /* Table cells */
    .compare-table .grid>div {
        padding: 10px;
        min-height: 60px;
    }

    .compare-table .border-r {
        border-right: 1px solid #d1d5db;
    }

    .compare-table .text-base {
        font-size: 15px !important;
    }

    .compare-table .pr-4,
    .compare-table .pl-6 {
        padding-left: 8px;
        padding-right: 8px;
    }

    .grid.w-full {
        padding-top: 12px !important;
    }

    .compare-table .gap-y-2 {
        row-gap: 0px !important;
    }

    .compare-table .py-5 {
        padding-top: 8px;
        padding-bottom: 8px;
    }

    .compare-brand-name {
        font-size: 12px;
    }

    .select-product-compare .vertuka-rating-number {
        font-size: 14px;
    }

    /* Mobile product grid improvements */
    .select-product-compare .col-lg-3 {
        min-width: 200px;
        flex: 0 0 auto;
    }

    /* Smooth scrolling for better UX */
    /* .select-product-compare .container-fluid,
    .compare-table {
        scroll-behavior: smooth;
        scrollbar-width: thin;
        scrollbar-color: #1f9a17 #f1f1f1;
    } */

    /* Custom scrollbar for webkit browsers */
    /* .select-product-compare .container-fluid::-webkit-scrollbar,
    .compare-table::-webkit-scrollbar {
        height: 8px;
    }

    .select-product-compare .container-fluid::-webkit-scrollbar-track,
    .compare-table::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 4px;
    }

    .select-product-compare .container-fluid::-webkit-scrollbar-thumb,
    .compare-table::-webkit-scrollbar-thumb {
        background: #1f9a17;
        border-radius: 4px;
    }

    .select-product-compare .container-fluid::-webkit-scrollbar-thumb:hover,
    .compare-table::-webkit-scrollbar-thumb:hover {
        background: #0d7010;
    } */
    /* .wrapper {
        overflow-x: scroll !important;
    } */

    .select-product-compare .items .item.item-desktop .img-box img.pic {
        height: 150px !important;
    }
}
.grid.w-full {
    padding-top: 25px;
    padding-right: 15px;
}
.select-product-compare .stock.out-of-stock {
    font-size: 15px !important;
    padding-right: 15px;
    margin-top: 10px;
}

