/* ==========================================================================
   Роза Козметика — основни стилове
   ========================================================================== */

:root {
  --burgundy: #6d2739;
  --rose: #a8455f;
  --rose-light: #c26480;
  --blush: #f7e6ea;
  --blush-deep: #f0d5dc;
  --cream: #fdf9f4;
  --sand: #f3ece1;
  --gold: #b08d4f;
  --ink: #2e2429;
  --muted: #7c6b72;
  --line: #e6d8da;
  --white: #ffffff;

  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Jost", "Segoe UI", system-ui, -apple-system, sans-serif;

  --shadow-sm: 0 2px 10px rgba(109, 39, 57, 0.06);
  --shadow-md: 0 10px 30px rgba(109, 39, 57, 0.10);
  --shadow-lg: 0 22px 54px rgba(109, 39, 57, 0.16);
  --radius: 14px;
  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--rose); text-decoration: none; }
a:hover { color: var(--burgundy); }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0; }

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

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

/* --------------------------------------------------------- Бутони */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--sans); font-size: 15px; font-weight: 500;
  letter-spacing: 0.04em; text-transform: uppercase;
  padding: 14px 30px; border: 1px solid transparent; border-radius: 999px;
  cursor: pointer; transition: transform .18s ease, background .18s ease,
    color .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--burgundy); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--rose); color: #fff; box-shadow: var(--shadow-md); }
.btn--ghost { background: transparent; color: var(--burgundy); border-color: var(--burgundy); }
.btn--ghost:hover { background: var(--burgundy); color: #fff; }
.btn--block { width: 100%; }
.btn--sm { padding: 10px 20px; font-size: 13px; }

/* --------------------------------------------------------- Промо лента */
.topbar {
  background: var(--burgundy); color: #f6e3e7;
  font-size: 13.5px; letter-spacing: .06em; text-align: center; padding: 9px 16px;
}

/* --------------------------------------------------------- Хедър */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(253, 249, 244, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; min-height: 76px;
}
.logo { display: flex; align-items: center; gap: 11px; }
.logo__mark { width: 38px; height: 38px; flex: 0 0 38px; }
.logo__text { font-family: var(--serif); font-size: 26px; letter-spacing: .01em; color: var(--burgundy); }
.logo__text span {
  display: block; font-family: var(--sans); font-size: 9.5px;
  letter-spacing: .34em; text-transform: uppercase; color: var(--gold); margin-top: -4px;
}

.nav { display: flex; align-items: center; gap: 30px; }
.nav a { font-size: 15px; color: var(--ink); letter-spacing: .02em; position: relative; padding: 4px 0; }
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 0;
  background: var(--rose); transition: width .22s ease;
}
.nav a:hover::after { width: 100%; }

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

.cart-btn {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--blush); border: 1px solid var(--blush-deep); color: var(--burgundy);
  border-radius: 999px; padding: 9px 17px; font-family: var(--sans); font-size: 14px;
  cursor: pointer; transition: background .18s ease, box-shadow .18s ease;
}
.cart-btn:hover { background: var(--blush-deep); box-shadow: var(--shadow-sm); }
.cart-btn__count {
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px;
  background: var(--burgundy); color: #fff; font-size: 12.5px;
  display: inline-flex; align-items: center; justify-content: center;
}

.burger {
  display: none; background: none; border: 0; cursor: pointer; padding: 8px; color: var(--burgundy);
}

