/* 
 * Sweets Website
 * =============================================================
 * File: product-catalog.css
 * Description: Styles for the product filter bar and catalog grid
 * =============================================================
 */

.c-product-catalog {
    padding: 80px 0;
    color: #fff;
    position: relative;
}

.c-catalog-title {
    font-family: var(--ff-heading, serif);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    color: #801a1a; /* Prominent red title */
    text-align: left;
    margin-bottom: 40px;
    letter-spacing: normal;
    word-spacing: normal;
}

/* ── Filter Bar ── */
.c-catalog-filters {
    margin-bottom: 50px;
}

.c-catalog-filters__top {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.c-category-pills {
    display: flex;
    gap: 12px;
}

.c-pill {
    padding: 8px 20px;
    border: 1px solid #331111;
    background: transparent;
    color: #999;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.3s ease;
    cursor: pointer;
    white-space: nowrap;
}

.c-pill.active {
    background: #6b1b1b;
    border-color: #6b1b1b;
    color: #fff;
}

.c-pill:hover:not(.active) {
    border-color: #6b1b1b;
    color: #fff;
}

.c-catalog-filters__bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #222;
    padding-top: 25px;
}

.c-filter-dropdowns {
    display: flex;
    gap: 15px;
}

.c-dropdown__btn {
    padding: 8px 16px;
    background-color: #f6d7b8; /* Matching background */
    
    border-radius: 6px;
    font-size: 14px;
    color: #7A1E1E;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.c-dropdown__btn i {
    font-size: 10px;
    color: #801a1a; /* Red icon arrow */
}

.c-dropdown__btn:hover {
    border-color: #801a1a;
}

.c-sort-selector {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    font-weight: 700;
    color: #888;
}

.c-dropdown--sort .c-dropdown__btn {
    padding: 6px 12px;
    background-color: #f6d7b8;
    border-color: #331111;
}

/* Dropdown Menu Styles - Force Hiding by Default */
.c-dropdown {
    position: relative !important;
}

.c-dropdown__menu {
    position: absolute !important;
    top: calc(100% + 8px) !important;
    left: 0 !important;
    width: max-content !important;
    min-width: 180px !important;
    background: #ffffff !important;
    border: 1px solid rgba(0,0,0,0.1) !important;
    border-radius: 12px !important;
    box-shadow: 0 15px 35px rgba(0,0,0,0.15) !important;
    padding: 12px 0 !important;
    z-index: 9999 !important;
    display: none !important; /* Initial State */
    animation: dropdownFadeIn 0.25s ease-out;
}

.c-dropdown__menu.show {
    display: block !important;
}

.c-dropdown__item {
    display: block !important; /* Force Vertical */
    width: 100% !important;
    padding: 12px 24px !important;
    font-size: 14px !important;
    color: #444444 !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    text-align: left !important;
}

.c-dropdown__item:hover {
    background-color: #fcf8f3;
    color: #A02020;
    padding-left: 24px;
}

.c-dropdown__item.active {
    font-weight: 700 !important;
    color: #7A1E1E !important;
    background-color: #fcf8f3 !important;
}

/* Toggle States */
.js-dropdown-toggle.is-active i {
    transform: rotate(180deg) !important;
}

.js-dropdown-toggle.is-active {
    background-color: #fce8d5 !important;
    border-color: #801a1a !important;
}

@keyframes dropdownFadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── Product Grid ── */
/* Grid handled by Bootstrap row and col classes */

@media (max-width: 992px) {
    .c-catalog-title {
        font-size: 2.2rem;
        margin-bottom: 28px;
        line-height: 1.2;
    }

    .c-catalog-filters__bottom {
        flex-direction: column;
        gap: 20px;
        align-items: center;
        text-align: center;
    }

    .c-filter-dropdowns {
        justify-content: center;
        width: 100%;
    }
}

