/* ============================================================
   Mihan Pharmed — Storefront Redesign
   Premium B2B medical / lab e-commerce
   Linked after brand.css. Does not rebuild 1-Theme.
   ============================================================ */

@font-face {
  font-family: "Vazirmatn";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/vazirmatn/Vazirmatn-Regular.woff2") format("woff2");
}
@font-face {
  font-family: "Vazirmatn";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/vazirmatn/Vazirmatn-Medium.woff2") format("woff2");
}
@font-face {
  font-family: "Vazirmatn";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/vazirmatn/Vazirmatn-SemiBold.woff2") format("woff2");
}
@font-face {
  font-family: "Vazirmatn";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/vazirmatn/Vazirmatn-Bold.woff2") format("woff2");
}
@font-face {
  font-family: "Vazirmatn";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("fonts/vazirmatn/Vazirmatn-ExtraBold.woff2") format("woff2");
}

:root {
  --rd-primary: #1e196b;
  --rd-primary-600: #2a2589;
  --rd-primary-700: #16124f;
  --rd-primary-800: #100d3a;
  --rd-primary-50: #f4f3fb;
  --rd-primary-100: #e8e6f6;
  --rd-ink: #16142a;
  --rd-muted: #5b5872;
  --rd-line: #e6e4f0;
  --rd-bg: #ffffff;
  --rd-bg-soft: #f7f6fb;
  --rd-radius: 20px;
  --rd-radius-sm: 14px;
  --rd-shadow: 0 8px 28px rgba(30, 25, 107, 0.08);
  --rd-shadow-lg: 0 18px 48px rgba(30, 25, 107, 0.12);
  --rd-ease: 200ms cubic-bezier(0.22, 1, 0.36, 1);
  --rd-space: 8px;
}

html {
  scroll-behavior: smooth;
}

html[dir="rtl"],
html[dir="rtl"] body,
.rd-auth-body {
  --default-font-family: "Vazirmatn", Tahoma, Arial, sans-serif;
  font-family: "Vazirmatn", "payda", Tahoma, Arial, sans-serif !important;
}

body.brand-body {
  font-family: "Vazirmatn", "payda", Tahoma, Arial, sans-serif;
  background: var(--rd-bg-soft) !important;
  color: var(--rd-ink);
  line-height: 1.7;
  letter-spacing: 0;
}

.brand-body [lang="en"],
.brand-body .en-label {
  letter-spacing: -0.02em;
}

:focus-visible {
  outline: 2px solid var(--rd-primary);
  outline-offset: 3px;
}

@keyframes rd-fade-up {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.rd-fade {
  animation: rd-fade-up 280ms var(--rd-ease) both;
}

/* ---------- Header glass ---------- */
.brand-header {
  background: rgba(255, 255, 255, 0.82) !important;
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  border-bottom: 1px solid rgba(30, 25, 107, 0.08) !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6), 0 8px 24px rgba(30, 25, 107, 0.04);
  transition: box-shadow var(--rd-ease), background var(--rd-ease);
}

.brand-header.is-scrolled {
  background: rgba(255, 255, 255, 0.94) !important;
  box-shadow: 0 8px 28px rgba(30, 25, 107, 0.08);
}

.brand-header .search-input {
  border-radius: 999px !important;
  background: var(--rd-primary-50) !important;
  border: 1px solid transparent !important;
  min-height: 48px;
  transition: border-color var(--rd-ease), box-shadow var(--rd-ease), background var(--rd-ease);
}

.brand-header .search-input:focus {
  background: #fff !important;
  border-color: var(--rd-primary) !important;
  box-shadow: 0 0 0 4px rgba(30, 25, 107, 0.12);
}

.brand-header .nav-link-brand {
  padding: 0.4rem 0;
  position: relative;
}

.brand-header .nav-link-brand::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: -2px;
  height: 2px;
  background: var(--rd-primary);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--rd-ease);
}

.brand-header .nav-link-brand:hover::after {
  transform: scaleX(1);
}

