
/* Букетолия — MONSTER MODE front (scoped to public pages)
   Note: admin pages keep using css/styles.css. Public pages include this file.
*/
:root{
  --bg: #fbfaf8;
  --surface: rgba(255,255,255,.82);
  --surface-2: rgba(255,255,255,.65);
  --text: #151313;
  --muted: rgba(21,19,19,.68);
  --muted-2: rgba(21,19,19,.52);
  --line: rgba(21,19,19,.10);
  --shadow: 0 10px 30px rgba(0,0,0,.08);
  --shadow-soft: 0 6px 18px rgba(0,0,0,.06);
  --radius: 22px;
  --radius-sm: 14px;
  --accent: #6d0f2e;      /* deep wine */
  --accent-2:#a98656;     /* warm gold */
  --accent-3:#d8b4a0;     /* dusty rose */
  --ok:#0f6d45;
  --warn:#a34e00;
  --max: 1180px;
  --monster-glow: 0 20px 60px rgba(109,15,46,.18);
}

body.public{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  background: radial-gradient(1200px 500px at 20% 0%, rgba(109,15,46,.10), transparent 55%),
              radial-gradient(900px 500px at 85% 10%, rgba(169,134,86,.12), transparent 55%),
              radial-gradient(900px 500px at 50% 95%, rgba(216,180,160,.18), transparent 55%),
              var(--bg);
  color:var(--text);
  line-height:1.35;
}
body.public a{ color:inherit; text-decoration:none; }
body.public img{ max-width:100%; display:block; }

.container{ width: min(var(--max), calc(100% - 48px)); margin: 0 auto; }
@media (max-width: 520px){ .container{ width: min(var(--max), calc(100% - 28px)); } }

.topbar{
  position:sticky; top:0; z-index:50;
  backdrop-filter: blur(14px);
  background: linear-gradient(to bottom, rgba(251,250,248,.92), rgba(251,250,248,.55));
  border-bottom:1px solid var(--line);
}
.nav{ display:flex; align-items:center; justify-content:space-between; padding:16px 0; gap:14px; }
.brand{ display:flex; align-items:center; gap:10px; }
.logo{
  width:38px;height:38px;border-radius:12px;
  background: radial-gradient(circle at 30% 30%, rgba(216,180,160,.9), rgba(109,15,46,.85));
  box-shadow: var(--shadow-soft);
  position:relative;
}
.logo:after{
  content:""; position:absolute; inset:9px;
  border-radius:10px;
  background: radial-gradient(circle at 40% 30%, rgba(255,255,255,.9), rgba(255,255,255,0));
  opacity:.55;
}
.brand-name{ display:flex; flex-direction:column; }
.brand-name strong{
  font-family: ui-serif, Georgia, "Times New Roman", Times, serif;
  letter-spacing:.02em;
  font-size:16px;
}
.brand-name span{ font-size:12px; color:var(--muted); }

.navlinks{ display:flex; gap:18px; align-items:center; flex-wrap:wrap; }
.navlinks a{
  font-size:13px; color:var(--muted);
  padding:8px 10px; border-radius:12px;
  transition: all .18s ease;
}
.navlinks a:hover{ color:var(--text); background: rgba(255,255,255,.55); }
@media (max-width: 520px){ .navlinks{ display:none; } }

.actions{ display:flex; gap:10px; align-items:center; }
.pill{
  border:1px solid var(--line);
  background: rgba(255,255,255,.55);
  color:var(--text);
  padding:10px 12px;
  border-radius:999px;
  display:flex; gap:10px; align-items:center;
  box-shadow: 0 1px 0 rgba(0,0,0,.02);
}
.pill small{ color:var(--muted); }
.call-pill{
  text-decoration: none;
}
.icon-btn{
  width:40px;height:40px;border-radius:999px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.72);
  display:grid; place-items:center;
  cursor:pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.icon-btn:hover{ transform: translateY(-1px); box-shadow: var(--shadow-soft); background: rgba(255,255,255,.92); }
.icon{ width:18px;height:18px; display:block; }

@media (max-width: 980px){
  .actions .pill{
    display:none;
  }
  .actions .call-pill{
    display:inline-flex;
  }
}
@media (max-width: 700px){
  .actions{ gap:6px; }
  .actions .call-pill{
    width:40px;
    height:40px;
    padding:0;
    justify-content:center;
    border-radius:999px;
  }
  .actions .call-pill div{ display:none; }
  .actions .icon-btn{
    width:38px;
    height:38px;
    font-size:12px;
  }
}

