/* ===================================================================
   JUVIQO — shared styles
   One Universe. Endless Solutions.
   =================================================================== */

:root{
  --cream:        #F8F3E7;
  --cream-deep:   #EFE6D2;
  --ink:          #1C1A14;
  --ink-soft:     #4A4537;
  --gold:         #B9872E;
  --gold-deep:    #8F6A22;
  --green:        #3E6B46;
  --green-deep:   #2A4A30;
  --white:        #FFFEFB;
  --line:         rgba(28,26,20,0.14);
  --shadow:       0 10px 30px rgba(28,26,20,0.10);

  --font-display: 'Fraunces', serif;
  --font-body:    'Work Sans', sans-serif;

  color-scheme: light;
}

*{ box-sizing: border-box; }

html{ scroll-behavior: smooth; }

body{
  margin: 0;
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img{ max-width: 100%; display:block; }

a{ color: inherit; }

h1,h2,h3{
  font-family: var(--font-display);
  margin: 0 0 0.4em;
  color: var(--ink);
  letter-spacing: -0.01em;
}

p{ margin: 0 0 1em; color: var(--ink-soft); max-width: 62ch; }

button{ font-family: inherit; cursor: pointer; }

.container{
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- header ---------- */
.site-header{
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(248,243,231,0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.site-header .bar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  max-width: 1120px;
  margin: 0 auto;
}
.brand{
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand-logo{
  height: 42px;
  width: auto;
  display: block;
}
.brand .mark{
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--ink);
}
.brand .mark em{
  font-style: normal;
  color: var(--gold-deep);
}
.brand .tagline{
  font-size: 0.72rem;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}
.header-actions{ display:flex; align-items:center; gap: 14px; }
.cart-btn{
  background: var(--ink);
  color: var(--white);
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cart-btn .count{
  background: var(--gold);
  color: var(--ink);
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 0.78rem;
  font-weight: 600;
}

/* ---------- hero ---------- */
.hero{
  padding: 64px 24px 48px;
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  gap: 18px;
  border-bottom: 1px solid var(--line);
}
.hero .eyebrow{
  color: var(--green-deep);
  font-weight: 600;
  font-size: 0.85rem;
}
.hero h1{
  font-size: clamp(2.1rem, 5vw, 3.2rem);
  max-width: 16ch;
  line-height: 1.08;
}
.hero p{ font-size: 1.05rem; max-width: 56ch; }

/* ---------- category tabs ---------- */
.category-row{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 28px 24px 0;
  max-width: 1120px;
  margin: 0 auto;
}
.cat-pill{
  border: 1px solid var(--line);
  background: var(--white);
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.cat-pill.active{
  background: var(--ink);
  color: var(--white);
  border-color: var(--ink);
}

/* ---------- product grid ---------- */
.grid-section{ padding: 28px 24px 72px; max-width: 1120px; margin: 0 auto; }
.product-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 22px;
  margin-top: 20px;
}
.product-card{
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.product-card .thumb{
  aspect-ratio: 1 / 1;
  background: var(--cream-deep);
  overflow: hidden;
}
.product-card .thumb img{ width:100%; height:100%; object-fit: cover; }
.product-card .body{ padding: 16px; display:flex; flex-direction:column; gap: 6px; flex:1; }
.product-card h3{ font-size: 1.05rem; margin:0; }
.product-card .price{ color: var(--gold-deep); font-weight: 600; font-size: 1.02rem; }
.product-card .desc{ font-size: 0.86rem; color: var(--ink-soft); margin: 0; flex:1; }
.add-btn{
  margin-top: 8px;
  background: var(--green);
  color: var(--white);
  border: none;
  border-radius: 10px;
  padding: 10px;
  font-weight: 600;
  font-size: 0.9rem;
}
.add-btn:hover{ background: var(--green-deep); }
.empty-note{ color: var(--ink-soft); padding: 32px 0; }

/* ---------- cart drawer ---------- */
.overlay{
  position: fixed; inset:0;
  background: rgba(20,18,12,0.45);
  display: none;
  z-index: 60;
}
.overlay.open{ display:block; }
.drawer{
  position: fixed;
  top:0; right:0; bottom:0;
  width: min(420px, 92vw);
  background: var(--white);
  z-index: 70;
  transform: translateX(105%);
  transition: transform 0.28s ease;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}
.drawer.open{ transform: translateX(0); }
.drawer-head{
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
  display:flex; justify-content: space-between; align-items:center;
}
.drawer-head h2{ font-size: 1.2rem; margin:0; }
.icon-btn{ background:none; border:none; font-size:1.3rem; color: var(--ink-soft); }
.drawer-body{ padding: 18px 22px; overflow-y:auto; flex:1; }
.cart-line{ display:flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items:center; }
.cart-line img{ width:56px; height:56px; border-radius: 8px; object-fit:cover; background: var(--cream-deep); }
.cart-line .info{ flex:1; }
.cart-line .info .name{ font-weight:600; font-size:0.92rem; }
.cart-line .info .unit{ font-size: 0.8rem; color: var(--ink-soft); }
.qty-group{ display:flex; align-items:center; gap:8px; }
.qty-group button{ width:26px; height:26px; border-radius:6px; border:1px solid var(--line); background:var(--cream); }
.drawer-foot{ padding: 18px 22px; border-top: 1px solid var(--line); }
.total-row{ display:flex; justify-content:space-between; font-weight:600; margin-bottom: 14px; font-size: 1.05rem; }
.btn-primary{
  width:100%;
  background: var(--gold);
  color: var(--ink);
  border:none;
  border-radius: 10px;
  padding: 13px;
  font-weight: 700;
  font-size: 0.98rem;
}
.btn-primary:disabled{ opacity: 0.5; }

/* ---------- checkout form ---------- */
.modal{
  position: fixed; inset:0;
  display:none;
  align-items:center; justify-content:center;
  z-index: 80;
  padding: 20px;
}
.modal.open{ display:flex; }
.modal-card{
  background: var(--white);
  border-radius: 16px;
  max-width: 460px;
  width:100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 26px;
  box-shadow: var(--shadow);
}
.modal-card h2{ font-size: 1.3rem; }
.field{ margin-bottom: 14px; }
.field label{ display:block; font-size:0.84rem; font-weight:600; margin-bottom:5px; color: var(--ink-soft); }
.field input, .field textarea, .field select{
  width:100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  background: var(--cream);
}
.field textarea{ resize: vertical; min-height: 70px; }
.pay-note{
  background: var(--cream-deep);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 0.86rem;
  color: var(--ink-soft);
  margin-bottom: 16px;
}
.form-msg{ font-size: 0.88rem; margin-top: 10px; }
.form-msg.ok{ color: var(--green-deep); }
.form-msg.err{ color: #9B3B2E; }

/* ---------- footer ---------- */
.site-footer{
  background: var(--ink);
  color: var(--cream);
  padding: 44px 24px 28px;
  margin-top: 40px;
}
.site-footer .container{
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px;
}
.site-footer .mark{ font-family: var(--font-display); font-size: 1.3rem; color: var(--white); }
.site-footer .tag{ color: var(--gold); font-size: 0.82rem; margin-top: 4px; }
.site-footer .contact{ font-size: 0.86rem; color: #CFC8B3; line-height: 1.9; }
.site-footer .bottom{
  text-align:center;
  font-size: 0.78rem;
  color: #8E8A78;
  margin-top: 28px;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 18px;
}

@media (max-width: 560px){
  .site-header .bar{ padding: 12px 16px; }
  .hero{ padding: 44px 16px 36px; }
  .category-row, .grid-section{ padding-left:16px; padding-right:16px; }
}