/* --------------------------------------------------------- Герой */
.hero { background: linear-gradient(170deg, var(--blush) 0%, var(--cream) 72%); overflow: hidden; }
.hero__inner {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center;
  padding: 78px 24px 88px;
}
.eyebrow {
  font-size: 12.5px; letter-spacing: .3em; text-transform: uppercase;
  color: var(--gold); margin: 0 0 18px;
}
.hero h1 { font-size: clamp(42px, 6vw, 68px); color: var(--burgundy); margin-bottom: 20px; }
.hero h1 em { font-style: italic; color: var(--rose); }
.hero__lead { font-size: 18.5px; color: var(--muted); max-width: 46ch; margin: 0 0 32px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; }
.hero__figure { position: relative; }
.hero__figure img { border-radius: 200px 200px var(--radius) var(--radius); box-shadow: var(--shadow-lg); }
.hero__badge {
  position: absolute; left: -22px; bottom: 34px; background: #fff;
  border-radius: var(--radius); padding: 16px 22px; box-shadow: var(--shadow-md); text-align: center;
}
.hero__badge strong { display: block; font-family: var(--serif); font-size: 30px; color: var(--burgundy); }
.hero__badge span { font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

/* --------------------------------------------------------- Предимства */
.perks { border-block: 1px solid var(--line); background: var(--white); }
.perks__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; padding: 34px 24px; }
.perk { display: flex; gap: 14px; align-items: flex-start; }
.perk svg { flex: 0 0 26px; color: var(--rose); margin-top: 3px; }
.perk h3 { font-family: var(--sans); font-size: 15px; font-weight: 600; margin-bottom: 2px; }
.perk p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.45; }

/* --------------------------------------------------------- Секции */
.section { padding: 88px 0; }
.section--tint { background: var(--sand); }
.section__head { text-align: center; max-width: 620px; margin: 0 auto 46px; }
.section__head h2 { font-size: clamp(32px, 4vw, 44px); color: var(--burgundy); margin-bottom: 14px; }
.section__head p { color: var(--muted); margin: 0; }

/* --------------------------------------------------------- Филтри */
.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 40px; }
.filter {
  background: transparent; border: 1px solid var(--line); color: var(--muted);
  border-radius: 999px; padding: 9px 20px; font-family: var(--sans); font-size: 14px;
  cursor: pointer; transition: all .18s ease;
}
.filter:hover { border-color: var(--rose-light); color: var(--rose); }
.filter.is-active { background: var(--burgundy); border-color: var(--burgundy); color: #fff; }

/* --------------------------------------------------------- Продукти */
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: 30px; }
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: var(--blush-deep); }
.card__media { position: relative; background: var(--blush); }
.card__media img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.card__tag {
  position: absolute; top: 14px; left: 14px; background: var(--burgundy); color: #fff;
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  padding: 5px 12px; border-radius: 999px;
}
.card__tag--sale { background: var(--gold); }
.card__body { padding: 20px 20px 22px; display: flex; flex-direction: column; flex: 1; gap: 8px; }
.card__cat { font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.card__title { font-size: 22px; color: var(--burgundy); }
.card__desc { font-size: 14.5px; color: var(--muted); margin: 0; line-height: 1.5; flex: 1; }
.card__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 6px; }
.price { font-family: var(--serif); font-size: 25px; color: var(--ink); }
.price s { font-family: var(--sans); font-size: 14px; color: var(--muted); margin-left: 7px; }

