/* ==========================================
   KINTAMANI — catalog.css
   ========================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ink:        #0e0e0e;
  --ink-soft:   #1c1c1c;
  --cream:      #f7f4ef;
  --cream-dark: #efe9e0;
  --gold:       #c9a84c;
  --gold-light: #e8c97a;
  --white:      #ffffff;
  --muted:      #888;
  --danger:     #c0392b;
  --warn:       #e67e22;
  --radius:     14px;
  --sidebar-w:  280px;
  --font-display: 'Cormorant Garamond', serif;
  --font-body:    'DM Sans', sans-serif;
  --shadow-sm: 0 2px 12px rgba(0,0,0,.06);
  --shadow-md: 0 8px 32px rgba(0,0,0,.10);
  --shadow-lg: 0 20px 56px rgba(0,0,0,.14);
}

html { scroll-behavior: smooth; }
body { font-family: var(--font-body); background: var(--cream); color: var(--ink); cursor: none; overflow-x: hidden; }

/* ── CURSOR ── */
.cursor-dot {
  position: fixed; width: 10px; height: 10px;
  background: var(--gold); border-radius: 50%;
  pointer-events: none; transform: translate(-50%,-50%);
  z-index: 9999; transition: width .2s, height .2s, background .2s;
}
.cursor-dot.big { width: 34px; height: 34px; background: rgba(201,168,76,.2); border: 1.5px solid var(--gold); }

/* ── HEADER ── */
header {
  position: fixed; top:0; left:0; right:0; z-index: 200;
  padding: 0 48px;
  background: rgba(14,14,14,.92);
  backdrop-filter: blur(18px);
  box-shadow: 0 2px 32px rgba(0,0,0,.28);
}
.header-inner { display:flex; align-items:center; justify-content:space-between; height: 76px; }
.logo { font-family: var(--font-display); font-size: 1.75rem; font-weight: 300; color: var(--white); text-decoration: none; letter-spacing: .06em; }
.logo-k { color: var(--gold); font-weight: 600; font-style: italic; }
nav { display:flex; align-items:center; gap: 32px; }
.nav-link { font-size: .8rem; font-weight: 400; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.7); text-decoration: none; position: relative; transition: color .2s; }
.nav-link::after { content:''; position:absolute; bottom:-4px; left:0; width:0; height:1px; background:var(--gold); transition: width .3s; }
.nav-link:hover, .nav-link.active { color: var(--white); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }
.cart-badge { display:inline-flex; align-items:center; justify-content:center; width:17px; height:17px; background:var(--gold); color:var(--ink); border-radius:50%; font-size:.58rem; font-weight:700; margin-left:3px; }
.nav-cta { font-size:.78rem; font-weight:500; letter-spacing:.08em; text-transform:uppercase; color:var(--ink); text-decoration:none; background:var(--gold); padding:9px 20px; border-radius:999px; transition: background .2s, transform .2s; }
.nav-cta:hover { background:var(--gold-light); transform:translateY(-1px); }

/* ── PAGE HERO ── */
.page-hero {
  position: relative; overflow: hidden;
  background: var(--ink);
  padding: 140px 48px 72px;
  text-align: center;
}
.page-hero-bg { position:absolute; inset:0; pointer-events:none; }
.ph-circle { position:absolute; border-radius:50%; filter:blur(80px); }
.ph-circle.c1 { width:500px; height:500px; background:rgba(201,168,76,.10); top:-200px; right:-80px; }
.ph-circle.c2 { width:350px; height:350px; background:rgba(201,168,76,.07); bottom:-100px; left:60px; }
.page-hero-content { position:relative; }
.eyebrow { font-size:.72rem; letter-spacing:.22em; text-transform:uppercase; color:var(--gold); margin-bottom:14px; }
.page-hero-content h1 { font-family:var(--font-display); font-size:clamp(2.6rem,6vw,5rem); font-weight:300; color:var(--white); line-height:1.06; margin-bottom:16px; }
.page-hero-content h1 em { font-style:italic; color:var(--gold); }
.sub { font-size:.92rem; color:rgba(255,255,255,.45); }

