/**
 * Sweets Website
 * =============================================================
 * File: bestsellers.css
 * Description: Premium best sellers product showcase section
 * =============================================================
 */

/* ── Section ─────────────────────────────────────── */
.c-bestsellers {
    padding: 130px 0 80px;
    /* Consistent cream background */
    position: relative;
}

.c-bestsellers .container {
    position: relative;
    z-index: 2;
}

/* ── Decorative Background Elements ── */
.c-bestsellers::before {
    content: '';
    position: absolute;
    top: 5%;
    left: -40px;
    width: clamp(150px, 20vw, 300px);
    height: 100%;
    background-image: url('../../images/homepage/ChatGPT_Image_Mar_10__2026__02_50_06_PM-removebg-preview 12.png');
    background-repeat: no-repeat;
    background-size: contain;
    background-position: left top;
    pointer-events: none;
    z-index: 1;
    opacity: 0.6;
}

.c-bestsellers::after {
    content: '';
    position: absolute;
    bottom: 5%;
    right: -40px;
    width: clamp(150px, 20vw, 300px);
    height: 100%;
    background-image: url('../../images/homepage/ChatGPT_Image_Mar_10__2026__02_50_06_PM-removebg-preview 14.png');
    background-repeat: no-repeat;
    background-size: contain;
    background-position: right bottom;
    pointer-events: none;
    z-index: 1;
    opacity: 0.6;
}

/* ── Section Header ──────────────────────────────── */
.c-bestsellers__header {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;
    gap: 0.5rem;
    text-align: center;
}

.c-bestsellers__title {
    font-family: var(--ff-heading, 'Quando', serif);
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    color: #7b1d1d;
    font-weight: 700;
    margin: 0;
}

/* ── Category Tabs ───────────────────────────────── */
.c-bestsellers__tabs {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: clamp(1rem, 3vw, 2.5rem);
    margin: 1rem 0 0 0;
    flex-wrap: wrap;
    width: 100%;
}

.c-bestsellers__tab {
    background: none;
    border: none;
    padding: 8px 0;
    font-size: 14px;
    font-weight: 600;
    color: #555;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.c-bestsellers__tab::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2.5px;
    background: #d67a18;
    transition: width 0.3s ease;
    border-radius: 4px;
}

.c-bestsellers__tab.active {
    color: #d67a18;
    font-weight: 700;
}

.c-bestsellers__tab.active::after {
    width: 100%;
}

.c-bestsellers__tab:hover {
    color: #d67a18;
}

/* ── Product Card ─────────────────────────────────── */
#bsProductGrid {
    justify-content: center;
}

.c-product-card-v2 {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e8e1d5;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 10px 25px rgba(123, 29, 29, 0.04);
}

.c-product-card-v2:hover {
    box-shadow: 0 15px 35px rgba(123, 29, 29, 0.12);
    transform: translateY(-5px);
}

.c-product-card-v2__img-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background: #fdfaf5;
}

.c-product-card-v2 .c-bestseller-zoom-img {
    transition: transform 1.2s cubic-bezier(0.19, 1, 0.22, 1);
}

.c-product-card-v2:hover .c-bestseller-zoom-img,
.c-product-card-v2:active .c-bestseller-zoom-img {
    transform: scale(1.15);
}

