/* =====================================================
   ROJA SNACK - Modern Premium Stylesheet (v2.0)
   Palette: Coral Red + Sunset Orange + Warm Cream
   Typography: Poppins (modern geometric sans)
   ===================================================== */
:root {
  /* Brand */
  --rs-primary: #E63946;
  --rs-primary-dark: #C42836;
  --rs-primary-light: #FF5C68;
  --rs-secondary: #F77F00;
  --rs-secondary-dark: #D86A00;
  --rs-accent: #FCBF49;
  --rs-dark: #1A1A2E;
  --rs-dark-2: #16213E;
  --rs-bg: #FAF7F5;
  --rs-bg-2: #FFF5F1;
  --rs-card: #FFFFFF;
  --rs-muted: #6B7280;
  --rs-muted-2: #9CA3AF;
  --rs-border: #ECEEF2;
  --rs-success: #16A34A;
  --rs-warning: #F59E0B;
  --rs-danger: #DC2626;
  --rs-info: #2563EB;
  /* Effects */
  --rs-radius: 18px;
  --rs-radius-sm: 12px;
  --rs-radius-lg: 28px;
  --rs-shadow: 0 4px 20px rgba(20, 20, 40, .06);
  --rs-shadow-md: 0 10px 30px rgba(20, 20, 40, .08);
  --rs-shadow-hover: 0 20px 50px rgba(230, 57, 70, .15);
  --rs-shadow-glow: 0 8px 30px rgba(230, 57, 70, .25);
  --rs-grad: linear-gradient(135deg, #E63946 0%, #F77F00 100%);
  --rs-grad-soft: linear-gradient(135deg, rgba(230,57,70,.12) 0%, rgba(247,127,0,.12) 100%);
  --rs-grad-dark: linear-gradient(135deg, #1A1A2E 0%, #16213E 100%);
  /* Fonts */
  --font-base: 'Poppins', 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: 'Poppins', 'Inter', system-ui, sans-serif;
  /* Transitions */
  --rs-ease: cubic-bezier(.4, 0, .2, 1);
  --rs-ease-bounce: cubic-bezier(.34, 1.56, .64, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  max-width: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-base);
  background: var(--rs-bg);
  color: var(--rs-dark);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--rs-primary); text-decoration: none; transition: .25s var(--rs-ease); }
a:hover { color: var(--rs-primary-dark); }

::selection { background: var(--rs-primary); color: #fff; }

/* Custom scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--rs-bg-2); }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, var(--rs-primary), var(--rs-secondary)); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--rs-primary-dark); }

/* ===== Navbar ===== */
.navbar-rs {
  background: rgba(255, 255, 255, .85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 4px 20px rgba(20, 20, 40, .05);
  padding: .65rem 0;
  position: sticky;
  top: 0;
  z-index: 1020;
  border-bottom: 1px solid rgba(230, 57, 70, .08);
  transition: .3s var(--rs-ease);
}
.navbar-rs.scrolled {
  padding: .45rem 0;
  box-shadow: 0 8px 30px rgba(20, 20, 40, .1);
}
.navbar-rs .navbar-brand {
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -.5px;
  color: var(--rs-dark);
  display: flex; align-items: center; gap: .65rem;
}
.navbar-rs .brand-logo {
  width: 42px; height: 42px; border-radius: 14px;
  background: var(--rs-grad);
  color: #fff; display: grid; place-items: center;
  font-weight: 800; font-size: 1.05rem;
  box-shadow: 0 8px 20px rgba(230, 57, 70, .4);
  transition: .3s var(--rs-ease-bounce);
}
.navbar-rs .navbar-brand:hover .brand-logo {
  transform: rotate(-8deg) scale(1.08);
}
.navbar-rs .nav-link {
  font-weight: 500; color: var(--rs-dark);
  padding: .55rem 1rem !important;
  border-radius: 12px;
  transition: .2s var(--rs-ease);
  position: relative;
}
.navbar-rs .nav-link:hover,
.navbar-rs .nav-link.active {
  color: var(--rs-primary);
  background: rgba(230, 57, 70, .08);
}
.navbar-rs .nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 2px; left: 50%;
  transform: translateX(-50%);
  width: 18px; height: 3px;
  background: var(--rs-grad);
  border-radius: 3px;
}

/* ===== Buttons ===== */
.btn-rs {
  background: var(--rs-grad);
  background-size: 150% 150%;
  color: #fff !important;
  border: none;
  padding: .7rem 1.6rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: .95rem;
  transition: .35s var(--rs-ease);
  box-shadow: 0 8px 20px rgba(230, 57, 70, .3);
  position: relative;
  overflow: hidden;
  letter-spacing: .2px;
}
.btn-rs::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, transparent 30%, rgba(255,255,255,.25) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: .6s var(--rs-ease);
}
.btn-rs:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px rgba(230, 57, 70, .4);
  background-position: 100% 100%;
  color: #fff;
}
.btn-rs:hover::before { transform: translateX(100%); }
.btn-rs:active { transform: translateY(-1px); }

