:root {
  --bg: #f6f7f9;
  --bg-soft: #eef2f6;
  --surface: #ffffff;
  --ink: #12141a;
  --muted: #5c6575;
  --accent: #e11d48;
  --accent-deep: #be123c;
  --teal: #0d9488;
  --line: rgba(18, 20, 26, 0.1);
  --danger: #dc2626;
  --ok: #0f766e;
  --font-display: "Bricolage Grotesque", sans-serif;
  --font-body: "Figtree", sans-serif;
  --radius: 6px;
  --max: 1140px;
  --shadow-soft: 0 18px 50px rgba(18, 20, 26, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(900px 420px at 12% -8%, rgba(225, 29, 72, 0.09), transparent 55%),
    radial-gradient(800px 380px at 92% 6%, rgba(13, 148, 136, 0.1), transparent 50%),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 38%, var(--bg-soft) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-deep); }
img { max-width: 100%; display: block; }

.wrap { width: min(var(--max), calc(100% - 2rem)); margin-inline: auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .95rem 0;
}
.brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -.04em;
  color: var(--ink);
}
.brand span { color: var(--accent); }
.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem 1.05rem;
  align-items: center;
}
.nav-links a {
  color: var(--muted);
  font-size: .93rem;
  font-weight: 560;
  transition: color .18s ease;
}
.nav-links a:hover { color: var(--ink); }
.badge {
  display: inline-flex;
  min-width: 1.2rem;
  height: 1.2rem;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  border-radius: 4px;
  font-size: .7rem;
  font-weight: 700;
  padding: 0 .3rem;
  margin-left: .15rem;
}

/* —— Hero: one composition, brand first —— */
.hero {
  position: relative;
  min-height: calc(100vh - 68px);
  display: grid;
  align-items: end;
  overflow: hidden;
  isolation: isolate;
}
.hero-plane {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(105deg, rgba(246, 247, 249, 0.96) 0%, rgba(246, 247, 249, 0.72) 42%, rgba(246, 247, 249, 0.28) 68%, transparent 100%),
    radial-gradient(ellipse 70% 80% at 78% 42%, #fb7185 0%, transparent 58%),
    radial-gradient(ellipse 55% 70% at 88% 70%, #2dd4bf 0%, transparent 55%),
    radial-gradient(ellipse 40% 50% at 62% 28%, #38bdf8 0%, transparent 60%),
    linear-gradient(160deg, #1e293b 0%, #0f172a 100%);
  background-size: cover;
  animation: planeDrift 16s ease-in-out infinite alternate;
}
.hero-plane::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.28'/%3E%3C/svg%3E");
  background-size: 160px;
  opacity: .35;
  mix-blend-mode: soft-light;
  pointer-events: none;
}
@keyframes planeDrift {
  from { transform: scale(1) translate(0, 0); }
  to { transform: scale(1.05) translate(-1.2%, 1%); }
}
.hero-inner {
  width: min(var(--max), calc(100% - 2rem));
  margin-inline: auto;
  padding: 4.5rem 0 3.8rem;
}
.hero-brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3.4rem, 11vw, 7.2rem);
  line-height: .9;
  letter-spacing: -.05em;
  margin: 0 0 1.1rem;
  color: var(--ink);
  animation: riseIn .85s cubic-bezier(.22, 1, .36, 1) both;
}
.hero-brand em {
  font-style: normal;
  color: var(--accent);
}
.hero p {
  max-width: 28rem;
  color: var(--muted);
  font-size: clamp(1rem, 2.2vw, 1.12rem);
  margin: 0 0 1.7rem;
  animation: riseIn .85s .1s cubic-bezier(.22, 1, .36, 1) both;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  animation: riseIn .85s .2s cubic-bezier(.22, 1, .36, 1) both;
}
@keyframes riseIn {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: none; }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: .82rem 1.25rem;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  transition: transform .15s ease, background .18s ease, border-color .18s ease, color .18s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-deep);
  color: #fff;
}
.btn-ghost {
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover {
  border-color: var(--ink);
  background: #fff;
}
.btn-danger {
  background: transparent;
  color: var(--danger);
  border-color: rgba(220, 38, 38, 0.35);
}

.section { padding: 3.8rem 0 4.2rem; }
.section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.2vw, 2.35rem);
  letter-spacing: -.035em;
  margin: 0 0 .45rem;
}
.section .lead {
  color: var(--muted);
  margin: 0 0 2rem;
  max-width: 34rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.6rem 1.35rem;
}
.product {
  display: block;
  color: inherit;
  transition: transform .25s ease;
}
.product:hover {
  color: inherit;
  transform: translateY(-3px);
}
.product-thumb {
  aspect-ratio: 4 / 5;
  background:
    linear-gradient(145deg, #e2e8f0, #f8fafc),
    repeating-linear-gradient(-45deg, transparent, transparent 8px, rgba(18, 20, 26, 0.03) 8px, rgba(18, 20, 26, 0.03) 16px);
  overflow: hidden;
  margin-bottom: .85rem;
  border-radius: 2px;
  box-shadow: var(--shadow-soft);
}
.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .55s cubic-bezier(.22, 1, .36, 1);
}
.product:hover .product-thumb img { transform: scale(1.045); }
.product h3 {
  font-family: var(--font-display);
  font-size: 1.08rem;
  margin: 0 0 .2rem;
  letter-spacing: -.025em;
}
.product .meta { color: var(--muted); font-size: .88rem; }
.product .price {
  margin-top: .4rem;
  color: var(--teal);
  font-weight: 750;
  font-size: 1.02rem;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin-bottom: 1.7rem;
}
.chip {
  border: 1px solid var(--line);
  color: var(--muted);
  padding: .45rem .9rem;
  border-radius: var(--radius);
  font-size: .88rem;
  font-weight: 560;
  background: var(--surface);
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.chip.active,
.chip:hover {
  color: #fff;
  background: var(--ink);
  border-color: var(--ink);
}

.product-page {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 2.75rem;
  padding: 2.6rem 0 4.2rem;
  align-items: start;
}
.product-page .gallery {
  background: #e8edf2;
  min-height: 440px;
  overflow: hidden;
  border-radius: 2px;
  box-shadow: var(--shadow-soft);
}
.product-page .gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-page h1 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  letter-spacing: -.035em;
  margin: 0 0 .75rem;
}
.muted { color: var(--muted); }
.price-lg {
  font-size: 1.7rem;
  color: var(--teal);
  font-weight: 780;
  margin: 1rem 0;
}

