@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600&family=Manrope:wght@400;500;600;700&display=swap');

:root{
  --bg: #EFEAE2;
  --bg-alt: #F7F4EF;
  --ink: #201C1A;
  --ink-soft: #6B635C;
  --accent: #6B3F4D;
  --accent-soft: #C9A0A8;
  --gold: #A98B4E;
  --line: #DED6C9;
  --radius-card: 4px;
  --radius-pill: 999px;
  --header-h: 56px;
  --nav-h: 64px;
}

*{ box-sizing:border-box; margin:0; padding:0; }

body{
  font-family:'Manrope', sans-serif;
  background:var(--bg);
  color:var(--ink);
  padding-bottom: calc(var(--nav-h) + 10px);
  -webkit-font-smoothing:antialiased;
}

h1,h2,h3,.serif{ font-family:'Fraunces', serif; font-weight:500; letter-spacing:-0.01em; }

a{ color:inherit; text-decoration:none; }
img{ max-width:100%; display:block; }
button{ font-family:inherit; cursor:pointer; border:none; background:none; }
input, select{ font-family:inherit; }

/* ===== HEADER ===== */
.topbar{
  background:var(--bg-alt);
  color:var(--ink);
  padding:14px 20px 10px;
  text-align:center;
  position:sticky; top:0; z-index:50;
  border-bottom:1px solid var(--line);
}
.topbar .brand{
  font-family:'Fraunces', serif;
  font-size:22px;
  letter-spacing:0.06em;
}
.topbar .brand-logo{
  height:34px;
  width:auto;
  margin:0 auto;
}
.topbar .tagline{
  font-size:10.5px;
  color:var(--ink-soft);
  margin-top:4px;
  letter-spacing:0.08em;
  text-transform:uppercase;
}

.searchbar-wrap{
  background:var(--bg-alt);
  padding:12px 16px;
  display:flex;
  gap:10px;
  align-items:center;
  border-bottom:1px solid var(--line);
  position:sticky; top:var(--header-h); z-index:49;
}
.searchbar{
  flex:1;
  display:flex;
  align-items:center;
  gap:8px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:var(--radius-pill);
  padding:10px 16px;
  font-size:14px;
  color:var(--ink-soft);
}
.searchbar input{ border:none; outline:none; flex:1; background:none; font-size:14px; color:var(--ink); }
.icon-btn{
  width:40px; height:40px;
  display:flex; align-items:center; justify-content:center;
  border-radius:50%;
  background:#fff;
  border:1px solid var(--line);
  flex-shrink:0;
  position:relative;
}
.icon-btn .badge{
  position:absolute; top:-4px; right:-4px;
  background:var(--accent); color:#fff;
  font-size:10px; font-weight:700;
  width:18px; height:18px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
}

/* ===== BOTTOM NAV ===== */
.bottom-nav{
  position:fixed; bottom:0; left:0; right:0;
  height:var(--nav-h);
  background:var(--bg-alt);
  border-top:1px solid var(--line);
  display:flex;
  z-index:50;
  max-width:480px;
  margin:0 auto;
}
.bottom-nav a{
  flex:1;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:4px;
  font-size:11px;
  color:var(--ink-soft);
}
.bottom-nav a.active{ color:var(--accent); }
.bottom-nav svg{ width:22px; height:22px; }

/* ===== GUEST BANNER ===== */
.guest-banner{
  margin:16px; padding:16px;
  background:#fff;
  border-radius:var(--radius-card);
  border:1px solid var(--line);
  display:flex; align-items:center; justify-content:space-between;
  gap:10px;
}
.guest-banner .msg strong{ font-family:'Fraunces',serif; font-size:16px; display:block; }
.guest-banner .msg span{ font-size:12px; color:var(--ink-soft); }
.btn{
  display:inline-block;
  background:var(--ink);
  color:#fff;
  padding:10px 20px;
  border-radius:var(--radius-pill);
  font-size:13px;
  font-weight:600;
  white-space:nowrap;
}
.btn.outline{ background:none; border:1px solid var(--ink); color:var(--ink); }
.btn.accent{ background:var(--accent); }
.btn.block{ display:block; width:100%; text-align:center; }

/* ===== HERO ===== */
.hero{
  margin:16px;
  border-radius:var(--radius-card);
  overflow:hidden;
  background:linear-gradient(135deg, var(--ink) 0%, var(--accent) 140%);
  color:#fff;
  padding:40px 24px;
  position:relative;
  min-height:220px;
  display:flex; flex-direction:column; justify-content:flex-end;
}
.hero .eyebrow{ font-size:11px; letter-spacing:0.12em; color:var(--accent-soft); margin-bottom:6px; }
.hero h1{ font-size:32px; line-height:1.1; margin-bottom:14px; max-width:14ch; }
.hero .btn{ width:fit-content; }

/* ===== SECTIONS ===== */
.section{ padding:24px 16px 8px; }
.section-head{
  display:flex; align-items:baseline; justify-content:space-between;
  margin-bottom:14px;
}
.section-head h2{ font-size:20px; }
.section-head .see-all{ font-size:12px; color:var(--accent); font-weight:600; }

