/* ============================================================
   Royal Masala — Homepage Styles (brand: deep teal + gold)
   ============================================================ */
:root {
  --rm-bg: #00404E;
  --rm-bg-dark: #003D48;
  --rm-cream: #FFFDEC;
  --rm-gold: #E8B870;
  --rm-gold-deep: #D0A068;
  --rm-gold-bright: #F8A818;

  --rm-font-heading: 'Playfair Display', 'Glitten', Georgia, serif;
  --rm-font-body: 'Oswald', 'Bahnschrift', sans-serif;
  --rm-font-label: 'Inter', 'Calibri', 'Segoe UI', system-ui, sans-serif;

  --nav-bg: #FFFDEC;
  --nav-text: #1E4E5A;
  --nav-text-hover: #00404E;

  --muted: rgba(255, 253, 236, 0.68);
  --line: rgba(232, 184, 112, 0.25);
  --radius: 14px;
  --shadow: 0 6px 24px rgba(0, 22, 28, 0.35);
  --shadow-lg: 0 14px 40px rgba(0, 22, 28, 0.5);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--rm-font-body);
  color: var(--rm-cream);
  background: var(--rm-bg);
  line-height: 1.6;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
.container { max-width: 100%; margin: 0 auto; padding: 0 36px; }

/* ============ TOP ANNOUNCEMENT BAR ============ */
.topbar {
  background: #002b34;
  color: var(--rm-gold);
  font-family: var(--rm-font-body);
  font-weight: 300;
  font-size: 0.85rem;
  text-align: center;
  padding: 8px 16px;
  border-bottom: 1px solid var(--line);
}
.topbar strong { color: var(--rm-gold-bright); font-weight: 600; }

