/* REY Shop — mobile-first, dark navy header like the owner's store */
:root {
  --navy: #0b2239;
  --navy2: #10293f;
  --blue: #1e88e5;
  --green: #1db954;
  --amber: #ff9800;
  --bg: #eef3f8;
  --card: #ffffff;
  --text: #14202e;
  --muted: #68788a;
  --red: #d32f2f;
  --radius: 14px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Bengali", sans-serif;
  background: var(--bg);
  color: var(--text);
}
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.error { color: var(--red); font-weight: 600; }
img { max-width: 100%; }

/* ---------- header ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: linear-gradient(180deg, var(--navy), var(--navy2));
  color: #fff; padding: 10px 12px 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.3);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: #fff; }
.brand-logo { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; background: #fff; }
.brand-name { font-weight: 800; font-size: 1.25rem; letter-spacing: .5px; }
.brand-name span { color: #4db2ff; }
.topbar-actions { display: flex; align-items: center; gap: 6px; }
.lang-toggle { display: flex; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; overflow: hidden; }
.lang-btn { background: transparent; color: #fff; border: 0; padding: 6px 10px; cursor: pointer; font-size: .85rem; }
.lang-btn.active { background: var(--blue); font-weight: 700; }
.pill-btn { background: rgba(255,255,255,.14); color: #fff; border: 0; border-radius: 999px; padding: 8px 12px; cursor: pointer; font-size: .85rem; }
.icon-btn { position: relative; background: rgba(255,255,255,.14); border: 0; border-radius: 50%; width: 38px; height: 38px; font-size: 1.05rem; cursor: pointer; color: #fff; }
.icon-btn.dark { background: #e3eaf2; color: var(--text); }
.cart-count { position: absolute; top: -4px; right: -4px; background: var(--red); color: #fff; font-size: .68rem; font-weight: 700; border-radius: 999px; padding: 2px 6px; }
.search-row { margin-top: 10px; }
.search-row input {
  width: 100%; padding: 12px 16px; border-radius: 999px; border: 0; font-size: 1rem; outline: none;
}

/* ---------- layout ---------- */
main { max-width: 1100px; margin: 0 auto; padding: 12px; }
/* ---------- banner slider (auto-slide, 2 slides) ---------- */
.banner-wrap { position: relative; border-radius: var(--radius); overflow: hidden; touch-action: pan-y; }
.banner-track { display: flex; transition: transform .55s ease; }
.banner-slide { flex: 0 0 100%; min-width: 0; }
.banner-img { width: 100%; display: block; }
/* Slide 2 keeps the exact box of the banner image (1798 x 875) */
.banner-offer {
  aspect-ratio: 1798 / 875;
  display: flex; align-items: center; gap: 4%;
  padding: 4% 5%;
  background: linear-gradient(120deg, var(--navy) 0%, var(--navy2) 45%, var(--blue) 125%);
  color: #fff;
}
.banner-offer-logo {
  width: 21%; max-width: 190px; aspect-ratio: 1 / 1; flex: 0 0 auto;
  border-radius: 50%; object-fit: cover; background: #fff;
  border: 3px solid rgba(255,255,255,.85); box-shadow: 0 4px 14px rgba(0,0,0,.35);
}
.banner-offer-text { flex: 1; min-width: 0; }
.banner-offer-title {
  margin: 0 0 .35em; font-weight: 800; line-height: 1.2;
  font-size: clamp(1rem, 4.6vw, 2rem); color: #ffd54f;
}
.banner-offer-sub {
  margin: 0; line-height: 1.45; font-weight: 600;
  font-size: clamp(.72rem, 3vw, 1.08rem);
}
.banner-dots {
  position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%);
  display: flex; gap: 6px; padding: 4px 8px; border-radius: 999px;
  background: rgba(5,20,35,.35); z-index: 2;
}
.banner-dot {
  width: 9px; height: 9px; border-radius: 50%; padding: 0; cursor: pointer;
  border: 1px solid rgba(255,255,255,.9); background: rgba(255,255,255,.35);
}
.banner-dot.active { background: #fff; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.badge { border-radius: 999px; padding: 7px 12px; font-weight: 700; font-size: .85rem; }
.badge-green { background: #d8f5e1; color: #0d6b31; }
.badge-blue { background: #dcecfb; color: #0d4f8a; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 10px 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { white-space: nowrap; border: 1px solid #c8d6e4; background: #fff; color: var(--text); border-radius: 999px; padding: 8px 14px; cursor: pointer; font-size: .9rem; }
.chip.active { background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 700; }
.section-title { font-size: 1.3rem; margin: 16px 0 10px; }

/* ---------- product grid: 2 per row on mobile ---------- */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (min-width: 760px) { .grid { grid-template-columns: repeat(4, 1fr); } }
.card {
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 2px 8px rgba(15,40,70,.08); display: flex; flex-direction: column;
}
.card-img { aspect-ratio: 1 / 1; overflow: hidden; background: #f4f7fa; cursor: pointer; }
.card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-body { padding: 10px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card-brand { font-size: .72rem; letter-spacing: 1px; color: var(--muted); text-transform: uppercase; font-weight: 700; }
.card-name { font-weight: 700; font-size: .95rem; line-height: 1.25; cursor: pointer; }
.card-price { margin-top: 2px; }
.price-offer { color: #0d6b31; font-weight: 800; font-size: 1.1rem; }
.price-regular { color: var(--muted); text-decoration: line-through; font-size: .85rem; margin-left: 6px; }
.save-badge { background: var(--amber); color: #fff; font-size: .7rem; font-weight: 800; border-radius: 6px; padding: 2px 6px; margin-left: 6px; vertical-align: middle; }
.price-soon { color: var(--amber); font-weight: 800; }
.stock-note { font-size: .8rem; color: var(--muted); }
.stock-out { color: var(--red); font-weight: 700; font-size: .8rem; }
.card-btns { display: flex; gap: 8px; margin-top: auto; padding-top: 8px; }
.card-btns .btn { flex: 1; padding: 9px 4px; font-size: .85rem; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; border-radius: 10px; padding: 10px 14px; cursor: pointer;
  font-weight: 700; font-size: .92rem; text-decoration: none; background: #e3eaf2; color: var(--text);
}
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-green { background: var(--green); color: #fff; }
.btn-blue { background: var(--blue); color: #fff; }
.btn-outline { background: #fff; border: 2px solid var(--blue); color: var(--blue); }
.btn.big { width: 100%; padding: 14px; font-size: 1rem; margin-top: 10px; }
.back-btn { background: none; border: 0; color: var(--blue); font-weight: 700; font-size: 1rem; cursor: pointer; padding: 6px 0; }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- product detail ---------- */
.detail-gallery-main { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: var(--radius); background: #fff; }
.detail-thumbs { display: flex; gap: 8px; margin: 8px 0; overflow-x: auto; }
.detail-thumbs img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; }
.detail-thumbs img.active { border-color: var(--blue); }
.qty-row { display: flex; align-items: center; gap: 10px; margin: 10px 0; }
.qty-row button { width: 36px; height: 36px; border-radius: 50%; border: 1px solid #c8d6e4; background: #fff; font-size: 1.1rem; cursor: pointer; }

/* ---------- forms ---------- */
.form-card {
  background: var(--card); border-radius: var(--radius); padding: 16px;
  box-shadow: 0 2px 8px rgba(15,40,70,.08); margin: 12px 0;
}
.form-card label { display: block; font-weight: 600; margin-bottom: 12px; font-size: .92rem; }
.form-card input, .form-card select, .form-card textarea {
  width: 100%; margin-top: 5px; padding: 11px; border: 1px solid #c8d6e4;
  border-radius: 10px; font-size: 1rem; font-family: inherit; background: #fff;
}
.form-card label.check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.form-card label.check input { width: auto; margin: 0; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.summary-box { background: #f0f6fd; border-radius: 10px; padding: 12px; font-size: .95rem; line-height: 1.7; }
.summary-box .total { font-weight: 800; font-size: 1.05rem; }

/* ---------- instant number-check box (checkout / order now) ---------- */
.num-check { border-radius: 10px; padding: 10px 12px; margin: -4px 0 12px; font-size: .9rem; font-weight: 600; line-height: 1.55; }
.num-check.nc-red { background: #fde7e7; border: 1px solid #f1a9a9; color: #8a0d0d; }
.num-check.nc-amber { background: #fff4e0; border: 1px solid #ffcc80; color: #7a4a00; }
.num-check.nc-green { background: #e2f5e9; border: 1px solid #9fd8b4; color: #0d6b31; }
.num-check.nc-new { background: #eef3f8; border: 1px solid #c8d6e4; color: #43566b; }
.risk-box { background: #fff4e0; border: 1px solid #ffcc80; border-radius: 10px; padding: 12px; margin-top: 12px; font-size: .92rem; line-height: 1.6; }
.status-pill { display: inline-block; border-radius: 999px; padding: 3px 10px; font-size: .78rem; font-weight: 800; background: #dcecfb; color: #0d4f8a; text-transform: capitalize; }
.status-pill.pending_payment, .status-pill.payment_submitted { background: #ffe0b2; color: #8a5200; }
.status-pill.delivered { background: #d8f5e1; color: #0d6b31; }
.status-pill.cancelled, .status-pill.refused { background: #fbdcdc; color: #8a0d0d; }

/* ---------- cart drawer ---------- */
.overlay { position: fixed; inset: 0; background: rgba(5,20,35,.55); z-index: 90; }
.drawer {
  position: fixed; top: 0; right: 0; height: 100dvh; width: min(420px, 92vw);
  background: #fff; z-index: 100; padding: 16px; overflow-y: auto;
  box-shadow: -4px 0 20px rgba(0,0,0,.25);
}
.drawer-head { display: flex; justify-content: space-between; align-items: center; }
.cart-line { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid #e6edf4; }
.cart-line img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; }
.cart-line .grow { flex: 1; }
.cart-line .qty-row { margin: 4px 0; }
.cart-line .qty-row button { width: 28px; height: 28px; font-size: .95rem; }
.remove-link { background: none; border: 0; color: var(--red); cursor: pointer; font-size: .8rem; padding: 0; }

/* ---------- contact / footer ---------- */
.contact-card { background: var(--card); border-radius: var(--radius); padding: 18px; text-align: center; margin: 22px 0 6px; box-shadow: 0 2px 8px rgba(15,40,70,.08); }
.contact-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
.footer { text-align: center; padding: 26px 14px 40px; max-width: 1100px; margin: 0 auto; }
.footer-logo { width: 74px; height: 74px; border-radius: 50%; object-fit: cover; }
.footer-name { font-weight: 800; font-size: 1.15rem; margin: 8px 0 4px; }

/* ---------- admin ---------- */
.admin-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.tab-btn { border: 1px solid #c8d6e4; background: #fff; border-radius: 999px; padding: 9px 14px; cursor: pointer; font-weight: 600; }
.tab-btn.active { background: var(--navy); color: #fff; }
.order-card { background: #fff; border-radius: var(--radius); padding: 14px; margin: 10px 0; box-shadow: 0 2px 8px rgba(15,40,70,.08); font-size: .92rem; line-height: 1.55; }
.order-card h4 { margin: 0 0 6px; }
.order-card select { padding: 7px; border-radius: 8px; border: 1px solid #c8d6e4; }
.admin-product-row { display: flex; gap: 10px; align-items: center; background: #fff; border-radius: 10px; padding: 10px; margin: 8px 0; box-shadow: 0 1px 5px rgba(15,40,70,.07); }
.admin-product-row img { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; }
.admin-product-row .grow { flex: 1; font-size: .9rem; }
.img-preview { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 12px; }
.img-preview img { width: 70px; height: 70px; object-fit: cover; border-radius: 8px; }
.flagged-row { display: flex; justify-content: space-between; align-items: center; background: #fff; border-radius: 10px; padding: 10px 14px; margin: 8px 0; }
