/* ============================================================
   PINGWIN — единая тема (тёмная по умолчанию + светлая по .light)
   Apple-типографика и компоновка, две цветовые палитры.
   ============================================================ */

/* ТЁМНАЯ тема (по умолчанию) */
:root{
  --bg:#0e0e10; --surface:#1a1a1d; --surface-2:#26262a;
  --text:#f5f5f7; --muted:#9a9a9e; --line:#2a2a2e;
  --accent:#c9a24b; --on-accent:#000; --danger:#ff6b6b;
  --radius:18px;
  --shadow:0 1px 3px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
  --shadow-sm:0 1px 2px rgba(0,0,0,.25), 0 2px 8px rgba(0,0,0,.3);
  --blur-bg:rgba(14,14,16,.8);
}
/* СВЕТЛАЯ тема (Apple) */
body.light{
  --bg:#fbfbfd; --surface:#ffffff; --surface-2:#f5f5f7;
  --text:#1d1d1f; --muted:#6e6e73; --line:#e8e8ed;
  --accent:#1d1d1f; --on-accent:#fff; --danger:#d70015;
  --shadow:0 1px 3px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.06);
  --shadow-sm:0 1px 2px rgba(0,0,0,.04), 0 2px 8px rgba(0,0,0,.05);
  --blur-bg:rgba(251,251,253,.8);
}

*{ margin:0; padding:0; box-sizing:border-box; }
body{
  font-family:-apple-system,BlinkMacSystemFont,"SF Pro Display","SF Pro Text","Helvetica Neue",Helvetica,Arial,sans-serif;
  background:var(--bg); color:var(--text); line-height:1.47; letter-spacing:-0.01em;
  -webkit-font-smoothing:antialiased; padding-bottom:100px; transition:background .3s, color .3s;
}
img{ max-width:100%; display:block; }
.container{ max-width:720px; margin:0 auto; padding:0 20px; }

.hero{ position:relative; padding:64px 20px 40px; text-align:center; background-size:cover; background-position:center; }
.hero-content{ position:relative; z-index:1; }
.hero .logo{ width:120px; height:120px; object-fit:contain; margin:0 auto 22px; border-radius:26px; }
.hero h1{ font-size:40px; font-weight:600; letter-spacing:-0.03em; color:var(--text); line-height:1.08; }
.hero .desc{ color:var(--muted); margin-top:14px; font-size:18px; max-width:520px; margin-inline:auto; font-weight:400; }
.hero .info{ margin-top:20px; font-size:15px; color:var(--text); display:grid; gap:5px; }
.hero .info a{ color:var(--text); text-decoration:none; }

.theme-toggle{ position:absolute; top:18px; right:18px; z-index:5; width:42px; height:42px; border-radius:50%; border:1px solid var(--line); background:var(--surface); color:var(--text); cursor:pointer; font-size:19px; display:flex; align-items:center; justify-content:center; box-shadow:var(--shadow-sm); transition:transform .2s; }
.theme-toggle:active{ transform:scale(.92); }

.hero .social-row{ margin-top:24px; }
.social-row{ display:flex; gap:10px; flex-wrap:wrap; justify-content:center; }
.social-link{ border:none; background:var(--surface-2); color:var(--text); padding:11px 22px; border-radius:980px; text-decoration:none; font-size:15px; font-weight:500; transition:transform .2s; box-shadow:var(--shadow-sm); }
.social-link:active{ transform:scale(.97); }
.social-preorder{ background:var(--accent); color:var(--on-accent); }

.slider{ display:flex; gap:14px; overflow-x:auto; padding:18px 20px; scroll-snap-type:x mandatory; -webkit-overflow-scrolling:touch; }
.slider::-webkit-scrollbar{ display:none; }
.slide{ flex:0 0 86%; scroll-snap-align:center; border-radius:var(--radius); overflow:hidden; aspect-ratio:16/7; background:var(--surface-2); box-shadow:var(--shadow-sm); }
.slide img{ width:100%; height:100%; object-fit:cover; }

