/* ==========================================================================
   TS CLUB - Eşofman Altı Ürün Sayfası CSS (Responsive & Modern Design System)
   ========================================================================== */

:root {
    --ts-burgundy: #700018;
    --ts-burgundy-dark: #500012;
    --ts-navy: #002B49;
    --ts-navy-light: #102444;
    --bg-page: #f2f3f6;
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --border-radius-card: 24px;
    --border-radius-pill: 9999px;
    --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-page);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* User Header Notice Placeholder */
.user-header-placeholder {
    width: 100%;
    background: linear-gradient(135deg, var(--ts-navy) 0%, var(--ts-burgundy) 100%);
    color: #ffffff;
    padding: 12px 20px;
    text-align: center;
    font-size: 13px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.user-header-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    max-width: 1280px;
    margin: 0 auto;
}

.notice-badge {
    background: rgba(255,255,255,0.25);
    backdrop-filter: blur(4px);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.5px;
}

/* Page Container */
.page-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 16px 16px 40px 16px;
}

/* Breadcrumb Navigation */
.breadcrumb-nav {
    margin-bottom: 12px;
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    font-size: 13px;
    color: var(--text-muted);
}

.breadcrumb-link {
    color: var(--text-muted);
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.breadcrumb-link:hover {
    color: var(--ts-burgundy);
}

.ts-logo-icon {
    color: var(--ts-burgundy);
}

.breadcrumb-separator {
    color: #cbd5e1;
    font-size: 12px;
}

.breadcrumb-item.active {
    color: #334155;
    font-weight: 600;
}

/* Top Title Card */
.top-title-card {
    background-color: var(--bg-card);
    border-radius: var(--border-radius-card);
    padding: 24px 28px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.category-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.3px;
}

/* Action Buttons Wrapper (Mobile First) */
.action-buttons-wrapper {
    display: flex;
    gap: 12px;
    width: 100%;
}

.action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 18px;
    background-color: var(--bg-card);
    border: 1.5px solid #d1d5db;
    border-radius: 14px;
    font-family: var(--font-family);
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    cursor: pointer;
    transition: var(--transition);
}

.action-btn:hover {
    border-color: var(--ts-burgundy);
    color: var(--ts-burgundy);
    background-color: #fafafa;
}

/* Content Layout: Desktop Sidebar + Product Grid */
.content-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 992px) {
    .top-title-card {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .action-buttons-wrapper {
        display: none; /* Desktop uses left sidebar for filtering */
    }

    .content-layout {
        grid-template-columns: 280px 1fr;
        gap: 24px;
    }
}

/* Desktop Left Sidebar Filters */
.desktop-sidebar {
    display: none; /* Hidden on mobile by default */
    background: var(--bg-card);
    border-radius: var(--border-radius-card);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    height: fit-content;
}

@media (min-width: 992px) {
    .desktop-sidebar {
        display: block;
    }
}

.filter-group {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.filter-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.filter-heading {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.8px;
    color: #0f172a;
    margin-bottom: 14px;
    text-transform: uppercase;
}

/* Pill Radios & Checkboxes */
.pill-group.vertical {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pill-radio {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: var(--border-radius-pill);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #475569;
    transition: var(--transition);
    user-select: none;
}

.pill-radio input {
    display: none;
}

.pill-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1.5px solid #cbd5e1;
    display: inline-block;
    position: relative;
    transition: var(--transition);
}

.pill-radio.active,
.pill-radio:has(input:checked) {
    border-color: var(--ts-burgundy);
    color: var(--ts-burgundy);
    font-weight: 600;
    background-color: rgba(112, 0, 24, 0.02);
}

.pill-radio.active .pill-dot,
.pill-radio:has(input:checked) .pill-dot {
    border-color: var(--ts-burgundy);
    background-color: var(--ts-burgundy);
    box-shadow: inset 0 0 0 2.5px #ffffff;
}

/* Size Grid */
.size-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.size-pill {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    border: 1.5px solid #e2e8f0;
    border-radius: var(--border-radius-pill);
    font-size: 13px;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
}

.size-pill input {
    display: none;
}

.size-pill:has(input:checked) {
    border-color: var(--ts-burgundy);
    background-color: var(--ts-burgundy);
    color: #ffffff;
    font-weight: 700;
}

/* Custom Select for Brand */
.custom-select-wrapper {
    position: relative;
}

.custom-select {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    font-family: var(--font-family);
    font-size: 13px;
    font-weight: 500;
    color: #334155;
    background-color: #ffffff;
    outline: none;
    cursor: pointer;
    transition: var(--transition);
}

.custom-select:focus {
    border-color: var(--ts-burgundy);
}

.sidebar-reset-box {
    margin-top: 20px;
}

.reset-filters-btn {
    width: 100%;
    padding: 10px;
    background: #f1f5f9;
    border: none;
    border-radius: 12px;
    font-family: var(--font-family);
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: var(--transition);
}

.reset-filters-btn:hover {
    background: #e2e8f0;
    color: var(--ts-burgundy);
}

/* Products Section & Grid */
.products-grid-section {
    width: 100%;
}

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

@media (min-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 18px;
    }
}

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

/* Authentic TS Club Clean Product Card */
.ts-product-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    border: 1px solid #eef2f6;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.ts-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}

.ts-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
}

