/* ==========================================================================
   Kozmetik Parfüm — CATEGORIES PAGE STYLES
   Breadcrumb, Category Hero, Sidebar Filters, Product Grid, Pagination
   ========================================================================== */

/* Breadcrumb styles moved to global.css */

/* ===== CATEGORY HERO ===== */
.cat-hero{position:relative;height:clamp(180px, 22vw, 300px);overflow:hidden}
.cat-hero-bg{position:absolute;inset:0}
.cat-hero-bg img{width:100%;height:100%;object-fit:cover}
.cat-hero-overlay{position:absolute;inset:0;background:linear-gradient(90deg,rgba(14,14,24,0.85) 0%,rgba(14,14,24,0.5) 60%,rgba(14,14,24,0.3) 100%)}
.cat-hero-content{position:relative;z-index:2;height:100%;display:flex;flex-direction:column;justify-content:center}
.cat-hero-content h1{font-family:var(--font-heading);font-size:var(--fs-h1);font-weight:700;color:#fff;margin-bottom:8px;line-height:var(--lh-heading)}
.cat-hero-content p{color:rgba(255,255,255,0.7);font-size:var(--fs-body);margin-bottom:20px}
.cat-hero-stats{display:flex;gap:24px}
.cat-hero-stats span{display:flex;align-items:center;gap:8px;color:rgba(255,255,255,0.6);font-size:.9rem}
.cat-hero-stats strong{color:var(--accent);font-weight:700}

/* ===== CATEGORY LAYOUT ===== */
.cat-content{padding:clamp(20px, 3vw, 36px) 0 56px}
.cat-layout{display:grid;grid-template-columns:260px 1fr;gap:28px;align-items:start}

/* ===== SIDEBAR ===== */
.cat-sidebar{background:#fff;border-radius:var(--radius);border:1px solid var(--border);padding:0;position:sticky;top:100px;overflow:hidden;max-height:calc(100vh - 120px);overflow-y:auto}
.cat-sidebar::-webkit-scrollbar{width:5px}
.cat-sidebar::-webkit-scrollbar-track{background:transparent}
.cat-sidebar::-webkit-scrollbar-thumb{background:var(--border);border-radius:4px}
.cat-sidebar::-webkit-scrollbar-thumb:hover{background:var(--text-muted)}
.sidebar-header{display:flex;align-items:center;justify-content:space-between;padding:20px 24px;background:var(--bg);border-bottom:1px solid var(--border)}
.sidebar-header h2{font-size:var(--fs-h4);font-weight:700;color:var(--text);display:flex;align-items:center;gap:8px}
.sidebar-header h2 i{color:var(--primary-light)}
.sidebar-close{display:none;width:36px;height:36px;border-radius:50%;background:var(--border);align-items:center;justify-content:center;color:var(--text);font-size:1rem}

/* Filter Groups */
.filter-group{border-bottom:1px solid var(--border)}
.filter-title{padding:16px 24px;font-size:.88rem;font-weight:600;color:var(--text);cursor:pointer;display:flex;align-items:center;justify-content:space-between;transition:var(--transition);user-select:none}
.filter-title:hover{color:var(--primary)}
.filter-title i{font-size:.6rem;transition:transform .3s ease;color:var(--text-muted)}
.filter-title.open i{transform:rotate(180deg)}
.filter-body{max-height:0;overflow:hidden;transition:max-height .35s ease,padding .35s ease}
.filter-body.open{max-height:500px;padding:0 24px 20px}
.filter-search{margin-bottom:12px}
.filter-search input{width:100%;padding:10px 14px;border:1px solid var(--border);border-radius:var(--radius-sm);font-size:.85rem;background:var(--bg);transition:var(--transition)}
.filter-search input:focus{border-color:var(--primary-light);background:#fff}

/* Filter options with proper scrollbar */
.filter-options{display:flex;flex-direction:column;gap:4px;max-height:220px;overflow-y:auto;padding-right:4px}
.filter-options::-webkit-scrollbar{width:5px}
.filter-options::-webkit-scrollbar-track{background:var(--bg);border-radius:4px}
.filter-options::-webkit-scrollbar-thumb{background:var(--border);border-radius:4px;transition:background .2s}
.filter-options::-webkit-scrollbar-thumb:hover{background:var(--text-muted)}
.filter-check{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:8px;cursor:pointer;font-size:.88rem;color:var(--text);transition:var(--transition)}
.filter-check:hover{background:var(--bg)}
.filter-check input[type="checkbox"]{width:18px;height:18px;accent-color:var(--primary);cursor:pointer;flex-shrink:0}
.filter-check .count{color:var(--text-muted);font-size:var(--fs-small);margin-left:auto}

/* ===== TOOLBAR ===== */
.cat-toolbar{display:flex;align-items:center;justify-content:space-between;margin-bottom:24px;gap:16px;flex-wrap:wrap;position:relative;z-index:30}
.cat-toolbar-left{display:flex;align-items:center;gap:16px}
.filter-toggle-btn{display:none;padding:10px 18px;border-radius:var(--radius-sm);border:1px solid var(--border);background:#fff;color:var(--text);font-weight:500;font-size:.88rem;align-items:center;gap:8px;transition:var(--transition)}
.filter-toggle-btn:hover{border-color:var(--primary);color:var(--primary)}
.result-count{font-size:.9rem;color:var(--text-light)}
.result-count strong{color:var(--text);font-weight:700}
.cat-toolbar-right{display:flex;align-items:center;gap:12px}

/* Sort Dropdown — custom, premium */
.sort-native-hidden{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none;clip:rect(0 0 0 0)}
.sort-dropdown{position:relative}
.sort-dropdown-btn{display:flex;align-items:center;gap:10px;min-width:230px;padding:11px 16px;border:1px solid var(--border);border-radius:12px;background:#fff;color:var(--text);font-weight:600;font-size:.88rem;cursor:pointer;transition:var(--transition);box-shadow:0 1px 2px rgba(15,32,68,.04)}
.sort-dropdown-btn:hover{border-color:var(--primary-light);box-shadow:0 4px 14px rgba(124,92,224,.10)}
.sort-dropdown.open .sort-dropdown-btn{border-color:var(--primary);box-shadow:0 0 0 3px rgba(124,92,224,.10)}
.sort-dropdown-lead{color:var(--primary-light);font-size:.9rem;flex-shrink:0}
.sort-dropdown-current{flex:1;text-align:left;white-space:nowrap}
.sort-dropdown-caret{color:var(--text-muted);font-size:.72rem;flex-shrink:0;transition:transform .25s ease}
.sort-dropdown.open .sort-dropdown-caret{transform:rotate(180deg)}

.sort-dropdown-menu{position:absolute;top:calc(100% + 8px);right:0;left:0;z-index:50;list-style:none;margin:0;padding:6px;background:#fff;border:1px solid var(--border);border-radius:14px;box-shadow:0 18px 44px rgba(15,32,68,.16);opacity:0;visibility:hidden;transform:translateY(-8px) scale(.98);transform-origin:top center;transition:opacity .2s ease,transform .2s ease,visibility .2s}
.sort-dropdown.open .sort-dropdown-menu{opacity:1;visibility:visible;transform:translateY(0) scale(1)}
.sort-dropdown-option{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 12px;border-radius:9px;font-size:.86rem;font-weight:500;color:var(--text);cursor:pointer;transition:background .15s ease,color .15s ease}
.sort-dropdown-option:hover{background:rgba(124,92,224,.07);color:var(--primary)}
.sort-dropdown-option .fa-check{opacity:0;color:var(--primary);font-size:.8rem;flex-shrink:0}
.sort-dropdown-option.selected{color:var(--primary);font-weight:700;background:rgba(124,92,224,.06)}
.sort-dropdown-option.selected .fa-check{opacity:1}

/* Active Filters Tags */
.active-filters{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:20px}
.filter-tag{display:inline-flex;align-items:center;gap:6px;padding:6px 14px;background:var(--bg);border:1px solid var(--border);border-radius:var(--radius-full);font-size:var(--fs-caption);color:var(--text);font-weight:500;cursor:default}
.filter-tag i{cursor:pointer;color:var(--text-muted);transition:var(--transition)}
.filter-tag i:hover{color:var(--primary)}
.filter-clear-tag{background:var(--primary);color:#fff;border-color:var(--primary);cursor:pointer}
.filter-clear-tag i{color:rgba(255,255,255,.7)}
.filter-clear-tag:hover{opacity:.9}

/* ===== PRODUCT GRID — 4 columns default ===== */
.cat-products-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}
.cat-products-grid>.fade-up{display:flex}
.cat-products-grid>.fade-up>.pcard{flex:1}

/* No results state */
.cat-no-results{grid-column:1/-1;text-align:center;padding:60px 20px;color:var(--text-muted)}
.cat-no-results i{font-size:2.5rem;margin-bottom:16px;opacity:.3;display:block}
.cat-no-results p{font-size:1rem;margin-bottom:8px;font-weight:500;color:var(--text)}
.cat-no-results span{font-size:var(--fs-body-sm)}

/* ===== PAGINATION ===== */
.cat-pagination{display:flex;align-items:center;justify-content:center;gap:6px;margin-top:36px}
.page-btn{min-width:38px;height:38px;border-radius:var(--radius-sm);border:1px solid var(--border);background:#fff;color:var(--text);font-size:.85rem;font-weight:500;display:flex;align-items:center;justify-content:center;transition:var(--transition);cursor:pointer}
.page-btn:hover:not(:disabled):not(.active){border-color:var(--primary);color:var(--primary);background:var(--bg)}
.page-btn.active{background:var(--gradient);color:#fff;border-color:transparent}
.page-btn:disabled{opacity:.3;cursor:not-allowed}
.page-dots{color:var(--text-muted);font-size:.9rem;padding:0 4px}

/* ===== RESPONSIVE — 4 → 3 → 2 → 1 ===== */
@media(max-width:1400px){
  .cat-products-grid{grid-template-columns:repeat(4,1fr);gap:16px}
}
@media(max-width:1200px){
  .cat-products-grid{grid-template-columns:repeat(3,1fr);gap:14px}
  .cat-layout{grid-template-columns:240px 1fr;gap:24px}
}
@media(max-width:1024px){
  .cat-products-grid{grid-template-columns:repeat(3,1fr);gap:12px}
  .cat-layout{grid-template-columns:230px 1fr;gap:20px}
}
@media(max-width:950px){
  .cat-hero-overlay{background:linear-gradient(0deg,rgba(14,14,24,0.85) 0%,rgba(14,14,24,0.4) 100%)}
  .cat-layout{grid-template-columns:1fr}
  .cat-sidebar{position:fixed;top:0;left:-100%;width:85%;max-width:340px;height:100vh;height:100dvh;max-height:none;z-index:1060;border-radius:0;border:none;transition:left .3s ease;overflow-y:auto}
  .cat-sidebar.open{left:0}
  .sidebar-close{display:flex}
  .filter-toggle-btn{display:flex}
  .cat-products-grid{grid-template-columns:repeat(2,1fr);gap:12px}
  .cat-toolbar-left,.cat-toolbar-right{width:100%;justify-content:space-between}
  .sort-dropdown{flex:1}
  .sort-dropdown-btn{min-width:0;width:100%}
}
@media(max-width:480px){
  .cat-products-grid{grid-template-columns:1fr;gap:14px;max-width:360px;margin:0 auto}
  .cat-hero-stats{gap:14px;flex-wrap:wrap}
  .cat-hero-stats span{font-size:.8rem}
}
