/* ============================================================
   ЛЮМО Design System — "Luminous Surface"
   ============================================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Manrope:wght@300;400;500;600;700;800&display=swap');

/* === RESET === */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{-webkit-text-size-adjust:100%;color-scheme:light;scroll-behavior:smooth;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
body{min-height:100dvh;font-family:var(--ff-body);font-weight:400;background:var(--bg);color:var(--ink);line-height:1.6;overflow-x:hidden}
img,picture,video,canvas,svg{display:block;max-width:100%}
img{height:auto}
input,button,textarea,select{font:inherit;color:inherit}
button{cursor:pointer;border:none;background:none}
a{color:inherit;text-decoration:none}
ul,ol{list-style:none}
h1,h2,h3,h4,h5,h6{font-family:var(--ff-heading);font-weight:700;line-height:1.2;letter-spacing:-.02em}
p{max-width:72ch}
::selection{background:var(--accent);color:#fff}

/* === DESIGN TOKENS === */
:root{
  /* --- Colors --- */
  --bg:#FAFAFA;
  --bg-card:#FFFFFF;
  --bg-subtle:#F5F3F2;
  --bg-elevated:#FFFFFF;
  --ink:#141414;
  --ink-secondary:#3D3937;
  --muted:#6B6462;
  --muted-light:#9C9894;
  --accent:#6D1418;
  --accent-hover:#8B1A1F;
  --accent-light:#A02028;
  --accent-soft:rgba(109,20,24,.07);
  --accent-glow:rgba(109,20,24,.15);
  --accent-gradient:linear-gradient(135deg,#6D1418,#A02028);
  --success:#1A7D45;
  --success-soft:rgba(26,125,69,.08);
  --warning:#D97706;
  --warning-soft:rgba(217,119,6,.08);
  --danger:#DC2626;
  --danger-soft:rgba(220,38,38,.08);
  --line:rgba(20,20,20,.06);
  --line-strong:rgba(20,20,20,.12);
  --shadow-sm:0 2px 8px rgba(20,20,20,.04),0 1px 2px rgba(109,20,24,.03);
  --shadow-md:0 8px 24px rgba(20,20,20,.06),0 4px 8px rgba(109,20,24,.04);
  --shadow-lg:0 24px 80px rgba(20,20,20,.08),0 8px 24px rgba(109,20,24,.05);
  --shadow-glow:0 8px 40px rgba(109,20,24,.12);
  --shadow-neu:4px 4px 0 var(--accent);
  --shadow-neu-sm:2px 2px 0 var(--accent);

  /* --- Typography --- */
  --ff-heading:"Inter",system-ui,-apple-system,sans-serif;
  --ff-body:"Manrope",system-ui,-apple-system,sans-serif;
  --ff-mono:"Inter","Manrope",system-ui,-apple-system,sans-serif;
  --ff-price:"Inter","Manrope",system-ui,-apple-system,sans-serif;

  --fs-xs:.75rem;
  --fs-sm:.8125rem;
  --fs-base:.9375rem;
  --fs-md:1rem;
  --fs-lg:1.125rem;
  --fs-xl:1.3125rem;
  --fs-2xl:1.625rem;
  --fs-3xl:2rem;
  --fs-4xl:2.5rem;
  --fs-5xl:3.25rem;
  --fs-hero:clamp(2.5rem,5vw,4rem);

  --fw-regular:400;
  --fw-medium:500;
  --fw-semibold:600;
  --fw-bold:700;
  --fw-extrabold:800;

  /* --- Spacing --- */
  --space-1:.25rem;
  --space-2:.5rem;
  --space-3:.75rem;
  --space-4:1rem;
  --space-5:1.25rem;
  --space-6:1.5rem;
  --space-8:2rem;
  --space-10:2.5rem;
  --space-12:3rem;
  --space-16:4rem;
  --space-20:5rem;
  --space-24:6rem;
  --space-section:clamp(3rem,6vw,6rem);

  /* --- ЛЮМО Radii (авторская система) --- */
  --r-card:24px 8px 24px 8px;
  --r-card-inverse:8px 24px 8px 24px;
  --r-btn:12px 28px 12px 28px;
  --r-btn-inverse:28px 12px 28px 12px;
  --r-badge:4px 16px 16px 4px;
  --r-badge-inverse:16px 4px 4px 16px;
  --r-hero:0 0 48px 48px;
  --r-section:32px;
  --r-search:20px 20px 4px 4px;
  --r-search-open:20px 20px 0 0;
  --r-pill:999px;
  --r-sm:8px;
  --r-md:12px;
  --r-lg:16px;
  --r-xl:24px;
  --r-squircle:22% 22% 22% 22%;
  --r-filter-panel:0 24px 24px 0;
  --r-drawer:24px 24px 0 0;
  --r-summary:8px 32px 32px 8px;
  --r-ticket:16px;

  /* --- Transitions --- */
  --ease-out:cubic-bezier(.22,1,.36,1);
  --ease-spring:cubic-bezier(.34,1.56,.64,1);
  --ease-bounce:cubic-bezier(.68,-.55,.265,1.55);
  --t-fast:.15s;
  --t-base:.25s;
  --t-slow:.4s;
  --t-slower:.6s;

  /* --- Layout --- */
  --container-max:1320px;
  --container-px:clamp(1rem,3vw,2rem);
  --header-h:84px;
  --topbar-h:44px;
  --quicknav-h:54px;
  --mobile-nav-h:64px;
  --sidebar-w:280px;

  /* --- Z-index layers --- */
  --z-base:1;
  --z-dropdown:100;
  --z-sticky:200;
  --z-overlay:300;
  --z-modal:400;
  --z-toast:500;
  --z-preloader:9999;
}

/* === CONTAINER === */
.container{
  width:100%;
  max-width:var(--container-max);
  margin-inline:auto;
  padding-inline:var(--container-px);
}
.container--narrow{max-width:960px}
.container--wide{max-width:1440px}

/* === GRID SYSTEM === */
.grid{
  display:grid;
  gap:var(--space-6);
}
.grid--2{grid-template-columns:repeat(2,1fr)}
.grid--3{grid-template-columns:repeat(3,1fr)}
.grid--4{grid-template-columns:repeat(4,1fr)}
.grid--5{grid-template-columns:repeat(5,1fr)}
.grid--auto-fill{grid-template-columns:repeat(auto-fill,minmax(280px,1fr))}
.grid--auto-fit{grid-template-columns:repeat(auto-fit,minmax(280px,1fr))}
/* Responsive products grid: 4 → 3 → 2 → 1 */
.grid--products{grid-template-columns:repeat(4,1fr);gap:var(--space-4)}
@media(max-width:1200px){.grid--products{grid-template-columns:repeat(3,1fr)}}
@media(max-width:767px){.grid--products{grid-template-columns:repeat(2,1fr);gap:var(--space-3)}}
@media(max-width:399px){.grid--products{grid-template-columns:1fr}}
.grid--list{grid-template-columns:1fr}
.grid--list .product-card{flex-direction:row;align-items:center}
.grid--list .product-card__img{aspect-ratio:auto;width:180px;flex-shrink:0}
.grid--list .product-card__body{flex:1;padding:var(--space-4)}
.grid--list .product-card__actions{flex-direction:column;padding:var(--space-4);width:160px;flex-shrink:0}

/* === FLEX UTILITIES === */
.flex{display:flex}
.flex-col{flex-direction:column}
.flex-wrap{flex-wrap:wrap}
.items-center{align-items:center}
.items-start{align-items:flex-start}
.items-end{align-items:flex-end}
.justify-center{justify-content:center}
.justify-between{justify-content:space-between}
.justify-end{justify-content:flex-end}
.gap-1{gap:var(--space-1)}
.gap-2{gap:var(--space-2)}
.gap-3{gap:var(--space-3)}
.gap-4{gap:var(--space-4)}
.gap-6{gap:var(--space-6)}
.gap-8{gap:var(--space-8)}

/* === TYPOGRAPHY UTILITIES === */
.font-heading{font-family:var(--ff-heading)}
.font-body{font-family:var(--ff-body)}
.font-mono{font-family:var(--ff-mono)}

.text-xs{font-size:var(--fs-xs)}
.text-sm{font-size:var(--fs-sm)}
.text-base{font-size:var(--fs-base)}
.text-md{font-size:var(--fs-md)}
.text-lg{font-size:var(--fs-lg)}
.text-xl{font-size:var(--fs-xl)}
.text-2xl{font-size:var(--fs-2xl)}
.text-3xl{font-size:var(--fs-3xl)}
.text-4xl{font-size:var(--fs-4xl)}
.text-5xl{font-size:var(--fs-5xl)}

.fw-regular{font-weight:var(--fw-regular)}
.fw-medium{font-weight:var(--fw-medium)}
.fw-semibold{font-weight:var(--fw-semibold)}
.fw-bold{font-weight:var(--fw-bold)}
.fw-extrabold{font-weight:var(--fw-extrabold)}

.text-muted{color:var(--muted)}
.text-accent{color:var(--accent)}
.text-success{color:var(--success)}
.text-warning{color:var(--warning)}
.text-danger{color:var(--danger)}
.text-center{text-align:center}
.text-right{text-align:right}
.text-uppercase{text-transform:uppercase;letter-spacing:.06em}
.text-nowrap{white-space:nowrap}
.text-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* === SECTION SPACING === */
.section{padding-block:var(--space-section)}
.section--sm{padding-block:var(--space-12)}
.section--flush{padding-block:0}

.section__header{
  margin-bottom:var(--space-10);
}
.section__title{
  font-size:clamp(var(--fs-2xl),3vw,var(--fs-4xl));
  font-weight:var(--fw-extrabold);
  letter-spacing:-.03em;
}
.section__subtitle{
  font-size:var(--fs-lg);
  color:var(--muted);
  margin-top:var(--space-2);
}

/* === LUMO SHAPES (авторская геометрия CSS) === */

/* Squircle clip-path */
.squircle{
  clip-path:url(#squircle-clip);
  -webkit-clip-path:url(#squircle-clip);
}
.squircle--sm{border-radius:var(--r-squircle)}
.squircle--round{border-radius:50%}

/* Asymmetric card shape */
.shape-card{border-radius:var(--r-card)}
.shape-card-inv{border-radius:var(--r-card-inverse)}
.shape-btn{border-radius:var(--r-btn)}
.shape-btn-inv{border-radius:var(--r-btn-inverse)}
.shape-badge{border-radius:var(--r-badge)}
.shape-badge-inv{border-radius:var(--r-badge-inverse)}
.shape-pill{border-radius:var(--r-pill)}
.shape-section{border-radius:var(--r-section)}
.shape-hero{border-radius:var(--r-hero)}
.shape-search{border-radius:var(--r-search)}
.shape-drawer{border-radius:var(--r-drawer)}
.shape-summary{border-radius:var(--r-summary)}

/* Wave divider */
.wave-divider{
  position:relative;
  overflow:visible;
}
.wave-divider::after{
  content:"";
  position:absolute;
  left:0;right:0;
  bottom:-1px;
  height:60px;
  background:var(--bg);
  mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 60' preserveAspectRatio='none'%3E%3Cpath d='M0,60 C360,0 720,0 1080,30 C1260,45 1380,60 1440,60 L1440,60 L0,60 Z'/%3E%3C/svg%3E");
  -webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 60' preserveAspectRatio='none'%3E%3Cpath d='M0,60 C360,0 720,0 1080,30 C1260,45 1380,60 1440,60 L1440,60 L0,60 Z'/%3E%3C/svg%3E");
  mask-size:100% 100%;
  -webkit-mask-size:100% 100%;
  pointer-events:none;
  z-index:2;
}
.wave-divider--subtle::after{background:var(--bg-subtle)}
.wave-divider--inv::after{
  top:-1px;bottom:auto;
  transform:scaleY(-1);
}

/* Diagonal section */
.diagonal-section{
  clip-path:polygon(0 4%,100% 0,100% 96%,0 100%);
  padding-block:calc(var(--space-section) + 2vw);
}

/* Ticket / coupon shape via mask */
.ticket-shape{
  position:relative;
  border-radius:var(--r-ticket);
  background:var(--accent-soft);
  mask-image:
    radial-gradient(circle 8px at 0 50%,transparent 8px,#000 8.5px),
    radial-gradient(circle 8px at 100% 50%,transparent 8px,#000 8.5px);
  mask-composite:intersect;
  -webkit-mask-image:
    radial-gradient(circle 8px at 0 50%,transparent 8px,#000 8.5px),
    radial-gradient(circle 8px at 100% 50%,transparent 8px,#000 8.5px);
  -webkit-mask-composite:source-in;
  padding:var(--space-3) var(--space-6);
}

/* Blob decorative shape */
.blob{
  border-radius:30% 70% 70% 30% / 30% 30% 70% 70%;
  position:absolute;
  pointer-events:none;
  z-index:0;
}
.blob--accent{background:var(--accent-soft);opacity:.5}
.blob--subtle{background:var(--bg-subtle);opacity:.6}

/* Neubrutalism accents */
.neu-shadow{box-shadow:var(--shadow-neu);transition:box-shadow var(--t-fast) var(--ease-out),transform var(--t-fast) var(--ease-out)}
.neu-shadow:hover{box-shadow:var(--shadow-neu-sm);transform:translate(2px,2px)}
.neu-shadow:active{box-shadow:0 0 0 var(--accent);transform:translate(4px,4px)}

.neu-shadow--sm{box-shadow:var(--shadow-neu-sm)}
.neu-shadow--sm:hover{box-shadow:1px 1px 0 var(--accent);transform:translate(1px,1px)}

/* Gradient border */
.gradient-border{
  position:relative;
  background:var(--bg-card);
}
.gradient-border::before{
  content:"";
  position:absolute;
  inset:-1px;
  border-radius:inherit;
  padding:1px;
  background:var(--accent-gradient);
  mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);
  mask-composite:exclude;
  -webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);
  -webkit-mask-composite:xor;
  opacity:0;
  transition:opacity var(--t-base) var(--ease-out);
  pointer-events:none;
}
.gradient-border:hover::before{opacity:1}

/* Glassmorphism */
.glass{
  background:rgba(255,255,255,.72);
  backdrop-filter:blur(20px) saturate(180%);
  -webkit-backdrop-filter:blur(20px) saturate(180%);
}
.glass--dark{
  background:rgba(20,20,20,.6);
  backdrop-filter:blur(20px) saturate(180%);
  -webkit-backdrop-filter:blur(20px) saturate(180%);
  color:#fff;
}

/* Dot grid pattern */
.dot-grid{
  background-image:radial-gradient(circle,.8px,.8px,var(--ink) .8px,transparent .8px);
  background-size:24px 24px;
  opacity:.03;
  position:absolute;
  inset:0;
  pointer-events:none;
  z-index:1;
}

/* Grain texture overlay */
.grain{
  position:absolute;
  inset:0;
  pointer-events:none;
  z-index:1;
  opacity:.03;
  background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat:repeat;
  background-size:256px 256px;
}

/* === VISIBILITY / SR-ONLY === */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.hidden{display:none!important}

/* Scroll lock */
.scroll-lock{overflow:hidden;touch-action:none}

/* === ICON SIZE === */
.icon{
  width:24px;
  height:24px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
  flex-shrink:0;
}
.icon--sm{width:18px;height:18px}
.icon--xs{width:14px;height:14px}
.icon--lg{width:32px;height:32px}
.icon--xl{width:48px;height:48px}

/* === RESPONSIVE GRID === */
@media(max-width:1439px){
  .grid--5{grid-template-columns:repeat(4,1fr)}
}
@media(max-width:1023px){
  .grid--5,.grid--4{grid-template-columns:repeat(3,1fr)}
  .grid--3{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:767px){
  .grid--5,.grid--4,.grid--3{grid-template-columns:repeat(2,1fr)}
  .grid--2{grid-template-columns:1fr}
  :root{
    --header-h:60px;
    --topbar-h:0px;
    --quicknav-h:0px;
  }
}
@media(max-width:479px){
  .grid--5,.grid--4,.grid--3,.grid--2{grid-template-columns:1fr}
}

/* === SCROLLBAR === */
::-webkit-scrollbar{width:6px;height:6px}
::-webkit-scrollbar-track{background:transparent}
::-webkit-scrollbar-thumb{background:var(--line-strong);border-radius:var(--r-pill)}
::-webkit-scrollbar-thumb:hover{background:var(--muted-light)}
