:root {
  color-scheme: light;
  --bg: #f7f8fb;
  --surface: #ffffff;
  --surface-strong: #111827;
  --text: #172033;
  --muted: #667085;
  --line: #e5e7eb;
  --primary: #0f766e;
  --primary-dark: #115e59;
  --accent: #f59e0b;
  --danger: #dc2626;
  --soft: #eef6f4;
  --shadow: 0 18px 50px rgba(17, 24, 39, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.86), rgba(247,248,251,0.94)),
    url("assets/store-bg.png") top center / min(1600px, 150vw) auto no-repeat,
    linear-gradient(180deg, #ffffff 0, var(--bg) 420px),
    var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(247, 248, 251, 0.88);
  border-bottom: 1px solid rgba(229, 231, 235, 0.85);
  backdrop-filter: blur(14px);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  gap: 16px;
}

.brand,
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand {
  font-weight: 800;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--surface-strong), var(--primary));
  color: white;
}

.topbar-actions {
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 600;
}

.topbar-actions button {
  white-space: nowrap;
}

.icon-button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  min-height: 42px;
  border-radius: 8px;
  padding: 0 12px;
  cursor: pointer;
}

.cart-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.cart-count {
  display: grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--primary);
  color: white;
  font-size: 0.78rem;
}

.hero-section {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  align-items: center;
  gap: 48px;
  width: min(1120px, calc(100% - 32px));
  min-height: calc(100vh - 72px);
  margin: 0 auto;
  padding: 48px 0 64px;
}

.hero-copy h1,
.section-heading h2,
.checkout-summary h2 {
  margin: 0;
  letter-spacing: 0;
}

.hero-copy h1 {
  max-width: 780px;
  font-size: clamp(2.35rem, 6vw, 4.9rem);
  line-height: 0.95;
}

.hero-copy p:not(.eyebrow) {
  max-width: 650px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.7;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.trust-row span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid rgba(15, 118, 110, 0.14);
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.08);
  color: var(--primary-dark);
  padding: 0 12px;
  font-size: 0.85rem;
  font-weight: 800;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 8px;
  padding: 0 18px;
  border: 0;
  font-weight: 800;
  cursor: pointer;
}

.primary-button {
  background: var(--primary);
  color: white;
}

.primary-button:hover {
  background: var(--primary-dark);
}

.secondary-button {
  background: var(--surface);
  border: 1px solid var(--line);
}

.hero-panel {
  display: flex;
  justify-content: center;
}

.phone-frame {
  width: min(100%, 380px);
  min-height: 520px;
  padding: 24px;
  border-radius: 28px;
  background: linear-gradient(160deg, #101827 0%, #132f2d 58%, #0f172a 100%);
  box-shadow: var(--shadow);
}

.phone-top {
  width: 88px;
  height: 8px;
  margin: 0 auto 56px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.35);
}

.phone-title {
  margin-bottom: 22px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-align: center;
}

.chat-row {
  width: 86%;
  margin-bottom: 16px;
  border-radius: 8px;
  padding: 14px;
  color: white;
  line-height: 1.45;
}

.chat-row.incoming {
  background: rgba(15, 118, 110, 0.95);
}

.chat-row.outgoing {
  margin-left: auto;
  background: rgba(245, 158, 11, 0.96);
  color: #231a05;
}

.chat-row.compact {
  width: 66%;
}

