/* ==========================================================================
   SWEETS CATEGORY PAGE STYLES
   ========================================================================== */

body {
    background-color: #fdfbf9;
}

/* --- Hero Section --- */
.sweets-hero {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #fffaf6 0%, #fae6cb 100%);
    border-radius: 20px;
    margin-top: 20px;
    padding: 60px;
    gap: 40px;
    box-shadow: 0 10px 30px rgba(232, 93, 4, 0.05);
    background-size: cover !important;
    background-position: right center !important;
    background-repeat: no-repeat !important;
}
.sweets-hero-content {
    flex: 0 0 60%;
}
.hero-script {
    font-family: 'Great Vibes', cursive;
    font-size: 32px;
    color: #e54d60;
    margin-bottom: -10px;
    display: block;
}
.hero-title {
    font-size: 48px;
    font-weight: 800;
    color: #4a2f1d;
    line-height: 1.1;
    margin-bottom: 20px;
}
.highlight-orange {
    color: #e85d04;
}
.hero-desc {
    font-size: 16px;
    color: #666;
    margin-bottom: 40px;
    max-width: 400px;
    line-height: 1.5;
}
.hero-trust-icons {
    display: flex;
    gap: 30px;
}
.hero-trust-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: #4a2f1d;
}
.hero-trust-item i {
    width: 24px;
    height: 24px;
    color: #e85d04;
}
.sweets-hero-image {
    display: none;
}

/* --- Breadcrumbs --- */
.breadcrumbs-category {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #888;
    padding: 20px 0;
}
.breadcrumbs-category a {
    color: #4a2f1d;
    text-decoration: none;
    font-weight: 500;
}
.breadcrumbs-category svg {
    width: 14px;
    height: 14px;
}

/* --- Subcategories Carousel --- */
.subcategories-section {
    padding: 40px 0;
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
}
.subcategories-scroll {
    display: flex;
    gap: 30px;
    overflow-x: auto;
    padding: 10px 0;
    scrollbar-width: none; /* Firefox */
}
.subcategories-scroll::-webkit-scrollbar {
    display: none; /* Chrome */
}
.subcategory-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #4a2f1d;
    font-weight: 600;
    font-size: 14px;
    min-width: 100px;
    transition: all 0.2s;
}
.subcategory-icon-wrapper {
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 2px solid transparent;
    transition: all 0.2s;
    overflow: hidden;
    padding: 12px;
}
.subcategory-icon-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    mix-blend-mode: multiply;
}
.subcategory-item:hover .subcategory-icon-wrapper {
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    transform: translateY(-5px);
}
.subcategory-item.active .subcategory-icon-wrapper {
    border-color: #e54d60;
    box-shadow: 0 0 0 4px #fff0f2;
}
.subcategory-item.active span {
    color: #e54d60;
}
.scroll-right-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4a2f1d;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    flex-shrink: 0;
}
.scroll-right-btn:hover {
    border-color: #e85d04;
    color: #e85d04;
}

/* --- Layout --- */
.category-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

/* --- Sidebar Filters --- */
.filters-sidebar {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    border: 1px solid #f0f0f0;
    align-self: start;
}
.filters-title {
    font-size: 18px;
    font-weight: 800;
    color: #4a2f1d;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eee;
}
.filter-group {
    margin-bottom: 24px;
    border-bottom: 1px solid #eee;
    padding-bottom: 24px;
}
.filter-group:last-of-type {
    border-bottom: none;
    margin-bottom: 30px;
}
.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    margin-bottom: 16px;
}
.filter-header h4 {
    font-size: 14px;
    font-weight: 700;
    color: #4a2f1d;
}
.filter-header svg {
    width: 16px;
    height: 16px;
    color: #888;
}
.filter-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.filter-group.is-collapsed .filter-body {
    display: none;
}

.filter-group.is-collapsed .filter-header {
    margin-bottom: 0;
}

.filter-group.is-collapsed .filter-header svg {
    transform: rotate(180deg);
}

