:root {
  --red: #e30613;
  --red-dark: #990009;
  --black: #070707;
  --ink: #171717;
  --muted: #767676;
  --paper: #ffffff;
  --line: rgba(255, 255, 255, 0.18);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  color: var(--paper);
  background:
    linear-gradient(145deg, rgba(153, 0, 9, 0.72), rgba(7, 7, 7, 0.94)),
    #080808;
  overflow: hidden;
}

.admin-body {
  min-height: 100%;
  height: auto;
  color: var(--ink);
  background: #f3f4f6;
  overflow: auto;
}

a,
button {
  font: inherit;
}

.phone-page {
  width: 100%;
  height: 100dvh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 8px;
  overflow: hidden;
}

.offer-card {
  position: fixed;
  top: 8px;
  bottom: 8px;
  left: 8px;
  right: auto;
  width: min(calc(100vw - 16px), 374px);
  max-width: none;
  height: auto;
  max-height: none;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: 8px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(10, 10, 10, 0.9);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.48);
  overflow: hidden;
}

.top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 38px;
}

.slider {
  position: relative;
  min-height: 0;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  touch-action: pan-y;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 260ms ease, transform 260ms ease;
  pointer-events: none;
}

.slide.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.slide img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #000;
  -webkit-user-drag: none;
  user-select: none;
}

.slider-btn {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
}

.prev {
  left: 9px;
}

.next {
  right: 9px;
}

.dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10px;
  z-index: 6;
  display: flex;
  justify-content: center;
  gap: 7px;
}

.dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.42);
}

.dot.active {
  width: 24px;
  border-radius: 999px;
  background: var(--red);
}

.info {
  padding: 0 2px;
}

.eyebrow {
  margin: 0 0 4px;
  color: #ff5a63;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

h1,
h2 {
  margin: 0;
  color: #fff;
  line-height: 1.02;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

h1 {
  font-size: clamp(24px, 7vw, 34px);
  text-align: center;
}

h2 {
  font-size: clamp(21px, 6vw, 28px);
}

.price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 7px;
}

.price-row span {
  color: #cfcfcf;
  font-weight: 800;
}

.price-row strong {
  color: #fff;
  font-size: clamp(30px, 9vw, 42px);
  line-height: 1;
}

.actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding-bottom: max(0px, env(safe-area-inset-bottom));
}

.btn {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  text-decoration: none;
  color: #fff;
  font-weight: 900;
}

.btn.primary {
  background: linear-gradient(135deg, #19a84f, #25d366);
  box-shadow: 0 12px 28px rgba(37, 211, 102, 0.24);
}

.empty-state {
  display: grid;
  align-content: center;
  gap: 12px;
  min-height: 0;
  padding: 24px;
  text-align: center;
}

.empty-state p {
  margin: 0;
  color: #d8d8d8;
  line-height: 1.5;
}

.admin-login {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 18px;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px clamp(16px, 4vw, 42px);
  background: var(--black);
  color: #fff;
}

.admin-header strong,
.admin-header span {
  display: block;
}

.admin-header span {
  margin-top: 3px;
  color: #cfcfcf;
  font-size: 13px;
}

.admin-header nav {
  display: flex;
  gap: 12px;
}

.admin-header a {
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}

.admin-wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 22px 16px 40px;
}

.admin-box {
  width: min(100%, 520px);
  margin-bottom: 22px;
  padding: 22px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

.admin-login .admin-box {
  margin: 0;
}

.admin-box h1 {
  color: var(--ink);
  text-align: left;
  font-size: 28px;
}

.admin-box p {
  color: var(--muted);
  line-height: 1.5;
}

.admin-box label {
  display: block;
  margin-top: 14px;
  color: var(--ink);
  font-weight: 800;
}

.admin-box input[type="text"],
.admin-box input[type="password"],
.admin-box input[type="file"] {
  width: 100%;
  margin-top: 7px;
  padding: 12px;
  border: 1px solid #d1d5db;
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
}

.admin-btn {
  min-height: 44px;
  margin-top: 16px;
  padding: 11px 16px;
  border: 0;
  border-radius: var(--radius);
  background: var(--red);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

.admin-btn.danger {
  width: 100%;
  background: #b91c1c;
}

.alert {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: var(--radius);
  font-weight: 800;
}

.alert.success {
  background: #dcfce7;
  color: #166534;
}

.alert.error {
  background: #fee2e2;
  color: #991b1b;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}

.admin-card {
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.admin-card img {
  width: 100%;
  aspect-ratio: 9 / 14;
  object-fit: contain;
  background: #000;
}

.admin-card div {
  padding: 14px;
}

.admin-card h2 {
  color: var(--ink);
  font-size: 18px;
}

.admin-card p {
  margin: 8px 0 4px;
  color: var(--red);
  font-weight: 900;
}

.admin-card small {
  display: block;
  color: var(--muted);
  word-break: break-all;
}

@media (min-width: 760px) {
  .phone-page {
    padding: 18px;
  }

  .offer-card {
    position: static;
    top: auto;
    bottom: auto;
    left: auto;
    right: auto;
    width: min(96vw, 980px);
    height: min(92dvh, 720px);
    max-width: 980px;
    grid-template-columns: minmax(0, 1fr) 340px;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 14px;
  }

  .top {
    grid-column: 1 / -1;
  }

  .slider {
    grid-row: 2 / 4;
  }

  .info {
    align-self: end;
  }

  .actions {
    align-self: end;
  }
}

@media (max-width: 380px), (max-height: 700px) {
  .phone-page {
    padding: 6px;
  }

  .offer-card {
    gap: 7px;
    padding: 7px;
    border-radius: 14px;
  }

  .top {
    min-height: 42px;
  }

  .slider-btn {
    width: 36px;
    height: 36px;
    font-size: 28px;
  }

  h2 {
    font-size: 20px;
  }

  .price-row strong {
    font-size: 29px;
  }

  .btn {
    min-height: 48px;
  }
}
