/* ═══════════════════════════════════════════════════════════════
   MODERN THEME — style.css
   Uses all settings: theme_color, navigation_color, custom_css,
   brand_color, logo, favicon, hero banners, footer menus, etc.
═══════════════════════════════════════════════════════════════ */

/* ── CSS Variables (overridden per-site by custom_styles component) ── */
:root {
  --accent:        #ef7206;
  --accent-dark:   #c95f00;
  --accent-light:  #fff3e8;
  --nav-bg:        #1a1a2e;
  --nav-text:      #ffffff;
  --text-primary:  #0f172a;
  --text-muted:    #64748b;
  --border:        #e2e8f0;
  --surface:       #f8fafc;
  --white:         #ffffff;
  --radius-sm:     6px;
  --radius-md:     10px;
  --radius-lg:     16px;
  --shadow-sm:     0 1px 3px rgba(0,0,0,.08);
  --shadow-md:     0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:     0 12px 40px rgba(0,0,0,.14);
  --transition:    0.22s cubic-bezier(0.4,0,0.2,1);
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; }
body { font-family: 'Inter', 'Rethink Sans', system-ui, sans-serif; color: var(--text-primary); background: #fff; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ── Promo Strip ── */
.promo-strip {
  background: var(--nav-bg);
  color: rgba(255,255,255,.82);
  font-size: 12.5px;
  padding: 7px 0;
  letter-spacing: .02em;
}
.promo-strip strong { color: #fff; }
.promo-strip-close {
  background: none; border: none; color: rgba(255,255,255,.5);
  font-size: 16px; cursor: pointer; line-height: 1; padding: 0 4px;
}

/* ── Desktop Header ── */
.mn-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 1000;
  box-shadow: var(--shadow-sm);
}
.mn-header-inner { padding: 14px 0; }
.mn-logo img { max-height: 44px; width: auto; }

/* Search bar */
.mn-search-wrap {
  display: flex; align-items: center;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  height: 48px;
  transition: border-color var(--transition), box-shadow var(--transition);
  overflow: hidden;
}
.mn-search-wrap:focus-within {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(239,114,6,.1);
}
.mn-search-icon { padding: 0 12px; color: var(--text-muted); flex-shrink: 0; }
.mn-search-input {
  flex: 1; border: none; background: transparent; outline: none;
  font-size: 14px; font-weight: 500; color: var(--text-primary);
  height: 100%; padding: 0 8px;
}
.mn-search-input::placeholder { color: var(--text-muted); font-weight: 400; }
.mn-search-btn {
  background: var(--accent); color: #fff; border: none;
  height: 100%; padding: 0 22px;
  font-size: 13px; font-weight: 700; letter-spacing: .06em;
  cursor: pointer; transition: background var(--transition); white-space: nowrap;
  text-transform: uppercase;
}
.mn-search-btn:hover { background: var(--accent-dark); }

/* Icon group */
.mn-icon-btn {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 10px; color: var(--text-primary);
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  border-radius: var(--radius-sm); transition: background var(--transition), color var(--transition);
  position: relative; cursor: pointer; background: none; border: none;
}
.mn-icon-btn svg { display: block; }
.mn-icon-btn:hover { background: var(--surface); color: var(--accent); }
.mn-cart-btn { background: var(--surface); }
.mn-cart-btn:hover { background: var(--accent); color: #fff; }
.mn-badge {
  position: absolute; top: 2px; right: 4px;
  background: var(--accent); color: #fff;
  font-size: 9px; font-weight: 800; min-width: 17px; height: 17px;
  border-radius: 99px; display: flex; align-items: center; justify-content: center;
  border: 2px solid #fff;
}

/* ── Mega Nav ── */
.mn-navbar {
  background: var(--nav-bg);
  border-bottom: 3px solid var(--accent);
  position: relative; z-index: 999;
}
.mn-nav-list { display: flex; align-items: stretch; list-style: none; margin: 0; padding: 0; }
.mn-nav-item { position: static; }
.mn-deals-link {
  display: flex; align-items: center; gap: 6px;
  background: var(--accent); color: #fff !important;
  padding: 12px 18px; font-size: 13px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .06em;
  border-right: 1px solid rgba(255,255,255,.15);
  transition: background var(--transition);
}
.mn-deals-link:hover { background: var(--accent-dark); }
.mn-nav-link {
  display: flex; align-items: center;
  padding: 12px 15px; color: rgba(255,255,255,.88) !important;
  font-size: 13px; font-weight: 600;
  border-bottom: 3px solid transparent;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
  white-space: nowrap;
}
.mn-nav-item:hover .mn-nav-link,
.mn-nav-link:hover {
  color: #fff !important;
  background: rgba(255,255,255,.08);
  border-bottom-color: var(--accent);
}

/* Mega panel */
.mn-mega-panel {
  display: none; position: absolute; left: 0; right: 0;
  background: #fff; border-top: 2px solid var(--accent);
  box-shadow: var(--shadow-lg);
  padding: 28px 0; z-index: 998;
}
.mn-nav-item:hover .mn-mega-panel { display: block; }
.mn-mega-col-head {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 700; color: var(--text-primary);
  padding-bottom: 8px; border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}
.mn-mega-col-head:hover { color: var(--accent); }
.mn-mega-col-icon {
  width: 42px; height: 42px; flex-shrink: 0;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); display: flex; align-items: center; justify-content: center;
  overflow: hidden; padding: 4px;
}
.mn-mega-col-icon img { max-width: 100%; max-height: 100%; object-fit: contain; }
.mn-sub-link { color: var(--text-muted); font-size: 12px; transition: color var(--transition); }
.mn-sub-link:hover { color: var(--accent); }
.mn-sub-sep { opacity: .3; margin: 0 4px; }

/* ── Live search results ── */
.mn-search-scope { position: relative; }
.mn-results-panel {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
  z-index: 9999; overflow: hidden; max-height: 420px; overflow-y: auto;
}
.mn-result-row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px; border-bottom: 1px solid #f1f5f9;
  transition: background var(--transition);
}
.mn-result-row:hover { background: var(--surface); }
.mn-result-row:last-child { border-bottom: none; }
.mn-result-img {
  width: 52px; height: 52px; flex-shrink: 0;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  background: #fff; padding: 4px;
}
.mn-result-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.mn-result-name { font-size: 13px; font-weight: 600; color: var(--text-primary); line-height: 1.35; margin-bottom: 2px; }
.mn-result-cat  { font-size: 11px; color: var(--text-muted); }
.mn-result-price { font-size: 13px; font-weight: 700; color: var(--text-primary); white-space: nowrap; margin-left: auto; }
.mn-result-empty { padding: 24px; text-align: center; font-size: 13px; color: var(--text-muted); }