.mega-dropdown-brand > div {
  border-radius: var(--rd-radius-sm) !important;
  box-shadow: var(--rd-shadow-lg) !important;
  border-color: var(--rd-line) !important;
}

/* ---------- Buttons ---------- */
.btn-gold,
.btn-navy {
  border-radius: 14px;
  min-height: 48px;
  padding: 0.75rem 1.4rem;
  box-shadow: 0 8px 20px rgba(30, 25, 107, 0.18);
}

.btn-gold:hover,
.btn-navy:hover {
  transform: translateY(-2px);
}

.btn-outline-navy,
.btn-outline-gold {
  border-radius: 14px;
  min-height: 48px;
  background: #fff;
}

.btn-sm {
  min-height: 40px;
  padding: 0.45rem 1rem;
}

/* ---------- Cards ---------- */
.card-brand,
.card-product,
.blog-card,
.info-card,
.brand-card,
.filter-sidebar,
.summary-card {
  border-radius: var(--rd-radius);
  border-color: var(--rd-line);
  box-shadow: 0 1px 2px rgba(30, 25, 107, 0.04);
}

.card-product:hover,
.card-brand:hover,
.blog-card:hover,
.info-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--rd-shadow-lg);
  border-color: rgba(30, 25, 107, 0.22);
}

.card-product .card-product-img {
  background: linear-gradient(180deg, #fff 0%, var(--rd-primary-50) 100%);
  border-bottom: 1px solid var(--rd-line);
}

.card-product .card-product-price {
  font-size: 1rem;
}

/* Shop product tiles that still use theme markup */
.rd-product-tile,
.product-grid-item {
  background: #fff;
  border: 1px solid var(--rd-line);
  border-radius: var(--rd-radius);
  box-shadow: 0 1px 2px rgba(30, 25, 107, 0.04);
  transition: transform var(--rd-ease), box-shadow var(--rd-ease), border-color var(--rd-ease);
  height: 100%;
}

.rd-product-tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--rd-shadow-lg);
  border-color: rgba(30, 25, 107, 0.22);
}

/* ---------- Page hero ---------- */
.page-hero {
  background:
    radial-gradient(circle at 12% 20%, rgba(255, 255, 255, 0.16), transparent 32%),
    linear-gradient(135deg, #1e196b 0%, #2a2589 52%, #100d3a 100%);
  padding: 2.5rem 0 2.75rem;
}

.page-hero h1 {
  letter-spacing: 0;
  line-height: 1.5;
}

.section-title {
  font-size: 1.5rem;
  letter-spacing: 0;
}

.section-title::after,
.section-title::before {
  height: 3px;
  border-radius: 99px;
}

/* ---------- Icons ---------- */
.rd-icon {
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

/* ---------- Patterned sections ---------- */
.rd-section--pattern {
  background-image: url("images/redesign/mihan-bg-pattern.png");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
}

/* ---------- Landing ---------- */
.rd-hero {
  position: relative;
  overflow: hidden;
  padding: 2.5rem 0 3rem;
  color: var(--rd-ink);
  background-color: #f4f2fb;
  background-image:
    radial-gradient(900px 420px at 12% 0%, rgba(255, 255, 255, 0.92), transparent 55%),
    url("images/redesign/mihan-bg-pattern.png");
  background-repeat: no-repeat;
  background-size: cover;
}

.rd-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 1.75rem;
  align-items: center;
}

@media (min-width: 992px) {
  .rd-hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: 2.5rem;
  }
}

.rd-hero-copy {
  max-width: 36rem;
}

.rd-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(30, 25, 107, 0.08);
  border: 1px solid rgba(30, 25, 107, 0.12);
  color: var(--rd-primary);
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 1.15rem;
}

.rd-hero h1 {
  font-size: clamp(1.7rem, 3.8vw, 2.85rem);
  font-weight: 800;
  line-height: 1.55;
  letter-spacing: 0;
  margin-bottom: 1rem;
  color: var(--rd-primary-800);
}

.rd-hero .rd-lead {
  font-size: 1.05rem;
  color: var(--rd-muted);
  max-width: 34rem;
  margin-bottom: 1.5rem;
}