/* ===== PRODUCT GRID / CARD ===== */
.grid-2{ display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.product-card{
  background:var(--bg-alt);
  border:1px solid var(--line);
  border-radius:var(--radius-card);
  overflow:hidden;
}
.product-card .img{
  aspect-ratio:3/4;
  background:linear-gradient(160deg,#DED0C8,#C9A0A8);
  display:flex; align-items:center; justify-content:center;
  color:#fff; font-family:'Fraunces',serif; font-size:14px; text-align:center; padding:10px;
  position:relative;
}
.product-card .img img{ width:100%; height:100%; object-fit:cover; }
.product-card .tag-sale{
  position:absolute; top:8px; left:8px;
  background:var(--accent); color:#fff;
  font-size:10px; font-weight:700; padding:3px 8px; border-radius:3px;
}
.product-card .body{ padding:10px 12px 14px; }
.product-card .cat{ font-size:10px; color:var(--ink-soft); text-transform:uppercase; letter-spacing:0.05em; }
.product-card .name{ font-size:13.5px; font-weight:600; margin:3px 0 6px; line-height:1.3; }
.product-card .price-row{ display:flex; align-items:baseline; gap:6px; flex-wrap:wrap; }
.product-card .price{ font-weight:700; font-size:14px; }
.product-card .price.sale{ color:var(--gold); }
.product-card .price-old{ font-size:11px; color:var(--ink-soft); text-decoration:line-through; }
.product-card .sold{ font-size:10px; color:var(--ink-soft); margin-top:4px; }

/* ===== CATEGORY PAGE ===== */
.category-layout{ display:flex; min-height:calc(100vh - 160px); }
.cat-sidebar{
  width:78px; flex-shrink:0;
  background:var(--bg-alt);
  border-right:1px solid var(--line);
  padding:10px 0;
}
.cat-sidebar a{
  display:flex; flex-direction:column; align-items:center; gap:6px;
  padding:14px 6px;
  font-size:10.5px;
  text-align:center;
  color:var(--ink-soft);
  border-left:3px solid transparent;
}
.cat-sidebar a.active{
  color:var(--ink); font-weight:700;
  border-left:3px solid var(--accent);
  background:var(--bg);
}
.cat-sidebar .icon{ font-size:20px; }
.cat-content{ flex:1; padding:16px; min-width:0; }
.cat-content h2{ font-size:19px; margin-bottom:14px; }

/* ===== CART ===== */
.cart-header{
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 16px;
  border-bottom:1px solid var(--line);
  background:var(--bg-alt);
}
.cart-header h1{ font-size:16px; letter-spacing:0.08em; text-transform:uppercase; }
.cart-item{
  display:flex; gap:12px;
  padding:14px 16px;
  border-bottom:1px solid var(--line);
  align-items:center;
}
.cart-item .thumb{
  width:64px; height:80px; border-radius:4px; flex-shrink:0;
  background:linear-gradient(160deg,#DED0C8,#C9A0A8);
}
.cart-item .info{ flex:1; min-width:0; }
.cart-item .info .name{ font-weight:600; font-size:13.5px; margin-bottom:2px; }
.cart-item .info .size{ font-size:11px; color:var(--ink-soft); }
.qty-stepper{ display:flex; align-items:center; gap:10px; margin-top:8px; }
.qty-stepper button{
  width:26px; height:26px; border:1px solid var(--line); border-radius:50%;
  display:flex; align-items:center; justify-content:center; font-size:14px;
}
.cart-empty{
  text-align:center; padding:60px 24px;
  color:var(--ink-soft);
}
.cart-empty .emoji{ font-size:40px; margin-bottom:12px; }
.cart-footer{
  position:fixed; bottom:0; left:0; right:0;
  background:#fff; border-top:1px solid var(--line);
  padding:14px 16px;
  display:flex; align-items:center; justify-content:space-between;
  z-index:60;
  max-width:480px; margin:0 auto;
}
.cart-footer .total-label{ font-size:11px; color:var(--ink-soft); }
.cart-footer .total-amt{ font-size:17px; font-weight:700; }

/* ===== AUTH FORMS ===== */
.auth-wrap{
  min-height:100vh;
  display:flex; align-items:center; justify-content:center;
  padding:32px 20px;
  background:var(--bg);
}
.auth-card{
  width:100%; max-width:380px;
  background:var(--bg-alt);
  border:1px solid var(--line);
  border-radius:var(--radius-card);
  padding:32px 24px;
}
.auth-card h1{ font-size:26px; margin-bottom:6px; }
.auth-card .sub{ font-size:13px; color:var(--ink-soft); margin-bottom:24px; }
.field{ margin-bottom:16px; }
.field label{ font-size:12px; font-weight:600; display:block; margin-bottom:6px; }
.field input{
  width:100%; padding:11px 14px;
  border:1px solid var(--line); border-radius:4px;
  font-size:14px; background:#fff;
  outline:none;
}
.field input:focus{ border-color:var(--accent); }
.auth-switch{ text-align:center; font-size:13px; margin-top:18px; color:var(--ink-soft); }
.auth-switch a{ color:var(--accent); font-weight:600; }
.alert{
  padding:10px 14px; border-radius:4px; font-size:13px; margin-bottom:16px;
}
.alert.error{ background:#F4D9DC; color:#7A2331; }
.alert.success{ background:#DCE8D9; color:#33552E; }

/* ===== PROFILE ===== */
.profile-head{
  padding:32px 20px 24px;
  background:var(--ink); color:#fff;
  display:flex; align-items:center; gap:14px;
}
.avatar{
  width:56px; height:56px; border-radius:50%;
  background:var(--accent); color:#fff;
  display:flex; align-items:center; justify-content:center;
  font-family:'Fraunces',serif; font-size:22px;
}
.profile-menu{ padding:12px 0; }
.profile-menu a{
  display:flex; align-items:center; justify-content:space-between;
  padding:16px 20px;
  border-bottom:1px solid var(--line);
  font-size:14px; font-weight:500;
}

/* ===== PRODUCT DETAIL ===== */
.pd-gallery{ background:#000; }
.pd-main-media{ aspect-ratio:1/1; background:linear-gradient(160deg,#DED0C8,#C9A0A8); display:flex; align-items:center; justify-content:center; overflow:hidden; }
.pd-main-media img{ width:100%; height:100%; object-fit:cover; }
.pd-main-media video{ width:100%; height:100%; object-fit:cover; background:#000; }
.pd-video-wrap{ position:relative; width:100%; height:100%; }
.pd-video-wrap iframe{ width:100%; height:100%; border:0; }
.pd-image-placeholder{ width:100%; height:100%; display:flex; align-items:center; justify-content:center; color:#fff; font-family:'Fraunces',serif; font-size:20px; text-align:center; padding:16px; }
.pd-thumbs{ display:flex; gap:8px; padding:10px; overflow-x:auto; background:var(--bg-alt); border-bottom:1px solid var(--line); }
.pd-thumb{ width:56px; height:56px; flex-shrink:0; border-radius:4px; overflow:hidden; border:2px solid transparent; opacity:0.6; background:#DED0C8; position:relative; }
.pd-thumb img{ width:100%; height:100%; object-fit:cover; }
.pd-thumb.active{ border-color:var(--accent); opacity:1; }
.pd-thumb-video{ background:var(--ink); display:flex; align-items:center; justify-content:center; }
.pd-thumb-video .pd-play{ color:#fff; font-size:16px; font-style:normal; }
.pd-body{ padding:20px 16px 100px; }
.pd-body .cat{ font-size:11px; color:var(--ink-soft); text-transform:uppercase; letter-spacing:0.06em; }
.pd-body h1{ font-size:22px; margin:6px 0 10px; }
.pd-price{ display:flex; align-items:baseline; gap:10px; margin-bottom:16px; }
.pd-price .now{ font-size:20px; font-weight:700; color:var(--gold); }
.pd-price .old{ font-size:14px; color:var(--ink-soft); text-decoration:line-through; }
.pd-label{ font-size:12px; font-weight:600; display:block; margin-bottom:8px; }
.variant-row{ display:flex; gap:8px; margin-bottom:18px; flex-wrap:wrap; }
.variant-chip{ display:flex; align-items:center; gap:6px; padding:7px 12px; border:1px solid var(--line); border-radius:var(--radius-pill); font-size:13px; background:#fff; }
.variant-chip.selected{ border-color:var(--ink); background:var(--ink); color:#fff; }
.variant-chip .swatch{ width:14px; height:14px; border-radius:50%; border:1px solid rgba(0,0,0,0.15); display:inline-block; }
.size-row{ display:flex; gap:8px; margin:0 0 20px; flex-wrap:wrap; }
.size-chip{
  padding:8px 14px; border:1px solid var(--line); border-radius:var(--radius-pill);
  font-size:13px; background:#fff;
}
.size-chip.selected{ border-color:var(--ink); background:var(--ink); color:#fff; }
.pd-desc{ font-size:13.5px; line-height:1.7; color:var(--ink-soft); }
.pd-sticky-cta{
  position:fixed; bottom:0; left:0; right:0;
  background:#fff; border-top:1px solid var(--line);
  padding:14px 16px; z-index:60;
  max-width:480px; margin:0 auto;
}

.container-max{ max-width:480px; margin:0 auto; background:var(--bg); min-height:100vh; position:relative; }
.empty-state{ text-align:center; padding:60px 24px; color:var(--ink-soft); }
.empty-state .emoji{ font-size:40px; margin-bottom:12px; }

/* ===== PAGINATION ===== */
.pagination{ display:flex; justify-content:center; gap:6px; margin:20px 0; flex-wrap:wrap; }
.pagination a, .pagination span{
  min-width:32px; height:32px; display:flex; align-items:center; justify-content:center;
  border:1px solid var(--line); border-radius:4px; font-size:12.5px; color:var(--ink);
}
.pagination a.current{ background:var(--ink); color:#fff; border-color:var(--ink); }
.pagination a.disabled{ opacity:0.35; pointer-events:none; }