/* Badges */
.c-product-card-v2__badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #f39a1f;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 5px 12px;
    border-radius: 4px;
    z-index: 2;
    text-transform: uppercase;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    max-width: calc(100% - 58px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.c-product-card-v2__badge--offer {
    background: #1caf18;
}

/* Wishlist */
.c-product-card-v2__heart {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    background: #fff;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f39a1f;
    /* Branded Orange */
    font-size: 1rem;
    cursor: pointer;
    z-index: 2;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

.c-product-card-v2__heart:hover {
    transform: scale(1.15);
    color: #d67a18;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.12);
}

/* Card Body */
.c-product-card-v2__body {
    padding: 1.25rem;
    background: #f7f5f1;
    /* Warm light beige Body */
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.c-product-card-v2__rating {
    display: flex;
    align-items: center;
    gap: 8px;
}

.c-product-card-v2__score,
.c-product-card-v2__label {
    color: #1b2f84;
    /* Deep Professional Blue */
    font-weight: 700;
    font-size: 0.85rem;
}

.c-product-card-v2__label:last-child {
    color: #888;
    font-weight: 500;
}

.c-product-card-v2__stars {
    color: #f39a1f;
    font-size: 0.9rem;
    letter-spacing: 2px;
    margin-bottom: 0.25rem;
}

.c-product-card-v2__title {
    margin: 0;
    line-height: 1.3;
}

.c-product-card-v2__title-link {
    font-family: var(--ff-heading, serif);
    font-size: 1.2rem;
    font-weight: 700;
    color: #222 !important;
    text-decoration: none;
    transition: color 0.3s ease;
}

.c-product-card-v2:hover .c-product-card-v2__title-link {
    color: #7b1d1d !important;
}

.c-product-card-v2__weight {
    margin-top: 0.5rem;
}

/* Price Row */
.c-product-card-v2__price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: 0.5rem;
}

.c-product-card-v2__price-current {
    font-size: 1.15rem;
    font-weight: 800;
    color: #1b2f84;
}

.c-product-card-v2__price-old {
    font-size: 0.9rem;
    color: #888;
    text-decoration: line-through;
}

.c-product-card-v2__weight-selector {
    display: flex;
    gap: 6px;
}

.c-weight-btn {
    flex: 1;
    background: #e6e1da;
    border: 1px solid #dcd3c7;
    border-radius: 4px;
    padding: 5px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
}

.c-weight-btn.active,
.c-weight-btn:hover {
    background: #fff;
    border-color: #7b1d1d;
    color: #7b1d1d;
}

/* Action Buttons */
.c-product-card-v2__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 1rem;
}

.c-btn-cart,
.c-btn-book {
    padding: 10px 5px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.9rem;
    text-align: center;
    transition: all 0.3s ease;
}

.c-btn-cart {
    background: #fff;
    border: 1.5px solid #dcd3c7;
    color: #444 !important;
}

.c-btn-cart:hover {
    background: #7b1d1d;
    color: #fff !important;
    border-color: #7b1d1d;
    transform: translateY(-2px);
}

.c-btn-book {
    background: linear-gradient(90deg, #7A1E1E 0%, #C65D00 100%);
    border: none;
    color: #fff !important;
    box-shadow: 0 4px 10px rgba(123, 29, 29, 0.2);
}

.c-btn-book:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(123, 29, 29, 0.3);
    filter: brightness(1.1);
}

/* ── Responsive Rules ────────────────────────────────────────── */

@media (max-width: 991.98px) {

    .c-bestsellers::before,
    .c-bestsellers::after {
        display: none !important;
    }

    .c-bestsellers__decorative-line {
        display: none;
    }

    .c-bestsellers__title {
        font-size: 1.75rem;
    }
}

@media (max-width: 767.98px) {
    .c-bestsellers {
        padding: 40px 0;
    }

    .c-bestsellers__header {
        margin-bottom: 2rem;
    }

    .c-bestsellers__subtitle {
        margin-bottom: 1.5rem;
    }

    .c-bestsellers__tabs {
        gap: 1.25rem;
        justify-content: center;
    }

    .c-product-card-v2__body {
        padding: 1rem 0.85rem;
    }

    .c-product-card-v2__title-link {
        font-size: 1rem;
    }

    .c-btn-cart,
    .c-btn-book {
        font-size: 0.8rem;
        padding: 8px 4px;
    }
}

@media (max-width: 575.98px) {
    .c-bestsellers__tabs {
        gap: 1rem;
    }

    .c-bestsellers__tab {
        font-size: 12px;
    }

    .c-product-card-v2__img-wrap {
        aspect-ratio: 1 / 1;
    }
}

@media (max-width: 426px) {
    .c-bestsellers {
        padding: 0.75rem 0 1.5rem !important;
    }

    .c-bestsellers .container {
        padding-left: 12px;
        padding-right: 12px;
    }

    .c-bestsellers__header {
        margin-bottom: 1rem;
        gap: 0.3rem;
    }

    .c-bestsellers__tabs {
        margin-top: 0.4rem;
    }

    .row-cols-2>* {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        width: 50% !important;
    }

    .c-product-card-v2__body {
        padding: 1rem !important;
    }

    .c-product-card-v2__rating {
        flex-wrap: wrap;
        gap: 6px;
    }

    .c-product-card-v2__score,
    .c-product-card-v2__label {
        font-size: 0.9rem !important;
    }

    .c-product-card-v2__stars {
        font-size: 0.95rem !important;
        letter-spacing: 2px;
    }

    .c-product-card-v2__title-link {
        font-size: 1.25rem !important;
    }

    .c-product-card-v2__actions {
        /* Stack buttons vertically */
        gap: 12px !important;
        margin-top: 0px !important;
    }

    .c-btn-cart,
    .c-btn-book {
        padding: 12px 10px !important;
        font-size: 1rem !important;
        width: 100% !important;
        min-height: 46px !important;
        border-radius: 8px !important;
    }
}

/* ── Optimized Compact Styles (No Inline CSS) ── */

.c-bestsellers__title-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: clamp(10px, 2vw, 20px);
}

 .c-bestsellers__title-line {
    flex: 1;
    height: 3.5px;
    background-color: #6C2C23;
    border-radius: 4px;
    max-width: 180px;
} 

.c-bestsellers__title-icon {
    height: 40px;
    object-fit: contain;
}

.c-bestsellers__title-main {
    color: #6C2C23;
    font-size: clamp(1.4rem, 6vw, 3.8rem);
    line-height: 1;
    margin: 0;
}

.c-bestsellers__subtitle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #D76F11;
    font-family: 'Inter', sans-serif;
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    font-weight: 600;
    margin-top: 5px;
}

.c-bestsellers__subtitle-icon {
    color: #E6424D !important;
    font-size: 1.1em;
}

