:root{
  --bg:#ffffff;
  --top:#f1f1f1;
  --text:#111827;
  --muted:#6b7280;
  --line:#e5e7eb;
  --shadow: 0 12px 30px rgba(0,0,0,.10);
  --shadow2: 0 10px 24px rgba(0,0,0,.10);
  --accent:#0b5bd3;
  --accent2:#0ea5e9;
  --card:#ffffff;
  --side:#ffffff;
  --sideW: 380px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

/* Верхняя серая плашка */
.top-plate{
  height: 120px;
  background: var(--top);
  position: relative;
}
.top-actions{
  position:absolute;
  right: 22px;
  top: 18px;
  display:flex;
  gap: 12px;
  align-items:center;
}
.icon-btn{
  width: 54px;
  height: 54px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 10px 22px rgba(0,0,0,.12);
  display:grid;
  place-items:center;
  cursor:pointer;
}
.icon-btn:active{ transform: scale(.98); }
.icon{ width: 26px; height: 26px; display:block; }
.badge{
  position:absolute;
  right: -4px;
  top: -4px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #111827;
  color:#fff;
  font-size: 12px;
  display:flex;
  align-items:center;
  justify-content:center;
}

.layout{
  display:grid;
  grid-template-columns: 1fr;
  min-height: calc(100vh - 120px);
}
.content{
  padding: 22px 22px 60px 22px;
}

.brandline{
  max-width: 1120px;
  margin: 10px auto 14px auto;
  padding: 0 10px;
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap: 14px;
}
.brand{
  font-weight: 800;
  letter-spacing: .2px;
  font-size: 22px;
}
.subtitle{
  color: var(--muted);
  font-size: 14px;
}

.products-list{
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 10px 18px 10px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.product-card{
  width: 100%;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 0; /* строгие прямые */
  box-shadow: 0 8px 22px rgba(0,0,0,.08);
  overflow:hidden;
}
.product-card img{
  width:100%;
  height: 260px;
  object-fit: cover;
  display:block;
  background: #f8fafc;
}
.pc-body{
  padding: 16px 14px 18px 14px;
  text-align:center;
}
.pc-title{
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
}
.pc-price{
  font-size: 14px;
  margin-bottom: 14px;
}
.pc-actions{
  display:flex;
  gap:10px;
  justify-content:center;
  flex-wrap:wrap;
}
.pc-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background:#fff;
  cursor:pointer;
  font-weight: 700;
}
.pc-btn.primary{
  border-color: transparent;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  color:#fff;
}
.pc-btn:active{ transform: scale(.98); }

.cart-side{
  position: sticky;
  top: 0;
  height: 100vh;
  border-left: 1px solid var(--line);
  background: var(--side);
  padding: 18px;
  overflow:auto;
}
.cart-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.cart-title{
  font-weight: 900;
  font-size: 18px;
}
.cart-clear{
  border: 1px solid var(--line);
  background:#fff;
  border-radius: 999px;
  padding: 8px 10px;
  cursor:pointer;
  font-weight: 700;
}
.cart-clear:active{ transform: scale(.98); }

.cart-empty{
  margin-top: 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}
.cart-list{
  display:flex;
  flex-direction:column;
  gap: 12px;
  margin-top: 14px;
}
.cart-item{
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background:#fff;
}
.ci-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 10px;
}
.ci-name{ font-weight: 800; font-size: 14px; line-height: 1.25; }
.ci-sku{ color: var(--muted); font-size: 12px; margin-top: 4px; }
.ci-remove{
  border:0;
  background: transparent;
  cursor:pointer;
  color: #111827;
  opacity:.7;
  font-size: 18px;
}
.ci-remove:hover{ opacity:1; }

.ci-bottom{
  margin-top: 10px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
}
.qty{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 8px;
  background:#fff;
}
.qty button{
  width: 30px; height: 30px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background:#fff;
  cursor:pointer;
  font-size: 18px;
}
.qty input{
  width: 34px;
  border:0;
  outline:none;
  text-align:center;
  font-weight: 800;
  background: transparent;
}

.cart-total{
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  font-weight: 900;
}
.pay-btn{
  width:100%;
  margin-top: 12px;
  border:0;
  border-radius: 14px;
  padding: 14px;
  cursor:pointer;
  font-weight: 900;
  color:#fff;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  box-shadow: var(--shadow2);
}
.pay-btn:active{ transform: scale(.99); }
.small-note{
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.modal{ position: fixed; inset: 0; z-index: 999999; }
.modal-backdrop{ position:absolute; inset:0; background: rgba(17,24,39,.45); }
.modal-card{
  position: relative;
  width: min(860px, calc(100% - 26px));
  max-height: calc(100% - 26px);
  overflow:auto;
  margin: 13px auto;
  background:#fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.modal-head{
  display:flex; align-items:center; justify-content:space-between;
  padding: 14px 16px;
  border-bottom:1px solid var(--line);
}
.modal-title{ font-weight: 900; font-size: 18px; }
.modal-close{
  width: 42px; height: 42px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background:#fff;
  cursor:pointer;
  font-size: 22px;
}
.modal-body{ padding: 14px 16px; }
.modal-image{
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  background:#f8fafc;
  padding: 10px;
}
.modal-desc{ margin-top: 12px; line-height: 1.5; color:#111827; }
.modal-foot{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding: 14px 16px;
  border-top:1px solid var(--line);
}
.modal-price{ font-weight: 900; font-size: 18px; }

/* Галерея в модалке (карусель) */
.modal-gallery{ position: relative; }
.modal-nav{
  position:absolute; top:50%; transform:translateY(-50%);
  width:44px; height:44px; border-radius:14px;
  border:1px solid rgba(0,0,0,.12);
  background: rgba(255,255,255,.92);
  cursor:pointer;
  font-size:28px;
  display:flex; align-items:center; justify-content:center;
  box-shadow: 0 10px 26px rgba(0,0,0,.14);
}
.modal-nav.left{ left:10px; }
.modal-nav.right{ right:10px; }
.modal-nav:active{ transform:translateY(-50%) scale(.98); }
.modal-dots{ display:flex; gap:8px; justify-content:center; margin-top:10px; }
.modal-dot{
  width:10px; height:10px; border-radius:999px;
  border:1px solid rgba(0,0,0,.22);
  background:#e5e7eb;
  cursor:pointer;
}
.modal-dot.active{ background:#111827; border-color:#111827; }


@media (max-width: 1100px){
  .layout{ grid-template-columns: 1fr; }
  .cart-side{ position: relative; border-left:0; border-top: 1px solid var(--line); height:auto; }
  .products-list{ grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
}
.checkout-form{
  margin-top: 14px;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.checkout-form .field label{
  font-size:12px;
  font-weight:700;
  color: var(--muted);
  margin-bottom:4px;
}
.checkout-form input,
.checkout-form textarea{
  width:100%;
  border:1px solid var(--line);
  border-radius:10px;
  padding:10px;
  font-size:14px;
}

/* Мобильная версия */
@media (max-width: 760px){
  .products-list{
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 10px 8px 18px 8px;
  }
  .product-card img{ height: 240px; }
}
.pickup-button{
  cursor:pointer;
  font-weight:800;
  padding:12px 18px;
  border-radius:14px;
  border:1px solid #111827;
  background:#2563eb;
  color:#fff;
  transition:.2s ease;
}

.pickup-button:hover{
  transform:translateY(-2px);
  box-shadow:0 8px 20px rgba(0,0,0,.25);
}

.pickup-button:active{
  transform:scale(.98);
}