/* PRODUCT GRID LAYOUT */
.custom-product-section .products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    align-items: stretch;
}

/* PRODUCT CARD */
.custom-product-section .product-card {
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    background: #fff;
    border: 1px solid #DDE6F4;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Card hover effect */
.custom-product-section .product-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid #B1B1B1;
}


/* PRODUCT IMAGE */
.custom-product-section .product-image {
    height: auto;
    min-height: 250px;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 93%;
    margin: auto;
    padding-top: 13px;
}

/* Product image behavior */
.custom-product-section .product-image .product-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}


/* PRODUCT INFO AREA */
.custom-product-section .product-info {
    display: flex;
    flex-direction: column;
    flex: 0 1 auto;
    gap: 2px;
    padding: 0px 15px 15px;
}


/* PRODUCT TITLE */
.custom-product-section .product-title {
    font-size: 20px;
    line-height: 30px;
    font-weight: 600;
    letter-spacing: 0.15px;
    color: #012D57;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.custom-product-section .product-title a {
    color: #012d57;
    text-decoration: none;
}

/* Title underline when card hovered */
.custom-product-section .product-card:hover .product-title a {
    text-decoration: none;
    color: #C43D1A;
}


/* PRODUCT RATING */
.custom-product-section .product-rating {
    font-size: 14px;
    color: #1a3764;
}

/* Hollow star */
.custom-product-section .product-rating .star {
    font-size: 14px;
    margin-right: 5px;
    color: transparent;
    display: inline-block;
    -webkit-text-stroke: 1px #000000;
}

/* Filled star */
.custom-product-section .product-rating .star.filled {
    color: #1a3764;
    -webkit-text-stroke: 1px #1a3764;
}

/* Divider */
.custom-product-section .product-rating .divider {
    border-left: 1px solid #E2E2E2;
    margin: 0 5px 0 0;
}

/* Review text */
.custom-product-section .product-rating .reviews {
    display: inline-block;
}

.custom-product-section .product-rating .reviews a {
    color: #363030;
    font-size: 14px;
}

.product-reviews-summary {
    margin-bottom: 0;
}


/* BOTTOM SECTION (Price + Add to Cart) */
.custom-product-section .product-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
}

/* PRODUCT PRICE */
.custom-product-section .product-price {
    font-size: 16px;
    font-weight: 500;
    color: #1a3764;
    width: 40%;
    line-height: 2.3rem;
}

.custom-product-section .product-price span {
    display: block;
    font-size: 20px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Regular price */
.custom-product-section .product-price .regular-price {
    color: #003366;
}

/* Old price (strikethrough for discounted items) */
.custom-product-section .product-price .old-price {
    color: #003366;
    text-decoration: line-through;
}

/* Special price (discounted price) */
.custom-product-section .product-price .special-price {
    color: #C43D1A;
}


/* ADD TO CART BUTTON */
.custom-product-section .add-to-cart-btn {
    min-width: 120px;
    padding: 10px 40px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    color: #fff;
    background-color: #C43D1A;
    border-radius: 5px;
}

.custom-product-section .add-to-cart-btn:hover {
    background-color: #C43D1A !important;
}


/* RESPONSIVE: TABLET */
@media (max-width: 991px) {
    .custom-product-section .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* .custom-product-section .product-image {
        min-height: 300px;
    } */
}

/* RESPONSIVE Mobile */
@media (max-width: 767px) {
    .custom-product-section .products-grid {
        grid-template-columns: 1fr;
    }

    /* .custom-product-section .product-image {
        min-height: 300px;
    } */
}



/* BOTTOM ACTIONS - Responsive */
.bottom-actions {
    display: flex;
    align-items: center;
    justify-content: end;
    gap: 10px;
    width: 60%;
}

/* Tablet view */

/* Mobile view */
@media (max-width: 767px) {
    .bottom-actions {
        width: 100%;
        flex-direction: row;
        align-items: stretch;
        gap: 8px;
        justify-content: space-between;
    }

    .bottom-actions .add-to-cart-btn,
    .bottom-actions .wishlist-btn {
        width: 100%;
        justify-content: center;
    }
}

/* --- Wishlist Button Hidden by Default --- */
.product-card .wishlist-btn {
    position: relative;
    border: 1px solid #ddd;
    width: 34px;
    height: 34px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

/* Icon styling */
.product-card .wishlist-btn i {
    font-size: 18px;
    color: #C43D1A;
}

/* Remove underline/color override conflicts */
.wishlist-btn,
.wishlist-btn:hover,
.wishlist-btn:active,
.wishlist-btn:visited {
    color: inherit !important;
    text-decoration: none !important;
}


/* ===============================
   HORIZONTAL SCROLL OVERRIDE
   =============================== */

.custom-product-section .products-horizontal-scroll {
    display: flex !important;
    grid-template-columns: unset !important;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 20px;
    scroll-snap-type: x mandatory;
    padding-bottom: 10px;
}

.custom-product-section .products-horizontal-scroll .product-card {
     flex: 0 0 calc((100% - 60px) / 3);
    max-width: calc((100% - 60px) / 3);
    scroll-snap-align: start;
}

@media (max-width: 991px) {
    .custom-product-section .products-horizontal-scroll .product-card {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (max-width: 767px) {
    .custom-product-section .products-horizontal-scroll .product-card {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

.custom-product-section .products-horizontal-scroll::-webkit-scrollbar {
    height: 6px;
}

.custom-product-section .products-horizontal-scroll::-webkit-scrollbar-thumb {
    background: #c5c5c5;
    border-radius: 10px;
}


/* ===============================
   SCROLL WRAPPER
   =============================== */

.products-scroll-wrapper {
    position: relative;
}

/* Arrow buttons */
.scroll-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: #ffffff;
    border: 1px solid #ddd;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #1b3664;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* Left / Right positioning */
.scroll-arrow.left {
    left: -8px;
}

.scroll-arrow.right {
    right: -8px;
}

/* Hover */
.scroll-arrow:hover {
    background: #1b3664;
    color: #fff;
}

/* Hide arrows on mobile */
@media (max-width: 767px) {
    .scroll-arrow {
        display: none;
    }
}

.wishlist-btn.added,
.wishlist-btn.added i {
    color: #C43D1A;
}

/* Processing state with loading spinner */
.wishlist-btn.processing {
    pointer-events: none;
    opacity: 0.7;
    position: relative;
}

.wishlist-btn.processing i {
    opacity: 0.3;
}

.wishlist-btn.processing::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    margin: -5px 0 0 -5px;
    border: 2px solid #C43D1A;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
    z-index: 1;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.product-bottom:has(.regular-price) {
    margin-top: 2.3rem;
}