.ts-img-box {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    background: #f7f9fa;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ts-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.ts-product-card:hover .ts-img-box img {
    transform: scale(1.04);
}

.ts-badge-shipping {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #000000;
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 12px;
    z-index: 2;
    letter-spacing: 0.2px;
}

.ts-fav-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(4px);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    color: #64748b;
    transition: all 0.2s ease;
}

.ts-fav-btn:hover,
.ts-fav-btn.active {
    background: #ffffff;
    color: #e60000;
}

.ts-card-info {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
    background: #ffffff;
}

.ts-card-title {
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.35;
    margin-bottom: 8px;
    text-transform: uppercase;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 35px;
}

.ts-card-price {
    font-size: 16px;
    font-weight: 800;
    color: #5a1420;
}

/* Badges */
.badge-free-shipping {
    position: absolute;
    top: 14px;
    left: 14px;
    background-color: #000000;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 20px;
    z-index: 3;
    letter-spacing: 0.2px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.btn-favorite {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(8px);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
    transition: var(--transition);
}

.btn-favorite .heart-icon {
    fill: none;
    stroke: #ffffff;
    stroke-width: 2.2;
    transition: var(--transition);
}

.btn-favorite:hover {
    background: rgba(255, 255, 255, 0.85);
}

.btn-favorite.active .heart-icon {
    fill: var(--ts-burgundy);
    stroke: var(--ts-burgundy);
}

/* Weekly Deal Circular Floating Badge (Bottom Left of Image) */
.badge-weekly-deal {
    position: absolute;
    bottom: 50px;
    left: 10px;
    width: 78px;
    height: 78px;
    background: radial-gradient(circle at 30% 30%, #8b0d2a, #540614);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.15;
    text-align: center;
    z-index: 4;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
    border: 2px solid rgba(255, 255, 255, 0.15);
}

/* Bottom Dark Gradient Overlay with Text */
.product-bottom-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px 14px 14px 14px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.5) 60%, transparent 100%);
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.product-title {
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.3px;
}

.product-price {
    font-size: 17px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.2px;
}

/* ==========================================================================
   MOBILE DRAWER & MODALS
   ========================================================================== */

/* Overlay */
.drawer-overlay,
.sort-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    z-index: 999998;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.drawer-overlay.active,
.sort-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Mobile Filter Drawer */
.mobile-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 480px;
    height: 100vh;
    background-color: #f1f3f7;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -4px 0 25px rgba(0,0,0,0.15);
}

.mobile-drawer.active {
    transform: translateX(0);
}

/* Burgundy Header Bar */
.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background-color: #4A071E;
    color: #ffffff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.drawer-title {
    font-size: 19px;
    font-weight: 500;
    color: #ffffff;
    letter-spacing: 0.2px;
    text-align: center;
    flex: 1;
}

.drawer-close {
    background: none;
    border: none;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    transition: transform 0.2s ease;
}

.drawer-close:hover {
    opacity: 0.85;
    transform: scale(1.08);
}

/* Body Canvas */
.drawer-body {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    background-color: #f1f3f7;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* White Card Accordion Items */
.accordion-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
}

.accordion-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    background: #ffffff;
    border: none;
    font-family: var(--font-family);
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    letter-spacing: 0.5px;
    cursor: pointer;
    text-align: left;
    outline: none;
}

.accordion-icon {
    color: #495057;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.accordion-card.open .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s ease;
    padding: 0 20px;
    background: #ffffff;
}

.accordion-card.open .accordion-content {
    max-height: 350px;
    padding: 10px 20px 20px 20px;
    border-top: 1px solid #f1f3f5;
    overflow-y: auto;
}

/* Footer Section */
.drawer-footer {
    display: flex;
    justify-content: center;
    padding: 16px 20px 24px 20px;
    background: #f1f3f7;
}

.drawer-save-btn {
    width: 60%;
    max-width: 260px;
    padding: 14px;
    background: #5CAAE6;
    border: none;
    border-radius: 14px;
    font-family: var(--font-family);
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.8px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(92, 170, 230, 0.3);
    transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.drawer-save-btn:hover {
    background-color: #4a9ad9;
    box-shadow: 0 6px 16px rgba(92, 170, 230, 0.4);
    transform: translateY(-1px);
}

.drawer-save-btn:active {
    transform: translateY(0);
}

/* Sort Modal */
.sort-modal {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #ffffff;
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    z-index: 999999;
    transform: translateY(100%);
    transition: transform 0.33s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 20px;
}

.sort-modal.active {
    transform: translateY(0);
}

.sort-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.sort-modal-header h3 {
    font-size: 16px;
    font-weight: 700;
}

.sort-modal-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sort-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.sort-option.active {
    border-color: var(--ts-burgundy);
    background-color: rgba(112, 0, 24, 0.04);
    color: var(--ts-burgundy);
    font-weight: 700;
}
