:root {
  --bg: #fbf7f8;
  --ink: #101011;
  --muted: #6f676b;
  --line: #e7dfe2;
  --accent: #0c0c0d;
  --soft: #f2e8ec;
  --white: #ffffff;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

button, input, textarea { font: inherit; }

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(255,255,255,.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand {
  color: var(--ink);
  font-weight: 800;
  letter-spacing: 0;
  text-decoration: none;
}

nav {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

nav a, .admin-link, .icon-btn {
  border: 0;
  background: transparent;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
}

.icon-btn {
  border: 1px solid var(--ink);
  border-radius: 999px;
  padding: 9px 13px;
}

#cartCount {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  margin-left: 6px;
  border-radius: 50%;
  color: #fff;
  background: var(--accent);
  font-size: 12px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, .9fr);
  min-height: 620px;
  padding: clamp(32px, 5vw, 76px);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  background: var(--bg);
}

.hero-copy {
  max-width: 650px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}

h1, h2, h3, p { margin-top: 0; }

h1 {
  margin-bottom: 18px;
  color: var(--ink);
  font-family: Georgia, serif;
  font-size: clamp(42px, 7vw, 82px);
  line-height: .96;
  letter-spacing: 0;
}

h2 {
  font-family: Georgia, serif;
  font-size: clamp(30px, 4vw, 48px);
  letter-spacing: 0;
}

.hero-copy p:not(.eyebrow), .checkout p, .notice {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}

.hero-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  min-height: 480px;
}

.hero-images img {
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(16,16,17,.14);
}

.hero-images img:first-child { transform: translateY(-26px); }
.hero-images img:last-child { transform: translateY(34px); }

.primary, .secondary {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 46px;
  border-radius: 4px;
  padding: 12px 18px;
  border: 1px solid var(--accent);
  text-decoration: none;
  cursor: pointer;
  font-weight: 800;
}

.primary {
  color: #fff;
  background: var(--accent);
}

.secondary {
  color: var(--accent);
  background: #fff;
}

.notice {
  margin: 0 auto;
  max-width: 1120px;
  padding: 20px clamp(18px, 4vw, 28px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.notice strong { color: var(--ink); }

.section-head, .checkout, footer {
  max-width: 1120px;
  margin: 0 auto;
  padding: 58px clamp(18px, 4vw, 28px) 18px;
}

.products {
  max-width: 1120px;
  margin: 0 auto;
  padding: 10px clamp(18px, 4vw, 28px) 58px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 18px;
}

.product-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.product-card figure {
  margin: 0;
  aspect-ratio: 4 / 5;
  background: var(--soft);
}

.product-info {
  padding: 18px;
}

.product-info h3 {
  margin-bottom: 8px;
  font-size: 20px;
}

.product-info p {
  min-height: 58px;
  color: var(--muted);
  line-height: 1.45;
}

.meta {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
  font-size: 14px;
}

.price {
  display: block;
  margin: 14px 0;
  font-size: 22px;
  font-weight: 900;
}

.product-card .primary { width: 100%; }

.checkout {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 32px;
  padding-bottom: 72px;
}

form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

input, textarea {
  min-height: 44px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
}

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

.cart-panel {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 40;
  width: min(420px, 100vw);
  padding: 20px;
  background: #fff;
  border-left: 1px solid var(--line);
  box-shadow: -20px 0 60px rgba(16,16,17,.18);
  transform: translateX(110%);
  transition: transform .2s ease;
}

.cart-panel.open { transform: translateX(0); }

.cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.icon-only {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
}

.cart-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.qty {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qty button {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  padding: 18px 0;
  font-size: 18px;
}

.full { width: 100%; margin-bottom: 10px; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  padding: 24px;
  background: rgba(0,0,0,.52);
  overflow: auto;
}

.modal.open { display: block; }

.admin-box {
  max-width: 980px;
  margin: 0 auto;
  padding: 22px;
  background: #fff;
  border-radius: 8px;
}

.admin-content section {
  padding: 20px 0;
  border-top: 1px solid var(--line);
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.admin-products {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.admin-item {
  display: grid;
  grid-template-columns: 64px 1fr auto auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.admin-item img {
  width: 64px;
  height: 64px;
  border-radius: 6px;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

@media (max-width: 820px) {
  .hero, .checkout { grid-template-columns: 1fr; }
  .hero { min-height: auto; }
  .hero-images { min-height: 330px; }
  .admin-grid { grid-template-columns: 1fr; }
  .admin-item { grid-template-columns: 52px 1fr; }
  .admin-item button { width: 100%; }
  footer { flex-direction: column; }
}