.rd-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.rd-hero-actions .btn-gold {
  box-shadow: 0 10px 28px rgba(30, 25, 107, 0.2);
}

.rd-trust-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
}

.rd-trust-pills li {
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--rd-line);
  color: var(--rd-primary);
  font-size: 0.8rem;
  font-weight: 600;
}

.rd-hero-art {
  position: relative;
}

.rd-hero-art img {
  width: 100%;
  max-height: 460px;
  object-fit: contain;
  display: block;
}

.rd-stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.rd-stat-row div {
  background: #fff;
  border: 1px solid var(--rd-line);
  border-radius: 16px;
  padding: 0.85rem 0.6rem;
  text-align: center;
}

.rd-stat-row strong {
  display: block;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--rd-primary);
}

.rd-stat-row span {
  font-size: 0.75rem;
  color: var(--rd-muted);
}

.rd-pathway-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

@media (min-width: 900px) {
  .rd-pathway-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.rd-pathway {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--rd-line);
  border-radius: var(--rd-radius);
  overflow: hidden;
  min-height: 100%;
  transition: transform var(--rd-ease), box-shadow var(--rd-ease), border-color var(--rd-ease);
}

.rd-pathway:hover {
  transform: translateY(-4px);
  box-shadow: var(--rd-shadow-lg);
  border-color: rgba(30, 25, 107, 0.22);
}

.rd-pathway-media {
  aspect-ratio: 16 / 10;
  background: #f7f5ff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.rd-pathway-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rd-pathway-body {
  padding: 1rem 1.1rem 1.15rem;
}

.rd-pathway h3 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--rd-primary);
  margin-bottom: 0.2rem;
}

.rd-pathway p {
  font-size: 0.82rem;
  color: var(--rd-muted);
  margin: 0;
}

.rd-trust-visual {
  background: #fff;
  border: 1px solid var(--rd-line);
  border-radius: 28px;
  padding: 1.25rem 1rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--rd-shadow);
}

.rd-trust-visual img {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  display: block;
  margin-inline: auto;
}

.rd-section {
  padding: 4rem 0;
}

.rd-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.rd-kicker {
  color: var(--rd-primary);
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.rd-cat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

@media (min-width: 768px) {
  .rd-cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1100px) {
  .rd-cat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.rd-cat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
  padding: 1.25rem 1rem;
  background: #fff;
  border: 1px solid var(--rd-line);
  border-radius: var(--rd-radius);
  min-height: 100%;
  transition: transform var(--rd-ease), box-shadow var(--rd-ease), border-color var(--rd-ease);
}

.rd-cat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--rd-shadow);
  border-color: rgba(30, 25, 107, 0.25);
}

.rd-cat-card .rd-cat-media {
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--rd-primary-50);
  border-radius: 16px;
  overflow: hidden;
}

.rd-cat-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.75rem;
}

.rd-cat-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--rd-primary);
}

.rd-trust-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 768px) {
  .rd-trust-grid { grid-template-columns: repeat(4, 1fr); }
}

.rd-trust-card {
  background: #fff;
  border: 1px solid var(--rd-line);
  border-radius: var(--rd-radius);
  padding: 1.5rem;
  height: 100%;
}