.filter-empty-state {
    display: none;
    grid-column: 1 / -1;
    padding: 48px 20px;
    text-align: center;
    color: #75665c;
    background: #fff;
    border: 1px dashed #e6d7cd;
    border-radius: 12px;
}

.filter-empty-state.is-visible {
    display: block;
}

/* Custom Checkbox / Radio */
.custom-radio, .custom-checkbox {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 28px;
    cursor: pointer;
    font-size: 14px;
    user-select: none;
    color: #666;
}
.custom-radio input, .custom-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}
.radio-mark, .checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 18px;
    width: 18px;
    background-color: #f8f8f8;
    border: 1px solid #ddd;
}
.radio-mark {
    border-radius: 50%;
}
.checkmark {
    border-radius: 4px;
}
.custom-radio:hover input ~ .radio-mark, .custom-checkbox:hover input ~ .checkmark {
    background-color: #eee;
}
.custom-radio input:checked ~ .radio-mark, .custom-checkbox input:checked ~ .checkmark {
    background-color: #e85d04;
    border-color: #e85d04;
}
.radio-mark:after, .checkmark:after {
    content: "";
    position: absolute;
    display: none;
}
.custom-radio input:checked ~ .radio-mark:after, .custom-checkbox input:checked ~ .checkmark:after {
    display: block;
}
.custom-radio .radio-mark:after {
    top: 5px;
    left: 5px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: white;
}
.custom-checkbox .checkmark:after {
    left: 6px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.label-text {
    flex: 1;
    display: flex;
    justify-content: space-between;
}
.custom-radio input:checked ~ .label-text {
    font-weight: 700;
    color: #e85d04;
}
.count {
    color: #999;
    font-size: 13px;
    font-weight: 400;
}

/* Price Slider */
.price-slider-container {
    padding: 10px 0;
}
.price-slider {
    width: 100%;
    accent-color: #e85d04;
}
.price-range-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
    font-size: 12px;
    color: #666;
    font-weight: 600;
}
.filter-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}
.btn-clear {
    background: transparent;
    border: none;
    color: #e85d04;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    text-decoration: underline;
}

/* --- Main Content Header --- */
.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}
.category-header h2 {
    font-size: 28px;
    font-weight: 800;
    color: #4a2f1d;
    margin-bottom: 4px;
}
.category-header p {
    font-size: 14px;
    color: #888;
}
.sort-by {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #666;
}
.sort-by select {
    padding: 10px 16px;
    border: 1px solid #eee;
    border-radius: 8px;
    background: white;
    font-size: 14px;
    color: #4a2f1d;
    font-weight: 600;
    outline: none;
    cursor: pointer;
}