.section-tabs{ position:sticky; top:0; z-index:11; display:flex; gap:4px; background:var(--blur-bg); backdrop-filter:saturate(180%) blur(20px); -webkit-backdrop-filter:saturate(180%) blur(20px); border-bottom:1px solid var(--line); overflow-x:auto; scrollbar-width:none; flex-wrap:nowrap; padding:0 12px; }
.section-tabs::-webkit-scrollbar{ display:none; }
.sec-tab{ flex:0 0 auto; white-space:nowrap; padding:16px 16px; background:none; border:none; border-bottom:2px solid transparent; color:var(--muted); font-size:16px; font-weight:500; cursor:pointer; font-family:inherit; letter-spacing:-0.01em; }
.sec-tab.active{ color:var(--text); border-bottom-color:var(--accent); font-weight:600; }

.tabs{ position:sticky; top:53px; z-index:10; background:var(--blur-bg); backdrop-filter:saturate(180%) blur(20px); -webkit-backdrop-filter:saturate(180%) blur(20px); display:flex; gap:8px; overflow-x:auto; padding:14px 20px; border-bottom:1px solid var(--line); scrollbar-width:none; }
.tabs::-webkit-scrollbar{ display:none; }
.tab{ white-space:nowrap; padding:8px 16px; border-radius:980px; background:var(--surface-2); color:var(--muted); border:none; font-size:14px; cursor:pointer; font-family:inherit; font-weight:500; }
.tab.active{ background:var(--accent); color:var(--on-accent); font-weight:600; }

.category{ padding:28px 0 8px; }
.category h2{ font-size:26px; font-weight:600; letter-spacing:-0.02em; margin-bottom:18px; color:var(--text); }
.section-banner{ width:100%; border-radius:var(--radius); margin:0 0 22px; aspect-ratio:1273/671; object-fit:cover; cursor:zoom-in; display:block; box-shadow:var(--shadow-sm); }

.item{ display:flex; gap:16px; background:var(--surface); border-radius:var(--radius); padding:16px; margin-bottom:14px; box-shadow:var(--shadow-sm); transition:transform .15s; }
.item:active{ transform:scale(.995); }
.item-img{ width:88px; height:88px; border-radius:14px; object-fit:cover; background:var(--surface-2); flex-shrink:0; cursor:zoom-in; }
.item-body{ flex:1; min-width:0; }
.item-name{ font-size:17px; font-weight:600; letter-spacing:-0.01em; }
.item-desc{ font-size:14px; color:var(--muted); margin-top:5px; line-height:1.4; }
.item-bottom{ display:flex; align-items:center; justify-content:space-between; margin-top:12px; }
.item-price{ font-weight:600; color:var(--text); font-size:17px; }
.item-weight{ font-size:13px; color:var(--muted); }
.item-info{ display:block; }
.item-info .item-name{ font-size:20px; color:var(--text); }
.item-info .item-desc{ margin-top:8px; font-size:15px; }
.item-info .item-img{ width:100%; height:auto; max-height:260px; border-radius:14px; margin-bottom:12px; }

.btn{ background:var(--accent); color:var(--on-accent); border:none; padding:11px 22px; border-radius:980px; font-weight:600; cursor:pointer; font-size:15px; font-family:inherit; transition:transform .15s; letter-spacing:-0.01em; }
.btn:active{ transform:scale(.97); }
.btn-add{ padding:9px 18px; font-size:14px; background:var(--surface-2); color:var(--text); font-weight:600; }
.btn-ghost{ background:transparent; border:1px solid var(--accent); color:var(--accent); }
.qty{ display:flex; align-items:center; gap:12px; }
.qty button{ width:32px; height:32px; border-radius:50%; border:none; background:var(--surface-2); color:var(--text); font-size:18px; cursor:pointer; font-weight:500; }
.qty span{ min-width:18px; text-align:center; font-weight:600; }

.menu-cartbar, .cartbar{ position:fixed; left:50%; bottom:20px; transform:translateX(-50%); width:calc(100% - 40px); max-width:680px; background:var(--accent); color:var(--on-accent); font-weight:600; border-radius:980px; padding:16px 24px; display:flex; justify-content:space-between; align-items:center; cursor:pointer; z-index:50; box-shadow:var(--shadow); letter-spacing:-0.01em; }
.menu-cartbar.hidden, .cartbar.hidden{ display:none; }

