/* ============ TOKENS ============ */
:root {
  --bg: #FFF8EA;
  --ink: #16234A;
  --ink-soft: #5B6480;
  --red: #C8353C;
  --gold: #E3AE4D;
  --mint: #6FAE9C;
  --navy: #16234A;
  --line: #E5D9BE;
  --card: #FFFFFF;
  --radius: 14px;
  --font-display: "Unbounded", sans-serif;
  --font-body: "Manrope", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

:focus-visible {
  outline: 3px solid var(--mint);
  outline-offset: 2px;
}

.lang-en, .lang-ua { display: block; }
body.hide-en .lang-en { display: none; }
body.hide-ua .lang-ua { display: none; }

/* ============ HEADER ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--navy);
  border-bottom: 4px solid var(--gold);
}

.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  line-height: 1.05;
}

.brand-logo {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 3px solid var(--gold);
}

.brand-name {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4.2vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.brand-name .lang-ua { color: #FFFFFF; }
.brand-name .lang-en { color: var(--gold); font-size: 0.5em; font-weight: 500; margin-top: 4px; }

.page-nav {
  display: flex;
  gap: 18px;
  margin-left: 8px;
}
.page-nav-link {
  color: rgba(255,255,255,0.75);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.page-nav-link:hover { color: #fff; }
.page-nav-link.active { color: #fff; border-bottom-color: var(--gold); }

.header-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-toggle {
  display: flex;
  border: 2px solid var(--gold);
  border-radius: 999px;
  overflow: hidden;
}
.lang-toggle button {
  padding: 6px 14px;
  font-weight: 700;
  font-size: 0.8rem;
  background: transparent;
  color: var(--gold);
}
.lang-toggle button.active {
  background: var(--gold);
  color: var(--navy);
}

.cart-button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--gold);
  color: var(--navy);
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
}
.cart-count {
  background: var(--red);
  color: #fff;
  min-width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 0.72rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* ============ HERO ============ */
.hero {
  max-width: 1180px;
  margin: 0 auto;
  padding: 40px 20px 20px;
}
.hero-tagline {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 4vw, 2.4rem);
  max-width: 720px;
  line-height: 1.15;
}
.hero-tagline .lang-ua { color: var(--ink); }
.hero-tagline .lang-en { color: var(--ink-soft); font-size: 0.55em; font-weight: 500; margin-top: 6px; }

.hero-bio {
  max-width: 640px;
  margin: 14px 0 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--ink-soft);
}
.hero-bio .lang-ua { display: block; color: var(--ink); margin-bottom: 6px; }

.flag-stripe {
  height: 6px;
  margin: 18px 0 0;
  background: repeating-linear-gradient(
    90deg,
    var(--red) 0px, var(--red) 28px,
    var(--bg) 28px, var(--bg) 56px
  );
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

/* ============ CATEGORY NAV ============ */
.category-nav {
  max-width: 1180px;
  margin: 0 auto;
  padding: 10px 20px 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.category-pill {
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 700;
  font-size: 0.85rem;
  background: var(--card);
  color: var(--ink);
  transition: transform .12s ease;
}
.category-pill:hover { transform: translateY(-2px); }
.category-pill.active {
  background: var(--gold);
  border-color: var(--gold);
}

/* ============ PRODUCT GRID ============ */
.product-grid {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px 60px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 22px;
}

.product-card {
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  overflow: visible;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform .15s ease, box-shadow .15s ease;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 6px 6px 0 var(--ink);
}

.product-photo {
  aspect-ratio: 1 / 1;
  border-bottom: 2px solid var(--ink);
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
  background: #F1ECDD;
  position: relative;
}
.product-photo img { width: 100%; height: 100%; object-fit: cover; }
.product-photo.img-missing::after {
  content: "photo coming soon";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px;
  font-size: 0.75rem;
  color: var(--ink-soft);
  font-family: var(--font-body);
}
.product-photo img.hidden { display: none; }

.out-of-stock-banner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-8deg);
  background: var(--red);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(0.85rem, 5vw, 1.15rem);
  letter-spacing: 0.03em;
  padding: 8px 18px;
  border-radius: 6px;
  box-shadow: 0 4px 0 rgba(0,0,0,0.2);
  text-align: center;
  white-space: nowrap;
  z-index: 2;
}
.product-photo.sold-out img {
  opacity: 0.35;
  filter: grayscale(60%);
}

.sale-ribbon {
  position: absolute;
  top: 10px;
  left: -6px;
  background: var(--red);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 4px 10px;
  letter-spacing: 0.03em;
  border-radius: 0 4px 4px 0;
  z-index: 2;
}