/* --- Products Grid --- */
.products-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}
.product-card {
    background: white;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    padding: 16px;
    display: flex;
    flex-direction: column;
    position: relative;
}
.product-card:hover {
    box-shadow: 0 10px 25px rgba(0,0,0,0.06);
    border-color: #fae6cb;
    transform: none;
}
.badge {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 4px 10px;
    border-radius: 30px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 2;
}
.badge-best {
    background: #10b981;
    color: white;
}
.badge-new {
    background: #f59e0b;
    color: white;
}
.product-img-wrapper {
    background: #fdfbf9;
    border-radius: 8px;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    padding: 12px;
}
.product-img-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    mix-blend-mode: multiply;
}
.product-info {
    text-align: left;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.product-title {
    font-size: 16px;
    font-weight: 700;
    color: #4a2f1d;
    margin-bottom: 4px;
}
.product-weight {
    font-size: 13px;
    color: #888;
    margin-bottom: 8px;
}
.product-price {
    font-size: 18px;
    font-weight: 800;
    color: #4a2f1d;
    margin-bottom: 16px;
    margin-top: auto;
}
.btn-add-cart {
    width: 100%;
    justify-content: center;
    padding: 10px;
    font-size: 13px;
    gap: 8px;
    border-radius: 8px;
}
.btn-add-cart svg {
    width: 16px;
    height: 16px;
}

/* --- Pagination --- */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}
.page-btn {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1px solid #eee;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}
.page-btn:hover {
    border-color: #e85d04;
    color: #e85d04;
}
.page-btn.active {
    background: #e85d04;
    color: white;
    border-color: #e85d04;
}
.page-btn svg {
    width: 16px;
    height: 16px;
}
.page-dots {
    color: #888;
    font-weight: 600;
}

/* --- Banners (Re-use from Cart) --- */
.banners-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}
.promo-banner {
    position: relative;
    border-radius: 8px;
    padding: 40px;
    overflow: hidden;
    display: flex;
    align-items: center;
}
.banner-dark {
    background: #6a4124;
    color: white;
}
.banner-dark h3 {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.2;
}
.banner-dark p {
    font-size: 14px;
    margin-bottom: 24px;
    opacity: 0.9;
    line-height: 1.5;
}
.banner-light {
    background: white;
    border: 1px solid #fae6cb;
    color: #4a2f1d;
}
.banner-light h3 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 12px;
    line-height: 1.2;
}
.banner-light p {
    font-size: 14px;
    margin-bottom: 24px;
    color: #666;
    line-height: 1.5;
}
.banner-content {
    position: relative;
    z-index: 2;
    max-width: 85%;
}
.banner-icon {
    position: absolute;
    right: 20px;
    bottom: -20px;
    z-index: 1;
}
.btn-white {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: white;
    color: #4a2f1d;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    text-decoration: none;
}
.btn-white:hover {
    background: #fae6cb;
}
.btn-outline-pink {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: 1px solid #e54d60;
    background: transparent;
    color: #e54d60;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}
.btn-outline-pink:hover {
    background: #fff0f2;
}

/* Fix Base button primary for filters */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: #e85d04;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
}
.btn-primary:hover {
    background: #dc2f02;
}
.btn-outline-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: 1px solid #e85d04;
    background: transparent;
    color: #e85d04;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}
.btn-outline-primary:hover {
    background: #fdf3ed;
}

/* ==========================================================================
   MOBILE RESPONSIVENESS
   ========================================================================== */

/* Tablet (768px and below) */
@media (max-width: 768px) {
    /* Hero Section */
    .sweets-hero {
        flex-direction: column;
        padding: 40px 24px;
        gap: 30px;
    }
    .hero-script {
        font-size: 28px;
    }
    .hero-title {
        font-size: 36px;
    }
    .hero-desc {
        max-width: 100%;
        font-size: 15px;
    }
    .hero-trust-icons {
        gap: 20px;
        flex-wrap: wrap;
        justify-content: center;
    }
    .hero-trust-item {
        font-size: 11px;
    }
    .sweets-hero-image img {
        max-height: 300px;
    }

    /* Subcategories */
    .subcategories-section {
        padding: 30px 0;
    }
    .subcategory-item {
        min-width: 90px;
        font-size: 13px;
    }
    .subcategory-icon-wrapper {
        width: 70px;
        height: 70px;
    }

    /* Layout */
    .category-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* Sidebar Filters */
    .filters-sidebar {
        display: block !important;
        width: 100%;
        box-sizing: border-box;
    }

    /* Category Header */
    .category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    .category-header h2 {
        font-size: 24px;
    }
    .sort-by {
        width: 100%;
        justify-content: space-between;
    }
    .sort-by select {
        flex: 1;
    }

    /* Products Grid */
    .products-grid-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
    .product-card {
        padding: 14px;
    }
    .product-img-wrapper {
        height: 140px;
    }
    .product-title {
        font-size: 14px;
    }
    .product-weight {
        font-size: 12px;
    }
    .product-price {
        font-size: 16px;
    }
    .btn-add-cart {
        font-size: 12px;
        padding: 8px;
    }

    /* Banners */
    .banners-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .promo-banner {
        padding: 30px 24px;
    }
    .banner-dark h3 {
        font-size: 22px;
    }
    .banner-light h3 {
        font-size: 20px;
    }
}

