/* D:\zamburak\css\style.css */
@font-face{
  font-family:'Betmo';
  src:url('../assets/fonts/Betmo%20Regular%20Cyr.otf') format('opentype');

  font-weight:normal;
  font-style:normal;
}


:root{
  --bg:#ffffff;
  --text:#0b0b0f;
  --muted:#6b7280;
  --line:#eceef2;
  --card:#ffffff;
  --shadow:0 8px 24px rgba(0,0,0,.06);
  --radius:18px;
  --radius2:14px;
  --pad:14px;
  --btn:#0b0b0f;
  --btnText:#ffffff;
}

*{box-sizing:border-box}
html,body{margin:0;padding:0;background:var(--bg);color:var(--text);font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif}
button,input,textarea{font:inherit}
a{color:inherit}

.header{
  position:sticky;
  top:0;
  z-index:10;
  height:56px;
  background:rgba(255,255,255,.92);
  backdrop-filter:saturate(180%) blur(12px);
  border-bottom:1px solid var(--line);
  padding:0 var(--pad);
  display:flex;
  align-items:center;
  justify-content:space-between;
}

.brand{display:flex;align-items:center;gap:10px}
.brand-text{font-weight:800;letter-spacing:.2px}

.main{padding:10px var(--pad) 90px}

.product-list{display:flex;flex-direction:column;gap:12px}

.card{
  width:100%;
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--radius);
  overflow:hidden;
  box-shadow:var(--shadow);
}

.card-inner{padding:12px}
.card-title{font-size:18px;font-weight:800;line-height:1.15;margin:8px 0 6px}
.card-sizes{
  color:#6b7280;
  font-size:13px;
  line-height:1.4;
  margin:4px 0 10px 0;
  word-wrap:break-word;
  word-break:break-word;
}
.card-meta{display:flex;gap:10px;flex-wrap:wrap;color:var(--muted);font-size:13px}
.price{
  font-size:18px;
  font-weight:900;
  color:#16a34a;
  margin:8px 0 0 0;

  display:inline-block;
  background:#f0fdf4;
  border:1px solid #bbf7d0;
  padding:6px 12px;
  border-radius:12px;
}

.primary-btn{
  width:100%;
  border:0;
  border-radius:14px;
  background:var(--btn);
  color:var(--btnText);
  padding:14px 14px;
  font-weight:800;
  font-size:16px;
  cursor:pointer;
}
.primary-btn[disabled]{opacity:.45;cursor:not-allowed}

.secondary-btn{
  width:100%;
  border:1px solid var(--line);
  border-radius:14px;
  background:#fff;
  color:var(--text);
  padding:14px 14px;
  font-weight:800;
  font-size:16px;
  cursor:pointer;
}

.danger-btn{
  width:100%;
  border:1px solid #ffd0d0;
  border-radius:14px;
  background:#fff;
  color:#b42318;
  padding:14px 14px;
  font-weight:800;
  font-size:15px;
  cursor:pointer;
}

.cart-btn{
  position:relative;
  border:1px solid var(--line);
  background:#fff;
  border-radius:14px;
  height:40px;
  min-width:44px;
  padding:0 10px;
  display:flex;
  align-items:center;
  gap:10px;
  cursor:pointer;
}
.cart-icon svg{fill:var(--text)}
.cart-badge{
  position:absolute;
  right:-6px;
  top:-6px;

  background:#16a34a; /* спокойный зеленый */
  color:#ffffff;

  font-weight:900;
  font-size:12px;
  line-height:1;

  padding:5px 7px;
  border-radius:999px;

  border:2px solid #ffffff;
}