/* Compact Card Body */
.c-product-card-v2__body--compact {
    padding: 8px 10px 12px !important;
    background: #f7f5f1;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.c-product-card-v2__rating--compact {
    font-size: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-bottom: 6px;
}

.c-product-card-v2__rating--compact .score,
.c-product-card-v2__rating--compact .label {
    color: #0b3b84;
    font-weight: 800;
}

.c-product-card-v2__rating--compact .count {
    color: #888;
}

.c-product-card-v2__title--compact {
    text-align: center;
    font-family: var(--ff-poppins) !important;
  font-size: clamp(0.8rem, 2.5vw, 1rem);
  
    line-height: 1.3;
    min-height: 2.6em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-bottom: 0.75rem;
}

.c-product-card-v2__title--compact a {
    color: #222;
    font-family: var(--ff-poppins) !important;
    text-decoration: none;
}

/* Align bottom content using flex auto margin */
.weight-content {
    margin-top: auto;
}

.c-weight-selector--compact {
    display: flex;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.c-weight-btn--compact {
    flex: 1;
    border: none;
    font-size: 0.65rem;
    padding: 4px 0;
    font-weight: 700;
    cursor: pointer;
    background: transparent;
    color: #888;
}

.c-weight-btn--compact.active {
    background: #EBE4D5;
    color: #333;
}

.c-weight-btn--compact + .c-weight-btn--compact {
    border-left: 1px solid #ddd;
}

.c-price--compact {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 12px;
}

.c-price--compact .current {
    color: #6C2C23;
    font-weight: 800;
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.c-price--compact .old {
    color: #aaa;
    text-decoration: line-through;
    font-size: 0.7rem;
    white-space: nowrap;
}

.c-actions--compact {
    display: flex;
    gap: 4px;
}

.c-btn-cart--compact,
.c-btn-book--compact {
    flex: 1;
    text-align: center;
    padding: 8px 6px;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 4px;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.c-btn-cart--compact {
    background: #fff;
    border: 1px solid #bbb;
    color: #333;
}

.c-btn-book--compact {
    background: linear-gradient(90deg, #7A1E1E 0%, #C65D00 100%);
    color: #fff !important;
    border: 1px solid #9a3d07;
}

@media (max-width: 426px) {
    .c-product-card-v2__badge {
        top: 10px;
        left: 10px;
        font-size: 0.65rem;
        padding: 4px 10px;
        max-width: calc(100% - 54px);
    }

    .c-product-card-v2__heart {
        top: 10px;
        right: 10px;
        width: 30px;
        height: 30px;
    }

    .c-btn-cart--compact,
    .c-btn-book--compact {
        min-height: 44px;
        font-size: 0.85rem;
    }

    .c-bestsellers__title-icon {
        height: 20px;
    }
     .c-bestsellers__title-wrap{
        gap: 8px;
    }   
    .c-bestsellers__title-line {
        height: 2px;
        max-width: 60px;
    }
    .c-bestsellers__subtitle{
        font-size: 16px;
    }  
    .c-bestsellers__title-main{
        font-size: 20px;
    }
}

@media (max-width: 375px) {
    .c-bestsellers {
        padding: 0.75rem 0 1.5rem !important;
    }

    .c-bestsellers__header {
        margin-bottom: 0.95rem;
    }

    .c-price--compact {
        margin-bottom: 10px;
    }

    .c-price--compact .current {
        font-size: 1rem;
        font-weight: 900;
    }

    .c-actions--compact {
        flex-direction: column;
        gap: 8px;
    }

    .c-btn-cart--compact,
    .c-btn-book--compact {
        width: 100%;
        min-height: 44px;
        font-size: 0.85rem;
        border-radius: 8px;
    }

    .c-bestsellers__tabs {
        gap: 0.7rem;
    }

    .c-bestsellers__tab {
        font-size: 11px;
    }

    .c-product-card-v2__title--compact {
        font-size: 13px !important;
        min-height: 3.2em !important;
        -webkit-line-clamp: 2 !important;
        line-clamp: 2 !important;
        margin-bottom: 0.25rem !important;
    }
    .c-bestsellers__title-main {
        font-size: 17px;
    }
    .c-bestsellers__subtitle {
        font-size: 14px;
    }
    .c-bestsellers__title-line {
        max-width: 50px;
    }
}

@media (max-width: 320px) {
   .c-bestsellers__title-icon {
        height: 16px;
        
    }
    .c-bestsellers__title-wrap{
        margin-top: 20px;
        gap: 15px;
    }      
    .c-bestsellers__subtitle{
        font-size: 15px;
                margin-bottom: 5px;
    }  
    .c-bestsellers__title-main{
        font-size: 20px;
    }
    .c-bestsellers__title-line {
        max-width: 40px;
    }
    .c-product-card-v2__title--compact {
        font-size: 12px !important;
        min-height: 3.2em !important;
        -webkit-line-clamp: 2 !important;
        line-clamp: 2 !important;
        margin-bottom: 0.5rem !important;
    }
    .c-bestsellers__view-all-wrap{
       width: 50% !important;
    }
}
