@import url("https://fonts.googleapis.com/css2?family=Playfair+Display:wght@500;700&family=Nunito:wght@400;500;600;700&display=swap");

:root {
  --bg: #f9f3ec;
  --bg-soft: #f1e1d0;
  --panel: #fffaf5;
  --text: #2b1e25;
  --muted: #9b8693;
  --brand: #b01337;
  --brand-2: #f1b24a;
  --accent: #4b7bbb;
  --danger: #d64545;
  --ok: #2eaf6e;
  --ring: 0 0 0 3px rgba(176, 19, 55, 0.25);
  --radius: 18px;
  --shadow-1: 0 14px 35px rgba(82, 29, 53, 0.25);
  --shadow-2: 0 24px 70px rgba(82, 29, 53, 0.35);
}

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

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: "Nunito", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial;
  background: radial-gradient(1200px 800px at 85% -10%, #fce3d2 0%, transparent 55%),
    radial-gradient(900px 600px at 10% 110%, #e4d2f5 0%, transparent 60%), var(--bg);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.6;
  letter-spacing: 0.2px;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
.section-title,
.title {
  font-family: "Playfair Display", "Times New Roman", serif;
  letter-spacing: 0.4px;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

input,
select {
  font: inherit;
  color: inherit;
  background: var(--panel);
  border: 1px solid rgba(76, 44, 56, 0.18);
  border-radius: 12px;
  padding: 0.8rem 1rem;
}

input:focus,
select:focus,
button:focus {
  outline: none;
  box-shadow: var(--ring);
}

/* Layout */
.container {
  width: min(1200px, 92vw);
  margin: 0 auto;
}

/* Header */
header.site {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: saturate(140%) blur(10px);
  background: linear-gradient(180deg, rgba(255, 250, 245, 0.96), rgba(255, 245, 235, 0.9));
  border-bottom: 1px solid rgba(109, 69, 86, 0.18);
  box-shadow: 0 4px 28px rgba(82, 29, 53, 0.22);
}

.nav {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: radial-gradient(circle at 20% 20%, #ffe7c2 0, transparent 55%),
    conic-gradient(from 200deg, var(--brand), var(--brand-2), var(--accent), var(--brand));
  box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.3), var(--shadow-1);
}

.nav-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.nav-links a {
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 500;
  transition: color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}

.nav-links a:hover {
  color: var(--text);
  background: rgba(241, 215, 206, 0.85);
  transform: translateY(-1px);
}

.search {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.search input {
  width: clamp(160px, 32vw, 360px);
  background: #fffdf8;
  border-color: rgba(76, 44, 56, 0.18);
}

.actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.btn {
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  background: linear-gradient(180deg, #fff7ef, #f0ddd0);
  border: 1px solid rgba(118, 69, 80, 0.25);
  box-shadow: 0 8px 20px rgba(82, 29, 53, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn {
  transform: translateY(-1px);
  box-shadow: var(--shadow-2);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(82, 29, 53, 0.3);
}

.btn.primary {
  background: radial-gradient(circle at 20% 0, #ffd9a1 0, transparent 45%),
    linear-gradient(180deg, var(--brand), #7c0c28);
  border-color: #7c0c28;
  color: #fffaf5;
  font-weight: 700;
}

.btn.primary:hover {
  background: radial-gradient(circle at 10% 0, #ffe3b8 0, transparent 40%), linear-gradient(180deg, #c41b41, #5e081e);
}

.btn.ghost {
  background: transparent;
  border-color: rgba(118, 69, 80, 0.35);
}

/* cart btn badge positioning */
.cart-btn {
  position: relative;
}

.badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #fdfbff;
  font-size: 12px;
  font-weight: 800;
  border: 1px solid rgba(224, 238, 255, 0.9);
  box-shadow: 0 8px 18px rgba(64, 103, 161, 0.4);
}

/* Hero */
.hero {
  position: relative;
  isolation: isolate;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
  padding: clamp(2rem, 5vw, 5rem) 0 2rem;
}

.hero h1 {
  font-size: clamp(2.3rem, 5vw, 3.8rem);
  line-height: 1.02;
  margin: 0 0 0.9rem;
  letter-spacing: 0.5px;
}

.hero p {
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.2rem);
  margin: 0 0 1.6rem;
}

.hero .cta {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.shoe-orb {
  position: relative;
  border-radius: var(--radius);
  background: radial-gradient(550px 360px at 10% 10%, rgba(255, 228, 205, 0.55), transparent 65%),
    linear-gradient(145deg, #fff7ef, #f0d7d4);
  border: 1px solid rgba(140, 90, 106, 0.5);
  box-shadow: inset 0 0 80px rgba(255, 255, 255, 0.25), 0 32px 90px rgba(82, 29, 53, 0.7);
  aspect-ratio: 1/1;
  overflow: hidden;
}

.shoe-orb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.98;
  filter: contrast(1.08) saturate(1.1);
}

#contactForm input,
#contactForm textarea {
  width: 100%;
}

.floating {
  position: absolute;
  inset: auto;
  right: 20px;
  bottom: 20px;
  padding: 0.6rem 0.9rem;
  background: rgba(41, 20, 36, 0.88);
  border: 1px solid rgba(198, 147, 165, 0.7);
  border-radius: 12px;
  color: #fbe9ff;
  backdrop-filter: blur(8px);
  box-shadow: 0 16px 45px rgba(15, 6, 12, 0.7);
}

/* Sections */
section {
  padding: 2.2rem 0;
}

.section-title {
  font-size: 1.8rem;
  margin: 0 0 1rem;
  letter-spacing: 0.5px;
}

.muted {
  color: var(--muted);
}

/* Features */
.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.feature {
  background: radial-gradient(circle at 0 0, #fff0de 0, transparent 55%), linear-gradient(180deg, #fff7ef, #f2dfe0);
  border: 1px solid rgba(138, 88, 104, 0.25);
  border-radius: var(--radius);
  padding: 1.1rem;
  box-shadow: 0 14px 30px rgba(82, 29, 53, 0.25);
  min-height: 110px;
  display: grid;
  align-content: center;
  gap: 0.4rem;
}

.feature h3 {
  margin: 0;
  font-size: 1rem;
}

.feature p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Products */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fff8f0, #f0dde3);
  border: 1px solid rgba(138, 88, 104, 0.26);
  box-shadow: var(--shadow-1);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--brand-2);
  box-shadow: var(--shadow-2);
  background: linear-gradient(180deg, #fffaf5, #f3dcd9);
}

.card-media {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: #f6e9f4;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.05);
  transition: transform 0.6s ease;
}

.card:hover .card-media img {
  transform: scale(1.12);
}

.card-body {
  padding: 1rem;
  display: grid;
  gap: 0.4rem;
}

.title {
  font-weight: 700;
}

.price {
  color: var(--accent);
  font-weight: 800;
  letter-spacing: 0.4px;
}

.label {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  background: rgba(75, 123, 187, 0.18);
  border: 1px solid #4b7bbb;
  color: #f4f6ff;
  font-size: 0.75rem;
  font-weight: 700;
  backdrop-filter: blur(6px);
}

.add-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.qty {
  display: grid;
  grid-auto-flow: column;
  align-items: center;
  gap: 0.2rem;
}

.qty button {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: #fff4ed;
  border: 1px solid rgba(138, 88, 104, 0.25);
}

.load-more {
  display: grid;
  place-items: center;
  margin-top: 1rem;
}

/* Cart Drawer */
.drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(420px, 90vw);
  background: radial-gradient(circle at 0 0, #ffe9cf 0, transparent 60%), linear-gradient(180deg, #fff7ef, #f1dfe6);
  border-left: 1px solid rgba(89, 55, 70, 0.35);
  box-shadow: -32px 0 90px rgba(33, 9, 22, 0.7);
  transform: translateX(100%);
  transition: transform 0.35s ease;
  z-index: 10000;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.drawer.open {
  transform: translateX(0);
}

.drawer header,
.drawer footer {
  padding: 1rem;
  border-bottom: 1px solid rgba(89, 55, 70, 0.3);
}

#openCartMobile {
  display: none;
}

.drawer footer {
  border-top: 1px solid rgba(89, 55, 70, 0.35);
  border-bottom: 0;
  display: grid;
  gap: 0.6rem;
}

.drawer .items {
  padding: 1rem;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.cart-item {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  background: #fbeff5;
  border: 1px solid rgba(138, 88, 104, 0.3);
  border-radius: 14px;
  padding: 0.6rem;
  justify-content: space-between;
}

.cart-item img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
}

.ci-title {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
}

.ci-meta {
  color: var(--muted);
  font-size: 0.85rem;
}

.ci-actions {
  display: grid;
  gap: 0.3rem;
  justify-items: end;
}

.ci-actions .qty {
  gap: 0.3rem;
}

/* Sheet / Modal */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 6, 14, 0.7);
  backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 55;
}

.overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.sheet {
  position: fixed;
  inset: 10% auto auto 50%;
  transform: translateX(-50%) translateY(-12px) scale(0.98);
  width: min(720px, 94vw);
  background: radial-gradient(circle at 0 0, #432039 0, #1f101e 60%);
  border: 1px solid #6c3b54;
  border-radius: 18px;
  box-shadow: 0 30px 90px rgba(5, 1, 6, 0.9);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 70;
}

.sheet.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0) scale(1);
  z-index: 10000;
}

.sheet header,
.sheet footer {
  padding: 1rem;
  border-bottom: 1px solid #6c3b54;
  color: #fdf4ff;
}

.sheet footer {
  border-bottom: 0;
  border-top: 1px solid #6c3b54;
}

.sheet .content {
  padding: 1rem;
  display: grid;
  gap: 0.8rem;
  grid-template-columns: 1fr 1fr;
  color: #f7ecf8;
}

.sheet .content .span-2 {
  grid-column: span 2;
}

.success {
  display: none;
  padding: 1rem;
  background: #11291e;
  color: var(--ok);
  border: 1px solid #2e8f62;
  border-radius: 14px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%) translateY(18px);
  opacity: 0;
  transition: all 0.25s ease;
  background: #11291e;
  color: #d1ffe7;
  border: 1px solid #2e8f62;
  border-radius: 999px;
  padding: 0.6rem 1rem;
  box-shadow: 0 20px 50px rgba(3, 20, 12, 0.9);
  z-index: 80;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* Footer */
footer.site {
  margin-top: 2rem;
  padding: 2rem 0;
  border-top: 1px solid rgba(88, 55, 70, 0.4);
  color: var(--muted);
  background: rgba(255, 249, 243, 0.75);
  backdrop-filter: blur(6px);
}

/* ===== Header Base ===== */
header.site {
  background: var(--panel);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 24px rgba(82, 29, 53, 0.25);
}

header .nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1rem;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  transition: transform 0.3s ease;
}

.nav-links a {
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
}

/* ===== Burger button ===== */
.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.burger span {
  display: block;
  width: 100%;
  height: 3px;
  background: var(--text);
  border-radius: 3px;
  transition: all 0.3s ease;
}

/* ===== When open ===== */
/* — исправленный крестик для бургер-меню — */
.burger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 6px);
}

.burger.open span:nth-child(2) {
  opacity: 0;
}

.burger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -6px);
}

.content.success-msg {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

/* ===== Mobile Nav ===== */
@media (max-width: 768px) {
  .sheet .content .span-2 {
    grid-column: span 1;
  }

  label input {
    width: 100%;
  }

  .burger {
    display: flex;
  }

  #openCartMobile {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--panel);
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    box-shadow: 0 16px 40px rgba(82, 29, 53, 0.35);
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .actions {
    display: none;
    /* можно убрать, если хочешь показывать корзину на мобилках */
  }
}

/* Responsive */
@media (max-width: 980px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }

  .features {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .sheet .content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .nav {
    grid-template-columns: 1fr auto;
  }

  .search {
    display: none;
  }

  .features {
    grid-template-columns: 1fr;
  }

  .grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .card:hover,
  .card-media img,
  .reveal {
    transition: none;
  }
}