.btn-outline-rs {
  background: transparent;
  color: var(--rs-primary) !important;
  border: 2px solid var(--rs-primary);
  padding: .55rem 1.4rem;
  border-radius: 50px;
  font-weight: 600;
  transition: .25s var(--rs-ease);
}
.btn-outline-rs:hover {
  background: var(--rs-primary); color: #fff !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(230, 57, 70, .25);
}

/* ===== Hero ===== */
.hero-rs {
  position: relative;
  background: linear-gradient(135deg, #E63946 0%, #F77F00 100%);
  color: #fff;
  padding: 5rem 0 6rem;
  overflow: hidden;
}
.hero-rs::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 255, 255, .15) 0%, transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(255, 255, 255, .12) 0%, transparent 45%);
  pointer-events: none;
}
.hero-rs::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 60px;
  background: var(--rs-bg);
  -webkit-mask: radial-ellipse(80% 100% at 50% 0%, transparent 50%, #000 50%);
  mask: radial-ellipse(80% 100% at 50% 0%, transparent 50%, #000 50%);
  pointer-events: none;
}
.hero-rs .floating-shape {
  position: absolute;
  border-radius: 30%;
  background: rgba(255, 255, 255, .08);
  animation: float 6s ease-in-out infinite;
  pointer-events: none;
}
.hero-rs .floating-shape.s1 { width: 80px; height: 80px; top: 10%; right: 8%; animation-delay: 0s; }
.hero-rs .floating-shape.s2 { width: 120px; height: 120px; bottom: 12%; left: 5%; animation-delay: 2s; border-radius: 50%; }
.hero-rs .floating-shape.s3 { width: 50px; height: 50px; top: 60%; right: 25%; animation-delay: 4s; border-radius: 20%; }
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-25px) rotate(8deg); }
}
.hero-rs h1 { font-weight: 800; font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.1; letter-spacing: -.8px; }
.hero-rs p { font-size: clamp(1rem, 2.2vw, 1.18rem); opacity: .95; }
.hero-rs .btn-light {
  background: #fff; color: var(--rs-primary);
  border-radius: 50px; padding: .8rem 1.8rem;
  font-weight: 700; border: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .2);
  transition: .3s var(--rs-ease);
}
.hero-rs .btn-light:hover { transform: translateY(-3px); box-shadow: 0 14px 36px rgba(0, 0, 0, .25); }
.hero-rs .btn-outline-light {
  border: 2px solid rgba(255, 255, 255, .8); color: #fff;
  border-radius: 50px; padding: .7rem 1.6rem; font-weight: 600;
  background: rgba(255, 255, 255, .1);
  backdrop-filter: blur(10px);
  transition: .3s var(--rs-ease);
}
.hero-rs .btn-outline-light:hover {
  background: #fff; color: var(--rs-primary);
  border-color: #fff;
  transform: translateY(-3px);
}
.hero-stat {
  background: rgba(255, 255, 255, .12);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 20px;
  padding: 1.5rem;
}
.hero-stat .fw-bold { font-size: 1.7rem; }

.hero-card-decor {
  background: rgba(255, 255, 255, .15);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 32px;
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
}
.hero-card-decor::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at top right, rgba(255, 255, 255, .2), transparent 60%);
  pointer-events: none;
}

/* ===== Section title ===== */
.section-title {
  font-weight: 800; letter-spacing: -.6px;
  position: relative; padding-bottom: 14px;
  margin-bottom: 1.8rem;
  font-size: clamp(1.55rem, 3vw, 2.1rem);
  color: var(--rs-dark);
}
.section-title::after {
  content: ''; position: absolute; left: 0; bottom: 0;
  width: 70px; height: 5px; border-radius: 5px;
  background: var(--rs-grad);
}
.section-title.text-center::after { left: 50%; transform: translateX(-50%); }

.section-subtitle {
  display: inline-block;
  background: var(--rs-grad-soft);
  color: var(--rs-primary);
  padding: .35rem 1rem;
  border-radius: 50px;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: .8rem;
}

