:root {
  --dark: #3d1a2e;
  --dark-soft: #5c2d4a;
  --rose: #c2185b;
  --rose-light: #e91e63;
  --rose-pale: #fce4ec;
  --pink: #f48fb1;
  --bg: #fdf5f8;
  --surface: #ffffff;
  --text: #3d1a2e;
  --text-muted: #8e6a7e;
  --border: #f0d6e2;
  --success: #43a047;
  --error: #e53935;
  --font: 'Inter', system-ui, sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;
  --header-h: 72px;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(194, 24, 91, 0.08);
  --transition: 0.25s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body { font-family: var(--font); font-size: 16px; line-height: 1.6; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

h1, h2, h3, .section-title, .hero__title, .page-hero__title, .product-detail__title, .form__title {
  font-family: var(--font-display);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; font-size: 15px; font-weight: 600; border-radius: 10px;
  border: 2px solid transparent; cursor: pointer; transition: all var(--transition); white-space: nowrap;
}
.btn--primary { background: var(--rose); color: #fff; border-color: var(--rose); }
.btn--primary:hover { background: var(--rose-light); transform: translateY(-1px); }
.btn--outline { background: transparent; color: var(--text); border-color: var(--border); }
.btn--outline:hover { border-color: var(--rose); color: var(--rose); }
.btn--dark { background: var(--dark); color: #fff; border-color: var(--dark); }

/* Header */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100; height: var(--header-h);
  background: rgba(255,255,255,0.95); backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent; transition: all var(--transition);
}
.header--scrolled { border-color: var(--border); box-shadow: var(--shadow); }
.header__inner { display: flex; align-items: center; gap: 20px; height: var(--header-h); }

.logo { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 700; flex-shrink: 0; font-family: var(--font-display); }
.logo__icon {
  width: 38px; height: 38px; background: linear-gradient(135deg, var(--rose), var(--pink));
  border-radius: 10px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 18px;
}
.logo__accent { color: var(--rose); }

.nav { display: flex; gap: 24px; margin-left: auto; }
.nav__link { font-size: 14px; font-weight: 600; color: var(--text-muted); transition: color var(--transition); }
.nav__link:hover, .nav__link--active { color: var(--rose); }

.header__actions { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.header__phone { font-size: 14px; font-weight: 700; color: var(--dark); }

.cart-link {
  position: relative; width: 42px; height: 42px; display: flex; align-items: center; justify-content: center;
  background: var(--rose-pale); border-radius: 10px; font-size: 20px; transition: background var(--transition);
}
.cart-link:hover { background: #f8bbd0; }
.cart-link__badge {
  position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px;
  background: var(--rose); color: #fff; font-size: 11px; font-weight: 700; border-radius: 100px;
  display: flex; align-items: center; justify-content: center;
}

.burger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; margin-left: auto; }
.burger span { width: 24px; height: 2px; background: var(--dark); border-radius: 2px; transition: all var(--transition); }
.burger--active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.burger--active span:nth-child(2) { opacity: 0; }
.burger--active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Toast */
.toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 200; padding: 14px 20px;
  background: var(--dark); color: #fff; border-radius: 10px; font-size: 14px; font-weight: 600;
  box-shadow: var(--shadow); transform: translateY(100px); opacity: 0; transition: all 0.35s ease; pointer-events: none;
}
.toast--show { transform: translateY(0); opacity: 1; }

/* Hero */
.hero { padding: calc(var(--header-h) + 40px) 0 60px; background: linear-gradient(135deg, var(--dark) 0%, #6b1a4a 100%); color: #fff; }
.hero__inner { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.hero__badge { display: inline-block; padding: 6px 14px; background: rgba(244,143,177,0.25); color: var(--pink); font-size: 13px; font-weight: 700; border-radius: 100px; margin-bottom: 16px; }
.hero__title { font-size: clamp(32px, 5vw, 48px); font-weight: 700; line-height: 1.1; margin-bottom: 16px; }
.hero__title span { color: var(--pink); }
.hero__text { font-size: 17px; opacity: 0.85; margin-bottom: 28px; max-width: 440px; }
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero__image { border-radius: var(--radius); overflow: hidden; box-shadow: 0 24px 60px rgba(0,0,0,0.3); }
.hero__image img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }

/* Promo strip */
.promo-strip { background: var(--rose); color: #fff; text-align: center; padding: 12px; font-size: 14px; font-weight: 600; }

/* Sections */
.section { padding: 72px 0; }
.section--alt { background: var(--surface); }
.section-header { text-align: center; margin-bottom: 40px; }
.section-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--rose); margin-bottom: 8px; display: block; }
.section-title { font-size: clamp(26px, 4vw, 34px); font-weight: 700; margin-bottom: 8px; }
.section-subtitle { color: var(--text-muted); font-size: 16px; }

/* Category pills */
.cat-pills { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 40px; }
.cat-pill {
  padding: 10px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 100px;
  font-size: 14px; font-weight: 600; color: var(--text-muted); transition: all var(--transition);
}
.cat-pill:hover { border-color: var(--rose); color: var(--rose); }

/* Product cards */
.products-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.product-card { background: var(--surface); border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; transition: box-shadow var(--transition), transform var(--transition); }
.product-card:hover { box-shadow: var(--shadow); transform: translateY(-4px); }
.product-card__image { display: block; position: relative; aspect-ratio: 1; background: var(--rose-pale); overflow: hidden; }
.product-card__image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.product-card:hover .product-card__image img { transform: scale(1.05); }
.product-card__badge { position: absolute; top: 10px; left: 10px; padding: 4px 10px; background: var(--rose); color: #fff; font-size: 11px; font-weight: 700; border-radius: 6px; z-index: 1; }
.product-card__body { padding: 16px; }
.product-card__brand { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }
.product-card__title { font-size: 15px; font-weight: 700; margin: 4px 0 6px; line-height: 1.3; }
.product-card__title a:hover { color: var(--rose); }
.product-card__rating { font-size: 13px; color: #f59e0b; margin-bottom: 12px; }
.product-card__rating span { color: var(--text-muted); }
.product-card__footer { display: flex; align-items: center; justify-content: space-between; }
.product-card__prices { display: flex; flex-direction: column; }
.product-card__old { font-size: 13px; color: var(--text-muted); text-decoration: line-through; }
.product-card__price { font-size: 18px; font-weight: 800; color: var(--dark); }
.product-card__btn {
  width: 40px; height: 40px; border: none; background: var(--rose-pale); border-radius: 10px; font-size: 18px;
  cursor: pointer; transition: background var(--transition);
}
.product-card__btn:hover { background: var(--rose); }

/* Catalog */
.catalog-layout { display: grid; grid-template-columns: 240px 1fr; gap: 32px; align-items: start; }
.catalog-sidebar { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; position: sticky; top: calc(var(--header-h) + 16px); }
.catalog-sidebar__title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 12px; }
.filter__cats { display: flex; flex-direction: column; gap: 4px; margin-bottom: 24px; }
.filter__cat {
  padding: 9px 12px; border: none; background: none; border-radius: 8px; font-size: 14px; font-weight: 600;
  color: var(--text-muted); text-align: left; cursor: pointer; transition: all var(--transition);
}
.filter__cat:hover { background: var(--rose-pale); color: var(--text); }
.filter__cat--active { background: var(--rose); color: #fff; }
.filter__group { margin-bottom: 20px; }
.filter__label { display: block; font-size: 13px; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; }
.filter__select { width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; background: var(--bg); }
.catalog-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.catalog-count { font-size: 14px; color: var(--text-muted); }

/* Product detail */
.breadcrumb-bar { padding: calc(var(--header-h) + 16px) 0 0; background: var(--surface); border-bottom: 1px solid var(--border); }
.breadcrumb { font-size: 13px; color: var(--text-muted); padding-bottom: 16px; }
.breadcrumb a:hover { color: var(--rose); }
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.product-detail__gallery { position: relative; background: var(--rose-pale); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.product-detail__gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.product-detail__badge { position: absolute; top: 16px; left: 16px; padding: 6px 14px; background: var(--rose); color: #fff; font-size: 12px; font-weight: 700; border-radius: 8px; }
.product-detail__brand { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); }
.product-detail__title { font-size: 28px; font-weight: 700; margin: 8px 0 12px; }
.product-detail__rating { font-size: 15px; color: #f59e0b; margin-bottom: 16px; }
.product-detail__prices { margin-bottom: 20px; }
.product-detail__old { font-size: 18px; color: var(--text-muted); text-decoration: line-through; margin-right: 12px; }
.product-detail__price { font-size: 32px; font-weight: 800; color: var(--dark); }
.product-detail__desc { color: var(--text-muted); margin-bottom: 24px; line-height: 1.7; }
.product-detail__composition-title { font-size: 16px; font-weight: 700; margin-bottom: 12px; color: var(--dark); }
.product-detail__composition li { padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.product-detail__composition li::before { content: '🌸 '; }
.product-detail__actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 28px 0 16px; }
.product-detail__delivery { font-size: 14px; color: var(--text-muted); }

/* Cart */
.cart-empty { text-align: center; padding: 80px 20px; }
.cart-empty__icon { font-size: 64px; margin-bottom: 16px; }
.cart-empty h2 { font-size: 24px; margin-bottom: 8px; }
.cart-empty p { color: var(--text-muted); margin-bottom: 24px; }

.cart-layout { display: grid; grid-template-columns: 1fr 340px; gap: 32px; align-items: start; }
.cart-item {
  display: grid; grid-template-columns: 80px 1fr auto auto auto; gap: 16px; align-items: center;
  padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 12px;
}
.cart-item__image { width: 80px; height: 80px; border-radius: 8px; overflow: hidden; background: var(--rose-pale); }
.cart-item__image img { width: 100%; height: 100%; object-fit: cover; }
.cart-item__title { font-weight: 700; font-size: 15px; }
.cart-item__title:hover { color: var(--rose); }
.cart-item__brand { font-size: 13px; color: var(--text-muted); }
.cart-item__qty { display: flex; align-items: center; gap: 8px; }
.cart-item__qty button {
  width: 32px; height: 32px; border: 1px solid var(--border); background: var(--bg); border-radius: 8px;
  font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.cart-item__qty button:hover { border-color: var(--rose); color: var(--rose); }
.cart-item__qty span { min-width: 24px; text-align: center; font-weight: 700; }
.cart-item__price { font-weight: 800; font-size: 16px; white-space: nowrap; }
.cart-item__remove { background: none; border: none; color: var(--text-muted); font-size: 18px; cursor: pointer; padding: 4px; }
.cart-item__remove:hover { color: var(--error); }

.cart-summary, .checkout-summary-box {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; position: sticky; top: calc(var(--header-h) + 16px);
}
.cart-summary__title, .checkout-summary-box h3 { font-size: 18px; font-weight: 800; margin-bottom: 20px; }
.cart-summary__row { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 12px; color: var(--text-muted); }
.cart-summary__free { color: var(--success); font-weight: 600; }
.cart-summary__hint { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.cart-summary__total { display: flex; justify-content: space-between; font-size: 20px; font-weight: 800; padding-top: 16px; border-top: 1px solid var(--border); margin-top: 8px; }

/* Checkout */
.checkout-layout { display: grid; grid-template-columns: 1fr 360px; gap: 32px; align-items: start; }
.checkout-item { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 10px; color: var(--text-muted); gap: 12px; }
.checkout-total { display: flex; justify-content: space-between; font-size: 18px; font-weight: 800; padding-top: 16px; border-top: 1px solid var(--border); margin-top: 12px; }

.form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; }
.form__title { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.form__subtitle { font-size: 14px; color: var(--text-muted); margin-bottom: 24px; }
.form__group { margin-bottom: 18px; }
.form__label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.form__input {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px;
  font-family: var(--font); font-size: 15px; background: var(--bg); transition: border-color var(--transition);
}
.form__input:focus { outline: none; border-color: var(--rose); }
.form__input--error { border-color: var(--error); }
.form__textarea { resize: vertical; min-height: 80px; }
.form__error { font-size: 13px; color: var(--error); margin-top: 4px; min-height: 18px; }
.form__success { text-align: center; padding: 60px 20px; }
.form__success-icon { font-size: 64px; margin-bottom: 16px; }
.form__success h2 { font-size: 24px; margin-bottom: 8px; }
.form__success p { color: var(--text-muted); margin-bottom: 24px; }

.page-hero { padding: calc(var(--header-h) + 32px) 0 32px; background: var(--surface); border-bottom: 1px solid var(--border); }
.page-hero__title { font-size: 32px; font-weight: 700; }

/* Features */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.feature { text-align: center; padding: 24px 16px; background: var(--surface); border-radius: var(--radius); border: 1px solid var(--border); }
.feature__icon { font-size: 28px; margin-bottom: 12px; }
.feature__title { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.feature__text { font-size: 13px; color: var(--text-muted); }

/* Footer */
.footer { background: var(--dark); color: #c9a0b8; padding: 48px 0 0; }
.footer__inner { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 32px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.footer .logo { color: #fff; }
.footer__desc { font-size: 14px; margin-top: 12px; line-height: 1.6; }
.footer__title { font-size: 13px; font-weight: 700; color: #fff; margin-bottom: 14px; text-transform: uppercase; letter-spacing: 0.05em; }
.footer__link { display: block; font-size: 14px; margin-bottom: 8px; transition: color var(--transition); }
.footer__link:hover { color: var(--pink); }
.footer__bottom { display: flex; justify-content: space-between; padding: 20px 0; font-size: 13px; }

@media (max-width: 1024px) {
  .hero__inner, .product-detail, .cart-layout, .checkout-layout { grid-template-columns: 1fr; }
  .products-grid { grid-template-columns: repeat(2, 1fr); }
  .catalog-layout { grid-template-columns: 1fr; }
  .catalog-sidebar { position: static; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .footer__inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav {
    position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0; background: var(--surface);
    flex-direction: column; align-items: flex-start; padding: 24px; gap: 16px;
    transform: translateX(100%); transition: transform var(--transition); z-index: 99;
  }
  .nav--open { transform: translateX(0); }
  .header__phone { display: none; }
  .burger { display: flex; }
  .products-grid, .features { grid-template-columns: 1fr; }
  .cart-item { grid-template-columns: 60px 1fr; gap: 12px; }
  .cart-item__qty, .cart-item__price, .cart-item__remove { grid-column: 2; }
  .footer__inner { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; gap: 8px; text-align: center; }
}

@media (max-width: 768px) {
  body.menu-open { overflow: hidden; }
  .header { z-index: 1100; }
  .header--menu-open { background: #ffffff; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .burger { position: relative; z-index: 1102; }
  .nav {
    top: 0; left: 0; right: 0; bottom: 0;
    padding-top: var(--header-h);
    z-index: 1101;
    background: #ffffff;
    backdrop-filter: none; -webkit-backdrop-filter: none;
    box-shadow: -4px 0 32px rgba(61, 26, 46, 0.12);
    overflow-y: auto; -webkit-overflow-scrolling: touch;
    visibility: hidden; pointer-events: none;
  }
  .nav--open { visibility: visible; pointer-events: auto; }
  .nav-backdrop {
    position: fixed; inset: 0; z-index: 1100;
    background: rgba(61, 26, 46, 0.55);
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
  }
  .nav-backdrop--visible { opacity: 1; visibility: visible; pointer-events: auto; }
}

/* Mobile menu вЂ” Android fix */
@media (max-width: 768px) {
  body.menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
  }

  .header {
    z-index: 1200 !important;
  }

  .header--menu-open {
    background: #ffffff !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  .burger {
    position: relative;
    z-index: 1202;
  }

  .header .nav,
  #nav.nav,
  #nav {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    min-height: 100dvh !important;
    margin: 0 !important;
    padding: calc(var(--header-height, var(--header-h, 72px)) + 8px) 24px 32px !important;
    background-color: #ffffff !important;
    background-image: none !important;
    opacity: 1 !important;
    isolation: isolate !important;
    z-index: 1201 !important;
    transform: translate3d(100%, 0, 0) !important;
    transition: transform 0.28s ease, visibility 0.28s ease !important;
    visibility: hidden !important;
    pointer-events: none !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    box-shadow: -12px 0 40px rgba(0, 0, 0, 0.18) !important;
    gap: 0 !important;
  }

  .header .nav--open,
  #nav.nav--open,
  #nav.nav--open {
    transform: translate3d(0, 0, 0) !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }

  .nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1199;
    background-color: rgba(15, 23, 42, 0.65);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.28s ease, visibility 0.28s ease;
  }

  .nav-backdrop--visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
}
