/* ============================================================
   MAGNAT — Homepage Redesign · Tokens & Base Styles
   Stays close to existing Figma: burgundy, gold, cream, Manrope+Forum
   ============================================================ */

:root {
  /* Brand colors — from Figma metadata */
  --burgundy-900: #29071A;
  --burgundy-800: #390A22;
  --burgundy-700: #510E2D;   /* main header */
  --burgundy-600: #75092C;   /* dominant brand */
  --burgundy-500: #82223E;   /* lighter accents */
  --burgundy-50:  #FBF4F7;

  --gold-700: #94752F;
  --gold-600: #AA8832;
  --gold-500: #C7882C;        /* primary gold */
  --gold-400: #DFAC5B;
  --gold-200: #DCC9AB;        /* cream-gold (header text) */
  --gold-100: #E8DAC1;

  --cream-100: #F2F0ED;       /* nav bg, footer bg */
  --cream-50:  #FAF8F4;
  --paper:     #FFFFFF;

  --ink-900: #1C1C1C;
  --ink-700: #555555;
  --ink-500: #787878;
  --ink-400: #AFAFAF;
  --ink-300: #D2D2D2;
  --ink-200: #F2F2F2;

  --red-sale: #B9000A;
  --green-ok: #34822A;

  /* Type */
  --font-display: "Forum", "Cormorant Garamond", "Playfair Display", serif;
  --font-body: "Manrope", "Inter", system-ui, sans-serif;
  --font-accent: "Nunito", "Manrope", sans-serif;

  /* Radii — Figma cards are square; only buttons & pills have radius */
  --r-pill: 999px;
  --r-button: 2px;
  --r-card: 0px;

  --shadow-card: 0 0 20px 0 rgba(52,52,52,0.07);
  --shadow-card-hover: 0 8px 32px 0 rgba(52,52,52,0.12);

  --container: 1300px;
  --gutter: 70px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  color: var(--ink-900);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
img { display: block; max-width: 100%; }
ul { list-style: none; padding: 0; margin: 0; }

.h-display {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--gold-600);
  font-size: 36px;
  line-height: 1;
  letter-spacing: 0.01em;
}

.h-eyebrow {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-500);
}

.h-rule {
  display: inline-block;
  width: 40px;
  height: 1px;
  background: var(--gold-500);
  vertical-align: middle;
  margin: 0 14px;
}

/* ============================================================
   PAGE FRAME — toggle between desktop and mobile views
   ============================================================ */
.stage {
  min-height: 100vh;
  background: #E8E2D5;
  background-image:
    radial-gradient(circle at 20% 10%, rgba(199,136,44,0.08), transparent 50%),
    radial-gradient(circle at 80% 90%, rgba(81,17,45,0.08), transparent 50%),
    linear-gradient(180deg, #ECE5D6 0%, #DCD1BD 100%);
  padding: 28px 24px 64px;
  overflow-x: clip;
}

/* Floating toolbar — Desktop/Mobile + Tweaks toggles */
.toolbar {
  position: sticky;
  top: 16px;
  z-index: 100;
  margin: 0 auto 24px;
  width: max-content;
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 6px;
  background: rgba(40,16,28,0.92);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
          backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(220,201,171,0.18);
  border-radius: 999px;
  box-shadow: 0 10px 32px -8px rgba(40,10,30,0.4);
  font-family: var(--font-body);
}
.toolbar__seg {
  display: flex;
  gap: 2px;
  background: rgba(0,0,0,0.25);
  padding: 3px;
  border-radius: 999px;
}
.toolbar__btn {
  padding: 8px 16px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-200);
  border-radius: 999px;
  cursor: pointer;
  transition: all .15s;
  display: flex;
  gap: 8px;
  align-items: center;
}
.toolbar__btn:hover { color: #fff; }
.toolbar__btn.on {
  background: var(--gold-500);
  color: var(--burgundy-900);
}
.toolbar__divider { width: 1px; height: 22px; background: rgba(220,201,171,0.2); margin: 0 2px; }
.toolbar__solo {
  padding: 8px 14px;
  font-family: var(--font-body);
  font-weight: 600; font-size: 12px;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--gold-200);
  border-radius: 999px;
  cursor: pointer;
  display: flex; gap: 8px; align-items: center;
  transition: all .15s;
}
.toolbar__solo:hover { color: #fff; }
.toolbar__solo.on {
  background: var(--gold-500);
  color: var(--burgundy-900);
}
.toolbar__solo .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--ink-500);
  transition: background .15s;
}
.toolbar__solo.on .dot { background: var(--burgundy-700); }

