:root {
  --bg: #ffffff;
  --bg-alt: #f7f7f8;
  --text: #1c1c1e;
  --muted: #6b6b70;
  --border: #e6e6ea;
  --primary: #1c1c1e;
  --primary-hover: #000000;
  --accent: #e5484d;
  --radius: 10px;
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
  --max: 1140px;
  --font: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea { font-family: inherit; font-size: 1rem; }
[hidden] { display: none !important; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 24px; border-radius: 6px; font-weight: 600; font-size: 0.95rem;
  border: 1px solid transparent; transition: all .18s ease; line-height: 1.2;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-1px); }
.btn-outline { background: #fff; border-color: var(--text); color: var(--text); }
.btn-outline:hover { background: var(--text); color: #fff; }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }

.icon-btn {
  background: none; border: 0; width: 40px; height: 40px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; position: relative;
  color: var(--text);
}
.icon-btn:hover { background: var(--bg-alt); }
.icon-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50; background: #fff;
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 24px; }
.brand { font-weight: 700; font-size: 1.25rem; letter-spacing: -0.01em; }
.nav { display: flex; gap: 28px; }
.nav a { font-weight: 500; color: var(--muted); font-size: 0.95rem; }
.nav a:hover { color: var(--text); }
.header-actions { display: flex; align-items: center; gap: 4px; }
.cart-count {
  position: absolute; top: 4px; right: 2px; background: var(--accent); color: #fff;
  font-size: 0.65rem; font-weight: 700; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; display: flex; align-items: center; justify-content: center;
}
.menu-btn { display: none; }
.search-bar { display: none; border-top: 1px solid var(--border); padding: 12px 0; background: #fff; }
.search-bar.open { display: block; }
.search-bar input {
  width: 100%; padding: 12px 16px; border: 1px solid var(--border); border-radius: 6px; outline: none;
}
.search-bar input:focus { border-color: var(--text); }

/* Featured */
.featured { padding: 56px 0; border-bottom: 1px solid var(--border); }
.featured-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: start; }
.featured-media img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); }
.badge {
  display: inline-block; background: var(--accent); color: #fff; font-size: 0.72rem; font-weight: 700;
  padding: 4px 10px; border-radius: 4px; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 14px;
}
.featured-body h1 { font-size: 1.9rem; line-height: 1.25; letter-spacing: -0.02em; margin-bottom: 12px; }
.price { font-size: 1.5rem; font-weight: 700; margin-bottom: 20px; }
.price .old { color: var(--muted); text-decoration: line-through; font-weight: 500; font-size: 1.05rem; margin-left: 8px; }
.btn-row { display: flex; gap: 12px; margin-bottom: 28px; flex-wrap: wrap; }
.featured-desc p { margin-bottom: 14px; color: #333; }
.featured-desc ul { margin: 0 0 14px 22px; }
.featured-desc li { margin-bottom: 4px; }
.file-note { color: var(--muted); font-size: 0.9rem; margin-top: 8px; }

/* Sections */
.section { padding: 72px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.section-head h2, .about h2, .newsletter h2 { font-size: 1.85rem; letter-spacing: -0.02em; margin-bottom: 12px; }
.section-head p { color: var(--muted); }
.section-head a { text-decoration: underline; }

/* Product grid */
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.product-card {
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: #fff;
  transition: transform .2s ease, box-shadow .2s ease; display: flex; flex-direction: column;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.product-card .thumb { aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg-alt); }
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.product-card:hover .thumb img { transform: scale(1.04); }
.product-card .card-body { padding: 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-card h3 { font-size: 1.02rem; line-height: 1.35; font-weight: 600; }
.product-card .card-price { font-weight: 700; font-size: 1.1rem; }
.product-card .card-actions { margin-top: auto; display: flex; gap: 8px; padding-top: 8px; }
.product-card .card-actions .btn { flex: 1; padding: 10px 12px; font-size: 0.88rem; }
.empty-note { text-align: center; color: var(--muted); margin-top: 24px; }

/* About */
.about { background: var(--bg-alt); }
.about-grid { display: grid; grid-template-columns: 340px 1fr; gap: 56px; align-items: center; }
.about-media img { border-radius: 50%; width: 100%; aspect-ratio: 1; object-fit: cover; box-shadow: var(--shadow); }
.about-body p { margin-bottom: 14px; }
.about-body .btn { margin-top: 10px; }

/* Reviews */
.review-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.review-card {
  border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; background: #fff;
  display: flex; flex-direction: column; gap: 12px;
}
.review-card .stars { color: #f5a623; letter-spacing: 2px; font-size: 0.95rem; }
.review-card p { font-size: 0.95rem; color: #333; flex: 1; }
.review-card cite { font-style: normal; font-weight: 600; font-size: 0.9rem; }

/* Newsletter */
.newsletter { background: var(--text); color: #fff; text-align: center; }
.newsletter p { color: #c8c8cc; margin-bottom: 24px; }
.newsletter-form { display: flex; gap: 10px; max-width: 480px; margin: 0 auto; }
.newsletter-form input { flex: 1; padding: 12px 16px; border-radius: 6px; border: 1px solid #444; outline: none; }
.newsletter .btn-primary { background: #fff; color: var(--text); }
.newsletter .btn-primary:hover { background: #eee; }
.form-success { margin-top: 16px; font-weight: 600; color: #4ade80; }
.contact .form-success { color: #16a34a; }

/* Contact */
.contact-inner { max-width: 640px; margin: 0 auto; }
.contact-form { display: flex; flex-direction: column; gap: 12px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.contact-form input, .contact-form textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 6px; outline: none; resize: vertical;
}
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--text); }
.contact-form .btn { align-self: flex-start; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 40px 0; background: #fff; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; justify-content: center; }
.footer-links a { color: var(--muted); font-size: 0.9rem; }
.footer-links a:hover { color: var(--text); }
.payment-icons { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.payment-icons span {
  border: 1px solid var(--border); border-radius: 4px; padding: 4px 10px; font-size: 0.75rem; font-weight: 600;
  color: var(--muted); letter-spacing: .02em;
}
.copyright { color: var(--muted); font-size: 0.85rem; }

/* Cart drawer */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.4); opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 90; }
.overlay.open { opacity: 1; pointer-events: auto; }
.cart-drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: 400px; max-width: 100%; background: #fff; z-index: 100;
  transform: translateX(100%); transition: transform .28s ease; display: flex; flex-direction: column;
  box-shadow: -8px 0 32px rgba(0,0,0,.12);
}
.cart-drawer.open { transform: translateX(0); }
.cart-head { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; border-bottom: 1px solid var(--border); }
.cart-head h3 { font-size: 1.15rem; }
.cart-items { flex: 1; overflow-y: auto; padding: 16px 24px; }
.cart-empty { color: var(--muted); text-align: center; padding: 40px 0; }
.cart-item { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--border); }
.cart-item img { width: 64px; height: 48px; object-fit: cover; border-radius: 6px; }
.cart-item h4 { font-size: 0.9rem; font-weight: 600; line-height: 1.3; }
.cart-item .ci-price { font-size: 0.85rem; color: var(--muted); }
.cart-item .remove { background: none; border: 0; color: var(--muted); font-size: 0.8rem; text-decoration: underline; }
.cart-item .remove:hover { color: var(--accent); }
.cart-foot { padding: 20px 24px; border-top: 1px solid var(--border); }
.cart-total { display: flex; justify-content: space-between; margin-bottom: 14px; font-size: 1.05rem; }
.cart-note { text-align: center; color: var(--muted); font-size: 0.8rem; margin-top: 10px; }

/* Toast */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 20px); background: var(--text); color: #fff;
  padding: 12px 20px; border-radius: 6px; font-size: 0.9rem; opacity: 0; pointer-events: none; transition: all .25s; z-index: 200;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Cookie banner */
.cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0; background: #fff; border-top: 1px solid var(--border);
  padding: 16px 24px; display: flex; align-items: center; justify-content: space-between; gap: 20px; z-index: 80;
  box-shadow: 0 -4px 20px rgba(0,0,0,.06); font-size: 0.9rem;
}
.cookie-banner p { color: var(--muted); }
.cookie-banner a { text-decoration: underline; }
.cookie-actions { display: flex; gap: 8px; flex-shrink: 0; }
.cookie-banner.hidden { display: none; }

/* Legal pages */
.legal { max-width: 800px; margin: 0 auto; padding: 56px 24px 80px; }
.legal h1 { font-size: 2rem; letter-spacing: -0.02em; margin-bottom: 6px; }
.legal .updated { color: var(--muted); margin-bottom: 36px; font-size: 0.9rem; }
.legal h2 { font-size: 1.25rem; margin: 32px 0 10px; }
.legal p, .legal li { margin-bottom: 10px; color: #333; }
.legal ul { margin-left: 22px; }
.legal a { text-decoration: underline; }

/* Responsive */
@media (max-width: 960px) {
  .featured-grid, .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .about-media { max-width: 260px; margin: 0 auto; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .review-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  .nav {
    display: none; position: absolute; top: 68px; left: 0; right: 0; background: #fff;
    flex-direction: column; gap: 0; border-bottom: 1px solid var(--border);
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 24px; border-top: 1px solid var(--border); }
  .menu-btn { display: inline-flex; }
  .product-grid, .review-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .newsletter-form { flex-direction: column; }
  .cookie-banner { flex-direction: column; align-items: flex-start; }
  .featured-body h1 { font-size: 1.5rem; }
  .section { padding: 52px 0; }
}