.badge{ position:relative; }
.badge[data-count]:after{
  content: attr(data-count);
  position:absolute; top:-6px; right:-6px;
  min-width:18px; height:18px; padding:0 5px;
  border-radius:999px;
  background: var(--accent); color:white;
  font-size:11px; display:grid; place-items:center;
  border:2px solid var(--bg);
}

.btn{
  display:inline-flex; align-items:center; justify-content:center;
  gap:10px;
  padding:12px 16px;
  box-sizing: border-box;
  max-width: 100%;
  border-radius:999px;
  border:1px solid transparent;
  cursor:pointer;
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease, background .15s ease, border-color .15s ease;
  font-weight:600;
  user-select:none;
}
.btn:hover{ transform: translateY(-1px); box-shadow: var(--shadow-soft); }
.btn:active{ transform: translateY(0px); box-shadow:none; opacity:.95; }
.btn.primary{ background: linear-gradient(135deg, var(--accent), #4d0c22); color:white; }
.btn.secondary{ background: rgba(255,255,255,.72); border-color: var(--line); color:var(--text); }
.btn.ghost{ background: transparent; border-color: var(--line); color:var(--text); }
.btn.block{ width:100%; }

.kicker{
  font-size:12px; color: var(--muted);
  letter-spacing: .12em; text-transform: uppercase;
}
.h1{
  font-family: ui-serif, Georgia, "Times New Roman", Times, serif;
  font-weight:700;
  letter-spacing: .01em;
  font-size: clamp(34px, 4.2vw, 56px);
  line-height:1.06;
  margin: 10px 0 12px;
}
.h2{
  font-family: ui-serif, Georgia, "Times New Roman", Times, serif;
  font-weight:700;
  font-size: clamp(22px, 2.3vw, 30px);
  margin: 0 0 10px;
}
.p{ color:var(--muted); font-size:15px; margin:0; }
.note{ color:var(--muted-2); font-size:13px; }
.tag{
  font-size:12px; color:var(--muted);
  border:1px solid var(--line);
  background: rgba(255,255,255,.55);
  padding:6px 9px;
  border-radius:999px;
  display:inline-flex; gap:8px; align-items:center;
}

.section{ padding: 26px 0; }
.section-head{ display:flex; justify-content:space-between; align-items:flex-end; gap:14px; margin-bottom:14px; }

.card{
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card.pad{ padding: 20px; }

.hero{ padding: 34px 0 26px; }
.hero-grid{ display:grid; grid-template-columns: 1.08fr .92fr; gap:26px; align-items:start; }
@media (max-width: 980px){ .hero-grid{ grid-template-columns:1fr; } }

.hero-visual{
  position:relative;
  overflow:hidden;
  width:100%;
  height:420px;
  max-height:420px;
  align-self:start;
  isolation:isolate;
}
@media (max-width: 980px){
  .hero-visual{
    max-height:none;
    height: 300px;
  }
}
.hero-visual .fake-photo{
  position:absolute; inset:-40px;
  background:
    radial-gradient(260px 220px at 28% 35%, rgba(216,180,160,.95), transparent 62%),
    radial-gradient(280px 240px at 58% 42%, rgba(169,134,86,.55), transparent 62%),
    radial-gradient(320px 260px at 72% 55%, rgba(109,15,46,.55), transparent 62%),
    radial-gradient(420px 280px at 35% 70%, rgba(255,255,255,.8), transparent 65%),
    linear-gradient(135deg, rgba(30,18,22,.35), rgba(30,18,22,.08));
  filter: saturate(1.12) contrast(1.03);
  transform: scale(1.05);
  animation: monsterFloat 10s ease-in-out infinite alternate;
}
@keyframes monsterFloat{ from{ transform: scale(1.04) translateY(0px); } to{ transform: scale(1.08) translateY(-6px); } }
.hero-visual .overlay{ position:absolute; inset:0; z-index:1;
  background: radial-gradient(600px 300px at 20% 10%, rgba(255,255,255,.75), transparent 55%),
              radial-gradient(700px 400px at 80% 20%, rgba(255,255,255,.35), transparent 50%),
              linear-gradient(to bottom, rgba(0,0,0,.02), rgba(0,0,0,.14));
}
.hero-visual .stamp{
  position:absolute; left:18px; top:18px;
  z-index:2;
  display:flex; gap:10px; align-items:center;
  padding:10px 12px;
  border-radius:999px;
  background: rgba(255,255,255,.70);
  border:1px solid var(--line);
  box-shadow: var(--shadow-soft);
  font-size:13px;
}
.dot{ width:10px;height:10px;border-radius:999px;background: var(--ok); box-shadow:0 0 0 6px rgba(15,109,69,.12); }
.hero-visual .caption{
  position:absolute; left:20px; bottom:18px; right:20px;
  z-index:2;
  display:flex; justify-content:space-between; gap:14px; align-items:flex-end;
}
.caption .price{
  background: rgba(255,255,255,.70);
  border:1px solid var(--line);
  padding:12px 14px;
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
}
.caption .price strong{ display:block; font-size:16px; }
.caption .price span{ color:var(--muted); font-size:12px; }

.hero-copy{ display:flex; flex-direction:column; gap:14px; }
.hero-usp{ display:grid; grid-template-columns: 1fr 1fr; gap:10px; margin-top:6px; }
@media (max-width: 520px){ .hero-usp{ grid-template-columns:1fr; } }
.chip{
  border:1px solid var(--line);
  background: rgba(255,255,255,.58);
  border-radius: 16px;
  padding:10px 12px;
  font-size:13px;
  color:var(--muted);
  display:flex; gap:10px; align-items:flex-start;
}
.chip b{ color:var(--text); font-weight:700; }
.chip svg{ margin-top:2px; opacity:.9; }

.grid-4{ display:grid; grid-template-columns: repeat(4, 1fr); gap:14px; }
.grid-3{ display:grid; grid-template-columns: repeat(3, 1fr); gap:14px; }
@media (max-width: 980px){
  .grid-4{ grid-template-columns: repeat(2, 1fr); }
  .grid-3{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px){
  .grid-4, .grid-3{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.product-card{
  border-radius: var(--radius);
  overflow:hidden;
  border:1px solid var(--line);
  background: rgba(255,255,255,.74);
  box-shadow: var(--shadow-soft);
  transition: transform .18s ease, box-shadow .18s ease;
  display:flex; flex-direction:column;
  min-height: 360px;
  position:relative;
}
.product-card:hover{ transform: translateY(-2px); box-shadow: var(--monster-glow); }
.product-card .media{
  height: 220px;
  background: rgba(255,255,255,.6);
  position:relative;
}
.product-card .media img{
  width:100%; height:100%; object-fit:cover;
  transform: scale(1.01);
  transition: transform .25s ease;
}
.product-card:hover .media img{ transform: scale(1.06); }
.ribbon{
  position:absolute; left:14px; top:14px;
  background: rgba(255,255,255,.94);
  border:1px solid rgba(21,19,19,.28);
  padding:8px 10px;
  border-radius: 999px;
  font-size:12px;
  font-weight:800;
  color: var(--text);
  box-shadow: var(--shadow-soft);
  z-index: 3;
}
.quick-pill{
  position:absolute; right:14px; top:14px;
  background: rgba(255,255,255,.75);
  border:1px solid var(--line);
  padding:8px 10px;
  border-radius: 999px;
  font-size:12px;
  color: var(--muted);
  box-shadow: var(--shadow-soft);
}
.product-card .content{
  padding:14px 14px 16px;
  display:flex; flex-direction:column; gap:10px; flex:1;
}
.product-title{ font-weight:900; letter-spacing:.01em; margin:0; }
.small-row{ display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.price-row{ display:flex; justify-content:space-between; align-items:center; gap:10px; margin-top:auto; }
.price-row .price{ font-weight:900; }
.stars{ font-size:12px; color: var(--muted); }

.toolbar{ display:flex; gap:10px; flex-wrap:wrap; }
.search{
  flex:1; display:flex; align-items:center; gap:10px;
  padding:12px 14px; background: rgba(255,255,255,.72);
  border:1px solid var(--line); border-radius:999px;
}
.search input{ border:none; outline:none; width:100%; background:transparent; font-size:14px; }
.select{ padding:12px 14px; background: rgba(255,255,255,.72); border:1px solid var(--line); border-radius:999px; font-size:14px; }

.catalog-layout{ display:grid; grid-template-columns: 280px 1fr; gap:16px; align-items:start; }
@media (max-width: 980px){ .catalog-layout{ grid-template-columns:1fr; } }
.filters{ position:sticky; top:88px; padding:16px; }
@media (max-width: 980px){ .filters{ position:relative; top:0; } }
.filter-group{ margin-top:12px; }
.filter-group h4{ margin:0 0 10px; font-size:13px; color:var(--muted); letter-spacing:.08em; text-transform:uppercase; }
.filter-chips{ display:flex; flex-wrap:wrap; gap:8px; }
.filter-chips button{
  border:1px solid var(--line);
  background: rgba(255,255,255,.62);
  border-radius:999px;
  padding:8px 10px;
  font-size:13px;
  cursor:pointer;
  transition: all .15s ease;
}
.filter-chips button.active{
  border-color: rgba(109,15,46,.35);
  background: rgba(109,15,46,.08);
  color: var(--text);
}
.filter-chips button:hover{ transform: translateY(-1px); box-shadow: var(--shadow-soft); }

.mood-grid{ display:grid; grid-template-columns: repeat(4, 1fr); gap:12px; }
@media (max-width: 980px){ .mood-grid{ grid-template-columns: repeat(2,1fr);} }
@media (max-width: 520px){ .mood-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mood-card{
  border:1px solid var(--line);
  border-radius:20px;
  background: rgba(255,255,255,.72);
  padding:14px;
  display:flex; flex-direction:column; gap:8px;
  min-height:110px;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.mood-card:hover{ transform: translateY(-2px); box-shadow: var(--monster-glow); background: rgba(255,255,255,.9); }
.mood-emoji{ font-size:22px; }
.mood-title{ font-weight:900; }
.mood-note{ font-size:13px; color:var(--muted); }

.reveal{ opacity:0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.reveal.is-visible{ opacity:1; transform: translateY(0); }

.live-pill{
  position: fixed; left: 16px; bottom: 16px; z-index: 70;
  display:flex; align-items:center; gap:8px;
  padding:10px 12px;
  border-radius:999px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.85);
  box-shadow: var(--shadow-soft);
  font-size:13px;
}
.live-dot{ width:8px;height:8px;border-radius:999px;background:#0f6d45; box-shadow:0 0 0 6px rgba(15,109,69,.12); }
.sticky-cta{ position:fixed; right:16px; bottom:16px; z-index:70; }
@media (max-width: 700px){
  .sticky-cta{
    left:10px;
    right:10px;
    bottom:10px;
  }
  .sticky-cta .btn{
    width:100%;
    max-width:none;
    padding:12px 14px;
    font-size:14px;
    line-height:1.2;
  }
  .live-pill{
    left:10px;
    right:10px;
    bottom:66px;
    justify-content:center;
    text-align:center;
    font-size:12px;
    padding:8px 10px;
  }
  .toast{ bottom:126px; }
}

@media (max-width: 640px){
  .product-card{ min-height:305px; }
  .product-card .media{ height:160px; }
  .product-card .content{ padding:10px 10px 12px; gap:8px; }
  .product-title{ font-size:14px; line-height:1.25; }
  .price-row .price{ font-size:14px; }
  .price-row .btn{ padding:9px 10px; font-size:12px; }
  .filter-chips button{ font-size:12px; padding:7px 9px; }
}

.cart-layout{ display:grid; grid-template-columns: 1fr 360px; gap:16px; align-items:start; }
@media (max-width: 980px){ .cart-layout{ grid-template-columns:1fr; } }
.cart-item{
  display:grid; grid-template-columns: 94px 1fr auto; gap:12px;
  padding:12px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.65);
  border-radius: 18px;
}
.cart-item img{ height:94px; width:94px; border-radius:16px; object-fit:cover; border:1px solid var(--line); }
.qty{
  display:flex; align-items:center; gap:8px;
  border:1px solid var(--line);
  border-radius:999px;
  padding:8px 10px;
  background: rgba(255,255,255,.6);
}
.qty button{ border:none; background:transparent; cursor:pointer; width:26px; height:26px; border-radius:999px; }
.qty button:hover{ background: rgba(0,0,0,.04); }
.qty span{ min-width:18px; text-align:center; font-weight:900; }

.divider{ height:1px; background: var(--line); margin: 14px 0; }

.form{ display:grid; gap:12px; }
.field{ display:grid; gap:8px; }
.field label{ font-size:13px; color:var(--muted); }
.field input, .field textarea, .field select{
  width:100%;
  padding:12px 14px;
  border-radius:16px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.72);
  outline:none;
  font-size:14px;
}
.field textarea{ min-height:96px; resize:vertical; }
.two{ display:grid; grid-template-columns: 1fr 1fr; gap:12px; }
@media (max-width: 520px){ .two{ grid-template-columns:1fr; } }

.toast{
  position: fixed;
  left: 50%;
  bottom: 84px;
  transform: translateX(-50%);
  background: rgba(21,19,19,.86);
  color: white;
  padding: 12px 14px;
  border-radius: 999px;
  box-shadow: var(--shadow);
  opacity:0;
  pointer-events:none;
  transition: opacity .2s ease, transform .2s ease;
  font-size: 13px;
  z-index: 80;
}
.toast.show{ opacity:1; transform: translateX(-50%) translateY(-2px); }

.quick-picker{
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
}
.quick-picker.is-open{ display: block; }
.quick-picker__backdrop{
  position:absolute; inset:0;
  background: rgba(10,8,9,.45);
  backdrop-filter: blur(3px);
}
.quick-picker__dialog{
  position:relative;
  width: min(560px, calc(100% - 28px));
  margin: 8vh auto 0;
  z-index: 1;
}

.footer{
  padding: 28px 0 40px;
  border-top:1px solid var(--line);
  margin-top: 18px;
}
.footer-grid{
  display:grid; grid-template-columns: 1.2fr .8fr .8fr;
  gap: 16px;
}
@media (max-width: 980px){ .footer-grid{ grid-template-columns:1fr; } }
.footer a{ color:var(--muted); }
.footer a:hover{ color:var(--text); }

/* TEMP FIX: force cards visible */
.product-card {
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
}
/* Catalog hard-fix: prevent invisible cards after data load */
.products-grid,
.catalog-grid,
.catalog-list,
#catalogGrid {
  opacity: 1 !important;
  visibility: visible !important;
}

.product-card,
.catalog-card,
.product-item {
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
  filter: none !important;
}
/* --- STEM: compact qty row --- */
.stem-chips{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:10px;
  align-items:center;
}

.stem-chips .js-stem-qty,
.stem-chips .js-stem-custom-toggle{
  border:1px solid var(--line);
  background: rgba(255,255,255,.62);
  border-radius:999px;
  padding:8px 10px;
  font-size:13px;
  cursor:pointer;
  transition: all .15s ease;
  line-height:1;
}

.stem-chips .js-stem-qty:hover,
.stem-chips .js-stem-custom-toggle:hover{
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

.stem-chips .js-stem-qty.is-active,
.stem-chips .js-stem-custom-toggle.is-active{
  border-color: rgba(109,15,46,.35);
  background: rgba(109,15,46,.08);
  color: var(--text);
}

/* inline custom input shown in the same row */
.stem-custom-inline{
  display:none;
  align-items:center;
}

.stem-custom-inline.is-open{
  display:flex;
}

.stem-custom-input{
  width:120px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.62);
  border-radius:999px;
  padding:8px 12px;
  font-size:13px;
  outline:none;
}

.stem-custom-input::placeholder{
  color: rgba(21,19,19,.52);
}

/* compact bottom area */
.stem-bottom{
  margin-top:10px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
}

.stem-pack{
  display:flex;
  align-items:center;
  gap:8px;
  font-size:13px;
  color: var(--muted);
}

.stem-pack input{
  transform: translateY(1px);
}

.stem-total{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  margin-top:10px;
}

.stem-card .btn.primary{
  margin-top:10px;
  width:100%;
}
/* --- Stems: make "1 шт" + "лента" tags always in one stable row --- */
/* --- Stable price tags row --- */
.product-card.stem-card .small-row{
  display:flex !important;
  gap:8px;
  flex-wrap:nowrap;
  align-items:center;
  margin-top:8px !important;
}

.product-card.stem-card .small-row .tag{
  flex:1;
  min-width:0; /* важно — не вылазит */
  text-align:center;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  font-variant-numeric: tabular-nums;
  font-size:12px;
  padding:6px 8px;
}
.product-card.stem-card .media{
  background: linear-gradient(135deg, #f7f4f4, #efecec);
  display:flex;
  align-items:center;
  justify-content:center;
}

.product-card.stem-card .media img{
  width:100%;
  height:100%;
  object-fit:cover;
}
.hero-visual > .hero-real-photo{
  position:absolute !important;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center;
  z-index:0;
}

/* Hard override: keep hero image card compact on home page */
body.public[data-page="home"] .hero .hero-visual{
  height: 690px !important;
  min-height: 690px !important;
  max-height: 690px !important;
  align-self: start !important;
}
@media (max-width: 980px){
  body.public[data-page="home"] .hero .hero-visual{
    height: 280px !important;
    min-height: 280px !important;
    max-height: 280px !important;
  }
}