.price-original {
  font-size: 0.72rem;
  color: var(--ink-soft);
  text-decoration: line-through;
  margin-right: 4px;
}

.category-pill.sale-pill { border-color: var(--red); color: var(--red); }
.category-pill.sale-pill.active { background: var(--red); border-color: var(--red); color: #fff; }

.product-body {
  padding: 14px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.product-name .lang-ua { font-weight: 700; font-size: 0.95rem; }
.product-name .lang-en { font-weight: 500; font-size: 0.78rem; color: var(--ink-soft); }

.product-desc {
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin: 2px 0 6px;
}
.product-desc .lang-en { margin-top: 2px; }

.product-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.stock-note {
  font-size: 0.7rem;
  color: var(--red);
  font-weight: 700;
  margin-top: 2px;
}

/* Signature element: price tag / sticker */
.price-tag {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink);
  background: var(--gold);
  padding: 6px 12px 6px 16px;
  position: relative;
  clip-path: polygon(10px 0, 100% 0, 100% 100%, 10px 100%, 0 50%);
  margin-left: 6px;
}
.price-tag::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--bg);
}

.add-btn {
  border: 2px solid var(--ink);
  border-radius: 999px;
  width: 38px;
  height: 38px;
  font-size: 1.2rem;
  font-weight: 700;
  background: var(--card);
  flex-shrink: 0;
  transition: background .12s ease;
}
.add-btn:hover { background: var(--mint); }
.add-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ============ PRODUCT MODAL ============ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(36,38,43,0.5);
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }

.product-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.96);
  width: min(480px, 92vw);
  max-height: 88vh;
  overflow-y: auto;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  z-index: 61;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.product-modal.open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--card);
  font-size: 1.3rem;
  line-height: 1;
  z-index: 2;
}
.modal-close:hover { background: var(--red); color: #fff; border-color: var(--red); }

.modal-photo {
  aspect-ratio: 4 / 3;
  background: #F1ECDD;
  border-bottom: 2px solid var(--ink);
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
  position: relative;
}
.modal-photo img { width: 100%; height: 100%; object-fit: contain; }
.modal-photo.img-missing::after {
  content: "photo coming soon";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  font-size: 0.85rem;
}
.modal-photo img.hidden { display: none; }

.modal-body { padding: 18px 20px 22px; }
.modal-name .lang-ua { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; display: block; }
.modal-name .lang-en { font-size: 0.82rem; color: var(--ink-soft); font-weight: 500; }
.modal-desc { margin: 10px 0 16px; font-size: 0.85rem; color: var(--ink-soft); }
.modal-desc .lang-ua { display: block; margin-bottom: 3px; color: var(--ink); }
.modal-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.modal-stock { font-size: 0.75rem; color: var(--ink-soft); margin-top: 8px; }
.modal-oos {
  display: none;
  color: #fff;
  background: var(--red);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.02em;
  padding: 10px 14px;
  border-radius: 8px;
  text-align: center;
  margin-top: 12px;
}
.product-modal.oos .modal-oos { display: block; }
.product-modal.oos #modalAddBtn { opacity: 0.4; pointer-events: none; }

/* ============ CART DRAWER ============ */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(36,38,43,0.4);
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.cart-overlay.open { opacity: 1; pointer-events: auto; }

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px, 92vw);
  background: var(--bg);
  border-left: 2px solid var(--ink);
  z-index: 51;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .25s ease;
}
.cart-drawer.open { transform: translateX(0); }

.cart-header {
  padding: 18px 20px;
  border-bottom: 2px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cart-header h2 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin: 0;
}
.cart-close {
  font-size: 1.3rem;
  line-height: 1;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid var(--ink);
}
.cart-close:hover { background: var(--red); color: #fff; border-color: var(--red); }

.cart-scroll {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.cart-items {
  padding: 12px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cart-empty {
  color: var(--ink-soft);
  font-size: 0.9rem;
  text-align: center;
  margin-top: 40px;
}

.cart-item {
  display: flex;
  gap: 8px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}
.cart-item-photo {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  overflow: hidden;
  background: #F1ECDD;
  flex-shrink: 0;
  border: 1px solid var(--line);
}
.cart-item-photo img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-size: 0.85rem; font-weight: 700; }
.cart-item-name .en { display: block; font-weight: 500; color: var(--ink-soft); font-size: 0.72rem; }
.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}
.qty-btn {
  width: 22px;
  height: 22px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cart-item-remove {
  font-size: 0.72rem;
  color: var(--red);
  text-decoration: underline;
  margin-top: 4px;
}
.cart-item-price {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
}

.cart-footer {
  border-top: 2px solid var(--ink);
  padding: 12px 20px 18px;
}
.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin-bottom: 10px;
}

.checkout-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 10px;
}
.checkout-fields input {
  padding: 8px 10px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.8rem;
  background: var(--card);
  color: var(--ink);
  min-width: 0;
}
.checkout-fields input::placeholder { color: var(--ink-soft); }

