:root {
  --sand: #F4EBD9;
  --sand-deep: #E8D8B8;
  --cream: #FFFCF6;
  --ink: #2B2118;
  --ink-soft: #5B4E40;
  --shell-brown: #6B4A35;
  --turquoise: #2F7E80;
  --turquoise-deep: #23595B;
  --plum: #6B3F63;
  --gold: #B9862A;
  --line: #DCC9A3;
  --radius: 4px;
  --shadow: 0 8px 24px rgba(43, 33, 24, 0.10);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--sand);
  color: var(--ink);
  font-family: "Work Sans", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: "Fraunces", Georgia, serif;
  color: var(--ink);
  margin: 0 0 0.5em;
  font-weight: 500;
}

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

a { color: inherit; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--ink);
  color: var(--cream); padding: 10px 16px; z-index: 200;
}
.skip-link:focus { left: 8px; top: 8px; }

:focus-visible {
  outline: 2px solid var(--turquoise-deep);
  outline-offset: 2px;
}

/* Header */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(244, 235, 217, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1120px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { border-radius: 50%; }
.brand-name {
  font-family: "Fraunces", serif; font-size: 1.15rem; letter-spacing: 0.01em;
}
.cart-btn {
  position: relative; background: none; border: none; cursor: pointer;
  color: var(--ink); padding: 8px; display: flex; align-items: center;
}
.cart-count {
  position: absolute; top: -2px; right: -2px;
  background: var(--plum); color: var(--cream);
  font-size: 0.68rem; font-weight: 600; line-height: 1;
  min-width: 17px; height: 17px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 26px; border-radius: var(--radius); border: none;
  font-family: "Work Sans", sans-serif; font-weight: 600; font-size: 0.95rem;
  cursor: pointer; text-decoration: none; transition: transform 0.15s ease, background 0.15s ease;
}
.btn-primary { background: var(--turquoise-deep); color: var(--cream); }
.btn-primary:hover { background: var(--turquoise); }
.btn-secondary { background: var(--cream); color: var(--ink); border: 1px solid var(--line); }
.btn-secondary:hover { background: var(--sand-deep); }
.btn-small { padding: 9px 16px; font-size: 0.85rem; }
.btn-block { width: 100%; }

/* Hero */
.hero {
  display: grid; grid-template-columns: 1.05fr 1fr;
  align-items: stretch; gap: 0;
  max-width: 1280px; margin: 0 auto;
}
.hero-media { overflow: hidden; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; min-height: 320px; }
.hero-copy {
  display: flex; flex-direction: column; justify-content: center;
  padding: 48px 40px;
}
.hero-kicker {
  font-size: 0.8rem; letter-spacing: 0.06em; color: var(--gold);
  margin: 0 0 14px; font-weight: 600;
}
.hero-copy h1 {
  font-size: clamp(1.7rem, 3vw, 2.5rem); line-height: 1.18; max-width: 15ch;
}
.hero-text { color: var(--ink-soft); max-width: 42ch; margin: 16px 0 26px; }

/* Catalogue */
.catalogue { max-width: 1120px; margin: 0 auto; padding: 64px 20px 40px; }
.section-head { max-width: 56ch; margin-bottom: 32px; }
.section-head h2 { font-size: 1.8rem; }
.section-head p { color: var(--ink-soft); margin: 0; }

.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 22px;
}
.card {
  background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
}
.card-media { aspect-ratio: 4/3; overflow: hidden; background: var(--sand-deep); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-body h3 { font-size: 1.08rem; margin: 0; }
.card-desc { color: var(--ink-soft); font-size: 0.88rem; margin: 0; flex: 1; }
.card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.price { font-weight: 600; color: var(--shell-brown); }

/* About */
.about { background: var(--sand-deep); }
.about-inner { max-width: 720px; margin: 0 auto; padding: 56px 20px; text-align: left; }
.about h2 { font-size: 1.5rem; }
.about p { color: var(--ink-soft); margin: 0; }

/* Footer */
.site-footer {
  max-width: 1120px; margin: 0 auto; padding: 40px 20px 60px;
  color: var(--ink-soft); font-size: 0.85rem;
}
.site-footer p { margin: 0 0 8px; }
.install-hint { max-width: 60ch; }

/* Overlay */
.overlay {
  position: fixed; inset: 0; background: rgba(43, 33, 24, 0.45); z-index: 90;
}
.no-scroll { overflow: hidden; }

.overlay[hidden], .cart-drawer[hidden], .modal[hidden] { display: none; }

/* Cart drawer */
.cart-drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: min(420px, 100%);
  background: var(--cream); z-index: 100; display: flex; flex-direction: column;
  box-shadow: -12px 0 30px rgba(0,0,0,0.15);
}
.cart-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px; border-bottom: 1px solid var(--line);
}
.cart-head h2 { font-size: 1.2rem; margin: 0; }
.icon-btn { background: none; border: none; font-size: 1.1rem; cursor: pointer; color: var(--ink); padding: 4px 8px; }
.cart-items { flex: 1; overflow-y: auto; padding: 12px 20px; }
.cart-empty { padding: 20px; color: var(--ink-soft); }

.cart-item {
  display: grid; grid-template-columns: 56px 1fr auto; gap: 12px;
  align-items: center; padding: 14px 0; border-bottom: 1px solid var(--sand-deep);
}
.cart-item-img { width: 56px; height: 56px; object-fit: cover; border-radius: var(--radius); }
.cart-item-name { margin: 0; font-weight: 600; font-size: 0.92rem; }
.cart-item-price { margin: 2px 0 6px; color: var(--ink-soft); font-size: 0.85rem; }
.qty-stepper { display: flex; align-items: center; gap: 10px; }
.qty-btn {
  width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--sand); cursor: pointer; font-size: 1rem; line-height: 1;
}
.qty-val { min-width: 1.2em; text-align: center; font-size: 0.9rem; }
.remove-btn { background: none; border: none; color: var(--ink-soft); cursor: pointer; align-self: start; }

.cart-foot { padding: 18px 20px 24px; border-top: 1px solid var(--line); }
.cart-total-row {
  display: flex; justify-content: space-between; font-weight: 600;
  margin-bottom: 14px; font-size: 1.05rem;
}
.cart-note { font-size: 0.78rem; color: var(--ink-soft); margin: 10px 0 0; text-align: center; }

/* Checkout modal */
.modal {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: min(520px, calc(100% - 32px)); background: var(--cream);
  border-radius: var(--radius); padding: 28px; z-index: 110;
  box-shadow: var(--shadow);
}
.modal h2 { font-size: 1.25rem; }
.modal p { color: var(--ink-soft); font-size: 0.9rem; }
#orderSummary {
  width: 100%; min-height: 160px; margin: 12px 0 16px; padding: 12px;
  border: 1px solid var(--line); border-radius: var(--radius);
  font-family: inherit; font-size: 0.88rem; resize: vertical; background: var(--sand);
}
.modal-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.modal-close { position: absolute; top: 14px; right: 14px; }

/* Toast */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: var(--cream); padding: 10px 20px;
  border-radius: 999px; font-size: 0.85rem; z-index: 120;
}

/* Responsive */
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; }
  .hero-media img { min-height: 260px; }
  .hero-copy { padding: 32px 24px 40px; }
}