/* ── Mobile Header ── */
.mn-mob-header {
  background: #fff; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 1000;
  box-shadow: var(--shadow-sm);
}
.mn-mob-top { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; }
.mn-mob-hamburger { background: none; border: none; cursor: pointer; padding: 4px; }
.mn-mob-search { padding: 0 16px 10px; }
.mn-mob-search-row {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 14px;
}
.mn-mob-search-input { flex: 1; border: none; background: transparent; outline: none; font-size: 14px; }

/* Mobile bottom nav */
.mn-bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: #fff; border-top: 1px solid var(--border);
  display: flex; height: 58px; z-index: 1000;
  box-shadow: 0 -4px 20px rgba(0,0,0,.08);
}
.mn-bnav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; text-decoration: none; color: var(--text-muted);
  font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  background: none; border: none; cursor: pointer; transition: color var(--transition);
  position: relative;
}
.mn-bnav-item.active, .mn-bnav-item:hover { color: var(--accent); }

/* Offcanvas / slide-over */
.mn-mob-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 1998; }
.mn-mob-overlay.open { display: block; }
.mn-mob-drawer {
  position: fixed; top: 0; left: 0; bottom: 0; width: min(340px, 90vw);
  background: #fff; z-index: 1999;
  transform: translateX(-100%); transition: transform .3s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column; overflow: hidden;
}
.mn-mob-drawer.open { transform: translateX(0); }
.mn-mob-drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; background: var(--nav-bg); color: #fff; flex-shrink: 0;
}
.mn-mob-drawer-close { background: none; border: none; color: rgba(255,255,255,.7); font-size: 20px; cursor: pointer; }
.mn-mob-cats { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.mn-mob-cat-btn {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 13px 18px; background: none; border: none; border-bottom: 1px solid var(--border);
  font-size: 14px; font-weight: 600; color: var(--text-primary); cursor: pointer; text-align: left;
}
.mn-mob-cat-btn:hover { background: var(--surface); color: var(--accent); }
.mn-mob-cat-icon { width: 26px; height: 26px; object-fit: contain; border-radius: 3px; }
.mn-mob-cat-arrow { margin-left: auto; font-size: 11px; color: var(--text-muted); transition: transform .2s; }
.mn-mob-sub { display: none; background: var(--surface); border-bottom: 1px solid var(--border); }
.mn-mob-sub.open { display: block; }
.mn-mob-sub-all { display: block; padding: 10px 22px; font-size: 13px; font-weight: 700; color: var(--accent); border-bottom: 1px solid var(--border); }
.mn-mob-sub-item { display: flex; align-items: center; gap: 8px; padding: 10px 22px; font-size: 13px; color: var(--text-muted); border-bottom: 1px solid rgba(0,0,0,.04); }
.mn-mob-sub-item:hover { color: var(--accent); background: #fff; }
.mn-mob-footer { padding: 14px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; flex-shrink: 0; }
.mn-mob-auth-btn { display: block; padding: 11px; text-align: center; font-size: 14px; font-weight: 700; border-radius: var(--radius-sm); }
.mn-mob-auth-primary { background: var(--accent); color: #fff; }
.mn-mob-auth-secondary { background: var(--surface); color: var(--text-primary); border: 1px solid var(--border); }

/* ── Product Card ── */
.mn-product-card {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  height: 100%; display: flex; flex-direction: column; overflow: hidden;
}
.mn-product-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.mn-product-img-wrap {
  aspect-ratio: 1; background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; position: relative; padding: 16px;
}
.mn-product-img-wrap img {
  max-height: 100%; max-width: 100%; object-fit: contain;
  transition: transform .35s cubic-bezier(.16,1,.3,1);
}
.mn-product-card:hover .mn-product-img-wrap img { transform: scale(1.06); }
.mn-product-badge {
  position: absolute; top: 10px; left: 10px;
  font-size: 10px; font-weight: 800; padding: 3px 8px;
  border-radius: 99px; letter-spacing: .04em; text-transform: uppercase;
}
.mn-product-badge.sale  { background: #ef4444; color: #fff; }
.mn-product-badge.new   { background: #22c55e; color: #fff; }
.mn-product-badge.hot   { background: var(--accent); color: #fff; }
.mn-product-body { padding: 14px 14px 12px; flex: 1; display: flex; flex-direction: column; }
.mn-product-brand { margin-bottom: 6px; }
.mn-product-brand img { max-height: 20px; width: auto; object-fit: contain; opacity: .7; }
.mn-product-name {
  font-size: 13.5px; font-weight: 600; color: var(--text-primary);
  line-height: 1.4; margin-bottom: 10px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.mn-product-name:hover { color: var(--accent); }
.mn-product-price { font-size: 16px; font-weight: 800; color: var(--text-primary); font-variant-numeric: tabular-nums; margin-top: auto; }
.mn-product-old { font-size: 12px; font-weight: 400; color: var(--text-muted); text-decoration: line-through; margin-left: 6px; }
.mn-product-off { font-size: 11px; font-weight: 700; color: #ef4444; margin-left: 6px; }
.mn-add-to-cart {
  display: block; width: 100%; margin-top: 12px;
  padding: 9px; background: var(--text-primary); color: #fff;
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em;
  text-align: center; border: none; border-radius: var(--radius-sm);
  cursor: pointer; transition: background var(--transition);
}
.mn-add-to-cart:hover { background: var(--accent); color: #fff; }

/* ── Section headings ── */
.mn-section-head {
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 2px solid var(--border); padding-bottom: 14px; margin-bottom: 28px;
}
.mn-section-title {
  font-size: 18px; font-weight: 800; letter-spacing: -.02em; color: var(--text-primary);
  position: relative; padding-left: 14px;
}
.mn-section-title::before {
  content: ''; position: absolute; left: 0; top: 50%;
  transform: translateY(-50%); width: 4px; height: 20px;
  background: var(--accent); border-radius: 2px;
}
.mn-view-all { font-size: 12px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .08em; }
.mn-view-all:hover { color: var(--accent-dark); }

/* ── Hero slider ── */
.mn-hero { border-bottom: 1px solid var(--border); }
.mn-hero .slick-prev, .mn-hero .slick-next {
  width: 44px; height: 44px; background: rgba(255,255,255,.9) !important;
  border-radius: 50%; box-shadow: var(--shadow-md); z-index: 10;
  transition: background var(--transition);
}
.mn-hero .slick-prev:hover, .mn-hero .slick-next:hover { background: #fff !important; }
.mn-hero img { width: 100%; object-fit: cover; min-height: 300px; display: block; }

/* ── Category row ── */
.mn-cat-item { text-align: center; padding: 8px; }
.mn-cat-circle {
  width: 100px; height: 100px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 10px; padding: 18px;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.mn-cat-circle:hover { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); transform: translateY(-2px); }
.mn-cat-circle img { max-width: 100%; max-height: 100%; object-fit: contain; }
.mn-cat-label { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-primary); }

/* ── Brand grid ── */
.mn-brand-grid { border-top: 1px solid var(--border); border-left: 1px solid var(--border); }
.mn-brand-cell {
  border-right: 1px solid var(--border); border-bottom: 1px solid var(--border);
  height: 120px; display: flex; align-items: center; justify-content: center;
  transition: background var(--transition);
}
.mn-brand-cell:hover { background: var(--surface); }
.mn-brand-logo { max-height: 50px; max-width: 120px; object-fit: contain; filter: grayscale(1); opacity: .55; transition: filter .25s, opacity .25s, transform .25s; }
.mn-brand-cell:hover .mn-brand-logo { filter: grayscale(0); opacity: 1; transform: scale(1.06); }

/* ── Three column banners ── */
.mn-banner-col img { border-radius: var(--radius-md); width: 100%; transition: transform .4s ease; }
.mn-banner-col:hover img { transform: scale(1.02); }

/* ── Footer ── */
.mn-footer { background: var(--nav-bg); color: rgba(255,255,255,.72); padding: 56px 0 28px; }
.mn-footer-title { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; color: #fff; margin-bottom: 18px; }
.mn-footer a { color: rgba(255,255,255,.6); font-size: 13.5px; display: block; margin-bottom: 9px; transition: color var(--transition); }
.mn-footer a:hover { color: var(--accent); }
.mn-footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 20px; margin-top: 40px; font-size: 12px; color: rgba(255,255,255,.4); }
.mn-footer ul { list-style: none; padding: 0; margin: 0; }
.mn-footer ul li a { color: rgba(255,255,255,.6); font-size: 13px; }
.mn-footer ul li a:hover { color: var(--accent); }

/* ── Utilities ── */
@media (max-width: 991.98px) { body { padding-bottom: 58px; } }
.lazyload { opacity: 0; transition: opacity .3s ease; }
.lazyloaded { opacity: 1; }

/* Slick overrides */
.slick-track { display: flex !important; align-items: center; }