.rd-trust-card .rd-ico {
  width: 3rem;
  height: 3rem;
  border-radius: 14px;
  background: var(--rd-primary-50);
  color: var(--rd-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.rd-trust-card h3 {
  font-weight: 800;
  color: var(--rd-primary);
  margin-bottom: 0.35rem;
}

.rd-trust-card p {
  color: var(--rd-muted);
  font-size: 0.9rem;
}

.rd-cta {
  border-radius: 28px;
  padding: 3rem 1.5rem;
  text-align: center;
  background:
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.12), transparent 40%),
    linear-gradient(135deg, #1e196b, #2a2589 50%, #100d3a);
  color: #fff;
}

.rd-empty {
  background: #fff;
  border: 1px dashed var(--rd-line);
  border-radius: var(--rd-radius);
  padding: 3rem 1.5rem;
  text-align: center;
}

.rd-empty .rd-empty-ico {
  width: 4.5rem;
  height: 4.5rem;
  margin: 0 auto 1rem;
  border-radius: 20px;
  background: var(--rd-primary-50);
  color: var(--rd-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.rd-empty-art {
  width: min(280px, 80%);
  height: auto;
  margin: 0 auto 1.25rem;
  display: block;
}

.rd-about-hero {
  position: relative;
  overflow: hidden;
  padding: 2.5rem 0 3rem;
  background-color: #f4f2fb;
  background-image:
    radial-gradient(800px 360px at 10% 0%, rgba(255, 255, 255, 0.9), transparent 50%),
    url("images/redesign/mihan-bg-pattern.png");
  background-repeat: no-repeat;
  background-size: cover;
}

.rd-about-grid {
  display: grid;
  gap: 1.75rem;
  align-items: center;
}

@media (min-width: 900px) {
  .rd-about-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  }
}

.rd-about-copy h1 {
  color: var(--rd-primary-800);
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  font-weight: 800;
  line-height: 1.4;
  margin-bottom: 1rem;
}

.rd-about-copy p {
  color: var(--rd-muted);
  max-width: 36rem;
}

.rd-about-art img {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  display: block;
}

.rd-page-pattern {
  background-image: url("images/redesign/mihan-bg-pattern.png");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
}

/* ---------- Shop / filters ---------- */
.filter-sidebar,
.sticky .drop-shadow-lg,
aside .bg-white.rounded-lg {
  border-radius: var(--rd-radius) !important;
  border-color: var(--rd-line) !important;
  box-shadow: none !important;
}

/* ---------- Product detail ---------- */
.format-card {
  border: 1.5px solid var(--rd-line);
  background: #fff !important;
  border-radius: 16px !important;
  transition: border-color var(--rd-ease), box-shadow var(--rd-ease), background var(--rd-ease);
}

.format-card:hover,
.format-card.ring-2 {
  border-color: var(--rd-primary) !important;
  background: var(--rd-primary-50) !important;
  box-shadow: 0 0 0 4px rgba(30, 25, 107, 0.08);
}

/* ---------- Footer ---------- */
.brand-footer {
  background: #100d3a;
}

.brand-footer .footer-services {
  background: #16124f;
}

.brand-footer .footer-services .rounded-full {
  background: rgba(255, 255, 255, 0.1);
}

.brand-footer .footer-services svg {
  color: #fff !important;
}

/* ---------- Mobile bottom nav ---------- */
.brand-bottom-nav {
  background: rgba(255, 255, 255, 0.94) !important;
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--rd-line) !important;
  box-shadow: 0 -10px 30px rgba(30, 25, 107, 0.08);
}

.brand-bottom-nav a,
.brand-bottom-nav button {
  color: var(--rd-primary) !important;
}

.brand-bottom-nav .nav-icon-circle {
  background: var(--rd-primary-50) !important;
  color: var(--rd-primary);
}

.brand-bottom-nav .nav-center-btn {
  background: var(--rd-primary) !important;
  color: #fff !important;
  border-color: #fff !important;
}

.brand-bottom-nav #mobile-cart-count {
  background: var(--rd-primary) !important;
  color: #fff !important;
}

/* ---------- Auth / OTP ---------- */
.rd-auth-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--rd-bg-soft);
  background-image:
    radial-gradient(800px 400px at 10% 0%, rgba(30, 25, 107, 0.08), transparent 50%),
    url("images/redesign/mihan-bg-pattern.png");
  background-repeat: no-repeat;
  background-size: cover;
  font-family: "Vazirmatn", "payda", Tahoma, Arial, sans-serif;
}

.rd-auth-shell {
  width: 100%;
  max-width: 56rem;
  margin: auto;
  display: grid;
  gap: 1.5rem;
  align-items: center;
  padding: 2.5rem 0;
}

@media (min-width: 900px) {
  .rd-auth-shell {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }
}

