

.featured-products-section {
    padding: 40px 0; 
    margin-bottom: 0 !important;
    width: 100%;
    overflow: hidden;
}

.recommended-section {
    padding-top: 0 !important;
}

.section-header {
    text-align: center;
    margin-bottom: 20px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 15px;
}

.section-title {
    font-size: 28px; 
    color: #312a52; 
    font-weight: 700;
    margin-bottom: 4px;
    line-height: 1.1;
    letter-spacing: -0.5px;
}

.section-subtitle {
    font-size: 14px;
    color: #4a4a68;
    line-height: 1.4;
    margin: 0 auto;
    max-width: 600px;
    opacity: 0.9;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding-bottom: 1px; 
}

.product-card {
    background: transparent;
    display: flex;
    flex-direction: column;
}

.product-image-container {
    position: relative;
    aspect-ratio: 1/1.05;
    margin-bottom: 10px;
    background-color: transparent;
    border-radius: 15px; 
    overflow: hidden; 
}

.product-img-wrapper {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
}

.product-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    border-radius: inherit; 
    background: transparent;
}

.product-info {
    padding: 2px 0;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 2px;
}

.product-rating .stars {
    font-size: 13px;
    letter-spacing: 1px;
}

.product-rating .review-count {
    font-size: 12px;
    color: #333;
    opacity: 0.7;
}

.product-card-title {
    font-size: 16px;
    color: #312a52;
    font-weight: 700;
    margin-bottom: 6px;
    line-height: 1.25;
}

.product-excerpt {
    font-size: 13px;
    color: #555;
    line-height: 1.4;
    margin-bottom: 5px; 
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price-box {
    margin-bottom: 8px; 
}

.product-price-box .price-amount {
    font-size: 16px;
    font-weight: 700;
    color: #312a52;
}

.product-price-box del {
    font-size: 13px;
    color: #999;
    margin-right: 10px;
    text-decoration: none;
    position: relative;
    display: inline-block;
}

.product-price-box del::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: currentColor;
    transform: translateY(-50%);
}

.product-price-box ins {
    text-decoration: none;
}

.button.add_to_cart_button,
.add_to_cart_button,
.button-shop-now {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    background-color: var(--s2-atc-bg) !important;
    color: #fff !important;
    padding: 10px;
    border-radius: 50px; 
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.2s ease;
    position: relative;
}

.button.add_to_cart_button:hover,
.add_to_cart_button:hover,
.button-shop-now:hover {
    filter: brightness(0.9);
}

.button-shop-now.loading {
    color: transparent !important;
    pointer-events: none;
}

.button-shop-now.loading:after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: loom-spin 0.6s linear infinite;
}

@keyframes loom-spin {
    to { transform: rotate(360deg); }
}

.button-shop-now.out-of-stock-btn {
    background-color: #aea9ce;
    border: none;
    color: #fff;
    cursor: not-allowed;
    pointer-events: none;
}