.section-shell,
.checkout-section {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.section-heading > button {
  align-self: end;
}

.section-heading h2,
.checkout-summary h2 {
  font-size: clamp(1.65rem, 3vw, 2.5rem);
}

.section-subtext {
  margin: 8px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.search-box {
  display: grid;
  gap: 8px;
  width: min(100%, 320px);
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.search-box input,
.checkout-form input,
.checkout-form textarea,
.checkout-form select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 13px 14px;
  outline: none;
}

.search-box input:focus,
.checkout-form input:focus,
.checkout-form textarea:focus,
.checkout-form select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.product-card {
  display: grid;
  gap: 14px;
  min-height: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
  box-shadow: 0 10px 30px rgba(17, 24, 39, 0.05);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.product-card:hover {
  transform: translateY(-2px);
  border-color: rgba(15, 118, 110, 0.28);
  box-shadow: 0 18px 42px rgba(17, 24, 39, 0.1);
}

.product-image {
  display: grid;
  place-items: center;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  box-shadow: inset 0 -42px 90px rgba(17, 24, 39, 0.16);
  color: white;
  font-size: 2.4rem;
  font-weight: 900;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-card h3 {
  margin: 0;
  font-size: 1.08rem;
}

.product-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.product-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
}

.price {
  font-size: 1.15rem;
  font-weight: 900;
}

.checkout-section {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 22px;
  align-items: start;
}

.checkout-summary,
.checkout-form {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 22px;
  box-shadow: 0 14px 34px rgba(17, 24, 39, 0.06);
}

.cart-items {
  display: grid;
  gap: 12px;
  min-height: 90px;
  margin: 22px 0;
}

.empty-cart {
  display: grid;
  place-items: center;
  min-height: 90px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.cart-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.cart-item strong {
  display: block;
}

.quantity-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.quantity-controls button {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
}

.total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  font-size: 1.1rem;
}

.checkout-form {
  display: grid;
  gap: 16px;
}

.checkout-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.two-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.full-width {
  width: 100%;
}

.payment-fieldset {
  display: grid;
  gap: 12px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.payment-fieldset legend {
  padding: 0 6px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.payment-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.payment-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease;
}

.payment-options input {
  width: auto;
}

.payment-options label:has(input:checked) {
  border-color: rgba(15, 118, 110, 0.45);
  background: var(--soft);
}

.form-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  transform: translateY(24px);
  opacity: 0;
  pointer-events: none;
  max-width: min(360px, calc(100% - 32px));
  border-radius: 8px;
  background: var(--surface-strong);
  color: white;
  padding: 14px 16px;
  box-shadow: var(--shadow);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.visible {
  transform: translateY(0);
  opacity: 1;
}

.admin-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0 72px;
}

body:has(.admin-shell) {
  background:
    linear-gradient(180deg, rgba(247,248,251,0.95), rgba(247,248,251,0.98)),
    url("assets/admin-bg.png") top center / cover no-repeat fixed,
    var(--bg);
}

.admin-shell h1 {
  margin: 0;
  font-size: clamp(1.75rem, 4vw, 3rem);
  letter-spacing: 0;
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.85fr) minmax(0, 1.15fr);
  gap: 22px;
  align-items: start;
}

.admin-form-stack {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 16px;
}

.session-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 8px;
  background: var(--soft);
  padding: 14px;
}

.session-bar[hidden] {
  display: none;
}

.session-bar div {
  min-width: 0;
}

.session-bar strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.session-bar p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}

.session-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 99px;
  background: var(--primary);
  box-shadow: 0 0 0 5px rgba(15, 118, 110, 0.14);
}

.admin-form {
  position: static;
}

.admin-actions,
.admin-card-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-list-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 22px;
  box-shadow: 0 14px 34px rgba(17, 24, 39, 0.06);
}

.panel-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.admin-list-panel h2 {
  margin: 0;
  font-size: 1.2rem;
}

.count-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--primary-dark);
  padding: 0 10px;
  font-size: 0.8rem;
  font-weight: 900;
  white-space: nowrap;
}

.admin-products {
  display: grid;
  gap: 12px;
}

.admin-product {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: start;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
  transition: background 160ms ease;
}

.admin-product:hover {
  background: rgba(247, 248, 251, 0.72);
}

.admin-product:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.product-dot {
  width: 38px;
  height: 38px;
  border-radius: 8px;
}

.admin-product h3,
.admin-product p {
  margin: 0;
}

.admin-product p {
  margin: 6px 0 8px;
  color: var(--muted);
  line-height: 1.45;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  margin-left: 8px;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 0.78rem;
  font-weight: 800;
}

.status-pill.active {
  background: rgba(15, 118, 110, 0.12);
  color: var(--primary-dark);
}

.status-pill.hidden {
  background: rgba(220, 38, 38, 0.1);
  color: var(--danger);
}

.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid rgba(220, 38, 38, 0.2);
  border-radius: 8px;
  background: rgba(220, 38, 38, 0.08);
  color: var(--danger);
  padding: 0 14px;
  font-weight: 800;
  cursor: pointer;
}

.wide-empty {
  grid-column: 1 / -1;
}

@media (max-width: 860px) {
  .hero-section,
  .checkout-section,
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .hero-section {
    min-height: auto;
  }

  .products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-form-stack {
    position: static;
  }

  .payment-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .topbar {
    width: min(100% - 24px, 1120px);
  }

  .topbar-actions a {
    display: none;
  }

  .hero-section,
  .section-shell,
  .checkout-section {
    width: min(100% - 24px, 1120px);
  }

  .section-heading,
  .two-columns {
    grid-template-columns: 1fr;
  }

  .section-heading {
    display: grid;
    align-items: start;
  }

  .products-grid {
    grid-template-columns: 1fr;
  }

  .payment-options {
    grid-template-columns: 1fr;
  }

  .admin-product {
    grid-template-columns: 1fr;
  }

  .phone-frame {
    min-height: 430px;
  }
}
