/* v1-vitrina.css — BASE (исправленный, универсальный) */

/* ==========================================================
   VARIABLES
   ========================================================== */
:root{
  --bg: #eef3ff;               /* холодный светлый фон */
  --surface: #ffffff;
  --muted-surface: #ccd5ef;    /* яркий акцентный surface */
  --card: rgba(80,72,160,0.06);
  --card-strong: #e9e8ff;
  --accent: #3b2fbf;           /* насыщенный индиго */
  --accent2: #1f3bff;          /* синий/индиго */
  --text: #14141a;
  --muted: #47517a;
  --muted-2: #7a86b0;
  --gap: 12px;
  --maxw: 980px;
  --radius: 12px;
  --shadow: 0 10px 30px rgba(10,12,30,0.06);
  --focus: 0 0 0 4px rgba(31,59,255,0.12);
}

/* ==========================================================
   GLOBAL RESET / BASE STYLES
   ========================================================== */
html, body {
  background: var(--bg);
  min-height: 100vh;
  margin: 0;
  padding: 0;
  overflow-x: hidden !important;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body::-webkit-scrollbar { background: transparent; }

.container, .wrap, .vtr-page { background: transparent; }
img { max-width:100%; height:auto; display:block; }
a { color: inherit; text-decoration: none; }

.container { padding:18px; min-height: calc(var(--vh,1vh) * 100); }
.wrap { max-width: var(--maxw); margin: 0 auto; }

/* ==========================================================
   HEADER / HERO / CTA
   ========================================================== */
.header { display:flex; align-items:center; gap:10px; margin-bottom:14px; }
.brand {
  width:64px; height:64px; border-radius:12px;
  background:linear-gradient(135deg,var(--accent),var(--accent2));
  display:flex; align-items:center; justify-content:center;
  font-weight:900; color:var(--surface); font-size:28px;
}
.hgroup { display:flex; flex-direction:column; }
.site-title { font-weight:700; color:var(--text); }
.site-sub { font-size:13px; color:var(--muted); margin-top:4px; }

.hero {
  background: var(--muted-surface);
  padding:14px; border-radius:14px; box-shadow: var(--shadow);
}
.hero-top { display:flex; flex-direction:column; gap:10px; }
.hero h1 { margin:0; font-size:20px; color:var(--text) !important; }
.hero p { margin:0; font-size:13px; color:var(--muted) !important; }

.cta-row { display:flex; gap:10px; margin-top:10px; flex-wrap:wrap; }
.btn {
  display:inline-flex; align-items:center; gap:10px;
  padding:10px 14px; border-radius:10px; border:0; cursor:pointer; font-weight:700;
  background:linear-gradient(90deg,var(--accent),var(--accent2));
  color:var(--surface); box-shadow:0 8px 20px rgba(113,100,226,0.12);
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  transition: transform 150ms ease, box-shadow 150ms ease, opacity 120ms;
}
.btn:hover { transform: translateY(-2px); }
.btn:focus { box-shadow: var(--focus); outline: none; }
.btn-ghost {
  background:transparent; border:1px solid rgba(0,0,0,0.08);
  color:var(--muted); padding:10px 12px; border-radius:10px; font-weight:700; cursor:pointer;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.btn-ghost:focus { box-shadow: var(--focus); outline: none; }

/* ==========================================================
   ICON GRID / CATEGORIES / PROMO
   ========================================================== */
.icon-grid {
  display:grid; grid-template-columns:repeat(auto-fit,minmax(140px,1fr));
  gap:10px; margin-top:14px;
}
.icon-grid button {
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px;
  padding:12px; border-radius:10px; border:0;
  background: #7066d02a;
  color:var(--text); cursor:pointer; box-shadow:0 6px 18px rgba(0,0,0,0.06);
  transition: transform 160ms ease, box-shadow 160ms ease; text-align:center;
  user-select: none; -webkit-user-select: none;
}
.icon-grid button:active { transform:translateY(2px); }
.icon-ico { width:44px; height:44px; border-radius:8px;
  background:rgba(255,255,255,0.6);
  display:flex; align-items:center; justify-content:center; font-size:20px;
}
.icon-title { display:block; font-weight:700; white-space:normal; text-align:center; }

.categories { display:flex; flex-wrap:wrap; gap:10px; justify-content:center; }
.cat-btn {
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:10px 14px; border-radius:10px;
  background: linear-gradient(90deg,var(--accent),var(--accent2));
  color:var(--surface); border:0; cursor:pointer; font-weight:700; min-width:130px;
  box-shadow:0 8px 20px rgba(0,0,0,0.06);
}
.cat-btn:focus { box-shadow: var(--focus); outline: none; }

.promo-row { display:flex; gap:12px; overflow:auto; padding-bottom:6px; }
.promo-card {
  flex:0 0 78%; min-width:220px;
  background: var(--muted-surface);
  padding:12px; border-radius:12px; box-shadow:0 6px 18px rgba(0,0,0,0.06);
}
.promo-card strong { color:var(--text); }
.promo-card p { color:var(--muted); }

/* ==========================================================
   WHY / ABOUT (hero-like block)
   ========================================================== */
.why-hero {
  background: var(--muted-surface);
  padding: 18px;
  border-radius: 14px;
  box-shadow: var(--shadow);
  margin-top: 18px;
}
.why-wrap { display:flex; flex-direction:column; gap:10px; }
.why-hero h2 { margin:0; color:var(--text); font-size:20px; font-weight:800; }
.why-sub { margin:0; color:var(--muted); font-size:14px; line-height:1.4; }
.why-list { list-style:none; padding:0; margin:6px 0 0 0; display:flex; flex-direction:column; gap:8px; }
.why-list li {
  background: rgba(255,255,255,0.6);
  padding:10px 12px; border-radius:10px; font-size:14px; color:var(--text);
  box-shadow:0 6px 16px rgba(0,0,0,0.04); display:flex; align-items:center; gap:8px;
}

/* ==========================================================
   CATALOG
   ========================================================== */
.products {
  display:flex; gap:12px; overflow:auto; margin-top:8px; align-items:flex-start; padding-bottom:6px;
}
.product {
  background: var(--card-strong);
  border-radius:10px; padding:10px;
  min-width:160px;
  box-shadow:0 6px 18px rgba(0,0,0,0.06);
  display:flex; flex-direction:column; align-items:center; text-align:center; margin:8px; justify-content: space-between;
  border: 1px solid rgba(0,0,0,0.03);
  flex: 0 0 auto; width: min(84vw, 280px); max-width: calc(100% - 16px);
}
.product-media { width:100%; overflow:hidden; border-radius:8px; background:var(--surface); display:block; position:relative; }
.product-media img { width:100%; height:100%; object-fit:cover; display:block; border-radius:6px; }
.product h4 { margin: 8px 0 4px 0; font-size:15px; color:var(--text); height:36px; line-height:18px; overflow:hidden; text-overflow:ellipsis; }
.product .price { color:var(--accent); font-weight:800; margin-bottom:8px; }
.cat-btn.active { box-shadow: 0 8px 20px rgba(113,100,226,0.12); transform: translateY(-2px); }

.catalog-close-wrapper { display:flex; justify-content:center; margin-top:15px; margin-bottom:10px; }
.catalog-close-btn {
  padding:10px 14px; border-radius:10px; background: linear-gradient(90deg,var(--accent),var(--accent2));
  color:var(--surface); border:0; cursor:pointer; font-weight:700; min-width:130px;
  box-shadow:0 8px 20px rgba(0,0,0,0.06); transition: 0.2s;
}
.catalog-close-btn:hover { opacity:0.95; }
.catalog-close-btn:active { transform: scale(0.98); }

/* ==========================================================
   GALLERY
   ========================================================== */
.gallery-row {
  display:flex; gap:14px; overflow:auto; padding:8px 0; scroll-snap-type:x mandatory;
  background: rgba(167,160,224,0.02);
}
.gallery-card {
  flex:auto; min-width:220px; border-radius:10px; scroll-snap-align:center; background:var(--surface);
  box-shadow:0 6px 18px rgba(0,0,0,0.06);
}
.gallery-card img { width:100%; height:auto; object-fit:cover; display:block; border-radius:5px; box-shadow: var(--shadow) }
.gallery-controls { display:flex; gap:8px; align-items:center; justify-content:center; margin-top:8px; }
.gallery-btn { padding:8px 12px; border-radius:8px; border:0; background: linear-gradient(90deg,var(--accent),var(--accent2)); color:var(--surface); cursor:pointer; font-weight:700; }

/* ==========================================================
   REVIEWS
   ========================================================== */
.reviews { display:flex; gap:12px; overflow:auto; padding-bottom:6px; }
.review {
  flex:0 0 78%; min-width:220px; background:var(--muted-surface); padding:12px; border-radius:10px; box-shadow:0 6px 18px rgba(0,0,0,0.06);
}
.review strong { color:var(--text); }
.review p { color:var(--muted); }

/* ==========================================================
   FAQ
   ========================================================== */
.faq { margin-top:8px; }
.q { background:var(--muted-surface); padding:10px; border-radius:8px; margin-bottom:8px; cursor:pointer; }
.q-title { display:flex; justify-content:space-between; align-items:center; font-weight:700; color:var(--text); }
.q-body { margin-top:8px; color:var(--muted); display:none; }

/* ==========================================================
   CONTACTS
   ========================================================== */
.contacts { display:flex; flex-direction:column; gap:8px; }
.contact-item {
  background:var(--muted-surface); padding:12px; border-radius:8px; display:flex; align-items:center; gap:10px; font-weight:700; color:var(--accent);
}
.contact-item strong { color:var(--text); }

/* ==========================================================
   FOOTER
   ========================================================== */
.footer { margin-top:18px; color:var(--muted); font-size:13px; text-align:center; }

/* ==========================================================
   RESPONSIVE / MEDIA QUERIES
   ========================================================== */
@media(min-width:768px){ .product { width: 240px; } }
@media(min-width:667px){ .product { width: 220px; } }
@media(max-width:520px){
  .icon-grid{ display:none; }
  .icon-ico{ width:40px; height:40px; font-size:18px; }
  .gallery-row{ gap:12px; }
  .gallery-card{ flex:0 0 86%; }
  .products { flex-wrap:nowrap;}
  .product { width: min(76vw, 220px); }
  .catalog-close-wrapper { justify-content: left; }
}
@media(max-width:360px){
  .product{ width: min(76vw, 220px); }
  .hero h1{ font-size:18px; }
  .catalog-close-wrapper { justify-content: left; }
}

/* ==========================================================
   OVERRIDES
   ========================================================== */
.vtr-page .hero h1 { color: var(--text) !important; font-weight:800 !important; line-height:1.15; }
.vtr-page .hero p { color: var(--muted) !important; }
.vtr-page .section-title { color: var(--text) !important; font-weight:800 !important; }
.vtr-page .btn { background: linear-gradient(90deg,var(--accent),var(--accent2)) !important; color:var(--surface) !important; border:0 !important; }
.vtr-page .btn-ghost { color: var(--muted) !important; border-color: rgba(0,0,0,0.08) !important; }

/* ==========================================================
   SCROLLBARS (webkit + firefox)
   ========================================================== */
.gallery-row::-webkit-scrollbar,
.products::-webkit-scrollbar,
.reviews::-webkit-scrollbar,
.promo-row::-webkit-scrollbar { height: 10px; width: 10px; }
.gallery-row::-webkit-scrollbar-track,
.products::-webkit-scrollbar-track,
.reviews::-webkit-scrollbar-track,
.promo-row::-webkit-scrollbar-track { background: transparent; border-radius: 10px; }
.gallery-row::-webkit-scrollbar-thumb,
.products::-webkit-scrollbar-thumb,
.reviews::-webkit-scrollbar-thumb,
.promo-row::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, rgba(0,0,0,0.12), rgba(0,0,0,0.06));
  border-radius: 10px; border: 2px solid rgba(255,255,255,0.0);
}
.gallery-row:hover::-webkit-scrollbar-thumb,
.products:hover::-webkit-scrollbar-thumb { background: linear-gradient(90deg, rgba(0,0,0,0.18), rgba(0,0,0,0.1)); }
.gallery-row, .products, .reviews, .promo-row { scrollbar-width: thin; scrollbar-color: rgba(0,0,0,0.15) transparent; }
@media(max-width:520px){
  .gallery-row, .products, .reviews { scrollbar-width: none; }
  .gallery-row::-webkit-scrollbar, .products::-webkit-scrollbar, .reviews::-webkit-scrollbar { display: none; }
}
