/* =========================================================
   GB7 — FINISHED CSS (clean + deduped + sorted)
   Header: logo left • search centered • nav right
   Includes: subnav, hero, featured categories, profile dropdown,
   buttons/forms, layout helpers, footer, mobile nav.
========================================================= */

:root{
  /* Brand palette */
  --brand:#978668;
  --ink:#333333;
  --paper:#ffffff;
  --muted:#666666;

  /* UI surfaces */
  --card:#ffffff;
  --card2:#f7f7f7;
  --line:#e6e6e6;

  --bg: var(--paper);
  --text: var(--ink);
  --gold: var(--brand);

  --shadow: 0 10px 30px rgba(0,0,0,.10);
  --radius: 18px;

  /* Header sizing (fixed header offset) */
  --topbar-h: 74px;
  --subnav-h: 52px;

  /* Spacing system (luxury rhythm) */
  --s-1: 6px;
  --s-2: 10px;
  --s-3: 14px;
  --s-4: 18px;

  /* Content width + gutters */
  --gutter: 30px;
}

/* =========================
   Base / Reset
========================= */
*{ box-sizing:border-box; }

html, body{ height:100%; }

body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background: var(--bg);
  color: var(--text);

  /* Push page content below fixed header + subnav */
  /*padding-top: calc(var(--topbar-h) + var(--subnav-h));*/
}

a{ color:inherit; text-decoration:none; }

.muted{ color: var(--muted); }

/* Common wrap (used by home + pages) */
.homeWrap{
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* =========================
   Header (Topbar + Subnav)
========================= */
.topbar{
  position: fixed;
  top:0; left:0;
  width:100%;
  z-index: 20;
  padding: 0 var(--gutter);
  background: rgba(255,255,255);
  border-bottom: 1px solid var(--line);

  /* keep this only if you use translucency;
     with solid white it has no effect but harmless */
  backdrop-filter: blur(10px);
}

/* Main header row: 3 columns */
.topbar__inner{
  height: var(--topbar-h);
  width: 100%;
  display: grid;
  grid-template-columns: 220px minmax(280px, 1fr) auto; /* left | center | right */
  align-items: center;
  gap: var(--s-4);
}

/* Brand / Logo */
.brand{
  display:flex;
  align-items:center;
  white-space: nowrap;
  padding: var(--s-1) 0;
}

.brand--logo{
  display:flex;
  align-items:center;
}

.brand__logo{
  height: 44px;
  width: auto;
  display:block;
}
@media (min-width: 900px){
  .brand__logo{ height: 52px; }
}

/* Right group */
.topbar__right{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap: var(--s-3);
  min-width: 0;
}

/* =========================
   Header Search (center)
========================= */
.headerSearch{
  margin:0;
  width:100%;
  min-width: 0;
}

.headerSearch--center{
  justify-self: center;
  width: min(560px, 100%);
}

.headerSearch__field{
  height: 40px;
  width: 100%;
  min-width: 0;

  display:flex;
  align-items:center;
  gap: var(--s-2);

  padding: 0 var(--s-3);
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.98);
  box-shadow: 0 6px 18px rgba(0,0,0,.05);
}

.headerSearch__icon{
  color: var(--muted);
  font-size: 13px;
  line-height: 1;
  user-select:none;
}

.headerSearch__input{
  width:100%;
  min-width: 0;
  border:0;
  outline:none;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  padding: 0;
}

.headerSearch__field:focus-within{
  border-color: rgba(151,134,104,.65);
  box-shadow: 0 0 0 3px rgba(151,134,104,.15), 0 6px 18px rgba(0,0,0,.05);
}

/* =========================
   Nav (right)
========================= */
.nav{
  display:flex;
  align-items:center;
  gap: var(--s-2);
  flex: 0 0 auto;
}

.nav a{
  height: 40px;
  display:inline-flex;
  align-items:center;
  padding: 0 var(--s-3);
  border-radius: 999px;
  color: var(--muted);
  white-space: nowrap;
}
.nav a:hover{
  color: var(--text);
  background: rgba(0,0,0,.04);
}