/* ===== Product Card ===== */
.product-card {
  background: var(--rs-card);
  border-radius: var(--rs-radius);
  overflow: hidden;
  box-shadow: var(--rs-shadow);
  transition: .4s var(--rs-ease);
  border: 1px solid var(--rs-border);
  height: 100%;
  display: flex; flex-direction: column;
  position: relative;
}
.product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--rs-shadow-hover);
  border-color: rgba(230, 57, 70, .2);
}
.product-card .img-wrap {
  position: relative; aspect-ratio: 4/3;
  background: linear-gradient(135deg, #FFF5F1 0%, #FFE9E0 100%);
  overflow: hidden;
}
.product-card .img-wrap img {
  width: 100%; height: 100%; object-fit: cover;
  transition: .5s var(--rs-ease);
}
.product-card:hover .img-wrap img { transform: scale(1.08); }
.product-card .badge-unggulan,
.product-card .badge-diskon,
.product-card .badge-stok {
  position: absolute; top: 12px; left: 12px;
  font-size: .72rem; font-weight: 700;
  padding: .35rem .7rem; border-radius: 50px;
  color: #fff; z-index: 2;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
  letter-spacing: .3px;
}
.badge-unggulan { background: var(--rs-grad); }
.badge-diskon { background: var(--rs-danger); left: auto; right: 12px; }
.badge-stok { background: var(--rs-muted); }
.badge-stok.habis { background: var(--rs-danger); }
.badge-stok.menipis { background: var(--rs-warning); }
.product-card .body {
  padding: 1rem 1.15rem 1.2rem; display: flex; flex-direction: column; flex-grow: 1;
}
.product-card .cat {
  font-size: .7rem; color: var(--rs-primary); text-transform: uppercase; letter-spacing: 1.5px; font-weight: 700;
}
.product-card h5 {
  font-weight: 700; font-size: 1rem; margin: .35rem 0 .5rem;
  color: var(--rs-dark); line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 2.7em;
}
.product-card .price { font-weight: 800; color: var(--rs-primary); font-size: 1.1rem; }
.product-card .price-old { color: #9aa0a6; text-decoration: line-through; font-size: .85rem; margin-left: .4rem; font-weight: 500; }
.product-card .btn-detail {
  margin-top: .9rem; background: var(--rs-dark); color: #fff;
  border-radius: 50px; padding: .55rem 1rem; font-size: .85rem; font-weight: 600;
  text-align: center; transition: .25s var(--rs-ease);
  display: flex; align-items: center; justify-content: center; gap: .35rem;
}
.product-card .btn-detail:hover {
  background: var(--rs-grad); color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(230, 57, 70, .3);
}

/* ===== Category Card ===== */
.cat-card {
  display: flex; align-items: center; gap: .95rem;
  padding: 1.2rem 1.3rem; border-radius: var(--rs-radius);
  background: #fff; border: 1px solid var(--rs-border);
  transition: .3s var(--rs-ease); height: 100%;
  position: relative;
  overflow: hidden;
}
.cat-card::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--rs-grad-soft);
  opacity: 0;
  transition: .3s var(--rs-ease);
}
.cat-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--rs-shadow-hover);
  border-color: rgba(230, 57, 70, .2);
}
.cat-card:hover::before { opacity: 1; }
.cat-card > * { position: relative; z-index: 1; }
.cat-card .icon {
  width: 52px; height: 52px; border-radius: 16px;
  background: var(--rs-grad);
  color: #fff;
  display: grid; place-items: center; font-size: 1.4rem; flex-shrink: 0;
  box-shadow: 0 8px 16px rgba(230, 57, 70, .25);
  transition: .3s var(--rs-ease-bounce);
}
.cat-card:hover .icon { transform: scale(1.1) rotate(-5deg); }
.cat-card h6 { font-weight: 700; margin: 0; font-size: 1rem; color: var(--rs-dark); }
.cat-card small { color: var(--rs-muted); font-weight: 500; }

/* ===== Section padding ===== */
.section-pad { padding: 4.5rem 0; }
.section-pad-sm { padding: 2.5rem 0; }

