/* ==========================================================================
   Nimmi Catalog — fresh product-section design
   Brand: primary brown #42210B/#45281A, accents amber/gold #F19C11 #E7B908 #F0A90B
   Fonts: Calibri (primary), Ebrima (secondary)
   Everything is namespaced under .nimmi-catalog so it cannot affect the rest of the site.
   ========================================================================== */

.nimmi-catalog {
  --brown-900: #42210B;
  --brown-800: #45281A;
  --brown-700: #5c3a22;
  --amber:     #F19C11;
  --amber-600: #d9860a;
  --gold:      #E7B908;
  --bg:        #FBF8F3;
  --surface:   #FFFFFF;
  --text:      #2C1D11;
  --muted:     #8C7B6B;
  --line:      #ECE3D8;
  --line-2:    #F4EEE5;
  --stock:     #2E7D32;
  --oos:       #B23B3B;
  --radius:    14px;
  --radius-sm: 9px;
  --shadow:    0 6px 22px rgba(66,33,11,.09);
  --shadow-lg: 0 14px 40px rgba(66,33,11,.14);
  --maxw:      1240px;
  --font: "Calibri","Segoe UI","Ebrima",system-ui,-apple-system,"Helvetica Neue",Arial,sans-serif;

  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.nimmi-catalog *, .nimmi-catalog *::before, .nimmi-catalog *::after { box-sizing: border-box; }
.nimmi-catalog img { max-width: 100%; display: block; }
.nimmi-catalog a { color: inherit; text-decoration: none; }

.nimmi-wrap { max-width: var(--maxw); margin: 0 auto; padding: 28px 20px 64px; }

/* ---------- breadcrumb ---------- */
.nc-breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  font-size: 13.5px; color: var(--muted); margin: 4px 0 22px; }
.nc-breadcrumb a:hover { color: var(--amber-600); }
.nc-breadcrumb .sep { opacity: .5; }
.nc-breadcrumb .cur { color: var(--brown-800); font-weight: 600; }

/* ---------- page head ---------- */
.nc-head { margin: 0 0 24px; }
.nc-title { font-size: clamp(24px, 3.2vw, 34px); font-weight: 700; color: var(--brown-900);
  letter-spacing: -.01em; margin: 0 0 6px; }
.nc-sub { color: var(--muted); font-size: 15px; margin: 0; }
.nc-count { color: var(--muted); font-size: 13.5px; }

/* ---------- layout with side nav ---------- */
.nc-shell { display: grid; grid-template-columns: 268px 1fr; gap: 34px; align-items: start; }
@media (max-width: 900px) {
  .nc-shell { grid-template-columns: 1fr; gap: 18px; }
  /* Single-column: the category nav was position:sticky, so the tall accordion pinned itself to the
     top of the viewport and the products scrolled UNDERNEATH it (looked like products overlaying the
     category list, with a tiny visible product area). Make it static and move it BELOW the products
     so the listing is what you see first; the nav stays available at the bottom for switching. */
  /* !important: the base .nc-nav{position:sticky} rule is defined later in this file, so it would
     otherwise win at equal specificity even inside this media query. */
  .nc-nav { position: static !important; top: auto; order: 2; margin-top: 10px; }
}

/* ---------- category side nav (accordion) ---------- */
.nc-nav { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); position: sticky; top: 16px; }
.nc-nav h3 { margin: 0; padding: 16px 18px; font-size: 13px; letter-spacing: .12em; text-transform: uppercase;
  color: #fff; background: var(--brown-900); font-weight: 700; }
.nc-nav ul { list-style: none; margin: 0; padding: 0; }
.nc-nav-item { border-top: 1px solid var(--line-2); }
.nc-nav-main { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 13px 18px; background: none; border: 0; font: inherit; font-weight: 600; color: var(--brown-800);
  cursor: pointer; text-align: left; }
.nc-nav-main:hover { background: var(--line-2); }
.nc-nav-main .chev { display: inline-flex; align-items: center; color: var(--amber); transition: transform .22s ease; }
.nc-nav-item.open .nc-nav-main .chev { transform: rotate(90deg); }
.nc-nav-subs { max-height: 0; overflow: hidden; transition: max-height .28s ease; }
.nc-nav-item.open .nc-nav-subs { max-height: 640px; }
.nc-nav-subs a { display: block; padding: 9px 18px 9px 30px; font-size: 14px; color: var(--muted); }
.nc-nav-subs a:hover, .nc-nav-subs a.active { color: var(--amber-600); background: var(--line-2); }

/* ---------- category cards (landing) ---------- */
.nc-cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 22px; }
.nc-cat-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .2s ease; }
.nc-cat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
/* Fixed-ratio media box: the image is absolutely positioned so it can NEVER stretch the box past its
   aspect-ratio (a grid+auto-height box was sizing to the image, so cards with square vs landscape
   images got different heights and the name rows misaligned across a row). */