.rd-auth-visual {
  display: none;
  text-align: center;
}

@media (min-width: 900px) {
  .rd-auth-visual { display: block; }
}

.rd-auth-visual img {
  width: 100%;
  max-height: 340px;
  object-fit: contain;
}

.rd-auth-card {
  width: 100%;
  max-width: 28rem;
  margin-inline: auto;
  background: #fff;
  border: 1px solid var(--rd-line);
  border-radius: 24px;
  box-shadow: var(--rd-shadow-lg);
  padding: 2rem 1.5rem;
}

.rd-auth-card h2 {
  color: var(--rd-primary);
  font-weight: 800;
}

.rd-auth-card input[type="text"],
.rd-auth-card input[type="tel"],
.rd-otp-box {
  border-radius: 14px;
  border: 1.5px solid var(--rd-line);
  min-height: 48px;
}

.rd-auth-card input:focus,
.rd-otp-box:focus {
  border-color: var(--rd-primary);
  box-shadow: 0 0 0 4px rgba(30, 25, 107, 0.12);
  outline: none;
}

.rd-otp-box {
  width: 2.75rem;
  height: 3.25rem;
  text-align: center;
  font-size: 1.15rem;
  font-weight: 700;
}

/* ---------- Offcanvas ---------- */
#offcanvas-left > .flex > div:first-child,
#offcanvas-right > .flex > div:first-child {
  background: var(--rd-primary) !important;
}

/* ---------- Alerts / toasts ---------- */
.alert-brand {
  border-radius: 14px;
}

/* Dark mode */
.dark body.brand-body,
.dark .rd-auth-body {
  background: #0d1117 !important;
}

.dark .rd-cat-card,
.dark .rd-trust-card,
.dark .rd-product-tile,
.dark .rd-empty,
.dark .rd-auth-card {
  background: #1a2332;
  border-color: #2d3a4a;
}

.dark .rd-cat-card h3,
.dark .rd-trust-card h3 {
  color: #e5e7eb;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ============================================================
   Navbar mega menu / drawer / bottom nav (2026 redesign)
   ============================================================ */

.rd-transparent-art,
.rd-cat-media img,
.nav-cat-thumb img,
.rd-empty-art,
.rd-hero-visual img,
.rd-pathway-card img,
.rd-pathway-media img,
.rd-cat-card img,
.cat-card img,
.mega-rail-item img {
  background: transparent !important;
  mix-blend-mode: normal;
}

.rd-cat-card .rd-cat-media,
.cat-card,
.rd-pathway-media {
  background: transparent !important;
}

.rd-cat-card .rd-cat-media {
  background: var(--rd-primary-50) !important;
}

/* Header layout */
.rd-header-inner {
  padding-block: 0.65rem 0.55rem;
}

.rd-header-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: space-between;
}

.rd-logo-link {
  display: inline-flex;
  flex-shrink: 0;
}

.rd-search-pill {
  margin-inline: 0.5rem 1rem;
}

.rd-action-cluster {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

.rd-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem;
  border-radius: 12px;
  transition: background var(--rd-ease), transform var(--rd-ease);
  background: transparent;
  border: 0;
  cursor: pointer;
  color: inherit;
}

.rd-icon-btn:hover {
  background: rgba(30, 25, 107, 0.06);
}

.rd-header-divider {
  width: 1px;
  height: 1.75rem;
  background: rgba(30, 25, 107, 0.14);
  margin-inline: 0.45rem;
}

.rd-nav-row {
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.55rem;
  padding-top: 0.55rem;
  border-top: 1px solid rgba(30, 25, 107, 0.08);
}

.rd-primary-nav {
  display: flex;
  align-items: center;
  gap: 1.35rem;
}

.rd-phone-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: rgba(30, 25, 107, 0.08);
  color: var(--rd-primary);
  font-size: 0.85rem;
  font-weight: 700;
  transition: background var(--rd-ease), transform var(--rd-ease);
}

.rd-phone-chip:hover {
  background: rgba(30, 25, 107, 0.14);
}

