:root {
  --navy: #032b4f;
  --navy-2: #061f3a;
  --blush: #f8a9b8;
  --blush-soft: #ffe2e8;
  --rose: #c94750;
  --cocoa: #982f21;
  --cream: #fff7f2;
  --paper: #ffffff;
  --ink: #2f1d1b;
  --muted: #755d59;
  --line: rgba(3, 43, 79, 0.13);
  --shadow: 0 22px 60px rgba(3, 43, 79, 0.16);
  --radius: 8px;
  color-scheme: light;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 226, 232, 0.65), rgba(255, 247, 242, 0.8) 42%),
    var(--cream);
}

body.modal-open {
  overflow: hidden;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

a {
  color: inherit;
}

img,
video {
  max-width: 100%;
  display: block;
}

.site-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 247, 242, 0.94);
  border-bottom: 1px solid rgba(3, 43, 79, 0.08);
  backdrop-filter: blur(16px);
}

.nav {
  width: min(1180px, calc(100% - 32px));
  min-height: 76px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 22px;
  align-items: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  min-width: 0;
}

.brand img {
  width: 54px;
  height: 54px;
  object-fit: contain;
  border-radius: 50%;
}

.brand strong {
  display: block;
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--navy);
  line-height: 1.05;
}

.brand span {
  display: block;
  color: var(--cocoa);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.nav-links {
  display: flex;
  justify-content: center;
  gap: 18px;
  color: var(--navy);
  font-weight: 800;
  font-size: 0.92rem;
}

.nav-links a {
  text-decoration: none;
}

.nav-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.icon-btn,
.small-icon-btn {
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--navy);
  border-radius: var(--radius);
  box-shadow: 0 10px 24px rgba(3, 43, 79, 0.08);
}

.icon-btn {
  width: 46px;
  height: 46px;
  position: relative;
}

.small-icon-btn {
  width: 36px;
  height: 36px;
}

.icon-btn svg,
.small-icon-btn svg,
.btn svg {
  width: 19px;
  height: 19px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.cart-count {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--cocoa);
  color: #fff;
  font-size: 0.74rem;
  font-weight: 900;
  border: 2px solid var(--cream);
}

.hero {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 36px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
  gap: 34px;
  align-items: center;
}

.eyebrow {
  color: var(--cocoa);
  text-transform: uppercase;
  font-weight: 900;
  letter-spacing: 0;
  font-size: 0.8rem;
}

.hero h1 {
  margin: 10px 0 14px;
  color: var(--navy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 8vw, 6.5rem);
  line-height: 0.92;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 640px;
  margin: 0;
  color: #5c413d;
  font-size: clamp(1.05rem, 2.2vw, 1.45rem);
  line-height: 1.45;
  font-weight: 700;
}

.hero-actions,
.product-actions,
.checkout-actions,
.admin-actions,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-actions {
  margin-top: 24px;
}

.btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  padding: 0 16px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.btn.primary {
  background: var(--navy);
  color: #fff;
  box-shadow: 0 14px 28px rgba(3, 43, 79, 0.22);
}

.btn.secondary {
  background: var(--paper);
  color: var(--navy);
  border-color: var(--line);
}

.btn.rose {
  background: var(--cocoa);
  color: #fff;
}

.btn.ghost {
  background: transparent;
  color: var(--navy);
  border-color: var(--line);
}

.btn.danger {
  background: #fff4f2;
  color: #a32012;
  border-color: rgba(163, 32, 18, 0.22);
}

.hero-media {
  position: relative;
  min-height: 420px;
  display: grid;
  place-items: end center;
}

.hero-media::before {
  content: "";
  position: absolute;
  inset: 10% 3% 3%;
  background: var(--blush);
  border-radius: 50% 50% 8px 8px;
  border: 1px solid rgba(152, 47, 33, 0.12);
  box-shadow: var(--shadow);
}

.hero-media img,
.hero-media video {
  position: relative;
  width: min(480px, 100%);
  max-height: 560px;
  object-fit: cover;
  object-position: center top;
  border-radius: 8px;
}

.hero-media video {
  aspect-ratio: 4 / 5;
  background: var(--navy-2);
}

.stats-strip {
  border-top: 1px solid rgba(3, 43, 79, 0.08);
  border-bottom: 1px solid rgba(3, 43, 79, 0.08);
  background: rgba(255, 255, 255, 0.6);
}

.stats-inner {
  width: min(1180px, calc(100% - 32px));
  min-height: 108px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: stretch;
}

