/* ================================================================
 * Raj Collection Sequel — Layout primitives
 * Container, header, utility marquee, drawer, footer, bottom-nav,
 * page wrappers, sticky areas.
 * ================================================================ */

/* ---------- CONTAINER ---------- */
.rcs-container {
  width: 100%;
  max-width: 100%;
  padding-left: var(--rcs-gutter);
  padding-right: var(--rcs-gutter);
  margin-left: auto;
  margin-right: auto;
}
.rcs-container-bleed { width: 100%; }

/* ---------- BODY OFFSETS ---------- */
body {
  padding-bottom: calc(var(--rcs-bottom-nav-h) + var(--rcs-safe-bottom));
}
body.rcs-has-sticky-bar {
  padding-bottom: calc(var(--rcs-bottom-nav-h) + 76px + var(--rcs-safe-bottom));
}

/* ---------- UTILITY MARQUEE (top promo bar) ---------- */
.rcs-utility {
  background: var(--rcs-primary);
  color: var(--rcs-text-inverse);
  font-size: var(--rcs-size-xs);
  letter-spacing: var(--rcs-track-ui);
  text-transform: uppercase;
  font-weight: var(--rcs-fw-semi);
  overflow: hidden;
  position: relative;
  z-index: calc(var(--rcs-z-sticky) - 1);
}
.rcs-utility__inner {
  overflow: hidden;
  display: flex;
}
.rcs-utility__track {
  display: flex;
  gap: var(--rcs-space-7);
  padding: 8px 0;
  white-space: nowrap;
  flex: 0 0 auto;
  will-change: transform;
  animation: rcs-marquee 38s linear infinite;
  /* duplicated content makes infinite loop */
}
.rcs-utility__item {
  display: inline-flex;
  align-items: center;
  gap: var(--rcs-space-2);
  flex: 0 0 auto;
}
.rcs-utility__item .rcs-ico { color: var(--rcs-accent); font-size: var(--rcs-size-base); }
.rcs-utility__dot {
  width: 4px; height: 4px;
  border-radius: var(--rcs-r-pill);
  background: rgba(255, 255, 255, 0.4);
  align-self: center;
}
@keyframes rcs-marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.rcs-utility:hover .rcs-utility__track { animation-play-state: paused; }

/* ---------- HEADER ---------- */
.rcs-header {
  position: sticky;
  top: 0;
  z-index: var(--rcs-z-sticky);
  background: var(--rcs-canvas);
  border-bottom: 1px solid transparent;
  transition: background var(--rcs-dur-4) var(--rcs-ease-out),
              border-color var(--rcs-dur-4) var(--rcs-ease-out),
              box-shadow var(--rcs-dur-4) var(--rcs-ease-out);
}
.rcs-header.is-scrolled {
  background: rgba(250, 246, 240, 0.94);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom-color: var(--rcs-outline);
  box-shadow: var(--rcs-shadow-sm);
}
.rcs-header__inner {
  display: grid;
  grid-template-columns: 44px 1fr 44px 44px;
  align-items: center;
  gap: var(--rcs-space-2);
  min-height: 56px;
  padding: 8px var(--rcs-gutter);
}
.rcs-header__menu, .rcs-header__search, .rcs-header__cart {
  width: 44px; height: 44px;
  display: inline-flex;
  align-items: center; justify-content: center;
  color: var(--rcs-text);
  border-radius: var(--rcs-r-4);
  position: relative;
  transition: background var(--rcs-dur-2) var(--rcs-ease-out),
              transform var(--rcs-dur-1) var(--rcs-ease-out);
}
.rcs-header__menu:active, .rcs-header__search:active, .rcs-header__cart:active {
  background: rgba(28, 26, 25, 0.05);
  transform: scale(0.94);
}
.rcs-header__menu .rcs-ico, .rcs-header__search .rcs-ico, .rcs-header__cart .rcs-ico {
  font-size: 22px;
}
.rcs-header__brand {
  font-family: var(--rcs-font-display);
  font-size: var(--rcs-size-2xl);
  font-weight: var(--rcs-fw-medium);
  color: var(--rcs-primary);
  text-align: center;
  letter-spacing: -0.005em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: font-size var(--rcs-dur-4) var(--rcs-ease-out);
}
.rcs-header.is-scrolled .rcs-header__brand {
  font-size: var(--rcs-size-xl);
}