/* ── LAYOUT ── */
.catalog-layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  gap: 0;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 0 80px;
  align-items: start;
}

/* ── SIDEBAR ── */
.sidebar {
  position: sticky;
  top: 76px;
  height: calc(100vh - 76px);
  overflow-y: auto;
  padding: 36px 28px 48px;
  border-right: 1px solid var(--cream-dark);
  background: var(--white);
  scrollbar-width: thin;
  scrollbar-color: var(--cream-dark) transparent;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--cream-dark); border-radius: 2px; }

.sidebar-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:28px; }
.sidebar-header h2 { font-family:var(--font-display); font-size:1.5rem; font-weight:400; }
.reset-btn { font-size:.72rem; letter-spacing:.1em; text-transform:uppercase; color:var(--muted); text-decoration:none; border-bottom:1px solid transparent; transition:color .2s, border-color .2s; }
.reset-btn:hover { color:var(--gold); border-color:var(--gold); }

.filter-group { margin-bottom: 28px; }
.filter-label { display:block; font-size:.68rem; letter-spacing:.16em; text-transform:uppercase; color:var(--muted); margin-bottom:12px; font-weight:500; }

/* Search */
.search-wrap { position:relative; }
.search-wrap input { width:100%; padding:11px 36px 11px 14px; border:1.5px solid var(--cream-dark); border-radius: var(--radius); font-family:var(--font-body); font-size:.85rem; background:var(--cream); color:var(--ink); outline:none; transition:border-color .2s; }
.search-wrap input:focus { border-color:var(--gold); background:var(--white); }
.search-icon { position:absolute; right:12px; top:50%; transform:translateY(-50%); font-size:1.1rem; color:var(--muted); pointer-events:none; }

/* Chips */
.chip-group { display:flex; flex-wrap:wrap; gap:8px; }
.chip { display:inline-flex; align-items:center; padding:6px 14px; border-radius:999px; border:1.5px solid var(--cream-dark); font-size:.78rem; font-weight:400; cursor:none; transition:border-color .2s, background .2s, color .2s; user-select:none; }
.chip input { display:none; }
.chip:hover { border-color:var(--gold); color:var(--gold); }
.chip.active { background:var(--gold); border-color:var(--gold); color:var(--ink); font-weight:500; }

/* Price range */
.price-range { display:flex; align-items:center; gap:10px; }
.price-sep { color:var(--muted); font-size:.8rem; }
.price-input-wrap { display:flex; align-items:center; gap:6px; flex:1; background:var(--cream); border:1.5px solid var(--cream-dark); border-radius:var(--radius); padding:8px 12px; transition:border-color .2s; }
.price-input-wrap:focus-within { border-color:var(--gold); background:var(--white); }
.price-input-wrap span { font-size:.72rem; color:var(--muted); white-space:nowrap; }
.price-input-wrap input { width:100%; border:none; background:transparent; font-family:var(--font-body); font-size:.82rem; color:var(--ink); outline:none; }

/* Sort select */
.sort-select { width:100%; padding:11px 14px; border:1.5px solid var(--cream-dark); border-radius:var(--radius); font-family:var(--font-body); font-size:.85rem; color:var(--ink); background:var(--cream); outline:none; cursor:none; transition:border-color .2s; appearance:none; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:right 14px center; }
.sort-select:focus { border-color:var(--gold); }

.apply-btn { width:100%; padding:14px; background:var(--ink); color:var(--white); font-family:var(--font-body); font-size:.8rem; font-weight:500; letter-spacing:.1em; text-transform:uppercase; border:none; border-radius:var(--radius); cursor:none; transition:background .2s, transform .2s; }
.apply-btn:hover { background:var(--gold); color:var(--ink); transform:translateY(-1px); }

/* ── PRODUCT AREA ── */
.product-area { padding: 36px 40px 0; }