/* Mega panel */
.mega-wrap {
  position: relative;
}

.mega-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.mega-chevron {
  transition: transform 180ms var(--rd-ease);
}

[data-mega].is-open .mega-chevron,
.mega-wrap:hover .mega-chevron {
  transform: rotate(180deg);
}

.mega-panel {
  position: absolute;
  top: calc(100% + 0.65rem);
  inset-inline-start: 0;
  width: min(920px, 92vw);
  background: #fff;
  border: 1px solid var(--rd-line);
  border-radius: 20px;
  box-shadow: var(--rd-shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 200ms var(--rd-ease), transform 200ms var(--rd-ease), visibility 200ms;
  z-index: 60;
  overflow: hidden;
}

[data-mega].is-open .mega-panel,
.mega-wrap:hover .mega-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

@media (hover: none) {
  .mega-wrap:hover .mega-panel {
    opacity: 0;
    visibility: hidden;
  }
  [data-mega].is-open .mega-panel {
    opacity: 1;
    visibility: visible;
  }
}

.mega-panel-inner {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: 320px;
  max-height: min(70vh, 480px);
}

.mega-rail {
  background: var(--rd-primary-50);
  border-inline-end: 1px solid var(--rd-line);
  overflow-y: auto;
  padding: 0.5rem;
}

.mega-rail-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.7rem;
  border-radius: 12px;
  color: var(--rd-ink);
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 180ms var(--rd-ease), color 180ms var(--rd-ease);
}

.mega-rail-item:hover,
.mega-rail-item.is-active {
  background: #fff;
  color: var(--rd-primary);
  box-shadow: 0 1px 4px rgba(30, 25, 107, 0.06);
}

.mega-rail-label {
  line-height: 1.4;
}

.nav-cat-thumb {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  overflow: hidden;
  flex-shrink: 0;
}

.nav-cat-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.15rem;
}

.nav-cat-thumb--sm {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 8px;
}

.nav-cat-thumb--xs {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 6px;
}

.mega-panes {
  position: relative;
  overflow: hidden;
}

.mega-pane {
  display: none;
  padding: 1.1rem 1.25rem 1.25rem;
  overflow-y: auto;
  max-height: min(70vh, 480px);
  animation: rd-fade-up 200ms var(--rd-ease) both;
}

.mega-pane.is-active {
  display: block;
}

.mega-pane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.mega-pane-head h3 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--rd-primary);
  margin: 0;
}

.mega-pane-all {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--rd-primary);
  opacity: 0.8;
}

.mega-pane-all:hover {
  opacity: 1;
  text-decoration: underline;
}

.mega-child-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem;
}

@media (min-width: 900px) {
  .mega-child-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.mega-child-grid a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  font-size: 0.86rem;
  color: var(--rd-ink);
  transition: background 180ms var(--rd-ease), color 180ms var(--rd-ease);
}

.mega-child-grid a:hover {
  background: var(--rd-primary-50);
  color: var(--rd-primary);
}

.mega-pane-empty {
  color: var(--rd-muted);
  font-size: 0.9rem;
  margin: 0.5rem 0 0;
}

.mega-panel-foot {
  border-top: 1px solid var(--rd-line);
  padding: 0.7rem 1.15rem;
  background: #faf9fd;
}

.mega-panel-foot a {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--rd-primary);
}

.mega-panel-foot a:hover {
  text-decoration: underline;
}

/* Mobile drawer */
.rd-drawer-head {
  background: var(--rd-primary);
}

.brand-logo-img--drawer {
  height: 28px;
  width: auto;
  filter: brightness(0) invert(1);
}

.rd-drawer-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-weight: 600;
  color: var(--rd-ink);
  transition: background 180ms var(--rd-ease);
}

.rd-drawer-link:hover {
  background: rgba(30, 25, 107, 0.06);
}

.rd-drawer-link--sub {
  font-weight: 500;
  font-size: 0.9rem;
  padding-block: 0.55rem;
  color: var(--rd-muted);
}