/* Cart badge */
.rcs-badge-cart {
  position: absolute;
  top: 4px; right: 4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--rcs-primary);
  color: var(--rcs-text-inverse);
  font-family: var(--rcs-font-ui);
  font-size: 10px;
  font-weight: var(--rcs-fw-bold);
  line-height: 18px;
  text-align: center;
  border-radius: var(--rcs-r-pill);
  box-shadow: 0 0 0 2px var(--rcs-canvas);
}

/* Desktop: horizontal nav appears, hamburger hides */
.rcs-header__desktop-nav { display: none; }
@media (min-width: 769px) {
  .rcs-header__inner {
    grid-template-columns: auto 1fr auto auto auto;
  }
  .rcs-header__menu { display: none; }
  .rcs-header__brand { text-align: left; font-size: var(--rcs-size-3xl); }
  .rcs-header__desktop-nav {
    display: flex;
    gap: var(--rcs-space-7);
    align-items: center;
    justify-content: center;
  }
  .rcs-header__desktop-nav a {
    font-size: var(--rcs-size-sm);
    font-weight: var(--rcs-fw-semi);
    letter-spacing: var(--rcs-track-ui);
    text-transform: uppercase;
    color: var(--rcs-text);
    padding: 8px 4px;
  }
  .rcs-header__desktop-nav a:hover { color: var(--rcs-primary); }
}

/* ---------- DRAWER (mobile menu) ---------- */
.rcs-drawer {
  position: fixed;
  inset: 0;
  z-index: var(--rcs-z-drawer);
  pointer-events: none;
  visibility: hidden;
}
.rcs-drawer[data-open="true"] { pointer-events: auto; visibility: visible; }
.rcs-drawer__scrim {
  position: absolute;
  inset: 0;
  background: rgba(28, 26, 25, 0.50);
  opacity: 0;
  transition: opacity var(--rcs-dur-4) var(--rcs-ease-out);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.rcs-drawer[data-open="true"] .rcs-drawer__scrim { opacity: 1; }
.rcs-drawer__panel {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 86%;
  max-width: 360px;
  background: var(--rcs-canvas);
  transform: translateX(-100%);
  transition: transform var(--rcs-dur-5) var(--rcs-ease-out);
  box-shadow: 8px 0 32px rgba(28, 26, 25, 0.18);
  overflow-y: auto;
  padding: var(--rcs-space-6) var(--rcs-gutter-lg) calc(var(--rcs-space-9) + var(--rcs-safe-bottom));
  will-change: transform;
  display: flex;
  flex-direction: column;
}
.rcs-drawer[data-open="true"] .rcs-drawer__panel { transform: translateX(0); }
.rcs-drawer__close {
  width: 44px; height: 44px;
  border-radius: var(--rcs-r-4);
  display: inline-flex;
  align-items: center; justify-content: center;
  margin-left: -10px;
  color: var(--rcs-text);
}
.rcs-drawer__close:active { background: rgba(28, 26, 25, 0.06); }
.rcs-drawer__brand {
  font-family: var(--rcs-font-display);
  font-size: var(--rcs-size-3xl);
  color: var(--rcs-primary);
  margin: var(--rcs-space-3) 0 var(--rcs-space-6);
  font-weight: var(--rcs-fw-medium);
}
.rcs-drawer__group { margin-bottom: var(--rcs-space-6); }
.rcs-drawer__group h5 {
  font-family: var(--rcs-font-ui);
  font-size: var(--rcs-size-xs);
  letter-spacing: var(--rcs-track-display);
  text-transform: uppercase;
  color: var(--rcs-text-subtle);
  margin: 0 0 var(--rcs-space-2);
  font-weight: var(--rcs-fw-bold);
}
.rcs-drawer__group a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--rcs-space-3) 0;
  font-family: var(--rcs-font-display);
  font-size: var(--rcs-size-xl);
  color: var(--rcs-text);
  border-bottom: 1px solid var(--rcs-outline);
}
.rcs-drawer__group a:active { color: var(--rcs-primary); }
.rcs-drawer__group a .rcs-ico { color: var(--rcs-text-subtle); font-size: var(--rcs-size-base); }
.rcs-drawer__cta {
  margin-top: auto;
  padding-top: var(--rcs-space-6);
  display: flex;
  flex-direction: column;
  gap: var(--rcs-space-3);
}

