:root {
  --bg: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --card: #f8fafc;
  --accent: #2563eb;
  --accent-contrast: #ffffff;
  --border: #e2e8f0;
  --green: #16a34a;
  --amber: #f59e0b;
}

:root[data-theme="dark"] {
  --bg: #0b1220;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --card: #111827;
  --accent: #60a5fa;
  --accent-contrast: #0b1220;
  --border: #1f2937;
  --green: #22c55e;
  --amber: #fbbf24;
}

* { box-sizing: border-box; }
html, body { margin:0; padding:0; font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji"; background: var(--bg); color: var(--text); }

.container { max-width: 1100px; margin: 0 auto; padding: 16px; }
.nav { display:flex; align-items:center; justify-content:space-between; gap:16px; padding: 12px 0; position: sticky; top: 0; background: var(--bg); border-bottom:1px solid var(--border); z-index: 5;}
.brand { font-weight: 800; letter-spacing: .3px; }
.actions { display:flex; gap:10px; align-items: center; }
button, .btn {
  border: 1px solid var(--border);
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--card);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
}
.btn.primary { background: var(--accent); color: var(--accent-contrast); border-color: var(--accent); }
.btn.ghost { background: transparent; }
.btn.small { padding: 6px 10px; font-size: 14px; }
.grid { display:grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.card { background: var(--card); border:1px solid var(--border); border-radius: 16px; overflow:hidden; display:flex; flex-direction:column; }
.card img { width:100%; height: 180px; object-fit: cover; }
.card .p { padding: 12px; }
.price { font-weight:800; }
.muted { color: var(--muted); }
.table { width:100%; border-collapse: collapse; }
.table th, .table td { border-bottom:1px solid var(--border); padding: 10px; text-align:left; }
.kbd { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono"; font-size: 12px; border:1px solid var(--border); border-bottom-width:2px; padding:2px 6px; border-radius: 6px; background: var(--card); color: var(--muted); }
input, select, textarea {
  width:100%; padding: 10px 12px; background: var(--bg); color: var(--text); border:1px solid var(--border); border-radius: 10px;
}
form .row { display:grid; grid-template-columns: 1fr 1fr; gap: 12px; }
form .row.full { grid-template-columns: 1fr; }
.badge { display:inline-block; padding: 4px 8px; border-radius: 999px; border:1px solid var(--border); background: var(--card); font-size:12px; color: var(--muted); }
.badge-green { border-color: var(--green); color: var(--green); }
.badge-amber { border-color: var(--amber); color: var(--amber); }

.footer { margin-top: 40px; padding: 20px 0; border-top:1px solid var(--border); color: var(--muted); font-size: 14px; }
.alert { padding:12px; border:1px solid var(--border); border-radius: 12px; background: var(--card); }
.empty { text-align:center; border:1px dashed var(--border); padding: 30px; border-radius: 16px; color: var(--muted); }
.flex { display:flex; align-items:center; gap:8px; }
.right { margin-left:auto; }

.cart-badge {
  display:inline-block;
  min-width: 20px;
  padding: 0 6px;
  text-align:center;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-contrast);
  margin-left: 6px;
  font-size: 12px;
}

/* Toast */
.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.15);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .2s ease, transform .2s ease;
  z-index: 50;
}
.toast.show {
  opacity: 1;
  transform: translateY(0);
}

:root[data-theme="dark"] img[alt="Visa"], 
:root[data-theme="dark"] img[alt="Mastercard"] {
  filter: brightness(1.3);
}
.logo {
  height: 64px;       /* Increased from 42px */
  width: auto;
  display: block;
  transition: filter 0.3s ease, transform 0.2s ease;
}

/* Slight hover feedback (optional, looks premium) */
.logo:hover {
  transform: scale(1.03);
}

/* Make it a bit brighter in dark mode */
:root[data-theme="dark"] .logo {
  filter: brightness(1.3);
}


/* Optional: adjust brand text styling */
.brand-text {
  font-weight: 800;
  letter-spacing: 0.3px;
  color: var(--text);
}

//* ===========================
   CHECKOUT GRID FIX
   =========================== */

.checkout-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  width: 100%;
}

@media (max-width: 900px) {
  .checkout-grid {
    grid-template-columns: 1fr;   /* Stacks all fields on smaller screens */
  }
}

/* ===========================
   MODERN PAYMENT SELECT UI
   =========================== */

.payment-section {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 5px;
}

.pay-card {
  position: relative;
  border: 2px solid #e5e5e5;
  border-radius: 12px;
  padding: 14px 18px;
  cursor: pointer;
  display: flex;
  transition: 0.2s ease;
  background: #fff;
}

.pay-card:hover {
  border-color: #007bff;
  background: #f8fbff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.pay-card input[type="radio"] {
  position: absolute;
  opacity: 0;
}

/* Highlight when selected */
.pay-card input[type="radio"]:checked + .pay-card-body,
.pay-card input[type="radio"]:checked ~ .pay-card-body {
  border-left: 5px solid #007bff;
  padding-left: 12px;
}

.pay-card-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pay-card-title {
  font-size: 17px;
  font-weight: 600;
}

.pay-card-desc {
  font-size: 14px;
  color: #555;
}

/* Visa/Mastercard logos */
.card-icons {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.card-icons img {
  height: 22px;
  max-width: 40px;
  object-fit: contain;
}

/* MOBILE */
@media (max-width: 600px) {
  .card-icons img {
    height: 18px;
    max-width: 30px;
  }
}