/* ===== Promo Card ===== */
.promo-card {
  border-radius: var(--rs-radius); overflow: hidden;
  background: #fff; box-shadow: var(--rs-shadow);
  border: 1px solid var(--rs-border); height: 100%;
  transition: .3s var(--rs-ease);
  position: relative;
}
.promo-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--rs-shadow-hover);
}
.promo-card .head {
  height: 130px; background: var(--rs-grad);
  display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 2rem;
  position: relative;
  letter-spacing: 1px;
}
.promo-card .head::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, .2) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(255, 255, 255, .15) 0%, transparent 45%);
}
.promo-card .head::after {
  content: '';
  position: absolute; bottom: -1px; left: 0; right: 0;
  height: 20px;
  background: #fff;
  -webkit-mask: radial-ellipse(50% 100% at 50% 0%, transparent 50%, #000 50%);
  mask: radial-ellipse(50% 100% at 50% 0%, transparent 50%, #000 50%);
}
.promo-card .body { padding: 1.2rem; }
.promo-card h6 { font-weight: 700; }
.promo-card .diskon { color: var(--rs-danger); font-weight: 800; font-size: 1.1rem; }

/* ===== Feature box ===== */
.feature-box {
  text-align: center; padding: 2rem 1.2rem;
  background: #fff;
  border-radius: var(--rs-radius);
  border: 1px solid var(--rs-border);
  transition: .3s var(--rs-ease);
  height: 100%;
}
.feature-box:hover {
  transform: translateY(-6px);
  box-shadow: var(--rs-shadow-hover);
  border-color: rgba(230, 57, 70, .2);
}
.feature-box .icon {
  width: 68px; height: 68px; border-radius: 20px;
  background: var(--rs-grad-soft);
  color: var(--rs-primary);
  display: grid; place-items: center; font-size: 1.7rem;
  margin: 0 auto 1rem;
  transition: .3s var(--rs-ease);
}
.feature-box:hover .icon {
  background: var(--rs-grad);
  color: #fff;
  transform: scale(1.08);
  box-shadow: 0 10px 24px rgba(230, 57, 70, .25);
}
.feature-box h6 { font-weight: 700; color: var(--rs-dark); }
.feature-box p { color: var(--rs-muted); font-size: .9rem; }

/* ===== Footer ===== */
.footer-rs {
  background: var(--rs-grad-dark);
  color: #c9ccd1;
  padding: 4rem 0 1.5rem;
  margin-top: 4rem;
  position: relative;
  overflow: hidden;
}
.footer-rs::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--rs-grad);
}
.footer-rs h6 { color: #fff; font-weight: 700; margin-bottom: 1.1rem; letter-spacing: .3px; font-size: 1.05rem; }
.footer-rs a { color: #b9bcc4; transition: .2s var(--rs-ease); }
.footer-rs a:hover { color: var(--rs-accent); padding-left: 4px; }
.footer-rs .social {
  width: 42px; height: 42px; border-radius: 14px;
  background: rgba(255, 255, 255, .08); color: #fff;
  display: grid; place-items: center; transition: .3s var(--rs-ease);
  font-size: 1.1rem;
}
.footer-rs .social:hover {
  background: var(--rs-grad);
  transform: translateY(-3px) rotate(6deg);
  box-shadow: 0 8px 18px rgba(230, 57, 70, .35);
}
.footer-rs .footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .1);
  margin-top: 2.5rem; padding-top: 1.8rem;
  font-size: .88rem; color: #8a8d96;
}

