/* ========== FILE 2: styles.css (FULL VERSION) ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  background: #fef7f0;
  font-family:
    system-ui,
    -apple-system,
    "Segoe UI",
    "Inter",
    "Helvetica Neue",
    sans-serif;
  color: #1e1b18;
  padding-bottom: 30px;
}

.app {
  max-width: 500px;
  margin: 0 auto;
  background: #fef7f0;
  min-height: 100vh;
  position: relative;
}

.header {
  padding: 20px 18px 12px;
  background: rgba(254, 247, 240, 0.92);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid #f0e3d8;
}

.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.title h1 {
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.3px;
  background: linear-gradient(135deg, #c75c3c, #a03e22);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

.title p {
  font-size: 0.7rem;
  color: #a48d7a;
  margin-top: 2px;
}

.badge-status {
  background: #e0f2e9;
  padding: 6px 12px;
  border-radius: 40px;
  font-size: 0.7rem;
  font-weight: 600;
  color: #2b7a5c;
  display: flex;
  align-items: center;
  gap: 6px;
}

.dot {
  width: 7px;
  height: 7px;
  background: #2b7a5c;
  border-radius: 50%;
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.4;
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.icon-btn {
  background: white;
  width: 40px;
  height: 40px;
  border-radius: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  border: 1px solid #efe2d6;
  transition: all 0.2s;
}

.lang-switch {
  display: flex;
  gap: 8px;
  background: white;
  border-radius: 60px;
  padding: 4px;
  border: 1px solid #e7dacf;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}
.lang-btn {
  background: transparent;
  border: none;
  padding: 6px 14px;
  border-radius: 40px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  color: #9b8a79;
  display: flex;
  align-items: center;
  gap: 6px;
}
.lang-btn span {
  font-size: 1rem;
}
.lang-btn:hover {
  background: #f5ede5;
  color: #c75c3c;
}
.lang-btn.active {
  background: #1e1b18;
  color: white;
}

.cats {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 12px 18px;
  scrollbar-width: thin;
}

.cat {
  background: white;
  border: 1px solid #e7dacf;
  border-radius: 40px;
  padding: 7px 20px;
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s;
}

.cat.active {
  background: #1e1b18;
  border-color: #1e1b18;
  color: white;
}

.menu-grid {
  padding: 4px 16px 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.card {
  background: white;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
  border: 1px solid #f0e2d7;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
  cursor: pointer;
  position: relative;
}

.card:active {
  transform: scale(0.97);
}

.img-box {
  position: relative;
  background: #f5ede5;
  aspect-ratio: 1 / 1.2;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
  padding: 14px 12px 12px;
  color: white;
}

.card-name {
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.price-wrapper {
  margin-top: 5px;
}
.price-label {
  font-size: 0.65rem;
  opacity: 0.8;
  margin-right: 6px;
}
.price-amounts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
}
.price-riel {
  background: rgba(0, 0, 0, 0.65);
  padding: 2px 8px;
  border-radius: 40px;
  font-size: 0.7rem;
  font-weight: 500;
}
.price-usd {
  background: rgba(199, 92, 60, 0.9);
  padding: 2px 8px;
  border-radius: 40px;
  font-size: 0.7rem;
  font-weight: 500;
}
.add-circle {
  background: rgba(255, 255, 255, 0.95);
  width: 30px;
  height: 30px;
  border-radius: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.2rem;
  color: #c75c3c;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}
.new-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #c75c3c;
  color: white;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 40px;
  z-index: 2;
}
.cart-qty-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #2b7a5c;
  color: white;
  width: 26px;
  height: 26px;
  border-radius: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 800;
  border: 2px solid white;
  z-index: 2;
}

.float-cart {
  position: fixed;
  bottom: 24px;
  right: 20px;
  background: #1e1b18;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  z-index: 100;
  transition: all 0.2s;
  border: none;
  color: white;
}
.cart-num {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #c75c3c;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(5px);
  z-index: 200;
  display: none;
}
.sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-radius: 28px 28px 0 0;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.4, 1);
  z-index: 250;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.1);
}
.sheet.open {
  transform: translateY(0);
}
.sheet-handle {
  width: 40px;
  height: 4px;
  background: #ddd2c6;
  border-radius: 4px;
  margin: 12px auto;
}
.sheet-header {
  padding: 8px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #f0e3d8;
}
.sheet-title {
  font-weight: 700;
  font-size: 1.3rem;
}
.sheet-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}
.sheet-footer {
  padding: 14px 20px 28px;
  border-top: 1px solid #f0e3d8;
  display: flex;
  gap: 12px;
}
.btn-outline {
  background: transparent;
  border: 1.5px solid #e2d4c9;
  border-radius: 60px;
  padding: 12px 18px;
  font-weight: 600;
  cursor: pointer;
}
.btn-primary {
  background: #1e1b18;
  border: none;
  border-radius: 60px;
  padding: 12px 20px;
  color: white;
  font-weight: 700;
  flex: 1;
  cursor: pointer;
}

.cart-row {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
  align-items: center;
}
.cart-thumb {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  object-fit: cover;
}
.cart-details {
  flex: 1;
}
.cart-name {
  font-weight: 600;
  font-size: 0.85rem;
}
.cart-price {
  font-size: 0.7rem;
  color: #c75c3c;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: baseline;
}
.qty-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f7f0ea;
  border-radius: 40px;
  padding: 3px 8px;
}
.qty-btn {
  background: white;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
}

/* Detail sheet image container */
.detail-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #efe4db;
  overflow: hidden;
}
.detail-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.detail-content {
  padding: 20px;
}
.detail-name {
  font-size: 1.7rem;
  font-weight: 700;
}
.detail-price {
  font-size: 1.4rem;
  font-weight: 700;
  color: #c75c3c;
  margin: 8px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: baseline;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  z-index: 350;
  display: none;
  align-items: flex-end;
  justify-content: center;
}
.modal-card {
  background: white;
  width: 100%;
  max-width: 500px;
  border-radius: 32px 32px 0 0;
  max-height: 90vh;
  overflow-y: auto;
  padding: 20px;
}
.input {
  width: 100%;
  padding: 12px 16px;
  border-radius: 28px;
  border: 1.5px solid #e7dacf;
  margin-top: 6px;
  margin-bottom: 16px;
  font-family: inherit;
  background: #fefaf5;
}
.label {
  font-size: 0.7rem;
  font-weight: 600;
  color: #9b8a79;
}
.error-text {
  color: #c75c3c;
  font-size: 0.65rem;
  display: none;
  margin-top: -10px;
  margin-bottom: 8px;
}