/* Toolbar */
.toolbar { display:flex; align-items:center; justify-content:space-between; margin-bottom:20px; flex-wrap:wrap; gap:12px; }
.result-count { font-size:.85rem; color:var(--muted); }
.result-count strong { color:var(--ink); font-weight:600; }
.result-count em { font-style:italic; color:var(--gold); }
.toolbar-right { display:flex; align-items:center; gap:12px; }
.view-toggle { display:flex; gap:4px; }
.vt-btn { width:34px; height:34px; border-radius:8px; border:1.5px solid var(--cream-dark); background:transparent; font-size:.9rem; cursor:none; display:flex; align-items:center; justify-content:center; color:var(--muted); transition:border-color .2s, color .2s, background .2s; }
.vt-btn.active { border-color:var(--gold); color:var(--gold); background:rgba(201,168,76,.08); }
.mobile-sort { display:none; }
.filter-toggle { display:none; }

/* Active filter tags */
.active-filters { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:20px; }
.af-tag { display:inline-flex; align-items:center; gap:6px; font-size:.72rem; font-weight:500; padding:5px 12px; border-radius:999px; background:rgba(201,168,76,.12); border:1px solid rgba(201,168,76,.3); color:var(--ink-soft); }
.af-tag a { color:var(--gold); text-decoration:none; font-weight:700; line-height:1; }
.af-tag a:hover { color:var(--danger); }

/* ── PRODUCT GRID ── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 22px;
}

/* CARD */
.product-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .55s ease var(--delay, 0s),
              transform .55s ease var(--delay, 0s),
              box-shadow .3s ease;
}
.product-card.visible { opacity:1; transform:translateY(0); }
.product-card:hover { box-shadow: var(--shadow-lg); }

.card-image-wrap {
  position: relative; overflow: hidden; height: 210px;
  background: var(--cream-dark);
  display: flex; align-items: center; justify-content: center;
}
.card-image-wrap img { width:100%; height:100%; object-fit:cover; transition:transform .5s ease; }
.product-card:hover .card-image-wrap img { transform:scale(1.07); }
.img-placeholder { font-size:4rem; opacity:.2; }

.card-overlay { position:absolute; inset:0; background:rgba(14,14,14,.54); display:flex; align-items:center; justify-content:center; opacity:0; transition:opacity .3s; backdrop-filter:blur(3px); }
.product-card:hover .card-overlay { opacity:1; }
.overlay-btn { font-size:.72rem; font-weight:600; letter-spacing:.1em; text-transform:uppercase; color:var(--ink); background:var(--gold); text-decoration:none; padding:11px 22px; border-radius:999px; transform:translateY(10px); transition:transform .3s .04s, background .2s; }
.product-card:hover .overlay-btn { transform:translateY(0); }
.overlay-btn:hover { background:var(--gold-light); }

.card-badge { position:absolute; top:12px; left:12px; font-size:.58rem; font-weight:700; letter-spacing:.1em; text-transform:uppercase; padding:4px 10px; border-radius:999px; }
.card-badge:not(.sold-out):not(.low-stock) { background:var(--gold); color:var(--ink); }
.card-badge.sold-out { background:var(--danger); color:var(--white); }
.card-badge.low-stock { background:var(--warn); color:var(--white); }

.color-dot { position:absolute; bottom:12px; right:12px; width:14px; height:14px; border-radius:50%; border:2px solid rgba(255,255,255,.7); box-shadow:0 0 0 1px rgba(0,0,0,.15); }

.card-body { padding:18px 18px 16px; }
.card-cat { font-size:.62rem; letter-spacing:.14em; text-transform:uppercase; color:var(--gold); font-weight:500; }
.card-body h3 { font-family:var(--font-display); font-size:1.15rem; font-weight:500; margin:6px 0 6px; line-height:1.2; }
.card-desc { font-size:.77rem; color:var(--muted); line-height:1.55; margin-bottom:12px; }
.card-footer { display:flex; align-items:center; justify-content:space-between; }
.price { font-size:.92rem; font-weight:600; }
.detail-link { font-size:.72rem; font-weight:600; letter-spacing:.08em; text-transform:uppercase; color:var(--muted); text-decoration:none; transition:color .2s; }
.detail-link:hover { color:var(--gold); }