.product-card-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.button-complete-order {
    width: 100%;
    background-color: var(--s2-complete-bg) !important;
    color: #fff !important;
    padding: 12px;
    border-radius: 50px;
    border: none;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease, filter 0.2s ease;
    text-transform: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.button-complete-order svg {
    flex-shrink: 0;
}

.button-complete-order:hover {
    filter: brightness(0.9);
}

.button-complete-order.is-disabled,
.loom-open-cod-modal.is-disabled,
.button-shop-now.is-disabled,
.btn-at-v3.is-disabled,
.sticky-order-btn.is-disabled,
button:disabled {
    background-color: #f0f0f0 !important;
    background: #f0f0f0 !important;
    color: #999 !important;
    border: 1px solid #ddd !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    box-shadow: none !important;
    filter: none !important;
    transform: none !important;
}

@media (max-width: 767px) {
    .button-complete-order {
        padding: 8px;
        font-size: 11px;
        gap: 6px;
    }
    .button-complete-order svg {
        width: 14px;
        height: 14px;
    }
}

@media (max-width: 991px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

@media (max-width: 767px) {
    .featured-products-section { padding: 15px 0 30px; } 
    
    .section-title {
        font-size: 20px;
        margin-bottom: 2px;
    }
    
    .section-subtitle {
        font-size: 11px;
        max-width: 90%;
        margin: 0 auto;
    }

    .section-header { margin-bottom: 15px; }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .product-image-container { margin-bottom: 5px; border-radius: 8px; overflow: hidden; }
    
    .product-card-title {
        font-size: 11.5px; 
        margin-bottom: 0px; 
        height: auto;
        min-height: 2.5em; 
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        font-weight: 600;
        color: #312a52;
    }
    
    .product-excerpt { 
        display: block; 
        font-size: 9.5px; 
        line-height: 1.2;
        margin-bottom: 2px;
        -webkit-line-clamp: 1; 
    } 
    
    .product-rating { margin-bottom: 0px; margin-top: 2px; } 
    .product-rating .stars { font-size: 9px; letter-spacing: 0; }
    .product-rating .review-count { font-size: 9px; color: #555; }

    .product-price-box { margin-bottom: 4px; margin-top: 0px; } 
    .product-price-box .price-amount { font-size: 12.5px; }
    .product-price-box del { font-size: 11px; margin-right: 4px; }

    .button-shop-now {
        padding: 6px;
        font-size: 11px;
        border-radius: 50px; 
    }

}

.section-footer {
    margin-top: 25px;
}

.btn-show-more {
    display: inline-block;
    padding: 5px 15px;
    background-color: #312a52;
    border: none;
    color: #fff;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 12px;
    transition: none;
}

.btn-show-more:hover {
    background-color: #312a52;
    color: #fff;
    transform: none;
}

@media (max-width: 767px) {
    .section-footer { margin-top: 15px; }
    .btn-show-more {
        padding: 4px 12px;
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .products-grid {
        gap: 8px;
    }
    .section-title { font-size: 18px; }
}


/* ══════════════════════════════════════════════════════════════
   STYLE 2 — Bordered Card Grid (4 columns)
   Activated via body class .product-card-style-2
   ══════════════════════════════════════════════════════════════ */

/* Grid: 4 columns */
.product-card-style-2 .products-grid,
.products-grid.card-grid-style-2 {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

/* Card wrapper */
.product-card-style-2 .s2-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.product-card-style-2 .s2-card:hover {
    border-color: #ccc;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.07);
}

/* Discount badge — small circle, top-right */
.product-card-style-2 .s2-discount-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
    background-color: #e53935;
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    letter-spacing: -0.3px;
    box-shadow: 0 2px 6px rgba(229, 57, 53, 0.35);
}

/* Image area inside card */
.product-card-style-2 .s2-card .product-image-container {
    margin-bottom: 0;
    border-radius: 0;
    aspect-ratio: 1/1;
    background-color: #f9f9f9;
}

.product-card-style-2 .s2-card .product-img-wrapper img {
    border-radius: 0;
}

/* Product info padding inside card */
.product-card-style-2 .s2-card .product-info {
    padding: 12px 14px 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Title — clean, no stars or excerpt */
.product-card-style-2 .s2-card .product-card-title {
    font-size: 14px;
    font-weight: 600;
    color: #222;
    margin-bottom: 6px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Hide stars and excerpt in style-2 */
.product-card-style-2 .s2-card .product-rating,
.product-card-style-2 .s2-card .product-excerpt {
    display: none !important;
}

/* Price */
.product-card-style-2 .s2-card .product-price-box {
    margin-bottom: 10px;
}

.product-card-style-2 .s2-card .product-price-box .price-amount {
    font-size: 15px;
    font-weight: 700;
    color: #222;
}

/* Actions area */
.product-card-style-2 .s2-actions {
    display: flex;
    flex-direction: column;
    gap: 0px !important;
    margin-top: auto;
}

/* Complete Order button — full width, small border-radius */
.product-card-style-2 .s2-complete-btn {
    border-radius: 6px !important;
    background-color: var(--s2-complete-bg) !important;
    color: #ffffff !important;
    padding: 8px 10px !important;
    font-size: 12.5px !important;
    gap: 6px !important;
    margin: 0 0 4px 0 !important;
}

/* Add to Cart — small border-radius, full width */
.product-card-style-2 .s2-atc-btn {
    width: 100%;
    border-radius: 6px !important;
    background-color: var(--s2-atc-bg) !important;
    color: #ffffff !important;
    padding: 7px 10px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    margin: 0 !important;
}

/* ─── Tablet (<=991px): 3 columns ─── */
@media (max-width: 991px) {
    .product-card-style-2 .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
}

/* ─── Mobile (<=767px): 2 columns, compact ─── */
@media (max-width: 767px) {
    .product-card-style-2 .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .product-card-style-2 .s2-discount-badge {
        width: 30px;
        height: 30px;
        font-size: 9px;
        top: 6px;
        right: 6px;
    }

    .product-card-style-2 .s2-card .product-info {
        padding: 8px 10px 10px;
    }

    .product-card-style-2 .s2-card .product-card-title {
        font-size: 11.5px;
        margin-bottom: 3px;
    }

    .product-card-style-2 .s2-card .product-price-box .price-amount {
        font-size: 12.5px;
    }

    .product-card-style-2 .s2-card .product-price-box {
        margin-bottom: 6px;
    }

    .product-card-style-2 .s2-complete-btn {
        padding: 7px 8px !important;
        font-size: 10.5px !important;
        gap: 4px !important;
    }

    .product-card-style-2 .s2-complete-btn svg {
        width: 13px;
        height: 13px;
    }

    .product-card-style-2 .s2-atc-btn {
        padding: 6px 8px !important;
        font-size: 10px !important;
    }

    .product-card-style-2 .s2-actions {
        gap: 3px;
    }
}

/* ─── Small mobile (<=480px) ─── */
@media (max-width: 480px) {
    .product-card-style-2 .products-grid {
        gap: 6px;
    }

    .product-card-style-2 .s2-card {
        border-radius: 8px;
    }
}



/* ══════════════════════════════════════════════════════════════
   STYLE 3 — Premium Bordered (Compact)
   Activated via body class .product-card-style-3 (pending)
   ══════════════════════════════════════════════════════════════ */

/* Grid: 4 columns */
.products-grid.products-grid-3 {
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.product-card-v3 {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--brand-primary, #e62e2e);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card-v3 .card-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card-v3 .image-boxed-container {
    padding: 6px;
}

.product-card-v3 .product-image-link {
    position: relative;
    display: block;
    aspect-ratio: 1/1;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 8px;
}

.product-card-v3 .image-wrapper {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    overflow: hidden;
}

.product-card-v3 .image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card-v3 .product-details {
    padding: 0 8px 4px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-card-v3 .product-title {
    font-size: 14px;
    font-weight: 700;
    margin: 5px 0 8px;
    line-height: 1.3;
    min-height: 2.6em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-v3 .product-title a {
    color: #111;
    text-decoration: none;
}

.product-card-v3 .product-meta {
    padding-top: 8px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.product-card-v3 .product-rating {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(0, 0, 0, 0.04);
    padding: 3px 8px;
    border-radius: 6px;
}

.product-card-v3 .product-rating .stars {
    color: #ff8a65;
    font-weight: 700;
    font-size: 13px;
}

.product-card-v3 .product-rating .review-count {
    color: #999;
    font-size: 12px;
}

.product-card-v3 .product-discount-badge {
    background: #ff0000;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1;
}

.product-card-v3 .product-price {
    font-weight: 700;
    font-size: 15px;
    color: #111;
}

.product-card-v3 .product-price del {
    color: #999 !important;
    font-weight: 400;
    font-size: 12px;
    margin-right: 5px;
    text-decoration: line-through;
}

.product-card-v3 .product-price ins {
    text-decoration: none;
    color: #ff0000;
}

.product-card-v3 .product-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: auto;
}

.btn-at-v3 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    width: 100%;
}

.product-card-v3 .btn-atc {
    background-color: var(--brand-primary, #ff0000);
    color: #fff;
}

.product-card-v3 .btn-complete {
    background-color: #00ca99;
    color: #fff;
    margin-bottom: 2px;
}

.s3-show-more {
    background-color: var(--brand-primary) !important;
    color: #fff !important;
}

/* ─── Style 3 Mobile Optimization ─── */
@media (max-width: 767px) {
    .products-grid.products-grid-3 {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        margin-left: -12px;
        margin-right: -12px;
    }

    .product-card-v3 .product-title {
        font-size: 11px;
        min-height: auto;
        margin: 4px 0 4px;
    }

    .product-card-v3 .product-meta {
        padding-top: 5px;
        margin-bottom: 8px;
        flex-direction: column;
        align-items: center;
        gap: 4px;
    }

    .product-card-v3 .product-price {
        font-size: 13px;
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        flex-wrap: wrap;
    }

    .product-card-v3 .product-price del {
        font-size: 11px;
        margin-right: 4px;
    }

    .btn-at-v3 {
        padding: 6px;
        font-size: 11px;
        gap: 4px;
        border-radius: 6px;
    }

    .btn-at-v3 svg {
        width: 13px;
        height: 13px;
    }

    .product-card-v3 .product-details {
        padding: 0 6px 4px;
    }

    .product-card-v3 .product-rating .stars {
        font-size: 10.5px;
    }

    .product-card-v3 .product-rating .review-count {
        font-size: 10px;
    }
    
    .product-card-v3 .product-discount-badge {
        font-size: 9px;
        padding: 2px 4px;
        margin-bottom: 2px;
    }
}

/* --- Disabled / Out of Stock Buttons --- */
.is-disabled {
    cursor: not-allowed !important;
    opacity: 0.6 !important;
    filter: grayscale(0.5) contrast(0.8) !important;
    pointer-events: none !important;
    animation: none !important; 
    box-shadow: none !important;
    transform: none !important;
}

.product-card-actions .is-disabled,
.product-actions .is-disabled,
.s2-actions .is-disabled {
    background-color: #e0e0e0 !important;
    color: #888 !important;
    border-color: #d0d0d0 !important;
}