/* ============ HEADER ============ */
.header {
  position: sticky; top: 0; z-index: 100;
  background: var(--nav-bg);
  border-bottom: 1px solid rgba(30, 78, 90, 0.18);
  box-shadow: 0 2px 14px rgba(0, 22, 28, 0.12);
}
.header-inner {
  max-width: 100%; margin: 0 auto; padding: 14px 36px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.logo {
  font-family: var(--rm-font-heading);
  font-size: 1.5rem; font-weight: 900; color: var(--nav-text);
  white-space: nowrap;
  display: inline-flex; align-items: center;
}
.logo span { color: var(--nav-text-hover); }
.logo-img { height: 46px; width: auto; display: block; }
.nav { display: flex; gap: 26px; }
.nav a {
  font-family: var(--rm-font-label);
  font-weight: 500; font-size: .92rem; color: var(--nav-text);
  padding: 4px 0; border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
}
.nav a:hover { color: var(--nav-text-hover); border-color: var(--nav-text-hover); }
.auth-buttons { display: flex; gap: 10px; align-items: center; }
.btn {
  display: inline-block; padding: 9px 20px; border-radius: 999px;
  font-family: var(--rm-font-label);
  font-weight: 600; font-size: .9rem; transition: all .2s;
}
.btn-outline { border: 2px solid var(--nav-text); color: var(--nav-text); }
.btn-outline:hover { background: var(--nav-text-hover); color: var(--rm-cream); border-color: var(--nav-text-hover); }
.btn-primary {
  background: linear-gradient(135deg, var(--rm-gold) 0%, var(--rm-gold-deep) 100%);
  color: var(--rm-bg); border: 2px solid var(--rm-gold);
}
.btn-primary:hover { filter: brightness(1.08); }
.menu-toggle { display: none; font-size: 1.6rem; color: var(--nav-text); }

/* ============ HERO SLIDER ============ */
.hero { position: relative; overflow: hidden; }
.hero-track {
  display: flex;
  transition: transform .6s cubic-bezier(.65, .05, .36, 1);
}
.hero-slide {
  min-width: 100%; min-height: 480px;
  display: flex; align-items: center; justify-content: flex-start;
  padding: 60px 6vw;
  color: var(--rm-cream);
}
.hero-slide-1 { background: radial-gradient(circle at 80% 20%, rgba(248, 168, 24, 0.22) 0%, transparent 50%), linear-gradient(120deg, #002b34 0%, var(--rm-bg) 55%, #005d6e 100%); }
.hero-slide-2 { background: radial-gradient(circle at 15% 85%, rgba(232, 184, 112, 0.2) 0%, transparent 50%), linear-gradient(120deg, var(--rm-bg-dark) 0%, #015362 55%, #00404E 100%); }
.hero-slide-3 { background: radial-gradient(circle at 85% 80%, rgba(208, 160, 104, 0.25) 0%, transparent 55%), linear-gradient(120deg, #00333f 0%, var(--rm-bg) 50%, #014c5b 100%); }
.hero-content { max-width: 620px; text-align: left; }
.hero-eyebrow {
  display: inline-block; padding: 6px 16px; margin-bottom: 18px;
  background: rgba(232, 184, 112, 0.14); border: 1px solid var(--rm-gold);
  border-radius: 999px; font-size: .78rem; font-weight: 600;
  font-family: var(--rm-font-label);
  letter-spacing: .14em; text-transform: uppercase; color: var(--rm-gold);
}
.hero-title {
  font-family: var(--rm-font-heading);
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  font-weight: 900; line-height: 1.15; margin-bottom: 16px;
  color: var(--rm-cream);
}
.hero-subtitle { font-size: 1.05rem; font-weight: 300; color: var(--muted); margin-bottom: 28px; max-width: 520px; }
.hero-cta {
  display: inline-block; padding: 14px 32px;
  background: linear-gradient(135deg, var(--rm-gold) 0%, var(--rm-gold-deep) 100%);
  color: var(--rm-bg);
  font-family: var(--rm-font-label);
  border-radius: 999px; font-weight: 700;
  box-shadow: var(--shadow-lg);
  transition: transform .2s, box-shadow .2s, filter .2s;
}
.hero-cta:hover { transform: translateY(-2px); filter: brightness(1.08); }
.hero-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(232, 184, 112, 0.18); color: var(--rm-gold);
  border: 1px solid var(--line);
  font-size: 1.7rem; line-height: 1; padding: 0 0 4px;
  backdrop-filter: blur(4px);
  transition: background .2s, color .2s;
  z-index: 5;
}
.hero-arrow:hover { background: var(--rm-gold); color: var(--rm-bg); }
.hero-arrow.prev { left: 18px; }
.hero-arrow.next { right: 18px; }
.hero-dots {
  position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 10px; z-index: 5;
}
.hero-dot {
  width: 11px; height: 11px; border-radius: 50%;
  background: rgba(255, 253, 236, 0.35);
  transition: background .2s, transform .2s;
}
.hero-dot.active { background: var(--rm-gold-bright); transform: scale(1.25); }

/* ============ SECTIONS ============ */
.section { padding: 64px 0; }
.section-offers { background: var(--rm-bg-dark); }
.section-all { background: var(--rm-bg-dark); }
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; margin-bottom: 32px;
}
.section-title {
  font-family: var(--rm-font-heading);
  font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 900; line-height: 1.2;
  color: var(--rm-gold);
}
.section-title small {
  display: block; font-family: var(--rm-font-label);
  font-size: .76rem; font-weight: 600; letter-spacing: .16em;
  text-transform: uppercase; color: var(--rm-gold-bright); margin-bottom: 4px;
}
.view-all { font-family: var(--rm-font-label); font-weight: 600; font-size: .9rem; color: var(--rm-gold); white-space: nowrap; }
.view-all:hover { color: var(--rm-gold-bright); }

/* ============ CATEGORY GRID ============ */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 18px;
}
.category-card {
  background: var(--rm-bg-dark); border-radius: var(--radius);
  border: 1px solid var(--line);
  padding: 26px 14px; text-align: center;
  box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.category-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--rm-gold); }
.category-icon { font-size: 2.4rem; display: block; margin-bottom: 10px; }
.category-name { font-family: var(--rm-font-label); font-weight: 700; font-size: .95rem; color: var(--rm-cream); }
.category-count { font-size: .8rem; color: var(--muted); margin-top: 2px; }

/* ============ PRODUCT SLIDERS ============ */
.slider-wrapper { position: relative; padding: 0 52px; }
.product-slider {
  display: flex; gap: 18px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
  padding: 6px 2px 8px;
  -ms-overflow-style: none;   /* IE/Edge */
  scrollbar-width: none;      /* Firefox */
}
.product-slider::-webkit-scrollbar { display: none; height: 0; }  /* Chrome/Safari */
.slider-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  display: flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--rm-gold); color: var(--rm-bg);
  font-size: 1.5rem; line-height: 1; padding-bottom: 3px;
  box-shadow: var(--shadow-lg);
  z-index: 6;
  transition: background .2s, color .2s;
}
.slider-arrow:hover { background: var(--rm-gold-bright); }
.slider-arrow.prev { left: 4px; }
.slider-arrow.next { right: 4px; }

.product-card {
  position: relative;
  flex: 0 0 232px;
  scroll-snap-align: start;
  background: var(--rm-bg-dark); border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
/* whole-card clickable: the product-name link is stretched over the card;
   interactive controls (wishlist, action buttons) sit above it. */
.product-name a::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--rm-gold); }
.product-image {
  position: relative;
  height: 150px;
  display: flex; align-items: center; justify-content: center;
  font-size: 3.4rem;
}
.bg-1 { background: linear-gradient(135deg, #0a4a58, #0e5a6a); }
.bg-2 { background: linear-gradient(135deg, #114e54, #14605f); }
.bg-3 { background: linear-gradient(135deg, #2a4d3e, #1d5a52); }
.bg-4 { background: linear-gradient(135deg, #34474f, #20525e); }
.bg-5 { background: linear-gradient(135deg, #3d4a33, #2a584b); }
.bg-6 { background: linear-gradient(135deg, #14424f, #0d5566); }
.bg-7 { background: linear-gradient(135deg, #284a44, #155a5e); }
.bg-8 { background: linear-gradient(135deg, #233f52, #155068); }
.product-badge {
  position: absolute; top: 10px; left: 10px;
  padding: 4px 10px; border-radius: 999px;
  background: var(--rm-gold-bright); color: var(--rm-bg);
  font-family: var(--rm-font-label);
  font-size: .72rem; font-weight: 800; letter-spacing: .04em;
}
.product-badge.hot { background: var(--rm-gold-bright); }
.product-badge.new { background: var(--rm-gold); }
.product-wishlist {
  position: absolute; top: 8px; right: 8px;
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(0, 61, 72, 0.8);
  border: 1px solid var(--line);
  font-size: 1rem; color: var(--rm-gold);
  transition: background .2s, transform .2s;
}
.product-wishlist:hover { background: var(--rm-gold); color: var(--rm-bg); transform: scale(1.1); }
.product-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.product-cat {
  font-family: var(--rm-font-label);
  font-size: .7rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--rm-gold-bright);
}
.product-name { font-family: var(--rm-font-label); font-size: .93rem; font-weight: 600; line-height: 1.35; color: var(--rm-cream); display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.product-rating { font-size: .8rem; color: var(--muted); }
.product-rating .stars { color: var(--rm-gold-bright); margin-right: 4px; letter-spacing: .05em; }
.product-price-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: auto; padding-top: 8px;
}
.product-price { font-family: var(--rm-font-label); font-weight: 800; font-size: 1.05rem; color: var(--rm-gold); }
.product-price del { color: var(--muted); font-weight: 500; font-size: .82rem; margin-right: 6px; }
.add-cart {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, var(--rm-gold) 0%, var(--rm-gold-deep) 100%);
  display: flex; align-items: center; justify-content: center;
  transition: filter .2s, transform .2s;
}
.add-cart:hover { filter: brightness(1.1); transform: scale(1.08); }
.add-cart svg { width: 19px; height: 19px; fill: none; stroke: var(--rm-bg); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.add-cart svg circle { fill: var(--rm-bg); stroke: none; }

/* ============ NEWSLETTER ============ */
.newsletter {
  background: radial-gradient(circle at 50% 0%, rgba(232, 184, 112, 0.16) 0%, transparent 60%), var(--rm-bg-dark);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--rm-cream); text-align: center;
  padding: 64px 20px;
}
.newsletter h2 { font-family: var(--rm-font-heading); font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 900; margin-bottom: 10px; color: var(--rm-gold); }
.newsletter p { color: var(--muted); max-width: 520px; margin: 0 auto 26px; font-weight: 300; }
.newsletter-form {
  display: flex; gap: 10px; justify-content: center; flex-wrap: wrap;
  max-width: 520px; margin: 0 auto;
}
.newsletter-form input {
  flex: 1 1 280px; padding: 14px 20px;
  border: 1px solid var(--line); border-radius: 999px;
  font-family: var(--rm-font-label); font-size: .95rem;
  background: var(--rm-bg); color: var(--rm-cream);
  outline: none;
}
.newsletter-form input::placeholder { color: var(--muted); }
.newsletter-form input:focus { border-color: var(--rm-gold); }
.newsletter-form button {
  padding: 14px 32px; border-radius: 999px;
  background: linear-gradient(135deg, var(--rm-gold) 0%, var(--rm-gold-deep) 100%);
  color: var(--rm-bg);
  font-family: var(--rm-font-label);
  font-weight: 700; font-size: .95rem;
  transition: filter .2s;
}
.newsletter-form button:hover { filter: brightness(1.08); }

/* ============ FOOTER ============ */
.footer { background: #002b34; color: var(--muted); padding: 56px 0 0; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.3fr;
  gap: 36px;
  padding-bottom: 40px;
}
.footer-logo { font-family: var(--rm-font-heading); font-size: 1.4rem; font-weight: 900; color: var(--rm-gold); margin-bottom: 12px; }
.footer-about p { font-size: .9rem; font-weight: 300; }
.footer h4 { color: var(--rm-gold); font-family: var(--rm-font-label); font-size: .98rem; margin-bottom: 14px; }
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 9px; }
.footer ul a, .footer-bottom a { font-size: .9rem; font-weight: 300; transition: color .2s; }
.footer ul a:hover, .footer-bottom a:hover { color: var(--rm-gold-bright); }
.footer-contact p { font-size: .88rem; margin-bottom: 10px; font-weight: 300; }
.social { display: grid; grid-template-columns: repeat(5, 36px); gap: 10px; margin-top: 16px; width: max-content; }
.social a {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(232, 184, 112, 0.12);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-size: .95rem; color: var(--rm-gold);
  transition: background .2s, color .2s, transform .2s;
}
.social a:hover { background: var(--rm-gold); color: var(--rm-bg); transform: translateY(-2px); }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 18px 0; text-align: center;
  font-size: .84rem; font-weight: 300;
}

/* ============ SCROLL TO TOP ============ */
.scroll-top {
  position: fixed;
  right: 22px; bottom: 22px;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rm-gold) 0%, var(--rm-gold-deep) 100%);
  color: var(--rm-bg);
  font-size: 1.4rem; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-lg);
  z-index: 90;
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity .25s, visibility .25s, transform .25s, filter .2s;
}
.scroll-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.scroll-top:hover { filter: brightness(1.1); }

/* ============ RESPONSIVE ============ */
@media (max-width: 920px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--nav-bg);
    border-bottom: 1px solid rgba(30, 78, 90, 0.18);
    box-shadow: var(--shadow-lg);
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 24px; border-bottom: 1px solid rgba(30, 78, 90, .12); }
  .menu-toggle { display: block; }
  .auth-buttons .btn { padding: 8px 14px; font-size: .82rem; }
  .container { padding: 0 18px; }
  .header-inner { padding: 12px 18px; }
  .hero-slide { min-height: 420px; padding: 48px 7vw; }
  .hero-arrow { display: none; }
  .slider-arrow { display: none; }
  .slider-wrapper { padding: 0; }
  .section { padding: 44px 0; }
  .scroll-top { right: 14px; bottom: 14px; width: 44px; height: 44px; }
}
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
  .category-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .product-card { flex-basis: 200px; }
}

/* Fav icon shown before the logo in the header */
.logo-fav { height: 38px; width: auto; display: block; margin-right: 10px; border-radius: 8px; }

/* Real category image inside the icon circle */
.category-icon { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; margin: 0 auto 10px; overflow: hidden; border-radius: 14px; }
.category-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ============ CATEGORY / PRODUCTS PAGE ============ */
.cat-cover {
  background: linear-gradient(120deg, #002b34 0%, var(--rm-bg) 60%, #014c5b 100%);
  background-size: cover; background-position: center;
  padding: 54px 0 46px;
  border-bottom: 1px solid var(--line);
}
.breadcrumb {
  font-family: var(--rm-font-label); font-size: .86rem; color: var(--muted);
  margin-bottom: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
}
.breadcrumb a { color: var(--rm-gold); }
.breadcrumb a:hover { color: var(--rm-gold-bright); }
.breadcrumb .sep { color: var(--muted); }
.breadcrumb .current { color: var(--rm-cream); }
.cat-cover-title {
  font-family: var(--rm-font-heading); font-weight: 900;
  font-size: clamp(1.8rem, 4vw, 3rem); color: var(--rm-gold); line-height: 1.1;
}
.cat-cover-sub { color: var(--muted); font-weight: 300; margin-top: 6px; }

/* product GRID (no slider) — reuse .product-card but lay out as a grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
.product-grid .product-card { flex: initial; width: auto; }

/* pagination */
.rm-pager { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 40px; }
.rm-page {
  min-width: 42px; height: 42px; padding: 0 12px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px; border: 1px solid var(--line);
  background: var(--rm-bg-dark); color: var(--rm-cream);
  font-family: var(--rm-font-label); font-weight: 600; font-size: .9rem;
  transition: background .15s, color .15s, border-color .15s;
}
.rm-page:hover { border-color: var(--rm-gold); color: var(--rm-gold); }
.rm-page.active { background: linear-gradient(135deg, var(--rm-gold), var(--rm-gold-deep)); color: var(--rm-bg); border-color: var(--rm-gold); }
.rm-page.disabled { opacity: .4; pointer-events: none; }

.cat-empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.cat-empty-ico { font-size: 3rem; margin-bottom: 12px; }
.cat-empty p { margin-bottom: 18px; }

@media (max-width: 600px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .cat-cover { padding: 32px 0 28px; }
}

/* ============ STOREFRONT: card actions, wishlist, toast, cart ============ */
.product-image-link { position:absolute; inset:0; display:block; }
.product-name a { color: inherit; }
.product-name a:hover { color: var(--rm-gold); }
.product-price { margin-top: 6px; }
.product-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 10px; position: relative; z-index: 2; }
.btn-cart, .btn-buy {
  flex: 1; padding: 9px 8px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-family: var(--rm-font-label); font-weight: 700; font-size: .78rem;
  cursor: pointer; transition: filter .15s, background .15s, color .15s;
}
.btn-cart svg, .btn-buy svg { width: 15px; height: 15px; flex: 0 0 auto; }
.btn-cart { background: rgba(232,184,112,.15); color: var(--rm-gold); border: 1px solid var(--rm-gold); }
.btn-cart:hover { background: var(--rm-gold); color: var(--rm-bg); }
.btn-buy { background: linear-gradient(135deg, var(--rm-gold), var(--rm-gold-deep)); color: var(--rm-bg); border: 1px solid var(--rm-gold); }
.btn-buy:hover { filter: brightness(1.08); }

/* wishlist heart */
.product-wishlist { z-index: 3; color: var(--rm-gold); }
.product-wishlist.active { color: #ff5a7a; background: var(--rm-cream); }
.product-wishlist.active:hover { color: #ff5a7a; }

/* cart icon + badge in header */
.cart-link { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%; color: var(--nav-text); border: 1px solid rgba(30,78,90,.25); }
.cart-link:hover { color: var(--nav-text-hover); border-color: var(--nav-text-hover); }
.cart-link svg { width: 21px; height: 21px; }
.cart-badge { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; background: var(--rm-gold-bright); color: var(--rm-bg); font-family: var(--rm-font-label); font-size: .68rem; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }

/* toast */
.rm-toast-box { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 99999; display: flex; flex-direction: column; align-items: center; gap: 10px; pointer-events: none; width: max-content; max-width: 92vw; }
.rm-toast { display: flex; align-items: center; gap: 10px; background: linear-gradient(135deg, var(--rm-gold), var(--rm-gold-deep)); color: var(--rm-bg); border: none; border-radius: 12px; padding: 14px 22px; font-family: var(--rm-font-label); font-weight: 700; font-size: .95rem; box-shadow: 0 12px 34px rgba(0,22,28,.45); opacity: 0; transform: translateY(16px) scale(.96); transition: opacity .25s, transform .25s; max-width: 92vw; }
.rm-toast::before { content: '✓'; display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--rm-bg); color: var(--rm-gold); font-size: .8rem; font-weight: 800; flex: 0 0 auto; }
.rm-toast.show { opacity: 1; transform: translateY(0) scale(1); }
.rm-toast.err { background: #b3261e; color: #fff; }
.rm-toast.err::before { content: '!'; background: #fff; color: #b3261e; }
/* lift above the mobile bottom nav (72px) so it's never hidden */
body.rm-mobile-app .rm-toast-box { bottom: 90px; }

/* ============ PRODUCT DETAIL ============ */
.pd-wrap { display: grid; grid-template-columns: 1fr 1.1fr; gap: 38px; align-items: start; }
.pd-image { position: relative; background: linear-gradient(135deg,#0a4a58,#0e5a6a); border-radius: 18px; border: 1px solid var(--line); overflow: hidden; aspect-ratio: 1/1; display: flex; align-items: center; justify-content: center; font-size: 5rem; }
.pd-image img { width: 100%; height: 100%; object-fit: cover; }
.pd-title { font-family: var(--rm-font-heading); font-weight: 900; font-size: clamp(1.6rem,3vw,2.4rem); color: var(--rm-cream); margin: 6px 0 10px; }
.pd-price { font-family: var(--rm-font-label); font-weight: 800; font-size: 1.6rem; color: var(--rm-gold); margin-bottom: 16px; }
.pd-desc { color: var(--muted); font-weight: 300; line-height: 1.7; margin-bottom: 18px; }
.pd-variation { margin-bottom: 12px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pd-var-name { font-family: var(--rm-font-label); font-weight: 600; color: var(--rm-cream); }
.pd-var-chip { padding: 5px 12px; border-radius: 999px; background: rgba(232,184,112,.12); border: 1px solid var(--line); color: var(--rm-gold); font-size: .82rem; }
.pd-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 22px; }
.pd-btn { flex: 0 0 auto; min-width: 150px; padding: 14px 22px; border-radius: 12px; font-size: .92rem; }
.qty-stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.qty-btn { width: 42px; height: 48px; background: var(--rm-bg-dark); color: var(--rm-gold); font-size: 1.2rem; }
.qty-btn:hover { background: rgba(232,184,112,.15); }
.qty-input { width: 48px; height: 48px; text-align: center; background: var(--rm-bg); color: var(--rm-cream); border: none; border-left: 1px solid var(--line); border-right: 1px solid var(--line); font-family: var(--rm-font-label); font-weight: 700; }
@media (max-width: 760px) { .pd-wrap { grid-template-columns: 1fr; gap: 22px; } }

/* ============ CART PAGE ============ */
.cart-table { display: flex; flex-direction: column; gap: 12px; }
.cart-row { display: grid; grid-template-columns: 72px 1fr auto auto auto; gap: 16px; align-items: center; background: var(--rm-bg-dark); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; }
.cart-thumb { width: 72px; height: 72px; border-radius: 10px; overflow: hidden; background: linear-gradient(135deg,#0a4a58,#0e5a6a); display: flex; align-items: center; justify-content: center; font-size: 1.8rem; }
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-name { font-family: var(--rm-font-label); font-weight: 600; color: var(--rm-cream); }
.cart-unit { color: var(--muted); font-size: .85rem; }
.cart-stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--rm-bg); }
.cart-step { width: 34px; height: 38px; background: transparent; color: var(--rm-gold); font-size: 1.1rem; line-height: 1; cursor: pointer; transition: background .15s; }
.cart-step:hover { background: rgba(232,184,112,.16); }
.cart-qty-input { width: 52px; height: 38px; text-align: center; font-family: var(--rm-font-label); font-weight: 700; color: var(--rm-cream); background: transparent; border: none; border-left: 1px solid var(--line); border-right: 1px solid var(--line); outline: none; -moz-appearance: textfield; }
.cart-qty-input::-webkit-outer-spin-button, .cart-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cart-qty-input:focus { background: rgba(232,184,112,.1); }
.cart-line { font-family: var(--rm-font-label); font-weight: 800; color: var(--rm-gold); white-space: nowrap; }
.cart-remove { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,138,128,.12); color: #ff8a80; border: 1px solid rgba(255,138,128,.4); cursor: pointer; }
.cart-summary { margin-top: 24px; margin-left: auto; max-width: 360px; background: var(--rm-bg-dark); border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.cart-subtotal { display: flex; justify-content: space-between; align-items: center; font-family: var(--rm-font-label); font-size: 1.1rem; color: var(--rm-cream); }
.cart-subtotal strong { color: var(--rm-gold); font-size: 1.3rem; }
.cart-note { color: var(--muted); font-size: .82rem; margin: 10px 0 16px; }
.cart-summary-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.cart-btn-outline, .cart-btn-primary { display: block; width: 100%; text-align: center; padding: 12px 14px; border-radius: 10px; font-family: var(--rm-font-label); font-weight: 700; font-size: .9rem; cursor: pointer; transition: filter .15s, background .15s, color .15s; }
.cart-btn-outline { background: transparent; color: var(--rm-gold); border: 1.5px solid var(--rm-gold); text-decoration: none; }
.cart-btn-outline:hover { background: var(--rm-gold); color: var(--rm-bg); }
.cart-btn-primary { background: linear-gradient(135deg, var(--rm-gold), var(--rm-gold-deep)); color: var(--rm-bg); border: 1.5px solid var(--rm-gold); }
.cart-btn-primary[disabled] { opacity: .45; cursor: not-allowed; }
/* Mobile + tablet: 2-row card layout (thumb left, name+remove top, stepper+total bottom) */
@media (max-width: 1024px) {
  .cart-row {
    grid-template-columns: 60px 1fr auto;
    grid-template-areas:
      "thumb info remove"
      "thumb stepper line";
    column-gap: 12px; row-gap: 10px; align-items: center;
  }
  .cart-thumb { grid-area: thumb; width: 60px; height: 60px; align-self: start; }
  .cart-info { grid-area: info; min-width: 0; }
  .cart-name { white-space: normal; }
  .cart-remove { grid-area: remove; justify-self: end; align-self: start; }
  .cart-stepper { grid-area: stepper; justify-self: start; }
  .cart-line { grid-area: line; justify-self: end; text-align: right; }
}

/* ============ CATEGORY SLIDER (homepage) ============ */
.product-slider .category-card {
  flex: 0 0 158px;
  scroll-snap-align: start;
  margin-bottom: 0;
}

/* ============ CHECKOUT (Phase 1) ============ */
.co-alert { background:#b3261e; color:#fff; border-radius:10px; padding:12px 16px; margin-bottom:16px; font-family:var(--rm-font-label); font-weight:600; }
.co-grid { display:grid; grid-template-columns: 1fr 360px; gap:22px; align-items:start; }
.co-card { background:var(--rm-bg-dark); border:1px solid var(--line); border-radius:14px; padding:20px; margin-bottom:18px; }
.co-h { font-family:var(--rm-font-label); font-weight:800; color:var(--rm-gold); font-size:1.05rem; margin-bottom:14px; }
.co-radios { display:flex; flex-wrap:wrap; gap:10px; }
.co-opt { display:flex; align-items:center; gap:8px; padding:11px 16px; border:1.5px solid var(--line); border-radius:10px; cursor:pointer; font-family:var(--rm-font-label); font-weight:600; color:var(--rm-cream); }
.co-opt:has(input:checked) { border-color:var(--rm-gold); background:rgba(232,184,112,.12); color:var(--rm-gold); }
.co-opt input { accent-color:var(--rm-gold); }
.co-fields { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.co-fields label { display:block; font-family:var(--rm-font-label); font-size:.82rem; color:var(--muted); margin-bottom:5px; }
.co-fields input, .co-fields textarea { width:100%; padding:11px 13px; border-radius:10px; background:var(--rm-bg); color:var(--rm-cream); border:1px solid var(--line); font-family:var(--rm-font-label); }
.co-fields input:focus, .co-fields textarea:focus { outline:none; border-color:var(--rm-gold); }
#rmAddrWrap { grid-column:1/-1; }
.co-summary { background:var(--rm-bg-dark); border:1px solid var(--line); border-radius:14px; padding:20px; position:sticky; top:90px; }
.co-items { display:flex; flex-direction:column; gap:8px; margin-bottom:14px; max-height:240px; overflow:auto; }
.co-item { display:flex; justify-content:space-between; gap:10px; font-family:var(--rm-font-label); font-size:.88rem; color:var(--rm-cream); }
.co-line { display:flex; justify-content:space-between; font-family:var(--rm-font-label); color:var(--muted); padding:6px 0; }
.co-total { display:flex; justify-content:space-between; align-items:center; border-top:1px solid var(--line); margin-top:8px; padding-top:12px; font-family:var(--rm-font-label); color:var(--rm-cream); font-size:1.05rem; }
.co-total strong { color:var(--rm-gold); font-size:1.3rem; }
.co-back { display:block; text-align:center; margin-top:12px; color:var(--muted); font-family:var(--rm-font-label); font-size:.88rem; }
@media (max-width:860px){ .co-grid { grid-template-columns:1fr; } .co-fields { grid-template-columns:1fr; } .co-summary { position:static; } }