.checkout-actions {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.checkout-btn {
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 9px 14px;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.checkout-btn.email { background: var(--ink); color: var(--bg); }
.checkout-btn.telegram { background: var(--mint); border-color: var(--mint); }
.checkout-btn.messenger { background: #0084FF; border-color: #0084FF; color: #fff; }
.checkout-btn.instagram {
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
  border-color: #bc1888;
  color: #fff;
}
.checkout-btn.hidden { display: none; }
.checkout-btn:hover { transform: translateY(-1px); }
.checkout-hint {
  font-size: 0.68rem;
  color: var(--ink-soft);
  margin-top: 8px;
  text-align: center;
}

/* ============ SIMPLE CONTENT PAGES (About / FAQ) ============ */
.page-content {
  max-width: 760px;
  margin: 0 auto;
  padding: 44px 20px 60px;
}
.page-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  margin-bottom: 18px;
}
.page-title .lang-ua { display: block; color: var(--ink); }
.page-title .lang-en { display: block; color: var(--ink-soft); font-size: 0.55em; font-weight: 500; margin-top: 4px; }

.page-photo {
  width: 100%;
  max-width: 420px;
  border-radius: var(--radius);
  border: 2px solid var(--ink);
  margin: 0 auto 28px;
  display: block;
}

.page-body p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink);
  margin-bottom: 16px;
}
.inline-link {
  color: var(--red);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-underline-offset: 3px;
}
.inline-link:hover { color: var(--ink); }
.page-body .lang-ua { display: block; margin-bottom: 4px; }
.page-body .lang-en { display: block; color: var(--ink-soft); font-size: 0.9em; margin-bottom: 16px; }

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--red);
  color: #fff;
  border: 2px solid var(--red);
  border-radius: 999px;
  padding: 12px 24px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  margin-top: 10px;
}
.cta-button:hover { background: var(--ink); border-color: var(--ink); }

.faq-item {
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}
.faq-item:first-child { padding-top: 0; }
.faq-question {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 8px;
}
.faq-question .lang-ua { display: block; color: var(--ink); }
.faq-question .lang-en { display: block; color: var(--ink-soft); font-size: 0.75em; font-weight: 500; margin-top: 2px; }
.faq-answer { font-size: 0.9rem; line-height: 1.6; color: var(--ink); }
.faq-answer .lang-ua { display: block; margin-bottom: 3px; }
.faq-answer .lang-en { display: block; color: var(--ink-soft); }

.edit-note {
  background: #FFF3D6;
  border-left: 3px solid var(--gold);
  padding: 8px 12px;
  font-size: 0.72rem;
  color: var(--ink-soft);
  margin: -8px 0 16px;
}

/* ============ FOOTER ============ */
.site-footer {
  max-width: 1180px;
  margin: 0 auto;
  padding: 30px 20px 50px;
  color: var(--ink-soft);
  font-size: 0.8rem;
  border-top: 1px solid var(--line);
}
.site-footer p { margin: 0 0 6px; }
.site-footer p:last-child { margin-bottom: 0; }

.footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: 16px 0 12px;
}
.footer-social-link {
  color: var(--ink);
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  border-bottom: 2px solid var(--gold);
  padding-bottom: 2px;
}
.footer-social-link:hover { color: var(--red); border-color: var(--red); }
.footer-social-link.hidden { display: none; }

.footer-location {
  font-size: 0.75rem;
  color: var(--ink-soft);
}

.cart-policy-note {
  font-size: 0.72rem;
  color: var(--ink-soft);
  background: #F1ECDD;
  border-left: 3px solid var(--gold);
  padding: 6px 10px;
  margin: 0 0 10px;
  line-height: 1.4;
}

@media (max-width: 640px) {
  .hero { padding: 28px 16px 12px; }
  .category-nav { padding: 8px 16px 18px; }
  .product-grid { padding: 0 16px 40px; gap: 16px; }

  .header-inner {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 16px 16px 14px;
  }
  .brand { justify-content: center; }
  .page-nav { margin-left: 0; gap: 20px; }
  .header-controls { width: 100%; justify-content: center; }
}