.stat-item {
  min-width: 0;
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 18px;
  text-align: center;
  color: var(--navy);
  border-left: 1px solid rgba(3, 43, 79, 0.08);
}

.stat-item:first-child {
  border-left: 0;
}

.stat-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--blush-soft);
  color: var(--cocoa);
}

.stat-icon svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 1.9;
  fill: none;
}

.stat-item strong {
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0;
}

.section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0;
}

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

.section-head h2 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(1.75rem, 4vw, 3rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.section-head p {
  max-width: 540px;
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
  font-weight: 650;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.product-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 18px 45px rgba(3, 43, 79, 0.08);
}

.product-image-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--blush-soft);
}

.product-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 180ms ease;
}

.image-hover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(3, 43, 79, 0.58);
  color: #fff;
  font-weight: 900;
  opacity: 0;
  transition: opacity 180ms ease;
}

.product-image-wrap:hover img {
  transform: scale(1.04);
}

.product-image-wrap:hover .image-hover {
  opacity: 1;
}

.badge-row {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 10px;
  color: var(--navy);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(3, 43, 79, 0.08);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.badge.promo {
  color: #fff;
  background: var(--cocoa);
}

.product-body {
  padding: 16px;
}

.product-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.product-body h3 {
  margin: 0 0 8px;
  color: var(--navy);
  font-size: 1.25rem;
  line-height: 1.2;
}

.product-body p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.45;
}

.price {
  color: var(--cocoa);
  font-size: 1.25rem;
  font-weight: 950;
}

.empty-state {
  padding: 28px;
  border: 1px dashed rgba(3, 43, 79, 0.26);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.58);
  color: var(--muted);
  text-align: center;
  font-weight: 800;
}

.footer {
  background: var(--navy);
  color: #fff;
  padding: 34px 0;
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 22px;
  align-items: center;
}

.footer p {
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  background: rgba(6, 31, 58, 0.55);
  backdrop-filter: blur(8px);
}

.overlay.open {
  display: grid;
  place-items: center;
  padding: 18px;
}

.modal,
.drawer,
.admin-shell,
.maintenance-card {
  background: var(--paper);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.modal {
  width: min(760px, 100%);
  max-height: min(90vh, 900px);
  overflow: auto;
}

.modal.large {
  width: min(980px, 100%);
}

.modal-head,
.drawer-head,
.admin-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.modal-head h2,
.drawer-head h2 {
  margin: 0;
  color: var(--navy);
  font-size: 1.25rem;
}

.modal-body {
  padding: 16px;
}

.product-detail {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
  gap: 18px;
}

.product-detail img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--blush-soft);
}

.detail-list {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}

.detail-list div {
  padding: 10px;
  border-radius: var(--radius);
  background: #fff8f7;
  color: var(--muted);
}

.detail-list strong {
  color: var(--navy);
}

.drawer {
  position: fixed;
  z-index: 90;
  inset: 0 0 0 auto;
  width: min(440px, 100%);
  border-radius: 0;
  transform: translateX(110%);
  transition: transform 180ms ease;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.drawer.open {
  transform: translateX(0);
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 85;
  display: none;
  background: rgba(6, 31, 58, 0.42);
}

.drawer-backdrop.open {
  display: block;
}

.cart-list {
  overflow: auto;
  padding: 16px;
  display: grid;
  gap: 12px;
  align-content: start;
}

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

.cart-item img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: var(--radius);
}

.cart-item h3 {
  margin: 0 0 4px;
  font-size: 1rem;
  color: var(--navy);
}

.qty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
}

.qty-control {
  display: inline-grid;
  grid-template-columns: 34px 38px 34px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.qty-control button {
  height: 34px;
  border: 0;
  background: #fff8f7;
  color: var(--navy);
  font-weight: 950;
}

.qty-control span {
  text-align: center;
  font-weight: 900;
}

.drawer-foot {
  padding: 16px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
}

.total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--navy);
  font-size: 1.08rem;
  font-weight: 950;
}

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

.field {
  display: grid;
  gap: 6px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  color: var(--navy);
  font-size: 0.85rem;
  font-weight: 900;
}

.field small {
  color: var(--muted);
  line-height: 1.35;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

.field textarea {
  min-height: 92px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--cocoa);
  box-shadow: 0 0 0 3px rgba(248, 169, 184, 0.35);
}

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

.segmented label {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--navy);
  background: #fff;
  font-weight: 900;
}

.segmented input {
  width: 18px;
  height: 18px;
}

.summary-box {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: var(--radius);
  background: #fff8f7;
  border: 1px solid rgba(152, 47, 33, 0.13);
}

.summary-box div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.summary-box strong {
  color: var(--navy);
}