.nc-cat-media { aspect-ratio: 4/3; background: #fff; display: block; position: relative; overflow: hidden;
  border-bottom: 1px solid var(--line-2); }
.nc-cat-media img { position: absolute; inset: 18px; width: calc(100% - 36px); height: calc(100% - 36px); object-fit: contain; }
.nc-cat-name { padding: 14px 16px; font-weight: 600; color: var(--brown-800); display: flex;
  align-items: center; justify-content: space-between; gap: 8px; }
.nc-cat-name .arrow { color: var(--amber); transition: transform .2s ease; }
.nc-cat-card:hover .nc-cat-name .arrow { transform: translateX(4px); }

/* ---------- filter bar ---------- */
.nc-filters { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin: 0 0 22px;
  padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.nc-filters .grp { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.nc-filters label { font-size: 12.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.nc-select, .nc-search input { font: inherit; font-size: 14px; color: var(--text); background: #fff;
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; outline: none; transition: border-color .15s; }
.nc-select:focus, .nc-search input:focus { border-color: var(--amber); }
.nc-search { position: relative; margin-left: auto; }
.nc-search input { padding-left: 34px; min-width: 200px; }
.nc-search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.nc-chip { font: inherit; font-size: 13px; padding: 6px 13px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; color: var(--brown-800); cursor: pointer; transition: all .15s; }
.nc-chip:hover { border-color: var(--amber); }
.nc-chip.on { background: var(--brown-900); color: #fff; border-color: var(--brown-900); }
.nc-toggle { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--brown-800); cursor: pointer; }
.nc-toggle input { accent-color: var(--amber); width: 16px; height: 16px; }

/* ---------- product grid ---------- */
.nc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 22px; }
.nc-card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .2s ease; display: flex; flex-direction: column; }
.nc-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.nc-card-media { aspect-ratio: 1/1; background: #fff; display: block; position: relative; overflow: hidden;
  border-bottom: 1px solid var(--line-2); }
.nc-card-media img { position: absolute; inset: 16px; width: calc(100% - 32px); height: calc(100% - 32px); object-fit: contain; mix-blend-mode: multiply; }
.nc-badges { position: absolute; top: 12px; left: 12px; display: flex; flex-direction: column; gap: 6px; }
.nc-badge { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 999px; color: #fff; }
.nc-badge.new { background: var(--amber); }
.nc-badge.oos { background: var(--oos); }
.nc-card-body { padding: 14px 15px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.nc-card-name { font-weight: 600; color: var(--brown-800); font-size: 15px; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.nc-card-model { font-size: 12.5px; color: var(--muted); }
.nc-card-foot { margin-top: auto; padding-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.nc-price { color: var(--brown-900); font-weight: 700; font-size: 15px; }
.nc-price small { color: var(--muted); font-weight: 500; font-size: 11px; }
.nc-swatches { display: flex; gap: 4px; }
.nc-swatch-more { font-size: 11.5px; color: var(--muted); }
.nc-instock { font-size: 12px; color: var(--stock); font-weight: 600; }
.nc-instock.no { color: var(--oos); }

/* ---------- empty ---------- */
.nc-empty { text-align: center; padding: 70px 20px; color: var(--muted); }
.nc-empty h3 { color: var(--brown-800); margin: 0 0 6px; }

/* ---------- product detail ---------- */
.nc-detail { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 44px; align-items: start; }
@media (max-width: 860px) { .nc-detail { grid-template-columns: 1fr; gap: 26px; } }
.nc-gallery-main { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  aspect-ratio: 1/1; display: grid; place-items: center; padding: 30px; box-shadow: var(--shadow); }
.nc-gallery-main img { max-height: 100%; width: auto; object-fit: contain; mix-blend-mode: multiply; }
.nc-thumbs { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.nc-thumb { width: 72px; height: 72px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; display: grid; place-items: center; padding: 6px; cursor: pointer; transition: border-color .15s; }
.nc-thumb img { max-height: 100%; width: auto; object-fit: contain; }
.nc-thumb.active { border-color: var(--amber); box-shadow: 0 0 0 2px rgba(241,156,17,.25); }

.nc-info .nc-eyebrow { font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--amber-600); font-weight: 700; }
.nc-info h1 { font-size: clamp(22px, 3vw, 30px); color: var(--brown-900); margin: 6px 0 8px; line-height: 1.2; }
.nc-info .nc-model { color: var(--muted); font-size: 14.5px; margin: 0 0 16px; }
.nc-price-lg { font-size: 24px; font-weight: 700; color: var(--brown-900); margin: 0 0 4px; }
.nc-price-lg small { font-size: 13px; color: var(--muted); font-weight: 500; }
.nc-stockline { font-size: 13.5px; font-weight: 600; color: var(--stock); margin-bottom: 20px; }
.nc-stockline.no { color: var(--oos); }
.nc-block { margin: 20px 0; }
.nc-block > .nc-label { font-size: 12.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted);
  font-weight: 700; margin-bottom: 9px; }
.nc-opts { display: flex; flex-wrap: wrap; gap: 9px; }
.nc-opt { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 15px; font-size: 13.5px;
  color: var(--brown-800); cursor: pointer; transition: all .15s; }
.nc-opt:hover { border-color: var(--amber); }
.nc-opt.active { background: var(--brown-900); color: #fff; border-color: var(--brown-900); }
.nc-finish { display: flex; align-items: center; gap: 8px; }
.nc-desc { color: #4a3a2c; font-size: 14.5px; margin: 18px 0; }
.nc-media-links { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; }
.nc-media-links a { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 600;
  color: var(--brown-800); border: 1px solid var(--line); border-radius: 999px; padding: 8px 15px; transition: all .15s; }
.nc-media-links a:hover { border-color: var(--amber); color: var(--amber-600); }
.nc-cta { display: inline-flex; align-items: center; gap: 9px; margin-top: 8px; background: var(--amber);
  color: #3a1e08; font-weight: 700; font-size: 15px; padding: 13px 26px; border-radius: 999px;
  box-shadow: 0 8px 20px rgba(241,156,17,.32); transition: transform .15s, box-shadow .15s; }
.nc-cta:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(241,156,17,.42); }

/* swatch dot */
.nc-dot { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0,0,0,.15); display: inline-block; }

/* ---------- responsive tweaks ---------- */
@media (max-width: 560px) {
  .nimmi-wrap { padding: 18px 14px 48px; }
  .nc-grid, .nc-cat-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
  .nc-search { margin-left: 0; width: 100%; }
  .nc-search input { width: 100%; }
  .nc-card-name { font-size: 14px; }
}
.nc-hidden { display: none !important; }

/* ---------- image lightbox ---------- */
.nc-lightbox { position: fixed; inset: 0; z-index: 99999; background: rgba(38,24,12,.82);
  display: flex; align-items: center; justify-content: center; padding: 30px; }
.nc-lightbox img { max-width: min(92vw, 900px); max-height: 88vh; width: auto; height: auto;
  border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,.5); background: #fff; }
.nc-lb-close { position: absolute; top: 18px; right: 24px; width: 44px; height: 44px; border: 0;
  border-radius: 50%; background: rgba(255,255,255,.16); color: #fff; font-size: 26px; line-height: 1;
  cursor: pointer; transition: background .15s; }
.nc-lb-close:hover { background: rgba(255,255,255,.32); }
.nc-media-links a svg { flex: none; }