/* ── LIST VIEW ── */
.product-grid.list-view { grid-template-columns: 1fr; }
.product-grid.list-view .product-card { display:grid; grid-template-columns:200px 1fr; }
.product-grid.list-view .card-image-wrap { height:160px; }
.product-grid.list-view .card-body { display:flex; flex-direction:column; justify-content:space-between; }

/* ── EMPTY STATE ── */
.empty-state {
  grid-column: 1 / -1;
  text-align:center; padding:100px 40px;
}
.empty-icon { font-size:3.5rem; color:var(--gold); margin-bottom:20px; }
.empty-state h3 { font-family:var(--font-display); font-size:2rem; font-weight:400; margin-bottom:10px; }
.empty-state p { font-size:.88rem; color:var(--muted); margin-bottom:28px; }
.btn-primary { display:inline-block; background:var(--gold); color:var(--ink); font-size:.78rem; font-weight:600; letter-spacing:.1em; text-transform:uppercase; text-decoration:none; padding:14px 30px; border-radius:999px; transition:background .2s, transform .2s; }
.btn-primary:hover { background:var(--gold-light); transform:translateY(-2px); }

/* ── FOOTER ── */
footer { background:var(--ink); padding:56px 48px 0; }
.footer-inner { display:grid; grid-template-columns:2fr 1fr 1fr; gap:48px; max-width:1440px; margin:0 auto; padding-bottom:40px; border-bottom:1px solid rgba(255,255,255,.08); }
.footer-brand p { font-size:.83rem; color:rgba(255,255,255,.38); margin-top:14px; line-height:1.7; }
.footer-links h4 { font-size:.66rem; letter-spacing:.16em; text-transform:uppercase; color:var(--gold); margin-bottom:18px; }
.footer-links { display:flex; flex-direction:column; gap:10px; }
.footer-links a { font-size:.83rem; color:rgba(255,255,255,.48); text-decoration:none; transition:color .2s; }
.footer-links a:hover { color:var(--white); }
.footer-bottom { max-width:1440px; margin:0 auto; padding:20px 0; font-size:.72rem; color:rgba(255,255,255,.22); }

/* ── RESPONSIVE ── */
@media (max-width:1100px) {
  :root { --sidebar-w:240px; }
  .product-grid { grid-template-columns: repeat(auto-fill,minmax(200px,1fr)); }
}

@media (max-width:860px) {
  header { padding:0 20px; }
  nav { display:none; }

  .catalog-layout {
    grid-template-columns: 1fr;
    padding-bottom: 48px;
  }

  .sidebar {
    position: fixed; top:76px; left:0; bottom:0; z-index:150;
    width:300px; transform:translateX(-100%);
    box-shadow:var(--shadow-lg);
    transition:transform .32s ease;
    height:auto;
  }
  .sidebar.open { transform:translateX(0); }

  .product-area { padding:24px 20px 0; }
  .filter-toggle {
    display:inline-flex; align-items:center; gap:6px;
    font-size:.75rem; font-weight:500; letter-spacing:.08em;
    padding:8px 16px; border-radius:999px;
    border:1.5px solid var(--cream-dark); background:var(--white);
    cursor:none; transition:border-color .2s;
  }
  .filter-toggle:hover { border-color:var(--gold); color:var(--gold); }
  .mobile-sort { display:block; width:auto; padding:8px 36px 8px 12px; }
  .page-hero { padding:120px 24px 56px; }
  .footer-inner { grid-template-columns:1fr 1fr; }
}

@media (max-width:480px) {
  .product-grid { grid-template-columns:1fr; }
  .product-grid.list-view .product-card { grid-template-columns:1fr; }
  .product-grid.list-view .card-image-wrap { height:200px; }
  footer { padding:40px 20px 0; }
  .footer-inner { grid-template-columns:1fr; }
}