
@font-face {
  font-family: "Noto Sans Khmer";
  src: url("fonts/NotoSansKhmer.ttf") format("truetype");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --theme-primary: #0077b6;
  --theme-secondary: #00b4d8;
  --theme-soft: #e7f7fb;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: "Noto Sans Khmer", "Khmer OS Battambang", Arial, sans-serif;
  background: #eef6f3;
  color: #17202a;
  padding-bottom: 120px;
}

.hero {
  margin: 16px;
  padding: 24px;
  border-radius: 24px;
  color: white;
  background: linear-gradient(135deg, var(--theme-primary), var(--theme-secondary));
  box-shadow: 0 12px 30px rgba(0, 119, 182, 0.25);
}

.hero h1 {
  font-size: 34px;
  margin: 6px 0 10px;
}

.store-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.store-profile-photo {
  width: 68px;
  height: 68px;
  flex: 0 0 68px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.75);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.16);
}

.store-profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.store-profile-photo span {
  font-size: 32px;
}

.hero p {
  line-height: 1.6;
}

.telegram-profile {
  display: grid;
  gap: 3px;
  margin-top: 18px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.12);
  font-size: 13px;
}

.telegram-profile strong {
  font-size: 16px;
}

.small-title {
  font-size: 13px;
  opacity: 0.85;
  text-transform: uppercase;
}

.hero button {
  margin-top: 20px;
  padding: 12px 20px;
  border: none;
  border-radius: 12px;
  background: white;
  color: var(--theme-primary);
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
}

main {
  padding: 0 16px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin: 24px 0 16px;
}

.section-header h2 {
  font-size: 22px;
}

.section-header p {
  color: #6c757d;
  margin-top: 4px;
  font-size: 14px;
}

.contact-section {
  margin: 24px 0 20px;
  padding: 18px;
  border: 1px solid #d7ebe6;
  border-radius: 20px;
  background: linear-gradient(145deg, #ffffff, #f4fbf9);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.06);
  scroll-margin-top: 16px;
}

.contact-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.contact-heading h2 {
  font-size: 22px;
}

.contact-heading p:last-child {
  margin-top: 4px;
  color: #6c757d;
  font-size: 13px;
  line-height: 1.55;
}

.eyebrow {
  color: var(--theme-primary);
  font-size: 12px;
  font-weight: 700;
}

.contact-heading-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: #e3f5fb;
  font-size: 22px;
}

.contact-links {
  display: grid;
  gap: 9px;
  margin-top: 15px;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 54px;
  padding: 9px 11px;
  border: 1px solid #d7ebe6;
  border-radius: 13px;
  color: #17202a;
  text-decoration: none;
  background: white;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.contact-link:hover,
.contact-link:focus-visible {
  border-color: #63b9d8;
  box-shadow: 0 5px 14px rgba(0, 119, 182, 0.12);
  transform: translateY(-1px);
}

.contact-link.is-unavailable {
  cursor: not-allowed;
  opacity: 0.62;
}

.contact-link > span:nth-child(2) {
  display: grid;
  flex: 1;
  gap: 1px;
}

.contact-link strong {
  font-size: 14px;
}

.contact-link small {
  color: #6c757d;
  font-size: 11px;
}

.contact-link-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  color: white;
  font-size: 20px;
  font-weight: 700;
}

