/* ═══════════════════════════════════════════════════════════════
   ORDER / CART / CHECKOUT — styles
   ═══════════════════════════════════════════════════════════════ */

/* ── Nav: login / user dropdown ── */
.nav-cta-sm {
  padding: 5px 14px;
  border: 1px solid rgba(126,200,80,.5);
  border-radius: 20px;
  color: #7ec850 !important;
  font-weight: 600;
  transition: background .2s;
}
.nav-cta-sm:hover { background: rgba(126,200,80,.12); }

.nav-user-menu { position: relative; }
.nav-user-trigger {
  cursor: pointer;
  color: var(--cream, #fdf6e3);
  font-size: .88rem;
  font-weight: 500;
  white-space: nowrap;
  user-select: none;
}
.nav-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 2px);
  right: 0;
  background: #1a2b1c;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px;
  min-width: 160px;
  padding: 6px;
  z-index: 200;
  box-shadow: 0 10px 30px rgba(0,0,0,.5);
  list-style: none;
}
.nav-user-menu:hover .nav-dropdown,
.nav-user-menu:focus-within .nav-dropdown { display: block; }
.nav-dropdown li a {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  color: rgba(253,246,227,.75);
  text-decoration: none;
  font-size: .85rem;
  transition: background .15s, color .15s;
}
.nav-dropdown li a:hover { background: rgba(255,255,255,.07); color: #fdf6e3; }
.nav-dropdown li:last-child a { color: #ef4444; }
.nav-dropdown li:last-child a:hover { background: rgba(239,68,68,.1); }

/* ── Cart badge in header ── */
.cart-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--cream, #fdf6e3);
  text-decoration: none;
  font-weight: 500;
  padding: 6px 14px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 30px;
  transition: background .2s, border-color .2s;
}
.cart-link:hover { background: rgba(255,255,255,.08); }
.cart-link svg   { width: 18px; height: 18px; }
.cart-badge {
  position: absolute;
  top: -6px; right: -6px;
  background: #f59e0b;
  color: #1a1a1a;
  font-size: 11px;
  font-weight: 700;
  width: 18px; height: 18px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
}
.cart-badge.hidden { display: none; }

/* ── Page wrapper ── */
.order-page {
  min-height: 70vh;
  padding: 40px 0 80px;
  background: var(--bg-dark, #0f1a12);
}
.order-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
}
.order-page-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: var(--cream, #fdf6e3);
  margin-bottom: 8px;
}
.order-page-title em { color: var(--accent, #7ec850); font-style: normal; }
.order-subtitle {
  color: rgba(253,246,227,.55);
  margin-bottom: 36px;
  font-size: .95rem;
}

/* ── Cart items list ── */
.cart-list  { display: flex; flex-direction: column; gap: 16px; }
.cart-item  {
  display: grid;
  grid-template-columns: 70px 1fr auto auto;
  align-items: center;
  gap: 16px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  padding: 14px 18px;
  transition: background .2s;
}
.cart-item:hover { background: rgba(255,255,255,.07); }
.ci-img {
  width: 70px; height: 70px;
  object-fit: cover;
  border-radius: 10px;
}
.ci-no-img {
  width: 70px; height: 70px;
  border-radius: 10px;
  background: rgba(126,200,80,.12);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
}
.ci-name  { font-weight: 600; color: var(--cream, #fdf6e3); margin-bottom: 4px; }
.ci-unit  { font-size: .82rem; color: rgba(253,246,227,.45); }
.ci-price { font-size: .9rem; color: rgba(253,246,227,.6); margin-top: 2px; }

.ci-qty {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ci-qty button {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.2);
  background: transparent;
  color: var(--cream, #fdf6e3);
  font-size: 1.1rem;
  cursor: pointer;
  transition: background .15s;
  display: flex; align-items: center; justify-content: center;
}
.ci-qty button:hover { background: rgba(126,200,80,.2); }
.ci-qty-num {
  min-width: 28px;
  text-align: center;
  color: var(--cream, #fdf6e3);
  font-weight: 600;
}
.ci-subtotal {
  min-width: 90px;
  text-align: right;
  font-weight: 700;
  color: var(--accent, #7ec850);
  font-size: 1rem;
}
.ci-remove {
  background: none;
  border: none;
  color: rgba(253,246,227,.3);
  cursor: pointer;
  font-size: 1.2rem;
  padding: 4px;
  transition: color .15s;
}
.ci-remove:hover { color: #ef4444; }

/* ── Cart footer ── */
.cart-footer {
  margin-top: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 24px;
}
.cart-total-block { color: var(--cream, #fdf6e3); }
.cart-total-block .label { font-size: .85rem; opacity: .6; }
.cart-total-block .amount {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent, #7ec850);
}
.cart-empty {
  text-align: center;
  padding: 80px 20px;
  color: rgba(253,246,227,.45);
}
.cart-empty svg { opacity: .3; margin-bottom: 16px; }
.cart-empty p   { font-size: 1.1rem; margin-bottom: 20px; }

/* ── Checkout layout ── */
.checkout-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 32px;
  align-items: start;
}
@media (max-width: 768px) {
  .checkout-grid { grid-template-columns: 1fr; }
}

/* ── Form ── */
.form-card {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  padding: 28px;
}
.form-card h3 {
  font-size: 1.1rem;
  color: var(--cream, #fdf6e3);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-size: .83rem;
  color: rgba(253,246,227,.6);
  margin-bottom: 6px;
  font-weight: 500;
}
.form-group label span.req { color: #ef4444; }
.form-control {
  width: 100%;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  padding: 11px 14px;
  color: var(--cream, #fdf6e3);
  font-size: .95rem;
  outline: none;
  transition: border-color .2s;
  box-sizing: border-box;
}
.form-control:focus   { border-color: var(--accent, #7ec850); }
.form-control.error   { border-color: #ef4444; }
.form-error {
  font-size: .78rem;
  color: #ef4444;
  margin-top: 4px;
}
textarea.form-control { resize: vertical; min-height: 80px; }

/* ── Map ── */
#checkout-map {
  width: 100%;
  height: 260px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.12);
  margin-top: 8px;
  z-index: 1;
}
.map-hint {
  font-size: .78rem;
  color: rgba(253,246,227,.4);
  margin-top: 6px;
}
.map-locate-btn {
  margin-top: 8px;
  background: rgba(126,200,80,.15);
  border: 1px solid rgba(126,200,80,.3);
  color: var(--accent, #7ec850);
  border-radius: 8px;
  padding: 7px 14px;
  font-size: .83rem;
  cursor: pointer;
  transition: background .2s;
  display: flex; align-items: center; gap: 6px;
}
.map-locate-btn:hover { background: rgba(126,200,80,.25); }

/* ── Order summary sidebar ── */
.order-summary-card {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  padding: 24px;
  position: sticky;
  top: 20px;
}
.order-summary-card h3 {
  font-size: 1rem;
  color: var(--cream, #fdf6e3);
  margin-bottom: 16px;
}
.summary-items { list-style: none; padding: 0; margin: 0 0 16px; }
.summary-item {
  display: flex;
  justify-content: space-between;
  font-size: .88rem;
  color: rgba(253,246,227,.7);
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.summary-item .name { flex: 1; }
.summary-item .qty  { color: rgba(253,246,227,.4); margin: 0 8px; }
.summary-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,.12);
}
.summary-total .label { color: var(--cream, #fdf6e3); font-weight: 600; }
.summary-total .amount {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--accent, #7ec850);
}

/* ── Buttons ── */
.btn-order {
  display: block;
  width: 100%;
  background: var(--accent, #7ec850);
  color: #0f1a12;
  border: none;
  border-radius: 50px;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
  margin-top: 20px;
  text-align: center;
  text-decoration: none;
}
.btn-order:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(126,200,80,.3);
}
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255,255,255,.2);
  color: var(--cream, #fdf6e3);
  border-radius: 50px;
  padding: 10px 22px;
  font-size: .9rem;
  text-decoration: none;
  transition: background .2s;
}
.btn-outline:hover { background: rgba(255,255,255,.07); }

/* ── Order confirm ── */
.confirm-hero {
  text-align: center;
  padding: 60px 20px 40px;
}
.confirm-icon {
  width: 80px; height: 80px;
  background: rgba(126,200,80,.15);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.4rem;
  margin: 0 auto 20px;
}
.confirm-hero h1 { color: var(--cream, #fdf6e3); margin-bottom: 8px; }
.confirm-hero p   { color: rgba(253,246,227,.55); }
.confirm-order-id {
  display: inline-block;
  background: rgba(126,200,80,.12);
  border: 1px solid rgba(126,200,80,.25);
  color: var(--accent, #7ec850);
  border-radius: 30px;
  padding: 6px 20px;
  font-weight: 700;
  font-size: .9rem;
  margin-bottom: 32px;
}

.confirm-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}
.detail-card {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  padding: 20px;
}
.detail-card h4 {
  font-size: .8rem;
  color: var(--accent, #7ec850);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 12px;
}
.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 5px 0;
  font-size: .88rem;
}
.detail-row .dk { color: rgba(253,246,227,.5); flex-shrink: 0; }
.detail-row .dv { color: var(--cream, #fdf6e3); text-align: right; }

.order-items-table { width: 100%; border-collapse: collapse; }
.order-items-table th {
  text-align: left;
  font-size: .78rem;
  color: rgba(253,246,227,.45);
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.order-items-table td {
  padding: 10px 0;
  font-size: .9rem;
  color: var(--cream, #fdf6e3);
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.order-items-table td.sub { color: var(--accent, #7ec850); font-weight: 600; text-align: right; }
.order-items-table td.right { text-align: right; }

.status-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: .8rem;
  font-weight: 600;
  color: #fff;
}

/* ── My orders ── */
.orders-list { display: flex; flex-direction: column; gap: 16px; }
.order-row {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  padding: 18px 22px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  text-decoration: none;
  transition: background .2s;
}
.order-row:hover { background: rgba(255,255,255,.07); }
.or-id {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--accent, #7ec850);
  min-width: 60px;
}
.or-date { font-size: .8rem; color: rgba(253,246,227,.45); margin-bottom: 4px; }
.or-items { font-size: .88rem; color: rgba(253,246,227,.7); }
.or-right  { text-align: right; }
.or-total  { font-size: 1.1rem; font-weight: 700; color: var(--cream, #fdf6e3); }

/* ── Toast notification ── */
.cart-toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: #1e2e20;
  border: 1px solid rgba(126,200,80,.35);
  color: var(--cream, #fdf6e3);
  padding: 12px 20px;
  border-radius: 12px;
  font-size: .88rem;
  box-shadow: 0 8px 30px rgba(0,0,0,.5);
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateY(80px);
  opacity: 0;
  transition: transform .3s, opacity .3s;
  pointer-events: none;
}
.cart-toast.show { transform: translateY(0); opacity: 1; }
.cart-toast .ct-icon { font-size: 1.2rem; }