.rd-drawer-link--accent {
  color: var(--rd-primary);
  background: rgba(30, 25, 107, 0.08);
}

.rd-drawer-link--danger {
  color: #dc2626;
}

.rd-acc {
  margin-block: 0.35rem 0.75rem;
}

.rd-acc-label {
  padding: 0.35rem 1rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--rd-primary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.rd-acc-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 1rem;
  border: 0;
  background: transparent;
  border-radius: 12px;
  font-weight: 700;
  color: var(--rd-ink);
  cursor: pointer;
  transition: background 180ms var(--rd-ease);
}

.rd-acc-toggle:hover {
  background: rgba(30, 25, 107, 0.06);
}

.rd-acc-chevron {
  transition: transform 180ms var(--rd-ease);
}

.rd-acc-item.is-open .rd-acc-chevron {
  transform: rotate(180deg);
}

.rd-acc-panel {
  display: none;
  padding-inline-start: 0.5rem;
  padding-bottom: 0.35rem;
}

.rd-acc-item.is-open .rd-acc-panel {
  display: block;
  animation: rd-fade-up 180ms var(--rd-ease) both;
}

/* Bottom nav */
.rd-bottom-nav {
  padding-bottom: max(0.35rem, env(safe-area-inset-bottom));
}

.rd-bottom-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: end;
  color: #fff;
}

.rd-bottom-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding: 0.35rem 0.2rem;
  opacity: 0.85;
  transition: opacity 180ms var(--rd-ease), transform 180ms var(--rd-ease);
}

.rd-bottom-tab .nav-icon-circle {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
}

.rd-bottom-tab.is-active {
  opacity: 1;
}

.rd-bottom-tab.is-active .nav-icon-circle {
  background: rgba(255, 255, 255, 0.18);
}

.rd-bottom-label {
  font-size: 0.68rem;
  font-weight: 600;
}

.rd-bottom-center {
  width: 58px;
  height: 58px;
  margin-top: -22px;
  margin-inline: auto;
  border-radius: 999px;
  border: 3px solid rgba(255, 255, 255, 0.85);
  background: linear-gradient(145deg, #2a2589, #1e196b);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
}

.rd-bottom-badge {
  position: absolute;
  top: 2px;
  inset-inline-end: 2px;
  min-width: 18px;
  height: 18px;
  padding-inline: 4px;
  border-radius: 999px;
  background: #fff;
  color: var(--rd-primary);
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Category list polish */
.rd-cat-page .rd-cat-card .rd-cat-media {
  background: linear-gradient(180deg, #f7f5ff 0%, transparent 100%) !important;
}

.rd-cat-page .rd-cat-card img {
  background: transparent !important;
}

.dark .mega-panel,
.dark .mega-rail-item.is-active,
.dark .mega-rail-item:hover {
  background: #111827;
  color: #e5e7eb;
}

.dark .mega-rail {
  background: #0b1220;
  border-color: #1f2937;
}

.dark .mega-panel-foot {
  background: #0b1220;
  border-color: #1f2937;
}

/* ===== NAVBAR rd-mega / glass / transparent-art (append) ===== */
.rd-mega {
  position: relative;
}

.rd-mega.is-open .mega-chevron,
.rd-mega.is-open .rd-mega-chevron {
  transform: rotate(180deg);
}

.rd-mega.is-open .mega-panel,
.rd-mega.is-open .rd-mega-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

@media (hover: none) {
  .rd-mega:hover .mega-panel,
  .rd-mega:hover .rd-mega-panel {
    opacity: 0;
    visibility: hidden;
  }
  .rd-mega.is-open .mega-panel,
  .rd-mega.is-open .rd-mega-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
}

.rd-transparent-art {
  background: transparent !important;
  mix-blend-mode: multiply;
  object-fit: contain;
}

.dark .rd-transparent-art {
  mix-blend-mode: normal;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.25));
}

.nav-cat-thumb {
  background: transparent;
}

.rd-bottom-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.rd-bottom-tab.is-active .rd-bottom-label {
  color: #fff;
}