.pill{
  height: 40px;
  display:inline-flex !important;
  align-items:center;
  padding: 0 var(--s-3) !important;
  border-radius: 999px;

  background: rgba(151,134,104,.14) !important;
  color: var(--text) !important;
  border: 1px solid rgba(151,134,104,.40);
}

/* Hamburger */
.hamburger{
  display:none;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
}

/* =========================
   Subnav (Categories)
========================= */
.subnav{
  height: var(--subnav-h);
  display:flex;
  align-items:center;

  border-top: 1px solid var(--line);
  background: rgba(255,255,255,.86);
  backdrop-filter: blur(10px);
}

.subnav__inner{
  width: 100%;
  display:flex;
  align-items:center;
  gap: var(--s-2);
  overflow-x:auto;

  padding: var(--s-2) 0;
  scrollbar-width: thin;
}
.subnav__inner::-webkit-scrollbar{ height: 10px; }
.subnav__inner::-webkit-scrollbar-thumb{
  background: rgba(0,0,0,.14);
  border-radius: 999px;
}

.subnav__item{
  height: 36px;
  display:inline-flex;
  align-items:center;
  padding: 0 var(--s-3);
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--muted);
  background: rgba(0,0,0,.02);
  transition: background .12s ease, border-color .12s ease, transform .12s ease;
  white-space: nowrap;
}
.subnav__item:hover{
  color: var(--text);
  background: rgba(0,0,0,.04);
  transform: translateY(-1px);
}
.subnav__item.active{
  color: var(--text);
  border-color: rgba(151,134,104,.55);
  background: rgba(151,134,104,.14);
}

/* =========================
   Profile Menu + Dropdown
========================= */
.profileMenu{
  position: relative;
  display: inline-flex;
  align-items: center;
}

.avatarBtn{
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--line);
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.02);
  cursor: pointer;
  padding: 0;
}

.avatarImg{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display:block;
}

.profileDropdown{
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 240px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.96);
  box-shadow: var(--shadow);
  padding: 10px;
  display: none;
  z-index: 50;
}
.profileMenu.open .profileDropdown{ display:block; }

.profileDropdown__head{
  padding: 8px 10px 10px 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}

.profileDropdown__name{ font-weight: 700; line-height: 1.2; }
.profileDropdown__meta{ font-size: 12px; margin-top: 4px; color: var(--muted); }

.profileDropdown__item{
  display:block;
  padding: 10px 10px;
  border-radius: 12px;
  color: var(--text);
}
.profileDropdown__item:hover{ background: rgba(0,0,0,.04); }

.profileDropdown__sep{
  height: 1px;
  background: var(--line);
  margin: 8px 0;
}

.profileDropdown__item.danger{ color: #b00020; }
.profileDropdown__item.danger:hover{ background: rgba(176,0,32,.08); }

/* =========================
   HOME HERO (fullscreen + slideshow)
========================= */
.homeHeroX{
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100svh;
  margin: 0;
  background: #000;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

/* 2 background layers for crossfade */
.homeHeroX__bg{
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
  opacity: 0;
  transition: opacity 900ms ease;
  will-change: opacity;
  z-index: 0;
}
.homeHeroX__bg.is-active{ opacity: 1; }

.homeHeroX__overlay{
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    90deg,
    rgba(0,0,0,.72) 0%,
    rgba(0,0,0,.28) 55%,
    rgba(0,0,0,.12) 100%
  );
}

.homeHeroX__inner{
  position: relative;
  z-index: 2;
  height: 100%;
  display:flex;
  align-items:flex-end;
}

.homeHeroX__content{
  width:100%;
  padding: 0 0 42px 0;
}

.homeHeroX__title{
  margin: 10px 0 0 0;
  color:#fff;
  font-size: 44px;
  line-height: 1.05;
  letter-spacing: -.4px;
  max-width: 18ch;
}
@media (max-width:900px){
  .homeHeroX__title{ font-size: 34px; }
}

.homeHeroX__sub{
  margin-top: 10px;
  color: rgba(255,255,255,.86);
  max-width: 72ch;
  line-height: 1.7;
  font-size: 14px;
}

/* =========================
   HOME — Featured Categories
========================= */
.homeSectionHead{
  margin-top: var(--s-4);
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap: var(--s-3);
}
.homeSectionHead h2{
  margin:0;
  font-size: 18px;
  letter-spacing: -.1px;
}

.homeCatGrid{
  margin-top: var(--s-3);
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s-3);
}
@media (max-width: 980px){
  .homeCatGrid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px){
  .homeCatGrid{ grid-template-columns: 1fr; }
}