/* ===== Page Header ===== */
.page-header {
  background: var(--rs-grad);
  color: #fff;
  padding: 3rem 0 3.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-header::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 255, 255, .15) 0%, transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(255, 255, 255, .12) 0%, transparent 45%);
  pointer-events: none;
}
.page-header::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 40px;
  background: var(--rs-bg);
  -webkit-mask: radial-ellipse(80% 100% at 50% 0%, transparent 50%, #000 50%);
  mask: radial-ellipse(80% 100% at 50% 0%, transparent 50%, #000 50%);
  pointer-events: none;
}
.page-header h1 { font-weight: 800; font-size: clamp(1.7rem, 4vw, 2.4rem); margin: 0; letter-spacing: -.5px; }
.page-header .breadcrumb {
  justify-content: center; background: transparent;
  margin: .7rem 0 0; padding: 0;
  position: relative;
}
.page-header .breadcrumb-item, .page-header .breadcrumb-item a {
  color: rgba(255, 255, 255, .9);
}
.page-header .breadcrumb-item.active { color: #fff; font-weight: 600; }
.page-header .breadcrumb-item + .breadcrumb-item::before { color: rgba(255, 255, 255, .6); }

/* ===== Detail Product ===== */
.detail-gallery .main-img {
  border-radius: var(--rs-radius-lg); overflow: hidden;
  background: linear-gradient(135deg, #FFF5F1 0%, #FFE9E0 100%);
  aspect-ratio: 1; margin-bottom: .8rem;
  box-shadow: var(--rs-shadow-md);
  position: relative;
}
.detail-gallery .main-img img { width: 100%; height: 100%; object-fit: cover; }
.detail-gallery .thumb {
  border-radius: 14px; overflow: hidden; aspect-ratio: 1;
  background: #f4f5f7; cursor: pointer; border: 2px solid transparent;
  transition: .25s var(--rs-ease);
}
.detail-gallery .thumb.active, .detail-gallery .thumb:hover {
  border-color: var(--rs-primary);
  transform: translateY(-2px);
}
.detail-gallery .thumb img { width: 100%; height: 100%; object-fit: cover; }
.detail-info h1 { font-weight: 800; font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -.5px; }
.detail-info .price-big { font-weight: 800; color: var(--rs-primary); font-size: 1.8rem; }
.detail-info .price-old-big { color: #9aa0a6; text-decoration: line-through; font-size: 1.05rem; margin-left: .55rem; }
.detail-info .stock-info { font-size: .9rem; }

/* ===== Form control ===== */
.form-control, .form-select {
  border-radius: 12px; padding: .7rem 1rem;
  border: 1.5px solid var(--rs-border); transition: .2s var(--rs-ease);
  background: #fff;
  font-size: .95rem;
}
.form-control:focus, .form-select:focus {
  border-color: var(--rs-primary); box-shadow: 0 0 0 4px rgba(230, 57, 70, .12);
  background: #fff;
}
.form-control::placeholder { color: var(--rs-muted-2); }
.form-label { font-weight: 600; font-size: .88rem; margin-bottom: .4rem; color: var(--rs-dark); }

/* ===== Admin sidebar ===== */
.admin-sidebar {
  background: var(--rs-grad-dark);
  color: #c9ccd1;
  min-height: 100vh; position: sticky; top: 0;
  padding: 1.4rem 0;
  box-shadow: 4px 0 20px rgba(0, 0, 0, .08);
}
.admin-sidebar .brand {
  color: #fff; font-weight: 800; font-size: 1.25rem;
  padding: 0 1.3rem 1.2rem; display: flex; align-items: center; gap: .6rem;
  border-bottom: 1px solid rgba(255, 255, 255, .08); margin-bottom: 1rem;
}
.admin-sidebar .nav-link {
  color: #b9bcc4; padding: .8rem 1.3rem;
  display: flex; align-items: center; gap: .85rem;
  border-radius: 0; font-weight: 500; font-size: .92rem;
  transition: .25s var(--rs-ease); border-left: 3px solid transparent;
}
.admin-sidebar .nav-link:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.admin-sidebar .nav-link.active {
  background: linear-gradient(90deg, rgba(230, 57, 70, .18), transparent);
  color: #fff;
  border-left-color: var(--rs-primary);
}
.admin-sidebar .nav-link i { width: 22px; text-align: center; font-size: 1.05rem; }

.admin-topbar {
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(12px);
  padding: .85rem 1.4rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .04);
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 1010;
  border-bottom: 1px solid var(--rs-border);
}
.admin-content { padding: 1.7rem; min-height: 100vh; background: var(--rs-bg); }

/* ===== Stat card (admin) ===== */
.stat-card {
  background: #fff; border-radius: var(--rs-radius);
  padding: 1.5rem; box-shadow: var(--rs-shadow);
  border: 1px solid var(--rs-border); height: 100%;
  display: flex; align-items: center; gap: 1.1rem;
  transition: .3s var(--rs-ease);
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; right: 0; width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--rs-grad-soft);
  transform: translate(30px, -30px);
  opacity: .5;
}
.stat-card:hover { transform: translateY(-4px); box-shadow: var(--rs-shadow-hover); }
.stat-card > * { position: relative; z-index: 1; }
.stat-card .icon {
  width: 60px; height: 60px; border-radius: 18px;
  display: grid; place-items: center; font-size: 1.5rem; color: #fff; flex-shrink: 0;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .12);
}
.stat-card .icon.red { background: linear-gradient(135deg, #E63946, #F77F00); }
.stat-card .icon.green { background: linear-gradient(135deg, #16A34A, #34D399); }
.stat-card .icon.blue { background: linear-gradient(135deg, #2563EB, #60A5FA); }
.stat-card .icon.yellow { background: linear-gradient(135deg, #F59E0B, #FBBF24); }
.stat-card .icon.purple { background: linear-gradient(135deg, #8B5CF6, #C084FC); }
.stat-card .label { color: var(--rs-muted); font-size: .82rem; font-weight: 500; }
.stat-card .value { font-weight: 800; font-size: 1.5rem; color: var(--rs-dark); line-height: 1.1; }

/* ===== Card general ===== */
.card-rs {
  background: #fff; border-radius: var(--rs-radius);
  box-shadow: var(--rs-shadow); border: 1px solid var(--rs-border);
  padding: 1.5rem;
  transition: .3s var(--rs-ease);
}
.card-rs .card-rs-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 1.3rem; flex-wrap: wrap; gap: .5rem;
}
.card-rs .card-rs-title { font-weight: 700; margin: 0; font-size: 1.12rem; color: var(--rs-dark); }

/* ===== Table ===== */
.table-rs { width: 100%; }
.table-rs thead th {
  font-size: .76rem; text-transform: uppercase; letter-spacing: .6px;
  color: var(--rs-muted); font-weight: 700; border-bottom: 2px solid var(--rs-border);
  padding: .95rem .85rem; white-space: nowrap;
  background: var(--rs-bg-2);
}
.table-rs tbody td { padding: .9rem .85rem; vertical-align: middle; border-bottom: 1px solid var(--rs-border); }
.table-rs tbody tr { transition: .2s var(--rs-ease); }
.table-rs tbody tr:hover { background: rgba(230, 57, 70, .03); }
.table-rs img.thumb-tbl { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; box-shadow: 0 4px 8px rgba(0, 0, 0, .08); }

/* ===== Badge status ===== */
.badge-status { padding: .35rem .8rem; border-radius: 50px; font-size: .74rem; font-weight: 700; letter-spacing: .3px; }
.badge-pending { background: #FEF3C7; color: #92400E; }
.badge-diproses { background: #DBEAFE; color: #1E40AF; }
.badge-dikirim { background: #E0E7FF; color: #4338CA; }
.badge-selesai { background: #D1FAE5; color: #065F46; }
.badge-batal { background: #FEE2E2; color: #991B1B; }
.badge-aktif { background: #D1FAE5; color: #065F46; }
.badge-nonaktif { background: #F3F4F6; color: #4B5563; }

/* ===== Loading overlay ===== */
.rs-loading {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(255, 255, 255, .9); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 1rem;
}
.rs-spinner {
  width: 60px; height: 60px; border-radius: 50%;
  border: 4px solid rgba(230, 57, 70, .15);
  border-top-color: var(--rs-primary);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.rs-loading-text { font-weight: 600; color: var(--rs-primary); letter-spacing: .5px; }

/* ===== Reveal animation ===== */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--rs-ease), transform .7s var(--rs-ease); }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ===== WhatsApp float button ===== */
.wa-float {
  position: fixed;
  bottom: 24px; right: 24px;
  width: 58px; height: 58px;
  background: #25D366;
  color: #fff;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 1.8rem;
  box-shadow: 0 8px 24px rgba(37, 211, 102, .5);
  z-index: 1000;
  transition: .3s var(--rs-ease);
  text-decoration: none;
  animation: pulse-wa 2.5s infinite;
}
.wa-float:hover {
  transform: scale(1.1) rotate(-5deg);
  color: #fff;
  box-shadow: 0 12px 32px rgba(37, 211, 102, .6);
}
@keyframes pulse-wa {
  0%, 100% { box-shadow: 0 8px 24px rgba(37, 211, 102, .5), 0 0 0 0 rgba(37, 211, 102, .5); }
  50% { box-shadow: 0 8px 24px rgba(37, 211, 102, .5), 0 0 0 14px rgba(37, 211, 102, 0); }
}

/* ===== Banner carousel ===== */
.banner-carousel-item {
  min-height: 240px;
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: center;
}
.banner-carousel-item::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(230, 57, 70, .92) 0%, rgba(247, 127, 0, .75) 50%, rgba(247, 127, 0, .4) 100%);
}
.banner-carousel-item .banner-content {
  position: relative;
  z-index: 2;
}

/* ===== Testimonial / quote ===== */
.testimonial-card {
  background: #fff;
  border-radius: var(--rs-radius);
  padding: 2rem;
  box-shadow: var(--rs-shadow);
  border: 1px solid var(--rs-border);
  height: 100%;
  position: relative;
}
.testimonial-card::before {
  content: '"';
  position: absolute;
  top: -10px; right: 24px;
  font-size: 6rem;
  color: var(--rs-grad-soft);
  font-family: serif;
  line-height: 1;
}

/* ===== Mobile tweaks ===== */
@media (max-width: 991px) {
  .hero-rs { padding: 3rem 0 4rem; }
  .section-pad { padding: 3rem 0; }
  .admin-sidebar {
    position: fixed; left: -100%; top: 0; width: 280px;
    z-index: 1100; transition: .3s var(--rs-ease);
  }
  .admin-sidebar.show { left: 0; }
  .admin-content { padding: 1.2rem; }
}

@media (max-width: 768px) {
  .section-pad { padding: 2.5rem 0; }
  .hero-rs { padding: 2.5rem 0 3.5rem; }
  .stat-card .value { font-size: 1.25rem; }
  .table-rs { font-size: .85rem; }
  .table-rs thead th, .table-rs tbody td { padding: .6rem .45rem; }
  .product-card .body { padding: .85rem .9rem 1rem; }
  .wa-float { width: 50px; height: 50px; font-size: 1.6rem; bottom: 18px; right: 18px; }
}

@media (max-width: 576px) {
  .navbar-rs .navbar-brand { font-size: 1.15rem; }
  .navbar-rs .brand-logo { width: 34px; height: 34px; font-size: .9rem; }
  .hero-rs h1 { font-size: 1.85rem; }
  .section-title { font-size: 1.4rem; }
  .btn-rs, .btn-outline-rs { padding: .65rem 1.3rem; font-size: .9rem; }
}

/* Prevent horizontal scroll for offcanvas / table wrappers */
.table-responsive { -webkit-overflow-scrolling: touch; }
.btn { white-space: nowrap; }

/* Utility */
.text-grad {
  background: var(--rs-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* =====================================================
   CHECKOUT MODAL - Modern Snap Popup
   ===================================================== */
.rs-checkout-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 20, 40, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1080;
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s var(--rs-ease), visibility .35s var(--rs-ease);
  padding: 1rem;
  overflow-y: auto;
}
.rs-checkout-overlay.show {
  opacity: 1;
  visibility: visible;
}
.rs-checkout-modal {
  width: 100%;
  max-width: 880px;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 30px 80px rgba(20, 20, 40, 0.25);
  overflow: hidden;
  transform: translateY(30px) scale(.96);
  opacity: 0;
  transition: transform .4s var(--rs-ease-bounce), opacity .35s var(--rs-ease);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
}
.rs-checkout-overlay.show .rs-checkout-modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* Header */
.rs-checkout-modal .rs-ch-header {
  background: var(--rs-grad);
  color: #fff;
  padding: 1.25rem 1.5rem;
  position: relative;
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-shrink: 0;
}
.rs-checkout-modal .rs-ch-header .icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.2);
  display: grid;
  place-items: center;
  font-size: 1.3rem;
}
.rs-checkout-modal .rs-ch-header h4 {
  margin: 0;
  font-weight: 800;
  font-size: 1.15rem;
}
.rs-checkout-modal .rs-ch-header small {
  opacity: .9;
  display: block;
  font-size: .8rem;
  margin-top: 2px;
}
.rs-checkout-modal .rs-ch-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: 0;
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  transition: .25s var(--rs-ease);
  display: grid;
  place-items: center;
}
.rs-checkout-modal .rs-ch-close:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: rotate(90deg);
}

/* Body */
.rs-checkout-modal .rs-ch-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

/* Product preview in checkout */
.rs-ch-product {
  display: flex;
  gap: 1rem;
  padding: .85rem;
  background: var(--rs-bg-2);
  border-radius: 14px;
  margin-bottom: 1.25rem;
  align-items: center;
}
.rs-ch-product img {
  width: 70px;
  height: 70px;
  border-radius: 12px;
  object-fit: cover;
  background: #fff;
}
.rs-ch-product .info { flex: 1; min-width: 0; }
.rs-ch-product .info h6 { margin: 0 0 .25rem; font-weight: 700; font-size: 1rem; }
.rs-ch-product .info .meta { font-size: .85rem; color: var(--rs-muted); }
.rs-ch-product .info .price { color: var(--rs-primary); font-weight: 800; }

/* Form inputs inside checkout */
.rs-checkout-modal .form-control,
.rs-checkout-modal .form-select {
  border-radius: 12px;
  border: 1.5px solid var(--rs-border);
  padding: .65rem .9rem;
  font-size: .95rem;
  transition: .2s var(--rs-ease);
}
.rs-checkout-modal .form-control:focus,
.rs-checkout-modal .form-select:focus {
  border-color: var(--rs-primary);
  box-shadow: 0 0 0 4px rgba(230, 57, 70, .1);
}
.rs-checkout-modal label {
  font-size: .85rem;
  font-weight: 600;
  margin-bottom: .35rem;
  color: var(--rs-dark);
}

/* Payment method cards */
.rs-pay-methods {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .75rem;
  margin-top: .5rem;
}
@media (max-width: 600px) {
  .rs-pay-methods { grid-template-columns: 1fr; }
}
.rs-pay-card {
  border: 2px solid var(--rs-border);
  border-radius: 16px;
  padding: 1rem .85rem;
  cursor: pointer;
  transition: .25s var(--rs-ease);
  text-align: center;
  background: #fff;
  position: relative;
}
.rs-pay-card:hover {
  border-color: var(--rs-primary-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(230, 57, 70, .08);
}
.rs-pay-card.active {
  border-color: var(--rs-primary);
  background: linear-gradient(135deg, rgba(230, 57, 70, .06), rgba(247, 127, 0, .06));
  box-shadow: 0 8px 22px rgba(230, 57, 70, .15);
}
.rs-pay-card .ic {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  margin: 0 auto .5rem;
  font-size: 1.4rem;
  background: var(--rs-grad-soft);
  color: var(--rs-primary);
}
.rs-pay-card.active .ic { background: var(--rs-grad); color: #fff; }
.rs-pay-card h6 { margin: 0; font-size: .92rem; font-weight: 700; }
.rs-pay-card small { color: var(--rs-muted); font-size: .75rem; }
.rs-pay-card .check {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--rs-primary);
  color: #fff;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
}
.rs-pay-card.active .check { display: flex; }

/* Bank selector pills */
.rs-bank-pills {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .75rem;
}
.rs-bank-pill {
  padding: .5rem .9rem;
  border: 2px solid var(--rs-border);
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  font-size: .85rem;
  background: #fff;
  transition: .25s var(--rs-ease);
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}
.rs-bank-pill:hover { border-color: var(--rs-primary-light); }
.rs-bank-pill.active {
  border-color: var(--rs-primary);
  background: var(--rs-primary);
  color: #fff;
}

/* Footer / summary */
.rs-checkout-modal .rs-ch-footer {
  padding: 1rem 1.5rem;
  background: #fff;
  border-top: 1px solid var(--rs-border);
  flex-shrink: 0;
}
.rs-ch-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: .75rem;
  flex-wrap: wrap;
  gap: .5rem;
}
.rs-ch-summary .lbl { font-size: .85rem; color: var(--rs-muted); }
.rs-ch-summary .total {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--rs-primary);
  letter-spacing: -.5px;
}
.rs-checkout-modal .btn-confirm-checkout {
  width: 100%;
  background: var(--rs-grad);
  color: #fff;
  border: 0;
  padding: .9rem 1rem;
  border-radius: 14px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: .25s var(--rs-ease);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  box-shadow: 0 8px 24px rgba(230, 57, 70, .3);
}
.rs-checkout-modal .btn-confirm-checkout:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(230, 57, 70, .4);
}
.rs-checkout-modal .btn-confirm-checkout:disabled {
  opacity: .65;
  cursor: not-allowed;
}

/* Success state */
.rs-ch-success {
  text-align: center;
  padding: 1rem .5rem;
}
.rs-ch-success .check-ic {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: linear-gradient(135deg, #16A34A, #34D399);
  color: #fff;
  font-size: 2.5rem;
  display: grid;
  place-items: center;
  margin: 0 auto 1rem;
  animation: rsPop .5s var(--rs-ease-bounce);
  box-shadow: 0 12px 30px rgba(22, 163, 74, .3);
}
@keyframes rsPop {
  0% { transform: scale(0); }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); }
}
.rs-ch-success h4 { font-weight: 800; margin-bottom: .5rem; }
.rs-ch-success .invoice-badge {
  display: inline-block;
  background: var(--rs-grad-soft);
  color: var(--rs-primary);
  padding: .35rem .85rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: .9rem;
  margin: .5rem 0 1rem;
}
.rs-ch-payment-info {
  background: var(--rs-bg-2);
  border-radius: 14px;
  padding: 1rem;
  text-align: left;
  margin: 1rem 0;
}
.rs-ch-payment-info h6 { font-weight: 700; margin-bottom: .5rem; }
.rs-ch-payment-info .row-info {
  display: flex;
  justify-content: space-between;
  padding: .35rem 0;
  border-bottom: 1px dashed var(--rs-border);
  font-size: .9rem;
}
.rs-ch-payment-info .row-info:last-child { border-bottom: 0; }
.rs-ch-payment-info .row-info .val { font-weight: 700; }
.rs-ch-payment-info .copy-btn {
  background: var(--rs-primary);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: .2rem .6rem;
  font-size: .8rem;
  cursor: pointer;
  margin-left: .5rem;
}

/* QRIS placeholder */
.rs-ch-qris-img {
  width: 180px;
  height: 180px;
  margin: 0 auto;
  background: repeating-conic-gradient(#000 0 25%, #fff 0 50%) 50% / 12px 12px;
  border: 8px solid #fff;
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .15);
  position: relative;
}
.rs-ch-qris-img::after {
  content: "QRIS";
  position: absolute;
  inset: auto 0 -28px 0;
  text-align: center;
  font-weight: 800;
  color: var(--rs-primary);
  font-size: .85rem;
  letter-spacing: 2px;
}

/* Conditional hidden */
.rs-conditional { display: none; }
.rs-conditional.show { display: block; }

/* Quick checkout button on cards */
.btn-checkout-now {
  background: var(--rs-grad);
  border: 0;
  color: #fff;
  font-weight: 700;
  border-radius: 12px;
  padding: .55rem .9rem;
  font-size: .9rem;
  cursor: pointer;
  transition: .25s var(--rs-ease);
  box-shadow: 0 6px 16px rgba(230, 57, 70, .25);
}
.btn-checkout-now:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(230, 57, 70, .35);
  color: #fff;
}

/* Smooth scroll lock when modal open */
body.rs-modal-open { overflow: hidden; }