.facebook-icon { background: #1877f2; }
.tiktok-icon { background: #111111; }
.telegram-icon { background: #229ed9; }
.telegram-icon svg {
  width: 20px;
  height: 20px;
}
.contact-link-arrow { color: var(--theme-primary); font-size: 20px; }

#cartCount {
  position: relative;
  align-self: center;
  display: grid;
  place-items: center;
  width: 50px;
  height: 46px;
  border: none;
  padding: 0;
  border-radius: 12px;
  background: white;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  cursor: pointer;
}

.store-controls {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.cart-button-icon {
  font-size: 21px;
}

.cart-badge {
  position: absolute;
  top: -7px;
  right: -7px;
  z-index: 2;
  display: grid;
  place-items: center;
  min-width: 23px;
  height: 23px;
  padding: 0 6px;
  border: 2px solid white;
  border-radius: 999px;
  background: #ef233c;
  color: white;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 4px 10px rgba(239, 35, 60, 0.3);
}

.cart-badge[hidden] {
  display: none;
}

.cart-badge-pop {
  animation: cart-badge-pop 280ms ease-out;
}

@keyframes cart-badge-pop {
  0% { transform: scale(0.65); }
  65% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

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

.product-card {
  background: white;
  padding: 16px;
  border-radius: 18px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
}

.product-icon {
  width: 100%;
  height: 138px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 16px;
  background: var(--theme-soft);
  font-size: 64px;
  margin-bottom: 14px;
}

.product-icon img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.product-icon.has-image {
  background: #f4f7f6;
}

.product-card h3 {
  font-size: 17px;
  margin-bottom: 8px;
}

.product-card.is-sold-out h3 {
  color: #d90429;
  text-decoration-line: line-through;
  text-decoration-thickness: 2px;
  text-decoration-color: #d90429;
}

.stock-status {
  display: block;
  margin-top: -4px;
  color: #d90429;
  font-size: 11px;
  font-weight: 700;
}

.stock-status[hidden] {
  display: none;
}

.product-card.is-sold-out .product-icon {
  filter: grayscale(0.45);
  opacity: 0.72;
}

.product-card p {
  display: none;
}

.product-options {
  min-height: 35px;
}

.product-options:empty {
  display: none;
}

.product-options label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #5c6770;
  font-size: 13px;
}

.product-options select {
  min-width: 0;
  flex: 1;
  padding: 7px 8px;
  border: 1px solid #cfded9;
  border-radius: 9px;
  background: #f7fbfa;
  color: #17202a;
}

.product-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
}

.product-bottom strong {
  color: var(--theme-primary);
  font-size: 18px;
}

.buy-button {
  border: none;
  border-radius: 10px;
  padding: 9px 12px;
  background: var(--theme-primary);
  color: white;
  cursor: pointer;
}

.buy-button:disabled {
  cursor: not-allowed;
  background: #d90429;
  opacity: 0.72;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  width: calc(100% - 24px);
  max-width: 600px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: white;
  border-radius: 18px;
  padding: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.bottom-nav button {
  position: relative;
  display: grid;
  place-items: center;
  gap: 3px;
  border: none;
  background: transparent;
  color: #17202a;
  font: inherit;
  cursor: pointer;
  min-height: 54px;
  padding: 4px 0;
}

.bottom-nav span {
  display: block;
  font-size: 11px;
  line-height: 1.15;
}

.bottom-nav .nav-icon {
  font-size: 20px;
  line-height: 1;
}

.bottom-nav .nav-label {
  margin-top: 0;
}

.hero,
.contact-section,
.section-header,
.products {
  scroll-margin-top: 16px;
}

.bottom-nav .cart-badge {
  top: -5px;
  right: calc(50% - 29px);
  display: grid;
  margin: 0;
  color: white;
  font-size: 12px;
}

.bottom-nav .cart-badge[hidden] {
  display: none;
}

@media (min-width: 700px) {
  body {
    max-width: 900px;
    margin: auto;
  }

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

.admin-page {
  padding: 20px 16px 40px;
}

.admin-shell {
  max-width: 1000px;
  margin: auto;
}

.admin-header,
.admin-section-title,
.admin-product-row,
.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.admin-header {
  margin-bottom: 18px;
}

.admin-header h1 {
  margin: 4px 0;
}

.admin-back,
.admin-secondary {
  border: 1px solid #cfded9;
  border-radius: 10px;
  padding: 9px 13px;
  background: white;
  color: var(--theme-primary);
  text-decoration: none;
  cursor: pointer;
}

.admin-card {
  margin-top: 18px;
  padding: 18px;
  border-radius: 18px;
  background: white;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
}

.admin-card-description {
  margin-top: 6px;
  color: #6c757d;
  font-size: 13px;
  line-height: 1.5;
}

.contact-settings-form {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.contact-settings-form label {
  display: grid;
  gap: 6px;
  color: #495057;
  font-size: 14px;
}

.contact-settings-form input {
  width: 100%;
  padding: 11px;
  border: 1px solid #cfded9;
  border-radius: 10px;
  font: inherit;
}

.appearance-form {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.appearance-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 94px;
  padding: 15px;
  border-radius: 16px;
  color: white;
  background: linear-gradient(135deg, var(--theme-primary), var(--theme-secondary));
}

.appearance-preview > div:last-child {
  display: grid;
  gap: 3px;
}

.appearance-preview strong {
  font-size: 21px;
}

.appearance-preview small {
  opacity: 0.85;
}

.appearance-photo-preview {
  width: 62px;
  height: 62px;
  flex: 0 0 62px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  font-size: 28px;
}

.appearance-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.theme-color-grid label {
  display: grid;
  gap: 6px;
  color: #495057;
  font-size: 14px;
}

.color-control {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 6px 9px;
  border: 1px solid #cfded9;
  border-radius: 10px;
  background: #f7fbfa;
}

.color-control input[type="color"] {
  width: 42px;
  height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.color-control output {
  font-family: Consolas, monospace;
  font-size: 13px;
  text-transform: uppercase;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.profile-photo-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.profile-photo-picker,
.remove-profile-photo {
  flex: 1;
  min-height: 46px;
  display: grid;
  place-items: center;
  padding: 10px 13px;
  border-radius: 11px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.profile-photo-picker {
  border: 0;
  background: var(--theme-primary);
  color: white;
  text-align: center;
}

.remove-profile-photo {
  border: 1px solid #f1c4c8;
  background: #fff5f5;
  color: #b02a37;
}

.appearance-form .checkout-button {
  margin-top: 0;
}

.payment-settings-form {
  display: grid;
  gap: 13px;
  margin-top: 14px;
}

.payment-settings-form > label {
  display: grid;
  gap: 6px;
  color: #495057;
  font-size: 14px;
}

.payment-settings-form > label input {
  width: 100%;
  padding: 11px;
  border: 1px solid #cfded9;
  border-radius: 10px;
  font: inherit;
}

.payment-qr-preview {
  width: min(100%, 280px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  margin: 0 auto;
  padding: 10px;
  border: 1px dashed #a8c9c0;
  border-radius: 16px;
  background: #f7fbfa;
  color: #6c757d;
  text-align: center;
}

.payment-qr-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.payment-qr-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

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

.category-form {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.category-form input {
  flex: 1;
  min-width: 0;
  padding: 10px;
  border: 1px solid #cfded9;
  border-radius: 10px;
  font: inherit;
}

.product-form label {
  display: grid;
  gap: 6px;
  color: #495057;
  font-size: 14px;
}

.size-price-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border: 1px solid #dcebe7;
  border-radius: 12px;
  background: #f7fbfa;
}

.size-price-group p {
  grid-column: 1 / -1;
  margin: 0;
}

.size-price-group small {
  color: #6c757d;
  font-weight: normal;
}

.product-form input,
.product-form select,
.product-form textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #cfded9;
  border-radius: 10px;
  font: inherit;
}

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

.admin-product-list,
.admin-order-list {
  display: grid;
  gap: 9px;
  margin-top: 14px;
}

.admin-product-row {
  padding: 12px;
  border: 1px solid #dcebe7;
  border-radius: 12px;
}

.admin-product-main {
  display: grid;
  gap: 3px;
}

.admin-product-line {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-product-thumb {
  width: 54px;
  height: 54px;
  overflow: hidden;
  flex: 0 0 54px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--theme-soft);
}

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

.admin-product-main small,
.admin-order-list p {
  color: #6c757d;
  font-size: 13px;
}

.admin-order-card {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid #dcebe7;
  border-radius: 12px;
  background: #f9fcfb;
}

.admin-order-card a {
  width: fit-content;
  color: var(--theme-primary);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.admin-product-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin-product-actions input[type="file"] {
  flex: 1 1 170px;
  min-width: 0;
  max-width: 220px;
}

.admin-product-actions button {
  border: 0;
  border-radius: 8px;
  padding: 7px 10px;
  background: var(--theme-soft);
  color: var(--theme-primary);
  cursor: pointer;
}

.admin-product-actions button[data-delete] {
  background: #fff0f0;
  color: #b02a37;
}

.admin-product-actions button[data-stock] {
  background: #fff0f0;
  color: #d90429;
  font-weight: 700;
}

.admin-product-actions button[data-stock].restore-stock {
  background: #eaf8ef;
  color: #16803d;
}

.admin-product-actions button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.admin-product-row.is-sold-out .admin-product-main strong {
  color: #d90429;
  text-decoration: line-through;
  text-decoration-thickness: 2px;
}

.crop-modal[hidden] {
  display: none;
}

.crop-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 16px;
}

.crop-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 20, 30, 0.62);
}

.crop-sheet {
  position: relative;
  width: min(100%, 520px);
  padding: 18px;
  border-radius: 20px;
  background: white;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.25);
}

#cropCanvas {
  width: 100%;
  max-height: 55vh;
  display: block;
  margin-top: 14px;
  border-radius: 12px;
  background: #111;
  touch-action: none;
}

.crop-zoom {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

.crop-zoom input {
  flex: 1;
}

.crop-hint {
  margin: 8px 0;
  color: #6c757d;
  font-size: 13px;
}

@media (max-width: 620px) {
  .product-form {
    grid-template-columns: 1fr;
  }

  .wide {
    grid-column: auto;
  }

  .size-price-group {
    grid-template-columns: 1fr 1fr;
  }

  .admin-product-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-product-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .theme-color-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 380px) {
  .store-profile-photo {
    width: 56px;
    height: 56px;
    flex-basis: 56px;
  }

  .hero h1 {
    font-size: 27px;
  }
}

.category-filter {
  width: 134px;
  max-width: 150px;
  padding: 9px 10px;
  border: 1px solid #cfded9;
  border-radius: 10px;
  background: white;
  color: #17202a;
}

.buy-button:active {
  transform: scale(0.97);
}

.cart-panel[hidden] {
  display: none;
}

.cart-panel {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  align-items: end;
}

.cart-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 20, 30, 0.55);
}

.cart-sheet {
  position: relative;
  width: 100%;
  max-width: 620px;
  max-height: 88vh;
  margin: 0 auto;
  overflow-y: auto;
  padding: 20px;
  border-radius: 24px 24px 0 0;
  background: #fff;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.18);
}

.cart-open {
  overflow: hidden;
}

.orders-panel[hidden] {
  display: none;
}

.orders-panel {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  align-items: end;
}

.orders-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 20, 30, 0.58);
}

.orders-sheet {
  position: relative;
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  margin: 0 auto;
  overflow-y: auto;
  padding: 20px;
  border-radius: 24px 24px 0 0;
  background: #f4faf8;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.2);
}

.orders-sheet .cart-header > div p {
  margin-top: 3px;
  color: #6c757d;
  font-size: 12px;
}

.orders-open {
  overflow: hidden;
}

.orders-refresh {
  display: block;
  margin: 14px 0 10px auto;
  padding: 8px 11px;
  border: 1px solid var(--theme-primary);
  border-radius: 10px;
  background: white;
  color: var(--theme-primary);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.orders-refresh:disabled {
  cursor: wait;
  opacity: 0.55;
}

.orders-status {
  color: #6c757d;
  font-size: 13px;
  line-height: 1.55;
  text-align: center;
}

.orders-list {
  display: grid;
  gap: 12px;
}

.my-order-card {
  display: grid;
  gap: 12px;
  padding: 15px;
  border: 1px solid #d7ebe6;
  border-radius: 16px;
  background: white;
  box-shadow: 0 6px 17px rgba(0, 0, 0, 0.055);
}

.my-order-header,
.my-order-items > div,
.my-order-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.my-order-header > div {
  display: grid;
  gap: 2px;
}

.my-order-header small {
  color: #7a858c;
  font-size: 11px;
}

.order-status-badge {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.status-pending { background: #fff3cd; color: #7a5900; }
.status-confirmed { background: #dff6e7; color: #087f5b; }
.status-rejected { background: #ffe3e3; color: #c92a2a; }

.my-order-items {
  display: grid;
  gap: 7px;
  padding: 10px 0;
  border-top: 1px solid #edf2f0;
  border-bottom: 1px solid #edf2f0;
  font-size: 13px;
}

.my-order-items strong {
  color: #495057;
}

.my-order-payment {
  padding: 8px 10px;
  border-radius: 9px;
  background: var(--theme-soft);
  color: #495057;
  font-size: 12px;
  font-weight: 700;
}

.my-order-meta {
  display: grid;
  gap: 5px;
  color: #6c757d;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.my-order-meta a {
  width: fit-content;
  color: var(--theme-primary);
  font-weight: 700;
  text-decoration: none;
}

.my-order-total strong {
  color: var(--theme-primary);
  font-size: 20px;
}

.orders-empty {
  padding: 38px 14px;
  text-align: center;
}

.orders-empty > span {
  display: block;
  font-size: 46px;
}

.orders-empty h3 {
  margin-top: 8px;
}

.orders-empty p {
  margin-top: 5px;
  color: #6c757d;
  font-size: 13px;
}

.checkout-step[hidden] {
  display: none;
}

.checkout-back {
  margin: 10px 0 14px;
  border: 0;
  background: transparent;
  color: var(--theme-primary);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.payment-heading {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 15px;
}

.payment-heading > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 13px;
  background: var(--theme-soft);
  font-size: 21px;
}

.payment-heading h3 {
  font-size: 18px;
}

.payment-heading p {
  margin-top: 2px;
  color: #6c757d;
  font-size: 12px;
  line-height: 1.45;
}

.checkout-qr {
  width: min(100%, 310px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  margin: 0 auto;
  padding: 10px;
  border: 1px solid #dcebe7;
  border-radius: 18px;
  background: white;
}

.checkout-qr img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.checkout-account-name {
  min-height: 20px;
  margin-top: 9px;
  color: #495057;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.payment-amount {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 13px 14px;
  border-radius: 13px;
  background: var(--theme-soft);
}

.payment-amount strong {
  color: var(--theme-primary);
  font-size: 23px;
}

.manual-payment-note {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 11px;
  background: #fff8e6;
  color: #775900;
  font-size: 12px;
  line-height: 1.55;
}

.delivery-field {
  display: grid;
  gap: 7px;
  margin-top: 13px;
  color: #495057;
  font-size: 14px;
}

.delivery-field input,
.delivery-field textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #cfded9;
  border-radius: 12px;
  font: inherit;
}

.delivery-field textarea {
  resize: vertical;
}

.location-field {
  margin-top: 13px;
  padding: 12px;
  border: 1px solid #dcebe7;
  border-radius: 13px;
  background: #f7fbfa;
}

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

.location-button {
  width: 100%;
  padding: 12px;
  border: 0;
  border-radius: 11px;
  background: var(--theme-primary);
  color: white;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.location-button span {
  display: block;
  margin-bottom: 3px;
  font-size: 20px;
}

.location-select-button {
  border: 1px solid var(--theme-primary);
  background: white;
  color: var(--theme-primary);
}

.location-button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.location-field p {
  margin-top: 8px;
  color: #6c757d;
  font-size: 12px;
}

.location-field p.has-location {
  color: #087f5b;
  font-weight: 700;
}

.location-field a {
  display: inline-block;
  margin-top: 6px;
  color: var(--theme-primary);
  font-size: 12px;
}

.location-field a[hidden] {
  display: none;
}

.order-success {
  padding: 34px 10px 16px;
  text-align: center;
}

.order-success > span {
  display: block;
  font-size: 52px;
}

.order-success h3 {
  margin-top: 8px;
  font-size: 22px;
}

.order-success p {
  margin: 8px 0 18px;
  color: #6c757d;
  line-height: 1.6;
}

.location-picker[hidden] {
  display: none;
}

.location-picker {
  position: fixed;
  inset: 0;
  z-index: 350;
  display: grid;
  align-items: end;
  padding-top: 30px;
}

.location-picker-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 20, 30, 0.68);
}

.location-picker-sheet {
  position: relative;
  width: min(100%, 680px);
  max-height: 94vh;
  margin: 0 auto;
  overflow-y: auto;
  padding: 17px;
  border-radius: 24px 24px 0 0;
  background: white;
  box-shadow: 0 -15px 45px rgba(0, 0, 0, 0.24);
}

.location-picker-sheet .cart-header > div p {
  margin-top: 3px;
  color: #6c757d;
  font-size: 12px;
  line-height: 1.4;
}

#deliveryMap {
  width: 100%;
  height: min(55vh, 430px);
  min-height: 310px;
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid #dcebe7;
  border-radius: 15px;
  background: #e8eeec;
}

.map-coordinates {
  margin-top: 9px;
  color: #6c757d;
  font-family: Consolas, monospace;
  font-size: 12px;
  text-align: center;
}

.location-picker-sheet .checkout-button {
  margin-top: 10px;
}

@media (max-width: 420px) {
  .location-choice-grid {
    grid-template-columns: 1fr;
  }

  #deliveryMap {
    min-height: 280px;
  }
}

.cart-header,
.cart-summary,
.cart-item,
.quantity-controls {
  display: flex;
  align-items: center;
}

.cart-header,
.cart-summary,
.cart-item {
  justify-content: space-between;
  gap: 16px;
}

.icon-button,
.quantity-controls button {
  display: grid;
  place-items: center;
  border: none;
  border-radius: 50%;
  background: var(--theme-soft);
  color: var(--theme-primary);
  cursor: pointer;
}

.icon-button {
  width: 38px;
  height: 38px;
  font-size: 26px;
}

.cart-items {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}

.cart-item {
  padding: 12px;
  border: 1px solid #dcebe7;
  border-radius: 14px;
}

.cart-item small {
  display: block;
  margin-top: 4px;
  color: #6c757d;
}

.quantity-controls {
  flex-shrink: 0;
  gap: 10px;
}

.quantity-controls button {
  width: 32px;
  height: 32px;
  font-size: 20px;
}

.empty-cart {
  padding: 32px 10px;
  text-align: center;
  color: #6c757d;
}

.note-field {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  color: #495057;
  font-size: 14px;
}

.note-field textarea {
  width: 100%;
  resize: vertical;
  padding: 12px;
  border: 1px solid #cfded9;
  border-radius: 12px;
  font: inherit;
}

.cart-summary {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #dcebe7;
  font-size: 18px;
}

.cart-summary strong {
  color: var(--theme-primary);
  font-size: 22px;
}

.checkout-status {
  min-height: 22px;
  margin-top: 10px;
  color: #b02a37;
  font-size: 13px;
  line-height: 1.5;
}

.checkout-button {
  width: 100%;
  margin-top: 8px;
  padding: 14px;
  border: none;
  border-radius: 13px;
  background: var(--theme-primary);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.checkout-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