.homeCatCard{
  position:relative;
  min-height: 250px;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow:hidden;
  background:#000;
  box-shadow: var(--shadow);
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.homeCatCard:hover{
  transform: translateY(-2px);
  box-shadow: 0 14px 40px rgba(0,0,0,.12);
  border-color: rgba(151,134,104,.35);
}

.homeCatCard__img{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit: cover;
  display:block;
  opacity:.92;
  transform: scale(1.02);
}

.homeCatCard__shade{
  position:absolute;
  inset:0;
  background: linear-gradient(180deg, rgba(0,0,0,.10) 0%, rgba(0,0,0,.62) 100%);
}

.homeCatCard__label{
  position:absolute;
  left:12px;
  bottom:12px;
  color:#fff;
  font-weight: 900;
  font-size: 14px;
  text-shadow: 0 10px 24px rgba(0,0,0,.45);
}
.homeCatCard__meta{
  display:block;
  margin-top: 4px;
  font-weight: 600;
  font-size: 11px;
  opacity:.82;
}

/* =========================
   Buttons / Cards / Forms
========================= */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: var(--s-2);
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,.02);
  cursor:pointer;
}
.btn:hover{ background: rgba(0,0,0,.04); }

.btn.gold{
  border-color: rgba(151,134,104,.55);
  background: rgba(151,134,104,.14);
}

.card{
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

input, select, textarea{
  width:100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  outline:none;
}

input:focus, select:focus, textarea:focus{
  border-color: rgba(151,134,104,.65);
  box-shadow: 0 0 0 3px rgba(151,134,104,.15);
}

textarea{ min-height:160px; resize:vertical; }

/* =========================
   Layout helpers
========================= */
.grid{ display:grid; gap: 14px; }
.grid.cols-3{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width:900px){ .grid.cols-3{ grid-template-columns: 1fr; } }

.row{ display:flex; gap: 12px; }
@media (max-width:720px){ .row{ flex-direction:column; } }

/* =========================
   Footer
========================= */
.footer{
  margin-top: 26px;
  border-top: 1px solid var(--line);
  background: rgba(0,0,0,.02);
}
.footer__inner{
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 18px;
  display:flex;
  justify-content:space-between;
  gap: 12px;
  flex-wrap:wrap;
  align-items:center;
  color: var(--muted);
  font-size: 12px;
}
.footer a{
  color: var(--muted);
  border-bottom: 1px solid transparent;
}
.footer a:hover{
  color: var(--text);
  border-bottom-color: rgba(151,134,104,.55);
}

/* =========================
   Mobile behavior
========================= */
@media (max-width: 980px){
  .topbar__inner{
    grid-template-columns: 180px minmax(220px, 1fr) auto;
    gap: var(--s-3);
  }
}

@media (max-width: 820px){
  .hamburger{ display:inline-flex; }

  /* nav becomes dropdown */
  .nav{
    display:none;
    position:absolute;
    right: var(--gutter);
    top: calc(var(--topbar-h) - 8px);
    flex-direction:column;
    padding: 12px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,.96);
    border-radius: 16px;
    box-shadow: var(--shadow);
    z-index: 30;
  }
  .nav.open{ display:flex; }

  /* header grid tighter */
  .topbar__inner{
    grid-template-columns: 140px 1fr auto;
    gap: var(--s-3);
  }

  .headerSearch--center{
    width: 100%;
  }
}

@media (max-width: 520px){
  .brand__logo{ height: 40px; }
}

/* ensure the currently-fading-in layer is always on top */
.homeHeroX__bg{ z-index: 0; }
.homeHeroX__bg.is-top{ z-index: 1; }