@media (max-width: 576px) {
    .c-catalog-title {
        font-size: 1.8rem;
        margin-bottom: 22px;
    }

    .c-catalog-filters {
        margin-bottom: 30px;
    }

    .c-category-pills {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .c-pill {
        padding: 6px 14px;
        font-size: 12px;
        flex: 1 1 calc(50% - 10px);
        max-width: 150px;
        text-align: center;
    }

    .c-filter-dropdowns {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .c-dropdown__btn {
        padding: 6px 12px;
        font-size: 12px;
    }

    .c-sort-selector {
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }

    .c-sort-selector span {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .c-pill {
        flex: 1 1 45%;
    }

    .c-dropdown {
        flex: 1 1 45%;
    }

    .c-dropdown__btn {
        width: 100%;
        justify-content: space-between;
    }

    .c-sort-selector .c-dropdown {
        flex: 0 0 auto;
        width: auto;
    }
}

/* ── Premium Product Card ── */
.c-product-card-premium {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.c-product-card-premium:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.c-product-card-premium__top-actions {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    display: block;
    z-index: 10;
    pointer-events: none;
}

.c-badge.c-badge--bestseller {
    display: inline-flex;
    align-items: center;
    line-height: 1;
    flex: 0 0 auto;
    background: #f59e0b;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 4px;
    text-transform: uppercase;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    pointer-events: auto;
}

.c-wishlist-btn {
    position: absolute;
    top: 0;
    right: 0;
    width: 34px;
    height: 34px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f59e0b;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: background 0.3s ease, color 0.3s ease;
    z-index: 11;
    pointer-events: auto;
}

.c-wishlist-btn:hover {
    background: #f59e0b;
    color: #fff;
}

.c-product-card-premium__image-wrap {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

@media (max-width: 575px) {
    .c-product-card-premium__image-wrap {
        aspect-ratio: 4 / 3; /* Shorter image on mobile */
    }

    .c-product-card-premium__content {
        padding: 10px !important;
    }

    .c-product-card-premium__title {
        font-size: 12px !important;
        margin-bottom: 4px !important;
        min-height: 0;
        display: block;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .c-product-card-premium__desc {
        display: none !important; /* Hide description in 2-column mobile to save space */
    }

    .c-product-card-premium__rating-row {
        gap: 4px !important;
        margin-bottom: 4px !important;
    }

    .c-product-card-premium__rating-score,
    .c-product-card-premium__rating-label {
        font-size: 11px !important;
    }

    .c-product-card-premium__rating-count {
        display: none !important;
    }

    .c-product-card-premium__stars {
        margin-bottom: 8px !important;
    }

    .c-product-card-premium__stars i {
        font-size: 10px !important;
    }

    .c-product-card-premium__price-row {
        margin-bottom: 12px !important;
        gap: 2px !important;
        flex-wrap: nowrap;
        align-items: baseline;
        min-width: 0;
    }

    .c-product-card-premium__price-current {
        font-size: 1.1rem !important;
        white-space: nowrap;
    }

    .c-product-card-premium__price-currency {
        font-size: 12px !important;
        white-space: nowrap;
    }

    .c-product-card-premium__price-old {
        font-size: 0.68rem !important;
        margin-left: 2px !important;
        flex-basis: auto;
        white-space: nowrap;
        opacity: 0.92;
    }

    .c-product-card-premium__weight {
        margin-bottom: 12px !important;
    }

    .weight-select {
        font-size: 11px !important;
        padding: 4px 8px !important;
        background-color: #f8f9fa;
        border-color: #ddd;
        border-radius: 4px;
        font-weight: 700;
        color: #333;
    }

    .c-product-card-premium__actions {
        flex-direction: column;
        gap: 6px !important;
    }

    .c-product-card-premium__actions .btn {
        width: 100%;
        padding: 6px !important;
        font-size: 10px !important;
    }

    .c-badge.c-badge--bestseller {
        font-size: 9px !important;
        padding: 2px 6px !important;
        top: 10px !important;
        left: 10px !important;
    }

    .c-wishlist-btn {
        width: 28px !important;
        height: 28px !important;
        top: 10px !important;
        right: 10px !important;
    }

    .c-wishlist-btn i {
        font-size: 12px !important;
    }
}

.c-product-card-premium__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.c-product-card-premium__content {
    padding: 12px; /* Reduced from 20px for 6-column density */
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.c-product-card-premium__rating-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.c-product-card-premium__rating-score {
    font-size: 13px;
    font-weight: 800;
    color: #1e3a8a;
}

.c-product-card-premium__rating-label {
    font-size: 13px;
    font-weight: 700;
    color: #1e3a8a;
}

.c-product-card-premium__rating-count {
    font-size: 11px;
    color: #888;
}

.c-product-card-premium__stars {
    display: flex;
    gap: 3px;
    margin-bottom: 15px;
}

.c-product-card-premium__stars i {
    font-size: 13px;
    color: #ddd;
}

.c-product-card-premium__stars i.active {
    color: #f59e0b;
}

.c-product-card-premium__title {
    font-family: var(--ff-poppins) !important;
    font-size: 1rem;
    font-weight: 800;
    color: #111;
    margin-bottom: 8px;
    line-height: 1.35;
    min-height: 0;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.c-product-card-premium__desc {
    font-size: 11px; /* Reduced from 13px */
    color: #777;
    line-height: 1.4;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.c-product-card-premium__weight-selector {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.weight-btn {
    padding: 4px 8px; /* Reduced padding */
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 4px;
    font-size: 11px; /* Reduced from 13px */
    font-weight: 700;
    color: #555;
    cursor: pointer;
    transition: all 0.2s ease;
}

.weight-btn.active {
    background: #f2f2f2;
    border-color: #333;
    color: #111;
}

.c-product-card-premium__price-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 20px;
}

.c-product-card-premium__price-currency {
    font-size: 18px;
    font-weight: 700;
    color: #222;
}

.c-product-card-premium__price-current {
    font-size: 20px; /* Reduced from 24px */
    font-weight: 800;
    color: #222;
    white-space: nowrap;
}

.c-product-card-premium__price-old {
    font-size: 14px;
    color: #aaa;
    text-decoration: line-through;
    margin-left: 4px;
    white-space: nowrap;
}

.c-product-card-premium__actions {
    display: flex;
    gap: 6px; /* Reduced from 10px */
    margin-top: auto;
}

.c-product-card-premium__actions .btn {
    flex: 1;
    padding: 10px;
    font-size: 10px;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.btn-cart {
    background: #fff;
    color: #333;
    border-color: #ddd !important;
}

.btn-cart:hover {
    background: #f9f9f9;
    border-color: #999 !important;
}

.btn-book {
    background: linear-gradient(90deg, #7A1E1E 0%, #C65D00 100%);
    color: #fff;
    border-color: #9a3d07 !important;
}

.btn-book:hover {
    background: linear-gradient(90deg, #681717 0%, #ae4f00 100%);
}
/* 425px Micro-adjustments for Product Catalog */
@media (max-width: 426px) {
    .c-catalog-title {
        font-size: 0.80rem !important;
        margin-bottom: 18px !important;
    }

    .c-product-catalog {
        padding: 40px 0 !important;
    }

    /* Force 1 column for products on small mobile */
    .c-product-catalog .col-6 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    .c-product-card-premium__image-wrap {
        aspect-ratio: 16 / 9 !important; /* Wider image for 1-column layout */
    }

    .c-product-card-premium__title {
       
        min-height: 0 !important;
        display: block !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .c-product-card-premium__price-current {
        font-size: 1.12rem !important;
    }

    .c-product-card-premium__price-old {
        font-size: 0.66rem !important;
    }

    .c-pill {
        font-size: 11px !important;
        padding: 6px 10px !important;
        flex: 1 1 30% !important;
    }
}
/* 375px Micro-adjustments for Product Catalog */
@media (max-width: 375px) {
   .c-product-card-premium__title {
                font-size: 0.70rem !important;
    }

   .c-product-card-premium__image-wrap {
        aspect-ratio: 14 / 10 !important; /* Wider image for 1-column layout */
    }
}