.carousel-wrapper{
  position:relative;
  width:100%;
}
.carousel{
  position:relative;
  width:100%;
  aspect-ratio: 4 / 5;
  background:#f3f4f6;
  overflow:hidden;
}
/* Цена поверх фото в карточке */
.price-overlay{
  position:absolute;
  top:12px;
  right:12px;
  z-index:5;
  font-size:16px;
  font-weight:900;
  color:#16a34a;
  background:#ffffff;
  border:1px solid #bbf7d0;
  padding:6px 12px;
  border-radius:12px;
  box-shadow:0 4px 12px rgba(0,0,0,.15);
}
.carousel-track{
  height:100%;
  display:flex;
  transition:transform .24s ease;
  will-change:transform;
}
.carousel-slide{
  min-width:100%;
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
}
.carousel-slide img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.dots{
  position:absolute;
  left:0;
  right:0;
  bottom:10px;
  display:flex;
  justify-content:center;
  gap:6px;
  pointer-events:none;
}
.dot{
  font-size:16px;
  line-height:1;
  color:rgba(255,255,255,.55);
  text-shadow:0 2px 10px rgba(0,0,0,.35);
}
.dot.active{color:#ffffff}

.hidden{display:none !important}

.detail-view #detailContent{
  display:flex;
  flex-direction:column;
  gap:12px;
}
.detail-top{padding:6px 0}
.back-btn{
  border:1px solid var(--line);
  background:#fff;
  border-radius:12px;
  padding:10px 12px;
  font-weight:800;
  cursor:pointer;
}

.detail-box{
  border:1px solid var(--line);
  border-radius:var(--radius);
  overflow:hidden;
  box-shadow:var(--shadow);
  background:#fff;
}
.detail-pad{padding:12px}
.detail-title{font-size:20px;font-weight:900;line-height:1.15;margin:8px 0}
.detail-sizes{
  color:#6b7280;
  font-size:13px;
  line-height:1.5;
  margin:6px 0 12px 0;
  word-wrap:break-word;
  word-break:break-word;
}
.detail-desc{
  display:flex;
  flex-direction:column;
  gap:10px;
  color:#374151;
  font-size:14px;
  line-height:1.6;
  margin-top:12px;
  padding:14px;
  background:#f9fafb;
  border:1px solid #e5e7eb;
  border-radius:12px;
}
/* Каждая строка описания с маркером */
.detail-desc-line{
  display:flex;
  align-items:flex-start;
  gap:10px;
  line-height:1.6;
}
.detail-desc-line::before{
  content:"•";
  color:#16a34a;
  font-weight:900;
  font-size:18px;
  line-height:1.3;
  flex-shrink:0;
  margin-top:1px;
}
.small-note{color:var(--muted);font-size:13px;line-height:1.35}

.sheet{
  position:fixed;
  inset:0;
  z-index:50;
}
.sheet-backdrop{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.35);
}
.sheet-panel{
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  background:#fff;
  border-top-left-radius:20px;
  border-top-right-radius:20px;
  border:1px solid var(--line);
  box-shadow:0 -18px 40px rgba(0,0,0,.18);
  max-height:86vh;
  display:flex;
  flex-direction:column;
}
.sheet-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 14px 10px;
  border-bottom:1px solid var(--line);
}
.sheet-title-wrap{
  display:flex;
  align-items:center;
  gap:10px;
}
.sheet-title{font-weight:900}
.info-btn{
  width:28px;
  height:28px;
  border-radius:50%;
  border:2px solid #6b7280;
  background:#fff;
  color:#6b7280;
  font-weight:900;
  font-size:16px;
  line-height:1;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:0;
  transition:all 0.2s ease;
}
.info-btn:hover{
  border-color:#0b0b0f;
  color:#0b0b0f;
}
.info-btn.required{
  border-color:#dc2626;
  color:#dc2626;
  background:#fef2f2;
  animation:pulse-red 1.5s ease-in-out infinite;
}
@keyframes pulse-red{
  0%,100%{
    box-shadow:0 0 0 0 rgba(220,38,38,0.7), 0 0 0 0 rgba(220,38,38,0.4);
    transform:scale(1);
  }
  50%{
    box-shadow:0 0 0 8px rgba(220,38,38,0), 0 0 0 12px rgba(220,38,38,0);
    transform:scale(1.05);
  }
}
.sheet-close{
  border:1px solid var(--line);
  background:#fff;
  border-radius:12px;
  width:36px;height:36px;
  font-size:22px;
  line-height:0;
  cursor:pointer;
}
.sheet-body{
  padding:14px;
  overflow:auto;
  display:flex;
  flex-direction:column;
  gap:12px;
}