/* ---------- FOOTER ---------- */
.rcs-footer {
  background: var(--rcs-canvas);
  padding: var(--rcs-space-7) 0 var(--rcs-space-6);
  margin-top: var(--rcs-space-9);
  border-top: 1px solid var(--rcs-outline);
}
.rcs-footer__brand {
  font-family: var(--rcs-font-display);
  font-size: var(--rcs-size-3xl);
  color: var(--rcs-primary);
  font-weight: var(--rcs-fw-medium);
  margin-bottom: var(--rcs-space-3);
}
.rcs-footer__about {
  font-size: var(--rcs-size-base);
  line-height: var(--rcs-lh-relaxed);
  color: var(--rcs-text-muted);
  margin-bottom: var(--rcs-space-5);
}

/* Footer accordions (collapsible link groups) */
.rcs-footer__col {
  border-bottom: 1px solid var(--rcs-outline);
}
.rcs-footer__col summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--rcs-space-4) 0;
  font-family: var(--rcs-font-ui);
  font-size: var(--rcs-size-xs);
  font-weight: var(--rcs-fw-bold);
  letter-spacing: var(--rcs-track-display);
  text-transform: uppercase;
  color: var(--rcs-text);
}
.rcs-footer__col summary::-webkit-details-marker { display: none; }
.rcs-footer__col summary::after {
  content: "";
  width: 10px; height: 10px;
  border-right: 1.5px solid var(--rcs-text-muted);
  border-bottom: 1.5px solid var(--rcs-text-muted);
  transform: rotate(45deg);
  transition: transform var(--rcs-dur-3) var(--rcs-ease-out);
}
.rcs-footer__col[open] summary::after {
  transform: rotate(-135deg);
}
.rcs-footer__col ul { padding: 0 0 var(--rcs-space-4); }
.rcs-footer__col li { margin: 0 0 var(--rcs-space-2); }
.rcs-footer__col li a {
  font-size: var(--rcs-size-base);
  color: var(--rcs-text-muted);
}
.rcs-footer__col li a:hover { color: var(--rcs-primary); }

.rcs-footer__newsletter {
  margin: var(--rcs-space-5) 0;
  position: relative;
}
.rcs-footer__newsletter input[type="email"] {
  height: 52px;
  border-radius: var(--rcs-r-pill);
  padding: 0 116px 0 20px;
  font-size: var(--rcs-size-base);
  background: var(--rcs-field);
}
.rcs-footer__newsletter button {
  position: absolute;
  right: 4px; top: 4px;
  height: 44px;
  padding: 0 22px;
  border-radius: var(--rcs-r-pill);
  background: var(--rcs-primary);
  color: var(--rcs-text-inverse);
  font-size: var(--rcs-size-sm);
  font-weight: var(--rcs-fw-bold);
  letter-spacing: var(--rcs-track-ui);
  text-transform: uppercase;
}

.rcs-footer__socials {
  display: flex;
  justify-content: center;
  gap: var(--rcs-space-3);
  margin: var(--rcs-space-5) 0;
}
.rcs-footer__socials a {
  width: 44px; height: 44px;
  border-radius: var(--rcs-r-pill);
  border: 1.5px solid var(--rcs-outline-strong);
  display: inline-flex;
  align-items: center; justify-content: center;
  color: var(--rcs-text);
  transition: background var(--rcs-dur-2) var(--rcs-ease-out),
              border-color var(--rcs-dur-2) var(--rcs-ease-out),
              color var(--rcs-dur-2) var(--rcs-ease-out);
}
.rcs-footer__socials a:hover, .rcs-footer__socials a:active {
  background: var(--rcs-primary);
  border-color: var(--rcs-primary);
  color: var(--rcs-text-inverse);
}

.rcs-footer__copyright {
  text-align: center;
  font-size: var(--rcs-size-xs);
  color: var(--rcs-text-subtle);
  letter-spacing: var(--rcs-track-wide);
  padding: var(--rcs-space-4) 0 0;
}