/* --------------------------------------------------------- За нас */
.about__inner { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.about__figure img { border-radius: var(--radius); box-shadow: var(--shadow-md); }
.about h2 { font-size: clamp(30px, 4vw, 42px); color: var(--burgundy); margin-bottom: 18px; }
.about p { color: var(--muted); }
.about__stats { display: flex; gap: 40px; margin-top: 30px; flex-wrap: wrap; }
.about__stats div strong {
  display: block; font-family: var(--serif); font-size: 34px; color: var(--rose); line-height: 1;
}
.about__stats div span { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

/* --------------------------------------------------------- Отзиви */
.reviews { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.review {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 28px;
}
.review h3 { font-size: 24px; color: var(--burgundy); margin-bottom: 10px; }
.review p { font-size: 15.5px; color: var(--muted); margin: 0; line-height: 1.6; }

/* --------------------------------------------------------- Бюлетин */
.newsletter { background: var(--burgundy); color: #f8e9ec; text-align: center; padding: 76px 0; }
.newsletter h2 { color: #fff; font-size: clamp(30px, 4vw, 42px); margin-bottom: 12px; }
.newsletter p { color: #e3c3cb; margin: 0 auto 28px; max-width: 52ch; }
.newsletter form { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.newsletter input {
  min-width: 300px; padding: 14px 20px; border-radius: 999px; border: 1px solid #8d4257;
  background: #7d3348; color: #fff; font-family: var(--sans); font-size: 15px;
}
.newsletter input::placeholder { color: #d3a3ae; }
.newsletter input:focus { outline: 2px solid var(--gold); outline-offset: 2px; }
.newsletter .btn--primary { background: var(--gold); color: #3a2a10; }
.newsletter .btn--primary:hover { background: #c8a361; }
.newsletter small { display: block; margin-top: 16px; color: #cf9ba7; font-size: 13px; }

/* --------------------------------------------------------- Контакти */
.contact__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.contact__card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 26px; text-align: center;
}
.contact__card svg { color: var(--rose); margin-bottom: 12px; }
.contact__card h3 {
  font-family: var(--sans); font-size: 15px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 8px;
}
.contact__card p { margin: 0; color: var(--muted); font-size: 15.5px; }

/* --------------------------------------------------------- Футър */
.footer { background: #33202a; color: #cbb6bd; padding: 60px 0 26px; font-size: 15px; }
.footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 36px; }
.footer h4 {
  font-family: var(--sans); font-size: 13px; letter-spacing: .16em;
  text-transform: uppercase; color: #fff; margin: 0 0 16px; font-weight: 600;
}
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer a { color: #cbb6bd; }
.footer a:hover { color: #fff; }
.footer__brand .logo__text { color: #fff; }
.footer__brand p { color: #a9939b; font-size: 14.5px; max-width: 34ch; }
.footer__legal { border-top: 1px solid #4a333d; margin-top: 44px; padding-top: 26px; }
.footer__legal dl {
  margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 36px;
}
.footer__legal dl > div { display: flex; gap: 8px; flex-wrap: wrap; font-size: 14.5px; }
.footer__legal dt { color: #9c868e; min-width: 108px; }
.footer__legal dd { margin: 0; color: #e2d3d8; }

.footer__bottom {
  border-top: 1px solid #4a333d; margin-top: 30px; padding-top: 22px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 13.5px; color: #9c868e;
}

/* --------------------------------------------------------- Количка */
.overlay {
  position: fixed; inset: 0; background: rgba(46, 36, 41, .45);
  opacity: 0; visibility: hidden; transition: opacity .25s ease, visibility .25s ease; z-index: 90;
}
.overlay.is-open { opacity: 1; visibility: visible; }

.cart {
  position: fixed; top: 0; right: 0; height: 100%; width: 100%; max-width: 420px;
  background: var(--cream); z-index: 100; display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .3s cubic-bezier(.4, 0, .2, 1);
  box-shadow: var(--shadow-lg);
}
.cart.is-open { transform: translateX(0); }
.cart__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 24px; border-bottom: 1px solid var(--line);
}
.cart__head h2 { font-size: 25px; color: var(--burgundy); }
.cart__close { background: none; border: 0; cursor: pointer; color: var(--muted); padding: 6px; }
.cart__close:hover { color: var(--burgundy); }
.cart__items { flex: 1; overflow-y: auto; padding: 12px 24px; }
.cart__empty { text-align: center; color: var(--muted); padding: 60px 10px; }
.cart__empty svg { color: var(--blush-deep); margin-bottom: 14px; }

.cart-item {
  display: grid; grid-template-columns: 72px 1fr auto; gap: 14px;
  padding: 18px 0; border-bottom: 1px solid var(--line); align-items: center;
}
.cart-item img { width: 72px; height: 72px; border-radius: 10px; object-fit: cover; background: var(--blush); }
.cart-item__name { font-family: var(--serif); font-size: 18px; color: var(--burgundy); line-height: 1.25; }
.cart-item__price { font-size: 14px; color: var(--muted); }
.qty {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 8px;
  border: 1px solid var(--line); border-radius: 999px; padding: 2px; background: #fff;
}
.qty button {
  width: 26px; height: 26px; border: 0; border-radius: 50%; background: transparent;
  color: var(--burgundy); font-size: 17px; line-height: 1; cursor: pointer;
}
.qty button:hover { background: var(--blush); }
.qty span { min-width: 22px; text-align: center; font-size: 14.5px; }
.cart-item__remove { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 4px; }
.cart-item__remove:hover { color: var(--rose); }

.cart__foot { border-top: 1px solid var(--line); padding: 20px 24px 26px; background: #fff; }
.cart__row { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 15px; color: var(--muted); }
.cart__row--total { font-family: var(--serif); font-size: 24px; color: var(--burgundy); margin: 12px 0 18px; }
.cart__note { font-size: 13px; color: var(--muted); text-align: center; margin: 12px 0 0; }

/* --------------------------------------------------------- Редактор */
.admin { max-width: 520px; }
.admin__hint {
  margin: 0; padding: 16px 24px; background: var(--blush);
  border-bottom: 1px solid var(--line); font-size: 13.5px;
  line-height: 1.5; color: var(--muted);
}
.admin .cart__foot { display: grid; gap: 10px; }

.admin-item {
  display: grid; grid-template-columns: 64px 1fr; gap: 14px;
  padding: 18px 0; border-bottom: 1px solid var(--line); align-items: start;
}
.admin-item.is-edited { border-left: 3px solid var(--gold); padding-left: 12px; margin-left: -15px; }
.admin-item img {
  width: 64px; height: 64px; border-radius: 10px; object-fit: cover;
  background: var(--blush); border: 1px solid var(--line);
}
.admin-item__fields { display: grid; gap: 8px; min-width: 0; }
.admin-item__label {
  font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold);
}
.admin-item__input {
  width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px;
  font-family: var(--serif); font-size: 17px; color: var(--burgundy); background: #fff;
}
.admin-item__input:focus { outline: 2px solid var(--rose-light); outline-offset: 1px; border-color: transparent; }
.admin-item__actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.admin-item__reset {
  background: none; border: 0; padding: 4px 0; cursor: pointer;
  font-family: var(--sans); font-size: 13px; color: var(--rose); text-decoration: underline;
}
.admin-item__reset:disabled { color: var(--line); cursor: default; text-decoration: none; }

.admin__export { display: grid; gap: 10px; padding-bottom: 6px; }
.admin__export p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
.admin__export code { font-size: 12.5px; background: var(--blush); padding: 1px 5px; border-radius: 4px; }
.admin__export textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 12px;
  line-height: 1.5; color: var(--ink); background: var(--sand); resize: vertical;
}

/* --------------------------------------------------------- Известие */
.toast {
  position: fixed; left: 50%; bottom: 30px; transform: translate(-50%, 22px);
  background: var(--burgundy); color: #fff; padding: 13px 26px; border-radius: 999px;
  font-size: 15px; box-shadow: var(--shadow-lg); z-index: 120;
  opacity: 0; visibility: hidden; transition: all .28s ease;
}
.toast.is-visible { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* --------------------------------------------------------- Появяване */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-in { opacity: 1; transform: none; }

/* --------------------------------------------------------- Адаптивност */
@media (max-width: 980px) {
  .hero__inner { grid-template-columns: 1fr; gap: 42px; padding-top: 56px; }
  .hero__figure { max-width: 500px; margin: 0 auto; }
  .hero__badge { left: 8px; }
  .perks__grid { grid-template-columns: repeat(2, 1fr); }
  .about__inner { grid-template-columns: 1fr; gap: 36px; }
  .reviews { grid-template-columns: 1fr; }
  .contact__grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .burger { display: inline-flex; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--cream); border-bottom: 1px solid var(--line);
    padding: 8px 24px 18px; display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .header__inner { position: relative; }
  .cart-btn span:not(.cart-btn__count) { display: none; }
  .section { padding: 62px 0; }
  .products { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
  .newsletter input { min-width: 0; width: 100%; }
  .newsletter form .btn { width: 100%; }
  .footer__grid { grid-template-columns: 1fr; gap: 28px; }
  .footer__legal dl { grid-template-columns: 1fr; }
  .about__stats { gap: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