.qr-section {
  background: #faf4ef;
  border-radius: 28px;
  padding: 16px;
  margin: 16px 0;
  border: 1px solid #f0e3d8;
}
.qr-toggle-btn {
  background: white;
  border: 1.5px solid #e2d4c9;
  border-radius: 60px;
  padding: 10px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #2b7a5c;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: 0.2s;
  margin-bottom: 12px;
}
.qr-img-custom {
  width: 160px;
  border-radius: 24px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  border: 2px solid white;
  background: white;
  display: none;
  margin: 0 auto;
}
.qr-note {
  font-size: 0.65rem;
  color: #a48d7a;
  margin-top: 8px;
  text-align: center;
}

.payment-options {
  display: flex;
  gap: 12px;
  margin: 16px 0;
}
.pay-btn {
  flex: 1;
  background: white;
  border: 1.5px solid #e2d4c9;
  border-radius: 60px;
  padding: 12px 8px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.pay-btn.paid-active {
  background: #2b7a5c;
  border-color: #2b7a5c;
  color: white;
}
.pay-btn.later-active {
  background: #c75c3c;
  border-color: #c75c3c;
  color: white;
}
.payment-error {
  color: #c75c3c;
  font-size: 0.7rem;
  display: none;
  margin-bottom: 12px;
  text-align: center;
}

.toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(30px);
  background: #1e1b18;
  color: white;
  padding: 14px 24px;
  border-radius: 60px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 500;
  font-size: 0.9rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  z-index: 400;
  opacity: 0;
  transition:
    opacity 0.2s,
    transform 0.3s cubic-bezier(0.2, 0.9, 0.4, 1);
  pointer-events: none;
  backdrop-filter: blur(12px);
  background: rgba(30, 27, 24, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
footer {
  text-align: center;
  font-size: 0.6rem;
  color: #b8a48f;
  padding: 16px;
}
.order-summary-items {
  font-size: 0.8rem;
  line-height: 1.4;
}