/* Mobile (576px and below) */
@media (max-width: 576px) {
    /* Hero Section */
    .sweets-hero {
        padding: 30px 16px;
        border-radius: 16px;
    }
    .hero-script {
        font-size: 24px;
    }
    .hero-title {
        font-size: 28px;
    }
    .hero-desc {
        font-size: 14px;
        margin-bottom: 24px;
    }
    .hero-trust-icons {
        gap: 16px;
    }
    .hero-trust-item {
        font-size: 10px;
    }
    .hero-trust-item i {
        width: 20px;
        height: 20px;
    }
    .sweets-hero-image img {
        max-height: 250px;
    }

    /* Subcategories */
    .subcategories-section {
        padding: 20px 0;
    }
    .subcategory-item {
        min-width: 80px;
        font-size: 12px;
    }
    .subcategory-icon-wrapper {
        width: 60px;
        height: 60px;
        padding: 10px;
    }
    .scroll-right-btn {
        width: 36px;
        height: 36px;
    }

    /* Sidebar Filters */
    .filters-sidebar {
        display: block !important;
        padding: 20px;
    }
    .filter-group {
        margin-bottom: 16px;
        padding-bottom: 16px;
    }
    .filter-header h4 {
        font-size: 13px;
    }
    .custom-radio, .custom-checkbox {
        font-size: 13px;
        padding-left: 24px;
    }

    /* Category Header */
    .category-header h2 {
        font-size: 20px;
    }
    .category-header p {
        font-size: 13px;
    }
    .sort-by {
        font-size: 13px;
    }
    .sort-by select {
        font-size: 13px;
        padding: 8px 12px;
    }

    /* Products Grid */
    .products-grid-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .product-card {
        padding: 12px;
    }
    .product-img-wrapper {
        height: 120px;
    }
    .product-title {
        font-size: 15px;
    }
    .product-weight {
        font-size: 13px;
    }
    .product-price {
        font-size: 17px;
    }
    .badge {
        font-size: 9px;
        padding: 3px 8px;
        top: 12px;
        left: 12px;
    }

    /* Pagination */
    .page-btn {
        width: 36px;
        height: 36px;
        font-size: 13px;
    }

    /* Banners */
    .promo-banner {
        padding: 24px 20px;
    }
    .banner-dark h3 {
        font-size: 20px;
    }
    .banner-dark p {
        font-size: 13px;
    }
    .banner-light h3 {
        font-size: 18px;
    }
    .banner-light p {
        font-size: 13px;
    }
    .btn-white, .btn-outline-pink {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* Small Mobile (400px and below) */
@media (max-width: 400px) {
    /* Hero Section */
    .sweets-hero {
        padding: 24px 12px;
    }
    .hero-script {
        font-size: 22px;
    }
    .hero-title {
        font-size: 24px;
    }
    .hero-trust-icons {
        gap: 12px;
    }
    .sweets-hero-image img {
        max-height: 200px;
    }

    /* Subcategories */
    .subcategory-item {
        min-width: 70px;
        font-size: 11px;
    }
    .subcategory-icon-wrapper {
        width: 55px;
        height: 55px;
        padding: 8px;
    }

    /* Products Grid */
    .product-card {
        padding: 10px;
    }
    .product-img-wrapper {
        height: 100px;
    }
    .product-title {
        font-size: 14px;
    }
    .btn-add-cart {
        font-size: 11px;
        padding: 8px;
    }

    /* Banners */
    .promo-banner {
        padding: 20px 16px;
    }
    .banner-dark h3 {
        font-size: 18px;
    }
    .banner-light h3 {
        font-size: 16px;
    }
    .btn-white, .btn-outline-pink {
        padding: 8px 16px;
        font-size: 13px;
    }
}