.viewport {
  display: flex;
  justify-content: center;
}
.viewport__scale {
  transform-origin: top center;
  flex-shrink: 0;
}

.frame {
  background: #fff;
  box-shadow: 0 30px 80px -20px rgba(40,10,30,0.35), 0 8px 24px -8px rgba(0,0,0,0.15);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}
.frame--desktop { width: 1440px; }
.frame--mobile {
  width: 390px;
  border-radius: 36px;
  background: #fff;
  box-shadow: 0 30px 80px -20px rgba(40,10,30,0.35), 0 8px 24px -8px rgba(0,0,0,0.15),
              0 0 0 12px #1c1c1c, 0 0 0 13px #3a3025;
}

.frame__chrome {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #2a2520;
  color: var(--gold-200);
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.frame--mobile .frame__chrome { display: none; }
.frame__chrome .dot {
  width: 9px; height: 9px; border-radius: 50%;
}
.frame__chrome .url {
  margin-left: 12px;
  font-family: var(--font-body);
  font-size: 11px;
  color: #c9bda1;
  letter-spacing: 0;
  text-transform: none;
}
.frame__chrome .badge {
  margin-left: auto;
  padding: 3px 10px;
  border: 1px solid var(--gold-500);
  color: var(--gold-200);
  border-radius: 999px;
  font-size: 10px;
}

.frame__body {
  width: 100%;
}

/* ============================================================
   HEADER / TOP BELT — matches Figma 1:1 (curved gold belt bottom)
   ============================================================ */
.belt {
  position: relative;
  z-index: 2;               /* sits above nav so the curve tongue overlays */
  height: 120px;            /* extended to fit belt curve */
  background: transparent;
  color: var(--gold-200);
  padding: 0;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
}
.belt__bg {
  position: absolute;
  inset: 0;
  color: var(--burgundy-700); /* belt.svg uses currentColor */
  pointer-events: none;
}
.belt__bg svg { display:block; width:100%; height:120px; }

.belt__row {
  position: relative;
  z-index: 1;
  height: 78px;
  display: flex;
  align-items: center;
  padding: 0 50px;
}
.belt .lang {
  display: flex; gap: 4px; align-items: center; cursor: pointer;
  font-weight: 500;
}
.belt .phones {
  display: flex; gap: 22px; align-items: center; margin-left: 22px;
}
.belt .phones .phone {
  display: flex; gap: 8px; align-items: center;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.belt .phones .phone .ic { opacity: 0.85; }
.belt__center {
  position: absolute;
  left: 50%;
  top: 14px;
  transform: translateX(-50%);
  width: 166px;
  height: 80px;
  z-index: 2;
  background: var(--gold-200);
  -webkit-mask: url("assets/logo-header.svg") center/contain no-repeat;
          mask: url("assets/logo-header.svg") center/contain no-repeat;
}
.belt .actions {
  margin-left: auto;
  display: flex;
  gap: 16px;
  align-items: center;
}
/* extra gap between search (has "Пошук" text) and first icon — matches Figma */
.belt .actions > :first-child { margin-right: 24px; }
.belt .actions .ic {
  display: flex; gap: 6px; align-items: center; cursor: pointer;
  transition: color .15s;
}
.belt .actions .ic:hover { color: #fff; }
.belt .actions .ic .count { font-weight: 500; }

/* Nav — sits below belt, slides up so the burgundy saddle tongue overlays it */
.nav {
  position: relative;
  margin-top: -42px;
  z-index: 1;
  height: 92px;
  padding-top: 42px;        /* compensate for overlap so links stay centered */
  background: var(--cream-100);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 44px;
  border-bottom: 1px solid #E6E1D7;
}
.nav a {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 16px;
  color: var(--ink-900);
  position: relative;
  padding: 8px 0;
  transition: color .15s;
  letter-spacing: 0.005em;
}
.nav a:hover { color: var(--burgundy-600); }
.nav a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--gold-500);
}
.nav a.sale { color: var(--red-sale); }

/* USP strip — small icons row under nav (NEW marketing addition) */
.usp {
  background: #fff;
  border-bottom: 1px solid var(--ink-200);
  padding: 14px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.usp__item {
  display: flex;
  gap: 10px;
  align-items: center;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--ink-700);
}
.usp__item b {
  display: block; color: var(--ink-900); font-weight: 600;
}
.usp__item .ic {
  width: 32px; height: 32px;
  color: var(--gold-500);
  flex-shrink: 0;
}

/* Section title block */
.section {
  padding: 80px var(--gutter) 0;
  margin: 0;
}
.section--bg-cream {
  background: var(--cream-50);
  padding: 80px var(--gutter);
  margin: 0;
}
.section--bg-burgundy {
  background: var(--burgundy-700);
  background-image:
    radial-gradient(ellipse at 80% 0%, rgba(199,136,44,0.15), transparent 60%),
    radial-gradient(ellipse at 0% 100%, rgba(220,201,171,0.06), transparent 50%);
  color: #fff;
  padding: 80px var(--gutter);
  margin: 0;
}
.section--bg-cream-orphan { background: var(--cream-50); padding-bottom: 70px; margin-top: 70px;}
.section--bg-burgundy-orphan {
  background: var(--burgundy-700);
  background-image:
    radial-gradient(ellipse at 80% 0%, rgba(199,136,44,0.15), transparent 60%),
    radial-gradient(ellipse at 0% 100%, rgba(220,201,171,0.06), transparent 50%);
  color: #fff;
  padding-bottom: 70px;
  margin-top: 70px;
}

.sec-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 36px;
  text-align: center;
}
.sec-head__title {
  font-family: var(--font-display);
  font-size: 36px;
  line-height: 1;
  color: var(--gold-600);
  margin: 0;
  font-weight: 400;
}
.section--bg-burgundy .sec-head__title { color: var(--gold-200); }
.sec-head__sub {
  max-width: 560px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink-500);
  line-height: 1.5;
}
.section--bg-burgundy .sec-head__sub { color: rgba(255,255,255,0.7); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.05em;
  border-radius: var(--r-button);
  cursor: pointer;
  transition: all .18s ease;
  white-space: nowrap;
  text-transform: uppercase;
}
.btn--solid { background: var(--gold-500); color: #fff; }
.btn--solid:hover { background: var(--gold-700); }
.btn--burgundy { background: var(--burgundy-600); color: #fff; }
.btn--burgundy:hover { background: var(--burgundy-700); }
.btn--ghost { background: transparent; color: var(--gold-200); border: 1px solid var(--gold-200); }
.btn--ghost:hover { background: var(--gold-200); color: var(--burgundy-700); }
.btn--ghost-dark { background: transparent; color: var(--gold-700); border: 1px solid var(--gold-500); }
.btn--ghost-dark:hover { background: var(--gold-500); color: #fff; border-color: var(--gold-500); }
.btn--link { background: none; color: var(--gold-500); padding: 6px 0; text-transform: none; letter-spacing: 0; font-size: 14px; }
.btn--link:hover { color: var(--gold-700); }
.btn--lg { padding: 18px 36px; font-size: 14px; }

/* ============================================================
   PRODUCT CARD — matches Figma 1:1 (325×462, 30/30/20 padding)
   ============================================================ */
.card {
  position: relative;
  background: #fff;
  border: 1px solid var(--ink-200);
  padding: 30px 30px 20px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  transition: box-shadow .2s ease;
}
.card:hover { box-shadow: var(--shadow-card); }
.card__photo {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background-size: cover;
  background-position: center;
  background-color: #f7f5f1;
  margin-bottom: 5px;
}
.card__overlay {
  position: absolute; inset: 0;
  padding: 6px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  pointer-events: none;
}
.card__overlay > * { pointer-events: auto; }
.card__labels { display: flex; gap: 4px; }
.card__icons { display: flex; gap: 8px; }
.card__icons .ic-btn {
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  color: var(--burgundy-700);
  cursor: pointer;
  transition: color .15s, transform .15s;
}
.card__icons .ic-btn:hover {
  color: var(--gold-500);
  transform: scale(1.08);
}
.card__icons .ic-btn.active { color: var(--gold-500); }

.label {
  display: inline-flex; align-items: center; justify-content: center;
  height: 22px;
  padding: 0 9px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
}
.label--new   { background: var(--gold-500); }
.label--sale  { background: var(--red-sale); }
.label--hit   { background: var(--burgundy-600); }
.label--gift  { background: var(--burgundy-500); }

.card__title {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.38;
  color: var(--ink-900);
  min-height: 2.75em;
  margin-top: 5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card__sku {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 12px;
  color: var(--ink-400);
  line-height: 1;
  margin-top: 2px;
}
.card__bottom {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-top: auto;
  padding-top: 16px;
  min-height: 50px;
}
.card__stock {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  color: var(--gold-600);
  line-height: 1;
}
.card__stock--out { color: var(--ink-400); }
.card__price {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 22px;
  color: var(--ink-900);
  text-align: right;
  line-height: 1;
}
.card__price .old {
  display: block;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink-400);
  text-decoration: line-through;
  margin-bottom: 4px;
}
.card__price .now-sale {
  color: var(--red-sale);
}

/* ============================================================
   PRODUCT GRID — cards share borders, no gap (matches Figma)
   ============================================================ */
.grid-products {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
.grid-products > .card {
  margin-right: -1px;
  margin-bottom: -1px;
}
.grid-products--3 { grid-template-columns: repeat(3, 1fr); }
.grid-products--5 { grid-template-columns: repeat(5, 1fr); }

.center { display: flex; justify-content: center; margin-top: 40px; }

/* ============================================================
   FOOTER — matches Figma 1:1 with vertical dividers
   ============================================================ */
.footer {
  background: var(--cream-100);
  padding: 50px var(--gutter) 30px;
  margin-top: 80px;
}
.footer__cols {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 0;
}
.footer__col {
  padding: 0 40px;
  border-right: 1px solid var(--ink-300);
}
.footer__col:first-child { padding-left: 0; }
.footer__col:last-child  { padding-right: 0; border-right: 0; }

.footer__brand {
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  gap: 10px;
  padding-top: 10px;
}
.footer__brand .logo {
  width: 164px; height: 140px;
  background: var(--burgundy-700);
  -webkit-mask: url("assets/logo-header.svg") center/contain no-repeat;
          mask: url("assets/logo-header.svg") center/contain no-repeat;
}
.footer__brand .tagline {
  font-family: var(--font-body); font-size: 11px;
  letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--ink-500); margin-top: 4px;
}
.footer__title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 18px;
  color: var(--ink-900);
  margin-bottom: 14px;
}
.footer a {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  color: var(--ink-700);
  padding: 6px 0;
  transition: color .15s;
}
.footer a:hover { color: var(--burgundy-600); }
.footer__contact-item {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 6px 0;
  font-family: var(--font-body);
  font-size: 14px; color: var(--ink-700);
}
.footer__contact-item .ic { color: var(--burgundy-600); flex-shrink: 0; margin-top: 2px; }
.footer__contact-item a { padding: 0; display: inline; }
.footer__contact-item.address { font-size: 13px; line-height: 1.5; color: var(--ink-700); }
.footer__socials { display: flex; gap: 14px; margin-top: 14px; color: var(--burgundy-600); }
.footer__socials a { padding: 0; }

.footer__bottom {
  margin-top: 40px; padding-top: 22px;
  border-top: 1px solid var(--ink-300);
  display: flex;
  justify-content: space-between;
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--ink-500);
}