.cart-item{
  border:1px solid var(--line);
  border-radius:14px;
  padding:10px;
  display:flex;
  gap:10px;
  align-items:center;
}
.cart-thumb{
  width:56px;height:70px;
  border-radius:12px;
  overflow:hidden;
  background:#f3f4f6;
  flex:0 0 auto;
}
.cart-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.cart-info{flex:1}
.cart-name{font-weight:900;line-height:1.1}
.cart-sub{color:var(--muted);font-size:13px;margin-top:4px}
.cart-actions{display:flex;flex-direction:column;gap:8px;align-items:flex-end}
.qty-row{display:flex;gap:8px;align-items:center}
.qty-btn{
  width:34px;height:34px;
  border-radius:12px;
  border:1px solid var(--line);
  background:#fff;
  font-weight:900;
  cursor:pointer;
}
.qty{min-width:22px;text-align:center;font-weight:900}
.remove-btn{
  border:0;
  background:transparent;
  color:#b42318;
  font-weight:900;
  cursor:pointer;
  padding:0;
}

.cart-summary{
  border-top:1px solid var(--line);
  padding-top:12px;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.sum-row{display:flex;justify-content:space-between;color:#111827}
.sum-row.total{font-weight:900;font-size:16px}

.field{display:flex;flex-direction:column;gap:8px}
.label{font-weight:900;font-size:13px;color:#111827}
.input{
  width:100%;
  border:1px solid var(--line);
  border-radius:14px;
  padding:12px 12px;
  font-size:15px;
  outline:none;
}
.textarea{resize:none}

.check{
  display:flex;
  gap:10px;
  align-items:flex-start;
  border:1px solid var(--line);
  border-radius:14px;
  padding:12px;
  font-size:14px;
  line-height:1.3;
}
.check input{margin-top:2px}

.pay-box{
  border:1px solid var(--line);
  border-radius:18px;
  padding:12px;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.pay-title{font-weight:900}
.pay-note{color:var(--muted);font-size:13px;line-height:1.35}
.qr-box{
  border:1px dashed var(--line);
  border-radius:16px;
  padding:12px;
  display:flex;
  flex-direction:column;
  gap:8px;
  align-items:center;
  justify-content:center;
  min-height:170px;
}
.qr-placeholder{
  width:120px;height:120px;
  border-radius:18px;
  background:#f3f4f6;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:900;
  color:#9ca3af;
}
.qr-box img{width:180px;max-width:100%;height:auto;border-radius:16px;display:block}

.admin-main{padding-bottom:30px}
.admin-card{
  border:1px solid var(--line);
  border-radius:18px;
  padding:14px;
  box-shadow:var(--shadow);
}
.admin-title{font-weight:900;margin:6px 0 10px}
.admin-divider{height:1px;background:var(--line);margin:12px 0}
.admin-list{display:flex;flex-direction:column;gap:10px}
.admin-row{
  border:1px solid var(--line);
  border-radius:14px;
  padding:10px;
  display:flex;
  justify-content:space-between;
  gap:12px;
}
.admin-row strong{display:block}
.admin-row small{color:var(--muted)}
.admin-row button{
  border:1px solid var(--line);
  background:#fff;
  border-radius:12px;
  padding:10px 12px;
  font-weight:900;
  cursor:pointer;
  height:40px;
  align-self:center;
}
.brand-logo{
  height:32px;
  width:auto;
  display:block;
}
.brand{
  display:flex;
  align-items:center;
  gap:10px;
}
.brand-name{
  font-family:'Betmo', system-ui, sans-serif;
  font-size:20px;
  font-weight:400;
  letter-spacing:.5px;
  color:#111111; /* почти черный, не глухой */
  line-height:1;

  text-shadow:0 0.5px 0 rgba(0,0,0,.25);
}
.brand-text-wrap{
  display:flex;
  flex-direction:column;
  line-height:1;
}
.brand-city{
  margin-top:-1px;
  font-size:11px;
  color:#6b7280;
  letter-spacing:.3px;
}
/* ===== Header announce text ===== */
.header-announce{
  flex:1;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:0 8px;
  overflow:hidden;
}
.announce-line{
  width:100%;
  max-width:320px;
  text-align:center;

  font-size:12px;
  font-weight:500;
  color:#1f2937; /* темнее, чем город */
  letter-spacing:.2px;

  background:#f3f4f6; /* мягкая плашка */
  border-radius:999px;
  padding:4px 10px;

  white-space:normal;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;

  line-height:1.2;
  min-height:2.2em;

  opacity:0;
  transform:translateY(6px);
}

/* появление */
.announce-line.in{
  animation:announceIn .35s ease forwards;
}

/* исчезновение */
.announce-line.out{
  animation:announceOut .35s ease forwards;
}

@keyframes announceIn{
  from{
    opacity:0;
    transform:translateY(6px);
  }
  to{
    opacity:1;
    transform:translateY(0);
  }
}

@keyframes announceOut{
  from{
    opacity:1;
    transform:translateY(0);
  }
  to{
    opacity:0;
    transform:translateY(-6px);
  }
}
/* PREMIUM 1 - Safe-area (iPhone notch) */
.header{
  padding-top:calc(10px + env(safe-area-inset-top));
}

.main{
  padding-bottom:calc(16px + env(safe-area-inset-bottom));
}

.sheet-panel{
  padding-bottom:calc(14px + env(safe-area-inset-bottom));
}
/* PREMIUM 2 - Tap feedback */
.card,
.primary-btn,
.secondary-btn,
.cart-btn,
.back-btn,
.sheet-close,
.qty-btn,
.remove-btn{
  -webkit-tap-highlight-color:transparent;
}

.card:active{
  transform:scale(.99);
}

.primary-btn:active,
.secondary-btn:active,
.cart-btn:active,
.back-btn:active,
.qty-btn:active,
.remove-btn:active{
  transform:scale(.98);
}
/* PREMIUM 3 - Card polish */
.card{
  box-shadow:0 10px 28px rgba(0,0,0,.06);
  border:1px solid rgba(0,0,0,.04);
}

.card-inner{
  padding:14px;
}

.card-meta{
  color:#6b7280;
}
/* PREMIUM 5 - Sheet feels native */
.sheet-backdrop{
  backdrop-filter:blur(6px);
  -webkit-backdrop-filter:blur(6px);
}

.sheet-panel{
  box-shadow:0 -18px 40px rgba(0,0,0,.16);
  border-top-left-radius:22px;
  border-top-right-radius:22px;
}
/* PREMIUM 6 - Inputs */
.input{
  border:1px solid rgba(0,0,0,.08);
}

.input:focus{
  outline:none;
  border-color:rgba(0,0,0,.18);
  box-shadow:0 0 0 4px rgba(0,0,0,.06);
}
/* PREMIUM 7 - Buttons */
.primary-btn{
  border-radius:16px;
  box-shadow:0 10px 22px rgba(0,0,0,.14);
}

.primary-btn:disabled{
  opacity:.45;
  box-shadow:none;
}

.secondary-btn{
  border-radius:14px;
  border:1px solid rgba(0,0,0,.10);
  background:#ffffff;
}
/* PREMIUM 8 - Cart badge depth */
.cart-badge{
  box-shadow:0 8px 16px rgba(0,0,0,.14);
}
/* PREMIUM 9 - Header announce refine */
.announce-line{
  border:1px solid rgba(0,0,0,.06);
  box-shadow:0 10px 18px rgba(0,0,0,.06);
}
/* PREMIUM 10 - Reduce motion */
@media (prefers-reduced-motion:reduce){
  *{
    animation-duration:.001ms !important;
    animation-iteration-count:1 !important;
    transition-duration:.001ms !important;
    scroll-behavior:auto !important;
  }
}
/* PREMIUM D2 - Detail box premium */
.detail-box{
  border:1px solid rgba(0,0,0,.06);
  box-shadow:0 14px 34px rgba(0,0,0,.07);
  border-radius:22px;
  overflow:hidden;
  background:#ffffff;
}
.detail-pad{
  padding:16px;
}
 /* если описание у тебя просто текстом в card-inner (без класса) */
  .card-inner > p{
    background:rgba(0,0,0,.02) !important;
    border:1px solid rgba(0,0,0,.06) !important;
    border-radius:14px !important;
    padding:12px 12px !important;
    margin:0 !important;
    line-height:1.5 !important;
  }
  /* 8) Фото-зона - чтобы даже заглушка выглядела нормально */
  .carousel{
    border-radius:18px !important;
    overflow:hidden !important;
    box-shadow:0 14px 30px rgba(0,0,0,.10) !important;
    background:linear-gradient(180deg,#f4f5f7,#eef0f4) !important;
  }
/* =========================
   Header announce ONLY on main
   ========================= */

/* когда открыта карточка товара */
.detail-view .header-announce{
  display:none !important;
}
/* =========================
   Hide header announce when detail is open
   (works even if no body class)
   ========================= */

/* когда секция detailView НЕ hidden - прячем плашку в шапке */
body:has(#detailView:not(.hidden)) .header-announce{
  display:none !important;
}
/* =========================
   BACK BUTTON IN HEADER (when detail is open)
   ========================= */

/* когда открыт detail - убираем лишнее место сверху в контенте */
body:has(#detailView:not(.hidden)) .detail-top{
  padding:0 !important;
  height:0 !important;
  margin:0 !important;
}

/* когда открыт detail - "Назад" становится кнопкой в шапке рядом с корзиной */
body:has(#detailView:not(.hidden)) .back-btn{
  position:fixed !important;

  /* позиция в шапке */
  top:calc(10px + env(safe-area-inset-top)) !important;

  /* слева от корзины */
  right:calc(var(--pad) + 54px) !important;

  width:40px !important;
  height:40px !important;
  padding:0 !important;

  border-radius:14px !important;
  border:1px solid rgba(0,0,0,.10) !important;
  background:rgba(255,255,255,.92) !important;
  box-shadow:0 10px 18px rgba(0,0,0,.10) !important;

  display:flex !important;
  align-items:center !important;
  justify-content:center !important;

  font-size:0 !important; /* скрываем текст Назад */
  z-index:9999 !important;
}

/* иконка - стрелка */
body:has(#detailView:not(.hidden)) .back-btn::before{
  content:"←";
  font-size:18px;
  font-weight:900;
  color:#111;
  line-height:1;
}

/* тап */
body:has(#detailView:not(.hidden)) .back-btn:active{
  transform:scale(.96);
}
/* =========================
   TERMS MODAL
   ========================= */
.terms-content{
  display:flex;
  flex-direction:column;
  gap:20px;
}
.terms-section{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.terms-section-title{
  font-weight:900;
  font-size:16px;
  color:#111827;
  margin-bottom:4px;
}
.terms-section-content{
  display:flex;
  flex-direction:column;
  gap:8px;
  padding-left:12px;
}
.terms-item{
  font-size:14px;
  line-height:1.6;
  color:#374151;
  position:relative;
  padding-left:20px;
}
.terms-item::before{
  content:"•";
  position:absolute;
  left:0;
  color:#16a34a;
  font-weight:900;
  font-size:18px;
}
.terms-item-title{
  font-weight:700;
  color:#111827;
  margin-bottom:4px;
}
.terms-highlight{
  background:#fef3c7;
  border:1px solid #fcd34d;
  border-radius:8px;
  padding:12px;
  margin-top:8px;
  font-size:13px;
  line-height:1.5;
  color:#92400e;
}
.terms-agree{
  margin-top:20px;
  padding-top:20px;
  border-top:1px solid var(--line);
}

/* =========================
   SIZES - BEAUTIFUL PILL
   ========================= */
@media (max-width: 520px){

  /* meta делаем вертикальным, чтобы размеры жили отдельным блоком */
  .card-meta{
    display:flex !important;
    flex-direction:column !important;
    gap:8px !important;
    flex-wrap:nowrap !important;
  }

  /* первая строка в meta - обычно это "Размеры: ..." */
  .card-meta > :first-child{
    display:inline-flex !important;
    align-items:center !important;
    gap:8px !important;

    width:fit-content !important;
    max-width:100% !important;

    background:rgba(0,0,0,.03) !important;
    border:1px solid rgba(0,0,0,.06) !important;
    border-radius:999px !important;

    padding:8px 12px !important;

    font-size:13px !important;
    line-height:1.1 !important;
    color:#111827 !important;

    box-shadow:0 10px 18px rgba(0,0,0,.06) !important;
  }

  /* маленькая метка-иконка перед размерами */
  .card-meta > :first-child::before{
    content:"#";
    display:inline-flex;
    align-items:center;
    justify-content:center;

    width:18px;
    height:18px;
    border-radius:6px;

    background:rgba(0,0,0,.06);
    color:rgba(0,0,0,.55);

    font-weight:900;
    font-size:12px;
    line-height:1;
  }

  /* цифры читаются ровнее */
  .card-meta > :first-child{
    font-variant-numeric:tabular-nums !important;
    letter-spacing:.1px !important;
  }
}