/* ---------- BOTTOM NAV ---------- */
.rcs-bottom-nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: var(--rcs-z-bottom-nav);
  background: rgba(250, 246, 240, 0.96);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  border-top: 1px solid var(--rcs-outline);
  box-shadow: 0 -2px 16px rgba(28, 26, 25, 0.04);
  padding: 6px 0 calc(6px + var(--rcs-safe-bottom));
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}
.rcs-bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 9.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--rcs-text-muted);
  min-height: 54px;
  position: relative;
  font-weight: var(--rcs-fw-semi);
  transition: color var(--rcs-dur-2) var(--rcs-ease-out);
}
.rcs-bottom-nav a .rcs-ico {
  font-size: 22px;
  transition: transform var(--rcs-dur-2) var(--rcs-ease-out);
}
.rcs-bottom-nav a:active .rcs-ico { transform: scale(0.88); }
.rcs-bottom-nav a.is-active { color: var(--rcs-primary); }
.rcs-bottom-nav a.is-active::before {
  content: "";
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 32px; height: 2px;
  background: var(--rcs-primary);
  border-radius: 0 0 var(--rcs-r-1) var(--rcs-r-1);
}
.rcs-bottom-nav .rcs-badge-cart {
  position: absolute;
  top: 6px;
  left: calc(50% + 9px);
  box-shadow: 0 0 0 2px var(--rcs-canvas);
}

/* Hide bottom nav on desktop */
@media (min-width: 769px) {
  .rcs-bottom-nav { display: none; }
  body { padding-bottom: 0; }
}

/* ---------- WHATSAPP FAB ---------- */
.rcs-whatsapp-fab {
  position: fixed;
  right: var(--rcs-space-4);
  bottom: calc(var(--rcs-bottom-nav-h) + var(--rcs-space-4) + var(--rcs-safe-bottom));
  z-index: var(--rcs-z-fab);
  width: 52px; height: 52px;
  border-radius: var(--rcs-r-pill);
  background: var(--rcs-whatsapp);
  color: #fff;
  display: inline-flex;
  align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.40);
  transition: bottom var(--rcs-dur-3) var(--rcs-ease-out),
              transform var(--rcs-dur-2) var(--rcs-ease-out);
}
.rcs-whatsapp-fab:active { transform: scale(0.92); }
.rcs-whatsapp-fab .rcs-ico { font-size: 28px; }

/* Push WhatsApp FAB up when sticky bar is showing */
body.rcs-has-sticky-bar .rcs-whatsapp-fab {
  bottom: calc(var(--rcs-bottom-nav-h) + 76px + var(--rcs-space-4) + var(--rcs-safe-bottom));
}

/* Hide WhatsApp FAB on desktop OR when keyboard is open */
body.rcs-keyboard-open .rcs-whatsapp-fab {
  transform: translateY(48px);
  pointer-events: none;
}

/* ---------- SECTIONS ---------- */
.rcs-section { padding: var(--rcs-space-7) 0; }
.rcs-section--tight { padding: var(--rcs-space-5) 0; }
.rcs-section--loose { padding: var(--rcs-space-9) 0; }
.rcs-section--tinted { background: var(--rcs-section-tint); }
.rcs-section--brand { background: var(--rcs-primary); color: var(--rcs-text-inverse); }
.rcs-section--brand h1, .rcs-section--brand h2, .rcs-section--brand h3 { color: var(--rcs-text-inverse); }

.rcs-section__title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--rcs-space-4);
  margin-bottom: var(--rcs-space-4);
}
.rcs-section__title h2 {
  font-family: var(--rcs-font-display);
  font-size: var(--rcs-size-4xl);
  color: var(--rcs-text);
  font-weight: var(--rcs-fw-medium);
  margin: 0;
}
.rcs-section__title .rcs-view-all {
  font-size: var(--rcs-size-xs);
  font-weight: var(--rcs-fw-bold);
  letter-spacing: var(--rcs-track-ui);
  text-transform: uppercase;
  color: var(--rcs-primary);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-bottom: 1px solid var(--rcs-primary);
  padding-bottom: 2px;
}