.image-lightbox img {
  width: min(900px, 92vw);
  max-height: 82vh;
  object-fit: contain;
  background: #fff;
  border-radius: var(--radius);
}

.admin-overlay {
  align-items: stretch;
}

.admin-shell {
  width: min(1220px, 100%);
  height: min(92vh, 900px);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
}

.admin-top {
  background: var(--navy);
  color: #fff;
}

.admin-top h2 {
  margin: 0;
  font-size: 1.15rem;
}

.admin-top span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.84rem;
  font-weight: 700;
}

.admin-body {
  min-height: 0;
  display: grid;
  grid-template-columns: 220px 1fr;
}

.admin-nav {
  padding: 12px;
  border-right: 1px solid var(--line);
  background: #fff8f7;
  overflow: auto;
}

.admin-nav button {
  width: 100%;
  min-height: 42px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--navy);
  padding: 0 10px;
  text-align: left;
  font-weight: 900;
}

.admin-nav button.active {
  background: #fff;
  border-color: var(--line);
  box-shadow: 0 8px 20px rgba(3, 43, 79, 0.08);
}

.admin-panel {
  min-height: 0;
  overflow: auto;
  padding: 18px;
}

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

.admin-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
}

.admin-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.admin-card-head h3 {
  margin: 0;
  color: var(--navy);
  font-size: 1rem;
}

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

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  text-align: left;
  font-size: 0.9rem;
}

th {
  color: var(--navy);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0;
}

td img.thumb {
  width: 52px;
  height: 52px;
  border-radius: var(--radius);
  object-fit: cover;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--blush-soft);
  color: var(--cocoa);
  font-size: 0.75rem;
  font-weight: 900;
}

.pill.ok {
  background: #eaf8ee;
  color: #14713b;
}

.pill.warn {
  background: #fff3d9;
  color: #8a5500;
}

.bank-row,
.location-row,
.user-row {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 10px;
  background: #fff;
}

.bank-row {
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
}

.location-row {
  grid-template-columns: minmax(0, 1fr) 140px auto;
}

.login-card {
  width: min(460px, 100%);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}

.login-card img {
  width: 82px;
  height: 82px;
  object-fit: contain;
  margin-bottom: 12px;
}

.login-card h2 {
  margin: 0 0 4px;
  color: var(--navy);
}

.login-card p {
  margin: 0 0 16px;
  color: var(--muted);
}

.maintenance {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}

.maintenance-card {
  width: min(560px, 100%);
  padding: 26px;
  text-align: center;
}

.maintenance-card img {
  width: 112px;
  margin: 0 auto 14px;
}

.maintenance-card h1 {
  margin: 0 0 10px;
  color: var(--navy);
  font-size: clamp(2rem, 5vw, 3rem);
}

.maintenance-card p {
  margin: 0 0 18px;
  color: var(--muted);
}

.toast-host {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 120;
  display: grid;
  gap: 8px;
  width: min(360px, calc(100vw - 32px));
}

.toast {
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--navy);
  color: #fff;
  box-shadow: var(--shadow);
  font-weight: 800;
}

.hidden {
  display: none !important;
}

@media (max-width: 880px) {
  .nav {
    grid-template-columns: 1fr auto;
    min-height: 68px;
  }

  .nav-links {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    padding-top: 28px;
  }

  .hero-media {
    min-height: 340px;
    order: -1;
  }

  .stats-inner {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-item:nth-child(odd) {
    border-left: 0;
  }

  .section-head,
  .footer-inner {
    display: grid;
  }

  .product-detail,
  .admin-body,
  .admin-grid,
  .form-grid,
  .bank-row,
  .location-row {
    grid-template-columns: 1fr;
  }

  .admin-shell {
    height: 94vh;
  }

  .admin-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .admin-nav button {
    min-width: max-content;
    margin-bottom: 0;
  }
}

@media (max-width: 560px) {
  .nav,
  .hero,
  .section,
  .stats-inner,
  .footer-inner {
    width: min(100% - 22px, 1180px);
  }

  .brand span {
    display: none;
  }

  .brand img {
    width: 48px;
    height: 48px;
  }

  .hero h1 {
    font-size: clamp(2.65rem, 18vw, 4.2rem);
  }

  .stats-inner {
    grid-template-columns: 1fr;
  }

  .stat-item {
    border-left: 0;
    border-top: 1px solid rgba(3, 43, 79, 0.08);
  }

  .stat-item:first-child {
    border-top: 0;
  }

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

  .product-actions .btn {
    flex: 1 1 100%;
  }
}