.form {
  display: grid;
  gap: .9rem;
  max-width: 430px;
}
.form.wide { max-width: 640px; }
label {
  display: grid;
  gap: .35rem;
  font-size: .9rem;
  color: var(--muted);
  font-weight: 560;
}
input, select, textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: var(--radius);
  padding: .75rem .85rem;
  font: inherit;
  transition: border-color .15s ease, box-shadow .15s ease;
}
textarea { min-height: 124px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.12);
}

.flash {
  padding: .8rem 1rem;
  border: 1px solid var(--line);
  margin: 1rem 0;
  border-radius: var(--radius);
  background: var(--surface);
}
.flash-ok {
  border-color: rgba(13, 148, 136, 0.35);
  color: var(--ok);
}
.flash-err {
  border-color: rgba(220, 38, 38, 0.35);
  color: var(--danger);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: .93rem;
}
.table th, .table td {
  text-align: left;
  padding: .75rem .45rem;
  border-bottom: 1px solid var(--line);
}
.table th {
  color: var(--muted);
  font-weight: 650;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.2rem 0 2.6rem;
  margin-top: 1rem;
  color: var(--muted);
  font-size: .92rem;
  background: rgba(255, 255, 255, 0.55);
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: end;
}
.footer-meta { text-align: right; }
.footer-ver { font-size: .8rem; opacity: .75; margin-top: .2rem; }

.nav-toggle {
  display: none;
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
  font-size: 1.05rem;
}
.nav-cta {
  color: #fff !important;
  background: var(--accent);
  padding: .4rem .75rem;
  border-radius: var(--radius);
  font-weight: 650;
}
.nav-cta:hover { background: var(--accent-deep); color: #fff !important; }
.nav-logout { display: inline; margin: 0; }
.nav-logout .btn { padding: .35rem .7rem; width: auto; }

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.1rem;
}
.stat {
  border-top: 3px solid var(--accent);
  background: var(--surface);
  padding: .95rem 1rem 1.05rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  border-top-width: 3px;
}
.stat b {
  display: block;
  font-family: var(--font-display);
  font-size: 1.65rem;
  letter-spacing: -.03em;
}
.stat span {
  color: var(--muted);
  font-size: .88rem;
}

@media (max-width: 860px) {
  .product-page { grid-template-columns: 1fr; gap: 1.6rem; }
  .nav-links { gap: .5rem .75rem; }
  .hero-inner { padding: 3.2rem 0 3rem; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding: .35rem 0 .6rem;
  }
  .nav-links.is-open { display: flex; }
  .nav-links a, .nav-logout .btn { width: 100%; }
  .nav { flex-wrap: wrap; }
  .brand { flex: 1; }
}

@media (max-width: 560px) {
  .hero-actions { flex-direction: column; align-items: stretch; }
  .footer-meta { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-plane,
  .hero-brand,
  .hero p,
  .hero-actions,
  .product,
  .product-thumb img {
    animation: none !important;
    transition: none !important;
  }
}
