/* ==========================================================================
   rise-theme.css — storefront redesign
   Loaded AFTER style.css, so it overrides the old look.
   Brand colour comes from Admin theme: var(--primary)  (set in dynamic-theme)
   ========================================================================== */

:root {
  --rise-ink: #0a0a0a;
  --rise-black: #000;
  --rise-white: #fff;
  --rise-line: #e6e6e6;
  --rise-muted: #6b6b6b;
  --rise-bg-soft: #f6f6f6;
  --rise-accent: var(--primary, #d80000);
  --rise-font: 'Poppins', 'Hind Siliguri', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --rise-topbar-h: 72px;
  --rise-navbar-h: 42px;
  --rise-container: 1320px;
}

body.rise-no-scroll { overflow: hidden; }

/* ==========================================================================
   1. HEADER — white top bar
   ========================================================================== */
.rise-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #fff;
  font-family: var(--rise-font);
}
.rise-header.is-scrolled { box-shadow: 0 2px 14px rgba(0, 0, 0, .12); }

.rise-topbar {
  background: #fff;
  height: var(--rise-topbar-h);
}
.rise-topbar-inner {
  position: relative;
  height: 100%;
  padding: 0 clamp(16px, 5.2vw, 110px);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}

.rise-top-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.rise-helpline {
  font-size: 13px;
  color: var(--rise-ink);
  text-decoration: none;
  white-space: nowrap;
}
.rise-helpline strong { font-weight: 700; letter-spacing: .1px; }

.rise-logo { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.rise-logo img {
  display: block;
  height: 42px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
}

.rise-top-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
  min-width: 0;
}

/* search = underline field, like the reference */
.rise-search {
  position: relative;
  width: 160px;
  max-width: 100%;
  transition: width .25s ease;
}
.rise-search:focus-within { width: 240px; }
.rise-search input[type="search"] {
  width: 100%;
  height: 30px;
  border: 0;
  border-bottom: 1px solid #222;
  border-radius: 0;
  background: transparent;
  padding: 0 30px 0 0;
  font: 400 12.5px/1 var(--rise-font);
  color: var(--rise-ink);
  outline: none;
  box-shadow: none;
  -webkit-appearance: none;
  appearance: none;
}
.rise-search input[type="search"]::placeholder { color: #333; }
.rise-search input[type="search"]::-webkit-search-cancel-button { display: none; }
.rise-search-btn {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: none;
  color: var(--rise-ink);
  cursor: pointer;
}

.rise-icon-btn {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: var(--rise-ink);
  text-decoration: none;
  background: none;
  border: 0;
  padding: 0;
  line-height: 1;
}
.rise-icon-btn:hover { color: var(--rise-accent); }

@media (min-width: 992px) {
  .rise-icon-btn svg { width: 26px; height: auto; }
  .rise-search-btn svg { width: 24px; height: auto; }
  .rise-cart .cart-count { top: -6px; right: -9px; }
}

/* live-search dropdown */
.rise-search-results {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 360px;
  max-width: calc(100vw - 32px);
  max-height: 420px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--rise-line);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .16);
  z-index: 30;
}
.rise-search-results.is-open { display: block; }
.rise-search-results ul { list-style: none; margin: 0; padding: 0; }
.rise-search-results a { display: block; color: inherit; text-decoration: none; }
.rise-search-results li {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid #f0f0f0;
}
.rise-search-results a:hover li { background: var(--rise-bg-soft); }
.rise-search-results .search_img img { width: 48px; height: 58px; object-fit: cover; display: block; }
.rise-search-results .search_content .name { margin: 0 0 3px; font-size: 12.5px; font-weight: 500; line-height: 1.35; }
.rise-search-results .search_content .price { margin: 0; font-size: 12.5px; font-weight: 700; }
.rise-search-results .search_content .price del { color: #999; font-weight: 400; margin-left: 4px; }
.rise-search-empty { padding: 18px; text-align: center; font-size: 12.5px; color: var(--rise-muted); }

/* cart (class names kept for main.js) */
.rise-cart { position: relative; }
.rise-cart .cart-amount { display: none; }
.rise-cart .cart-count {
  position: absolute;
  top: -7px;
  right: -9px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: #000;
  color: #fff;
  font: 600 10px/17px var(--rise-font);
  text-align: center;
}

.rise-cart .cart-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 14px);
  right: -12px;
  left: auto;
  width: 340px;
  max-width: calc(100vw - 24px);
  background: #fff;
  color: var(--rise-ink);
  border: 1px solid var(--rise-line);
  border-radius: 0;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .16);
  z-index: 40;
  opacity: 1;
  visibility: visible;
  transform: none;
}
.rise-cart::after { /* hover bridge so the menu doesn't close in the gap */
  content: '';
  position: absolute;
  left: -10px; right: -10px; top: 100%;
  height: 16px;
}
@media (hover: hover) {
  .rise-cart:hover .cart-dropdown { display: block; }
}
.rise-cart.open .cart-dropdown,
.rise-cart.active .cart-dropdown,
.rise-cart .cart-dropdown.show,
.rise-cart .cart-dropdown.open,
.rise-cart .cart-dropdown.active { display: block; }

