*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-deep:    #030710;
  --bg-mid:     #06101f;
  --bg-low:     #050b16;
  --surface:    rgba(255,255,255,0.05);
  --border:     rgba(255,255,255,0.08);
  --text:       #eaf3f8;
  --muted:      #7c8fa0;
  --accent:     #38d4ff;
  --accent-dark:#0c6ba8;
  --accent-deep:#123a6b;
  --danger:     #f97316;
  --urgent:     #ff3b3b;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background:
    radial-gradient(ellipse 70% 38% at 50% 0%, rgba(56, 212, 255, 0.22), transparent 62%),
    radial-gradient(ellipse 55% 34% at 92% 22%, rgba(18, 120, 160, 0.18), transparent 62%),
    radial-gradient(ellipse 60% 32% at 6% 62%, rgba(20, 90, 150, 0.15), transparent 62%),
    radial-gradient(ellipse 55% 30% at 50% 100%, rgba(10, 60, 105, 0.14), transparent 65%),
    linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-mid) 45%, var(--bg-low) 100%);
  background-attachment: fixed, fixed, fixed, fixed, fixed;
  color: var(--text);
  min-height: 100vh;
}

.topbar {
  text-align: center;
  padding: 12px;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--border);
}

.topbar a {
  color: var(--accent);
  text-decoration: none;
  font-size: 15px;
  letter-spacing: 0.03em;
}

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 420px;
  margin: 0 auto;
  padding: 40px 20px 60px;
  gap: 14px;
}

.product-img-wrap {
  position: relative;
  width: 100%;
  max-width: 320px;
  display: flex;
  justify-content: center;
  z-index: 1;
}

.product-img-wrap::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 92%;
  height: 92%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(56, 212, 255, 0.35), transparent 70%);
  filter: blur(34px);
  animation: glow-breathe 4.5s ease-in-out infinite;
  z-index: -1;
}

@keyframes glow-breathe {
  0%, 100% { opacity: 0.75; }
  50% { opacity: 1; }
}

.discount-badge {
  position: absolute;
  top: -6px;
  right: 6px;
  background: var(--urgent);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  box-shadow: 0 4px 16px rgba(255,59,59,0.55);
  transform: rotate(6deg);
  z-index: 2;
}

.product-img {
  width: 100%;
  max-width: 300px;
  max-height: 40vh;
  object-fit: contain;
  border-radius: 22px;
  display: block;
  filter: drop-shadow(0 24px 40px rgba(0,0,0,0.55));
}

.product-name {
  position: relative;
  z-index: 1;
  font-size: clamp(20px, 5vw, 28px);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-align: center;
}

.product-desc {
  position: relative;
  z-index: 1;
  font-size: clamp(14px, 3.5vw, 16px);
  color: var(--muted);
  text-align: center;
  line-height: 1.5;
  max-width: 340px;
  margin-top: -6px;
}

.price-row {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.price-sub {
  display: flex;
  align-items: center;
  gap: 10px;
}

.product-price-old {
  font-size: clamp(15px, 3.5vw, 19px);
  font-weight: 600;
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-color: var(--urgent);
}

.product-price {
  font-size: clamp(24px, 6vw, 34px);
  font-weight: 800;
  color: var(--accent);
  text-shadow: 0 0 24px rgba(56, 212, 255, 0.35);
}

.save-tag {
  font-size: 13px;
  font-weight: 700;
  color: var(--urgent);
  background: rgba(255,59,59,0.12);
  border: 1px solid rgba(255,59,59,0.3);
  padding: 3px 10px;
  border-radius: 999px;
}

.qty-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 16px;
}

.qty-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.15s;
}

.qty-btn:hover { border-color: var(--accent-dark); }

.qty-val {
  font-size: 22px;
  font-weight: 700;
  min-width: 24px;
  text-align: center;
}

.timer-block {
  position: relative;
  z-index: 1;
  text-align: center;
}

.timer-label {
  font-size: 13px;
  color: var(--urgent);
  font-weight: 700;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.timer {
  font-size: clamp(38px, 11vw, 64px);
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--urgent);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 18px rgba(255,59,59,0.45);
  animation: timer-pulse 1s ease-in-out infinite;
}

@keyframes timer-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.72; }
}

.btn-order {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 320px;
  padding: 16px;
  font-size: 18px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-deep), var(--accent-dark), var(--accent));
  color: #fff;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  letter-spacing: 0.03em;
  box-shadow: 0 12px 30px -10px rgba(56, 212, 255, 0.5);
  transition: opacity 0.15s, transform 0.1s;
}

.btn-order:hover  { opacity: 0.92; }
.btn-order:active { transform: scale(0.97); }

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 100;
}

.overlay.hidden { display: none; }

.modal {
  background: #071322;
  border: 1px solid var(--border);
  border-radius: 20px 20px 0 0;
  padding: 24px 20px 32px;
  width: 100%;
  max-width: 520px;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
}

.modal h2 {
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 18px;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.field label {
  font-size: 13px;
  color: var(--muted);
}

.field input[type="text"],
.field input[type="tel"] {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 16px;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
  width: 100%;
}

.field input:focus { border-color: var(--accent-dark); }

.delivery-btns { display: flex; gap: 10px; }

.delivery-btn {
  flex: 1;
  padding: 11px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.delivery-btn.active {
  border-color: var(--accent-dark);
  color: var(--accent);
  background: rgba(56, 212, 255, 0.12);
}

.btn-submit {
  width: 100%;
  padding: 15px;
  font-size: 16px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-deep), var(--accent-dark), var(--accent));
  color: #fff;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  margin-top: 4px;
  transition: opacity 0.15s;
}

.btn-submit:hover { opacity: 0.9; }

.form-note {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  margin-top: 10px;
  min-height: 18px;
}

@media (min-width: 560px) {
  .overlay { align-items: center; }

  .modal {
    border-radius: 20px;
    margin: 20px;
    max-height: 90vh;
  }

  .product-img {
    max-height: 45vh;
  }
}
