/* ==========================================================================
   Modular Filter Component CSS (FilterContainer, FilterAccordion, CheckboxList)
   ========================================================================== */

.filter-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.filter-accordions-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

/* ===== Filter Accordion Item ===== */
.filter-accordion {
    width: 100%;
    border: 1px solid #34352A;
    background-color: #f8f1ec;
    border-radius: 0;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.filter-accordion-header {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    padding: 16px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    text-align: left;
    user-select: none;
    box-sizing: border-box;
}

.filter-accordion-header:focus {
    outline: none;
}

/* Accordion Title */
.filter-accordion-title {
    font-family: 'Gotham', sans-serif;
    font-weight: 500;
    font-style: normal;
    font-size: 16px;
    line-height: 100%;
    letter-spacing: 0.08em; /* 8% */
    color: #34352A;
    text-transform: uppercase;
    margin: 0;
    padding: 0;
}

.filter-accordion-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Selected Count Badge (Black circle with white number) */
.filter-selected-badge {
    width: 22px;
    height: 22px;
    min-width: 22px;
    border-radius: 50%;
    background-color: #232320;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Gotham', sans-serif;
    font-weight: 500;
    font-size: 12px;
    line-height: 1;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.filter-selected-badge.d-none {
    display: none !important;
}

/* Chevron Icon */
.filter-accordion-chevron {
    width: 14px;
    height: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.filter-accordion.is-open .filter-accordion-chevron {
    transform: rotate(180deg);
}

/* Accordion Body (CSS Grid 60fps smooth slide animation) */
.filter-accordion-body {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.32s cubic-bezier(0.16, 1, 0.3, 1), padding 0.32s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
    padding: 0 18px;
    box-sizing: border-box;
}

.filter-accordion.is-open .filter-accordion-body {
    grid-template-rows: 1fr;
    padding: 0 18px 18px 18px;
}

.filter-accordion-body-inner {
    min-height: 0;
    overflow: visible;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.filter-accordion.is-open .filter-accordion-body-inner {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Checkbox List Top Bar ===== */
.filter-checkbox-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 8px;
    margin-bottom: 14px;
    border-bottom: 1px solid rgba(52, 53, 42, 0.2);
    box-sizing: border-box;
}

.filter-selected-count-label {
    font-family: 'Gotham', sans-serif;
    font-weight: 400;
    font-size: 13px;
    line-height: 100%;
    letter-spacing: 0.05em;
    color: #707060;
    text-transform: uppercase;
}

.filter-reset-group-btn {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font-family: 'Gotham', sans-serif;
    font-weight: 500;
    font-size: 13px;
    line-height: 100%;
    letter-spacing: 0.05em;
    color: #34352A;
    text-decoration: underline;
    cursor: pointer;
    text-transform: uppercase;
    transition: opacity 0.2s ease, color 0.2s ease;
}

.filter-reset-group-btn:hover {
    color: #8B4513;
    text-decoration: underline;
}

/* ===== Checkbox Items Container ===== */
.filter-checkbox-list-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 280px;
    overflow-y: auto;
    padding-right: 4px;
}

/* Custom minimal scrollbar */
.filter-checkbox-list-items::-webkit-scrollbar {
    width: 4px;
}

.filter-checkbox-list-items::-webkit-scrollbar-track {
    background: rgba(52, 53, 42, 0.05);
}

.filter-checkbox-list-items::-webkit-scrollbar-thumb {
    background: rgba(52, 53, 42, 0.25);
    border-radius: 0;
}

/* ===== Checkbox Item ===== */
.filter-checkbox-item {
    display: flex;
    align-items: center;
    position: relative;
    cursor: pointer;
    user-select: none;
    margin: 0;
}

.filter-checkbox-input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

/* Sharp Square Checkbox Box */
.filter-checkbox-box {
    width: 18px;
    height: 18px;
    min-width: 18px;
    border: 1.5px solid #414232;
    border-radius: 0 !important;
    background-color: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    box-sizing: border-box;
    transition: background-color 0.15s ease, border-color 0.15s ease;
    flex-shrink: 0;
}

.filter-checkbox-item:hover .filter-checkbox-box {
    border-color: #34352A;
}

.filter-checkbox-icon {
    display: none;
    width: 12px;
    height: 12px;
}

.filter-checkbox-input:checked ~ .filter-checkbox-box {
    background-color: transparent;
    border-color: #34352A;
}

.filter-checkbox-input:checked ~ .filter-checkbox-box .filter-checkbox-icon {
    display: block;
}

/* Checkbox Label Text */
.filter-checkbox-label {
    font-family: 'Gotham', sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 16px;
    line-height: 100%;
    letter-spacing: 0%;
    color: #414232;
    text-transform: uppercase;
    transition: color 0.15s ease;
}

.filter-checkbox-item:hover .filter-checkbox-label {
    color: #34352A;
}

/* ===== Bottom "TÜMÜNÜ SIFIRLA" Button ===== */
.filter-reset-all-btn {
    width: 100%;
    height: 50px;
    border: 1px solid #34352A;
    background-color: #f8f1ec;
    border-radius: 0 !important;
    font-family: 'Gotham', sans-serif;
    font-weight: 500;
    font-size: 15px;
    line-height: 100%;
    letter-spacing: 0.08em; /* 8% */
    color: #34352A;
    text-transform: uppercase;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    box-sizing: border-box;
    margin-top: 8px;
}

.filter-reset-all-btn:hover {
    background-color: #34352A;
    color: #ffffff;
}

.filter-reset-all-btn:focus {
    outline: none;
}

/* ===== Sidebar & Grid Layout Spacing ===== */
@media (min-width: 768px) {
    .filter-sidebar-col {
        padding-right: 48px !important;
    }

    .filter-products-col {
        padding-left: 16px !important;
    }
}

@media (min-width: 1200px) {
    .filter-sidebar-col {
        padding-right: 60px !important;
    }

    .filter-products-col {
        padding-left: 24px !important;
    }
}

/* ===== Mobile Fullscreen Modals (Filter & Sort) ===== */
.mobile-fullscreen-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 100%;
    height: 100%;
    background-color: #f8f1ec;
    z-index: 1050;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    animation: mobileModalSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.mobile-fullscreen-modal.d-none {
    display: none !important;
}

.mobile-fullscreen-modal.is-closing {
    animation: mobileModalSlideDown 0.2s cubic-bezier(0.4, 0, 1, 1) forwards;
}

@keyframes mobileModalSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes mobileModalSlideDown {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(20px);
    }
}

.mobile-modal-header {
    background-color: #f8f1ec;
    border-bottom: 1px solid rgba(52, 53, 42, 0.15);
    position: sticky;
    top: 0;
    z-index: 10;
}

.mobile-modal-title {
    font-family: 'Yrsa', serif;
    font-size: 1.35rem;
    font-weight: 600;
    color: #34352A;
    letter-spacing: 0.04em;
}

.mobile-modal-body {
    flex: 1;
    overflow-y: auto;
}

.mobile-sort-options-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mobile-sort-option-btn {
    width: 100%;
    height: 52px;
    border: 1px solid #34352A;
    background-color: #f8f1ec;
    color: #34352A;
    font-family: 'Gotham', sans-serif;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.03em;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    border-radius: 0;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.mobile-sort-option-btn.is-active {
    background-color: #34352A;
    color: #ffffff;
}

.mobile-sort-option-btn .sort-check-icon {
    font-size: 14px;
}

/* Mobile Action Buttons (Filtrele & Sırala) */
.mobile-action-btn {
    width: 100%;
    height: 48px;
    border-radius: 0 !important;
    background-color: #34352A !important;
    border-color: #34352A !important;
    color: #ffffff !important;
    font-family: 'Gotham', sans-serif !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    letter-spacing: 0.05em !important;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
}

.mobile-action-btn:active {
    opacity: 0.85;
}

/* Responsive Mobile Typography & Layout */
@media (max-width: 767.98px) {
    html, body {
        overflow-x: hidden !important;
        width: 100%;
    }

    .shop-container {
        padding-left: 12px !important;
        padding-right: 12px !important;
        padding-top: 3rem !important;
        overflow-x: hidden !important;
    }

    .filter-products-col {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    #product_container {
        margin-left: -6px !important;
        margin-right: -6px !important;
    }

    #product_container > [class*="col-"] {
        padding-left: 6px !important;
        padding-right: 6px !important;
        margin-bottom: 16px !important;
    }

    .coffee-card,
    .coffee-card:hover {
        width: 100% !important;
        background: transparent !important;
        background-color: transparent !important;
    }

    .coffee-card-image,
    .coffee-card-image:hover {
        background: transparent !important;
        background-color: transparent !important;
        height: 170px !important;
        padding: 8px !important;
        margin-bottom: 10px !important;
    }

    .coffee-card-info {
        padding: 0 4px !important;
    }

    .coffee-card-info h3 {
        font-size: 14px !important;
        line-height: 1.3 !important;
        font-weight: 600 !important;
        color: #34352A !important;
        margin-bottom: 4px !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
    }

    .coffee-card-meta {
        font-size: 12px !important;
        color: #6c757d !important;
        margin-bottom: 6px !important;
        min-height: auto !important;
    }

    .coffee-card-price {
        font-size: 14px !important;
        font-weight: 600 !important;
        color: #34352A !important;
    }

    .coffee-card-price.offer-link {
        font-size: 14px !important;
        font-weight: 600 !important;
    }

    .add-button {
        width: 28px !important;
        height: 28px !important;
        right: 8px !important;
        bottom: 8px !important;
        font-size: 14px !important;
    }

    .offer-button {
        width: 28px !important;
        height: 28px !important;
        right: 8px !important;
        bottom: 8px !important;
    }

    .offer-button svg {
        width: 14px !important;
        height: 14px !important;
    }

    .search-page-title-mobile {
        font-size: clamp(1.4rem, 5vw, 1.85rem) !important;
        line-height: 1.25 !important;
        word-break: break-word !important;
        padding: 0 4px !important;
    }
}

/* ===== Filter Empty State ===== */
.filter-empty-state {
    width: 100%;
    min-height: 380px;
    box-sizing: border-box;
    text-align: center;
}

.filter-empty-state-dino {
    display: flex;
    justify-content: center;
    align-items: center;
}

.filter-empty-state-dino svg {
    max-width: 144px;
    height: auto;
}

.filter-empty-state-notfound {
    display: flex;
    justify-content: center;
    align-items: center;
}

.filter-empty-state-notfound svg {
    max-width: 161px;
    height: auto;
}

.filter-empty-state-title {
    font-family: 'Gotham', sans-serif;
    color: #34352A;
    font-size: 22px;
    font-weight: 400;
    line-height: 1.4;
    max-width: 500px;
    margin: 0 auto 24px;
}

.filter-empty-state-action {
    display: flex;
    justify-content: center;
    width: 100%;
}

.filter-empty-state-action .btn-reset-all-filters {
    max-width: 320px;
    width: 100%;
    background-color: #34352A;
    color: #ffffff;
    font-family: 'Gotham', sans-serif;
    font-size: 13px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 14px 24px;
    border: 1px solid #34352A;
    border-radius: 0;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
}

.filter-empty-state-action .btn-reset-all-filters:hover {
    background-color: #464839;
    border-color: #464839;
    color: #ffffff;
}

@media (max-width: 767px) {
    .filter-empty-state {
        padding: 30px 15px;
        min-height: 300px;
    }
    .filter-empty-state-dino svg {
        max-width: 110px;
    }
    .filter-empty-state-notfound svg {
        max-width: 130px;
    }
    .filter-empty-state-title {
        font-size: 18px;
    }
}