.rise-cart .cart-dropdown-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 13px 16px; border-bottom: 1px solid var(--rise-line);
  font-size: 12px; text-transform: uppercase; letter-spacing: .08em;
}
.rise-cart .cart-dropdown-title { font-weight: 700; }
.rise-cart .cart-dropdown-count { color: var(--rise-muted); }
.rise-cart .cart-dropdown-body { max-height: 300px; overflow-y: auto; }
.rise-cart .mini-cart-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 16px; border-bottom: 1px solid #f2f2f2;
}
.rise-cart .mini-cart-thumb img { width: 48px; height: 58px; object-fit: cover; display: block; }
.rise-cart .mini-cart-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.rise-cart .mini-cart-name { font-size: 12.5px; font-weight: 500; color: var(--rise-ink); text-decoration: none; line-height: 1.35; }
.rise-cart .mini-cart-meta { font-size: 11.5px; color: var(--rise-muted); }
.rise-cart .mini-cart-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.rise-cart .mini-cart-line { font-size: 12.5px; font-weight: 700; }
.rise-cart .mini-cart-remove { background: none; border: 0; color: #aaa; cursor: pointer; padding: 0; font-size: 14px; }
.rise-cart .mini-cart-remove:hover { color: var(--rise-accent); }
.rise-cart .mini-cart-empty { padding: 34px 16px; text-align: center; color: var(--rise-muted); font-size: 13px; }
.rise-cart .mini-cart-empty i { font-size: 26px; margin-bottom: 8px; display: block; color: #ccc; }
.rise-cart .mini-cart-empty p { margin: 0; }
.rise-cart .cart-dropdown-foot { padding: 14px 16px 16px; background: #fafafa; }
.rise-cart .mini-cart-total { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; margin-bottom: 12px; }
.rise-cart .mini-cart-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rise-cart .mini-cart-view,
.rise-cart .mini-cart-checkout {
  display: block; text-align: center; padding: 11px 8px;
  font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  text-decoration: none; border: 1px solid #000; border-radius: 0;
}
.rise-cart .mini-cart-view { background: #fff; color: #000; }
.rise-cart .mini-cart-checkout { background: #000; color: #fff; }
.rise-cart .mini-cart-view:hover { background: #000; color: #fff; }
.rise-cart .mini-cart-checkout:hover { background: var(--rise-accent); border-color: var(--rise-accent); }

/* ==========================================================================
   2. HEADER — black category bar
   ========================================================================== */
.rise-nav {
  background: #000;
  height: var(--rise-navbar-h);
}
.rise-nav-list {
  list-style: none;
  margin: 0;
  padding: 0 16px;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: stretch;
  flex-wrap: nowrap;
  overflow: visible;
}
.rise-nav-item { position: relative; display: flex; align-items: stretch; }
.rise-nav-link {
  display: inline-flex;
  align-items: center;
  padding: 0 18px;
  color: #fff;
  font: 500 12.5px/1 var(--rise-font);
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  transition: color .15s ease;
}
.rise-nav-link::after {
  content: '';
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 8px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s ease;
}
.rise-nav-item:hover > .rise-nav-link::after,
.rise-nav-link.is-active::after { transform: scaleX(1); }

/* mega-ish dropdown */
.rise-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 220px;
  padding: 22px 26px 24px;
  background: #fff;
  color: var(--rise-ink);
  border-top: 2px solid #000;
  box-shadow: 0 22px 44px rgba(0, 0, 0, .18);
  z-index: 60;
  column-gap: 40px;
  columns: 1;
}
.rise-nav-item.has-dropdown:hover > .rise-dropdown,
.rise-nav-item.has-dropdown:focus-within > .rise-dropdown { display: block; }
.rise-nav-item.has-dropdown:nth-last-child(-n+2) > .rise-dropdown { left: auto; right: 0; transform: none; }

.rise-dd-group { break-inside: avoid; margin-bottom: 14px; min-width: 160px; }
.rise-dd-group:last-child { margin-bottom: 0; }
.rise-dd-title {
  display: block;
  margin-bottom: 6px;
  font: 600 11.5px/1.3 var(--rise-font);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #000;
  text-decoration: none;
}
.rise-dd-link {
  display: block;
  padding: 4px 0;
  font: 400 12.5px/1.35 var(--rise-font);
  color: #555;
  text-decoration: none;
  white-space: nowrap;
}
.rise-dd-title:hover,
.rise-dd-link:hover { color: var(--rise-accent); }
.rise-nav-item:nth-child(n) > .rise-dropdown:has(.rise-dd-group:nth-child(5)) { columns: 2; }
.rise-nav-item:nth-child(n) > .rise-dropdown:has(.rise-dd-group:nth-child(10)) { columns: 3; }

/* ==========================================================================
   3. MOBILE DRAWER + burger
   ========================================================================== */
.rise-burger {
  display: none;
  width: 34px; height: 34px;
  padding: 7px 6px;
  background: none; border: 0; cursor: pointer;
  flex-direction: column; justify-content: space-between;
}
.rise-burger span { display: block; height: 2px; width: 100%; background: #000; }

.rise-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, .55);
  opacity: 0; visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
  z-index: 1900;
}
.rise-overlay.is-open { opacity: 1; visibility: visible; }

.rise-drawer {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: min(86vw, 340px);
  background: #fff;
  transform: translateX(-102%);
  transition: transform .28s ease;
  z-index: 2000;
  display: flex; flex-direction: column;
  font-family: var(--rise-font);
}
.rise-drawer.is-open { transform: none; }
.rise-drawer-head {
  display: flex; justify-content: space-between; align-items: center;
  height: 54px; padding: 0 18px;
  background: #000; color: #fff;
  font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
}
.rise-drawer-close { background: none; border: 0; color: #fff; font-size: 28px; line-height: 1; cursor: pointer; }
.rise-drawer-body { flex: 1; overflow-y: auto; padding: 6px 0 24px; }
.rise-drawer-link,
.rise-drawer-sub,
.rise-drawer-child {
  display: block; text-decoration: none; color: var(--rise-ink);
}
.rise-drawer-link { padding: 14px 20px; font: 500 12.5px/1.2 var(--rise-font); letter-spacing: .07em; text-transform: uppercase; }
.rise-drawer-sub { padding: 11px 20px 11px 34px; font: 400 13px/1.3 var(--rise-font); }
.rise-drawer-child { padding: 9px 20px 9px 48px; font: 400 12.5px/1.3 var(--rise-font); color: #555; }
.rise-acc-row { display: flex; align-items: stretch; border-bottom: 1px solid #f0f0f0; }
.rise-acc-row > a { flex: 1; }
.rise-acc-toggle {
  width: 50px; background: none; border: 0; border-left: 1px solid #f0f0f0;
  cursor: pointer; color: #333; font-size: 12px;
}
.rise-acc-toggle i { transition: transform .2s ease; }
.rise-acc.is-open > .rise-acc-row .rise-acc-toggle i { transform: rotate(180deg); }
.rise-acc-panel { display: none; background: #fafafa; }
.rise-acc.is-open > .rise-acc-panel { display: block; }
.rise-drawer-extra { margin-top: 14px; border-top: 6px solid #f3f3f3; }
.rise-drawer-link strong { font-weight: 700; }

/* ==========================================================================
   4. HERO + MARQUEE BAR
   ========================================================================== */
.rise-hero { background: #000; padding: 0; margin: 0; }
.rise-hero .rise-hero-layout { display: block; max-width: none; padding: 0; margin: 0; gap: 0; }
.rise-hero .hero-layout-main { width: 100%; max-width: none; }
.rise-hero .hero-slider { border-radius: 0; width: 100%; }
.rise-hero .hero-slide img.hero-img { width: 100%; height: auto; display: block; border-radius: 0; object-fit: cover; }
.rise-hero .hero-nav {
  width: 44px; height: 44px; border-radius: 0;
  background: rgba(0, 0, 0, .45); color: #fff; border: 0;
}
.rise-hero .hero-nav:hover { background: #000; }
.rise-hero .hero-dots { bottom: 14px; }
.rise-hero .hero-dots button,
.rise-hero .hero-dots .hero-dot {
  width: 8px; height: 8px; border-radius: 50%;
}

.rise-hero-side { display: grid; gap: 12px; margin: 14px 0; grid-template-columns: repeat(2, 1fr); background: #fff; }
.rise-hero-side.hero-layout-side--1 { grid-template-columns: 1fr; }
.rise-hero-side.hero-layout-side--3 { grid-template-columns: repeat(3, 1fr); }
.rise-hero-side .hero-side-banner { display: block; overflow: hidden; }
.rise-hero-side img { display: block; width: 100%; height: auto; }

/* marquee */
.rise-marquee {
  background: #000;
  color: #fff;
  overflow: hidden;
  height: 44px;
  display: flex;
  align-items: center;
  font-family: var(--rise-font);
}
.rise-marquee-track {
  display: flex;
  flex-shrink: 0;
  width: max-content;
  animation: rise-marquee 40s linear infinite;
  will-change: transform;
}
.rise-marquee:hover .rise-marquee-track { animation-play-state: paused; }
.rise-marquee-group { display: flex; flex-shrink: 0; }
.rise-marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 0 26px 0 22px;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: .01em;
  white-space: nowrap;
}
.rise-bolt { flex-shrink: 0; transform: skewX(-8deg); }
@keyframes rise-marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .rise-marquee-track { animation: none; }
}

/* ==========================================================================
   9. RESPONSIVE
   ========================================================================== */
@media (max-width: 991px) {
  :root { --rise-topbar-h: 60px; }

  /* black bar is replaced by the drawer on tablets/phones */
  .rise-nav { display: none; }

  .rise-burger { display: inline-flex; }
  .rise-topbar-inner { padding: 0 20px 0 14px; gap: 8px; }
  .rise-helpline { display: none; }
  .rise-logo img { height: 32px; max-width: 150px; }
  .rise-top-right { gap: 12px; }

  /* search collapses to an icon-only field that expands on focus */
  .rise-search { width: 34px; }
  .rise-search input[type="search"] { padding-right: 0; border-bottom-color: transparent; cursor: pointer; }
  .rise-search input[type="search"]::placeholder { color: transparent; }
  .rise-search-btn { right: 2px; }
  .rise-search:focus-within {
    position: fixed; left: 0; right: 0; top: 0; width: 100%; height: var(--rise-topbar-h);
    background: #fff; z-index: 1500; padding: 0 56px 0 16px; display: flex; align-items: center;
  }
  .rise-search:focus-within input[type="search"] {
    border-bottom-color: #000; font-size: 14px; height: 36px; cursor: text;
  }
  .rise-search:focus-within input[type="search"]::placeholder { color: #666; }
  .rise-search:focus-within .rise-search-btn { right: 16px; }
  .rise-search:focus-within .rise-search-results {
    position: absolute; top: 100%; left: 0; right: 0; width: auto; max-width: none;
    max-height: calc(100vh - var(--rise-topbar-h) - 70px);
  }

  .rise-cart .cart-dropdown { display: none !important; } /* checkout link is used on touch */

}

@media (max-width: 575px) {
  .rise-marquee { height: 34px; }
  .rise-marquee-item { font-size: 12.5px; gap: 10px; padding: 0 18px 0 14px; }
  .rise-bolt { width: 17px; height: 17px; }
  .rise-hero-side, .rise-hero-side.hero-layout-side--3 { grid-template-columns: 1fr; }
}

@media (min-width: 992px) {
  .rise-drawer, .rise-overlay { display: none; }
}



/* ==========================================================================
   10. HEADER COLOURS — follow the admin theme (Admin → General Setting)
   Only the new header / hero / marquee are coloured here; every other part
   of the site keeps its original style.css colours.
   ========================================================================== */
:root {
  --rise-brand: var(--primary, #df2d4d);
  --rise-brand-dark: var(--primary-dark, #b72040);
  --rise-on-brand: #fff;
}
.rise-nav,
.rise-hero,
.rise-marquee,
.rise-drawer-head { background: var(--rise-brand); color: var(--rise-on-brand); }
.rise-nav-link,
.rise-drawer-close { color: var(--rise-on-brand); }
.rise-dropdown { border-top-color: var(--rise-brand); }
.rise-icon-btn:hover,
.rise-dd-title:hover,
.rise-dd-link:hover { color: var(--rise-brand); }
.rise-cart .cart-count { background: var(--rise-brand); color: var(--rise-on-brand); }
.rise-cart .mini-cart-view,
.rise-cart .mini-cart-checkout { border-color: var(--rise-brand); }
.rise-cart .mini-cart-view { color: var(--rise-brand); background: #fff; }
.rise-cart .mini-cart-checkout { background: var(--rise-brand); color: var(--rise-on-brand); }
.rise-cart .mini-cart-view:hover,
.rise-cart .mini-cart-checkout:hover { background: var(--rise-brand-dark); border-color: var(--rise-brand-dark); color: var(--rise-on-brand); }
.rise-search input[type="search"]:focus { border-bottom-color: var(--rise-brand); }
.rise-hero .hero-nav:hover { background: var(--rise-brand); }