.sheet-overlay{ position:fixed; inset:0; background:rgba(0,0,0,.4); opacity:0; pointer-events:none; transition:opacity .25s; z-index:60; }
.sheet-overlay.open{ opacity:1; pointer-events:auto; }
.sheet{ position:fixed; bottom:0; left:0; right:0; background:var(--surface); border-radius:28px 28px 0 0; max-height:88vh; overflow-y:auto; transform:translateY(100%); transition:transform .35s cubic-bezier(.32,.72,0,1); z-index:70; padding:14px 20px 40px; box-shadow:0 -8px 40px rgba(0,0,0,.18); }
.sheet.open{ transform:translateY(0); }
.sheet-handle{ width:38px; height:5px; background:var(--line); border-radius:999px; margin:0 auto 16px; }
.sheet h2{ font-size:24px; font-weight:600; letter-spacing:-0.02em; color:var(--accent); }
.sheet h3{ font-size:17px; font-weight:600; margin:20px 0 10px; }
.sheet-head{ display:flex; align-items:center; justify-content:space-between; gap:12px; }
.clear-cart{ background:var(--surface-2); border:none; color:var(--danger); border-radius:980px; padding:8px 16px; font-size:14px; cursor:pointer; font-weight:500; }
.muted-note{ color:var(--muted); font-size:14px; margin:6px 0 16px; }

.cart-line{ background:var(--surface-2); border-radius:16px; padding:14px; margin-bottom:10px; }
.cart-line-top{ display:flex; justify-content:space-between; align-items:flex-start; gap:10px; }
.cart-line-name{ font-weight:600; font-size:16px; }
.cart-line-sub{ font-size:14px; color:var(--muted); margin-top:3px; }
.cart-line-controls{ display:flex; align-items:center; justify-content:space-between; margin-top:12px; flex-wrap:wrap; gap:8px; }
.remove-x{ background:none; border:none; color:var(--danger); font-size:22px; cursor:pointer; line-height:1; padding:0 4px; flex-shrink:0; }
.cart-empty{ color:var(--muted); text-align:center; padding:36px 0; font-size:15px; }
.cart-summary{ margin-top:18px; border-top:1px solid var(--line); padding-top:16px; }
.sum-row{ display:flex; justify-content:space-between; font-size:15px; color:var(--muted); margin-bottom:8px; }
.sum-total{ font-size:20px; font-weight:600; color:var(--accent); margin-top:6px; }

.info-modal-overlay{ position:fixed; inset:0; background:rgba(0,0,0,.4); backdrop-filter:blur(4px); display:flex; align-items:center; justify-content:center; z-index:200; padding:24px; }
.info-modal-overlay.hidden{ display:none; }
.info-modal{ background:var(--surface); border-radius:26px; padding:34px 28px 26px; max-width:400px; width:100%; text-align:center; box-shadow:0 20px 70px rgba(0,0,0,.3); }
.info-icon{ width:56px; height:56px; margin:0 auto 20px; border-radius:50%; background:var(--surface-2); color:var(--accent); display:flex; align-items:center; justify-content:center; font-size:30px; font-weight:500; font-style:italic; font-family:Georgia,serif; border:1px solid var(--accent); }
.info-text{ color:var(--text); font-size:16px; line-height:1.5; margin-bottom:14px; }
.info-text:last-of-type{ margin-bottom:24px; }
.info-agree{ width:100%; padding:15px; font-size:17px; border-radius:14px; }

.lightbox{ position:fixed; inset:0; background:rgba(0,0,0,.92); display:none; align-items:center; justify-content:center; z-index:300; padding:20px; cursor:zoom-out; }
.lightbox.open{ display:flex; }
.lightbox img{ max-width:100%; max-height:100%; border-radius:16px; }

@media(max-width:520px){
  .hero{ padding:52px 18px 32px; }
  .hero h1{ font-size:32px; }
  .hero .desc{ font-size:16px; }
  .hero .logo{ width:100px; height:100px; }
  .category h2{ font-size:23px; }
  .item-img{ width:76px; height:76px; }
  .theme-toggle{ width:38px; height:38px; font-size:17px; top:14px; right:14px; }
}
@media(max-width:360px){
  .hero h1{ font-size:28px; }
  .item{ padding:13px; gap:12px; }
  .social-link{ padding:9px 17px; font-size:14px; }
}

.item-name, .cart-line-name, .order-title, .sec-tab, .tab, .item-desc, .cart-line-sub, h1, h2, h3 { overflow-wrap:break-word; word-break:break-word; }
.item-body, .cart-line { min-width:0; }
body { overflow-x:hidden; }
