/* ================================================================
   BUBBLES EGYPT — Main Stylesheet  (Sprint 1 + Sprint 2)
   Vanilla CSS · No Frameworks · RTL/LTR · Dark/Light Mode
   ================================================================ */

/* ── 1. CSS VARIABLES ─────────────────────────────────────────── */
:root {
  /* Brand palette */
  --brand-blue:  #284192;
  --brand-pink:  #EDB1D0;
  --brand-hot:   #FE5B98;
  --brand-blue2: #1e3070;

  /* Light-mode surfaces */
  --bg:          #ffffff;
  --bg-alt:      #f5f7fb;
  --bg-card:     #ffffff;
  --text:        #1a1a2e;
  --text-2:      #555566;
  --text-muted:  #8888a0;
  --border:      #e4e4ee;
  --shadow-sm:   0 2px 8px rgba(0,0,0,.07);
  --shadow-md:   0 6px 22px rgba(0,0,0,.12);

  /* Component tokens */
  --top-bar-bg:  #ffffff;
  --nav-bg:      var(--brand-blue);
  --ticker-bg:   var(--brand-hot);
  --footer-bg:   #284192;
  --footer-bot:  #1e3070;
  --input-bg:    #ffffff;
  --badge-bg:    var(--brand-hot);
  --chip-active: var(--brand-blue);
  --chip-text:   #fff;
}

[data-theme="dark"] {
  --bg:          #0d1021;
  --bg-alt:      #161a30;
  --bg-card:     #1c2038;
  --text:        #e6e8f4;
  --text-2:      #9ea0b8;
  --text-muted:  #60627a;
  --border:      #2a2d46;
  --shadow-sm:   0 2px 8px rgba(0,0,0,.4);
  --shadow-md:   0 6px 22px rgba(0,0,0,.55);

  --top-bar-bg:  #101328;
  --nav-bg:      #19215e;
  --ticker-bg:   #b83470;
  --footer-bg:   #150d2a;
  --footer-bot:  #0e0820;
  --input-bg:    #1c2038;
  --badge-bg:    var(--brand-hot);
  --chip-active: var(--brand-hot);
}

/* ── 2. RESET & BASE ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { scroll-behavior: smooth; }
body  {
  font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  transition: background-color .3s, color .3s;
  overflow-x: hidden;
  line-height: 1.6;
}
a      { text-decoration: none; color: inherit; }
ul     { list-style: none; }
img    { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }

.container {
  width: 100%;
  max-width: 1380px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ── 3. HEADER ────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

/* Top Bar */
.top-bar {
  background-color: var(--top-bar-bg);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
  transition: background-color .3s;
}
.top-bar-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
}

/* Logo */
.logo-oval {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--brand-blue);
  color: #fff;
  padding: 8px 22px;
  border-radius: 50px;
  font-weight: 900;
  font-size: 1.05rem;
  letter-spacing: 1.5px;
  white-space: nowrap;
  transition: opacity .2s;
}
.logo-oval:hover { opacity: .9; }

/* Search */
.search-wrap {
  position: relative;
  flex: 1;
  max-width: 540px;
  display: flex;
  align-items: center;
}
.search-input {
  width: 100%;
  padding: 10px 44px 10px 16px;
  border: 2px solid var(--border);
  border-radius: 50px;
  outline: none;
  font-size: .9rem;
  font-family: inherit;
  background-color: var(--input-bg);
  color: var(--text);
  transition: border-color .2s, background-color .3s;
}
[dir="rtl"] .search-input { padding: 10px 16px 10px 44px; }
.search-input:focus         { border-color: var(--brand-blue); }
.search-input::placeholder  { color: var(--text-muted); }
.search-btn {
  position: absolute;
  right: 14px;
  background: none;
  border: none;
  color: var(--brand-blue);
  font-size: .95rem;
  padding: 4px;
  display: flex;
  align-items: center;
}
[dir="rtl"] .search-btn { right: auto; left: 14px; }

/* Top Actions */
.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.hotline-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.15;
}
.hotline-num {
  font-weight: 900;
  font-size: 1.05rem;
  color: var(--brand-blue);
  direction: ltr;
}
.hotline-tag {
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--brand-blue);
}
.user-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--brand-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: .85rem;
  cursor: pointer;
  transition: opacity .2s;
  flex-shrink: 0;
}
.user-circle:hover { opacity: .85; }
.ctrl-btn {
  background: transparent;
  border: 2px solid var(--brand-blue);
  color: var(--brand-blue);
  padding: 5px 13px;
  border-radius: 20px;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .5px;
  transition: background .2s, color .2s, border-color .2s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
}
.ctrl-btn:hover { background-color: var(--brand-blue); color: #fff; }
[data-theme="dark"] .ctrl-btn             { border-color: var(--brand-pink); color: var(--brand-pink); }
[data-theme="dark"] .ctrl-btn:hover       { background-color: var(--brand-pink); color: var(--brand-blue); }

/* Navigation Bar */
.nav-bar { background-color: var(--nav-bg); transition: background-color .3s; overflow: visible; }
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  overflow: visible;
}
.nav-links {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  overflow: visible;
}
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: rgba(255,255,255,.72);
  padding: 13px 10px;
  font-size: .81rem;
  font-weight: 600;
  white-space: nowrap;
  transition: color .2s;
}
.nav-link:hover, .nav-link.active { color: #fff; }
.summer-dot   { font-size: .88rem; }
.summer-badge {
  background-color: #e53935;
  color: #fff;
  font-size: .58rem;
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: 800;
  letter-spacing: .5px;
  white-space: nowrap;
}
.caret { font-size: .65rem; opacity: .8; }

/* Nav Icons */
.nav-icons { display: flex; align-items: center; gap: 4px; padding: 6px 0; flex-shrink: 0; }
.nav-icon-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.05rem;
  padding: 8px 10px;
  transition: opacity .2s;
}
.nav-icon-btn:hover { opacity: .78; }
.icon-badge {
  position: absolute;
  top: 2px; right: 2px;
  background-color: var(--badge-bg);
  color: #fff;
  font-size: .6rem;
  font-weight: 800;
  width: 17px; height: 17px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
[dir="rtl"] .icon-badge { right: auto; left: 2px; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px; height: 20px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  margin-inline-end: 10px;
}
.hamburger span {
  display: block;
  height: 3px;
  background-color: #fff;
  border-radius: 2px;
  transition: transform .25s, opacity .25s;
}
.hamburger.open span:nth-child(1) { transform: translateY(8.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-8.5px) rotate(-45deg); }

/* ── Ticker Bar ── */
.ticker-bar {
  background-color: var(--ticker-bg);
  overflow: hidden;
  padding: 7px 0;
  transition: background-color .3s;
}
.ticker-track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: tickerMove 32s linear infinite;
}
.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-size: .78rem;
  font-weight: 700;
  padding: 0 18px;
  white-space: nowrap;
}
.ticker-sep {
  display: inline-block;
  background-color: var(--brand-blue);
  color: #fff;
  font-size: .62rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 10px;
  letter-spacing: .8px;
}
@keyframes tickerMove {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ── 4. HERO SECTION ──────────────────────────────────────────── */
.hero-section {
  background: linear-gradient(140deg, #f5e2ef 0%, #dde6ff 55%, #fce6f2 100%);
  padding: 70px 0 60px;
  position: relative;
  overflow: hidden;
  transition: background .3s;
}
[data-theme="dark"] .hero-section {
  background: linear-gradient(140deg, #1a0d30 0%, #0d1540 55%, #1c0b25 100%);
}
.hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}
.hero-text { flex: 1; max-width: 580px; }
.hero-title {
  font-size: 2.3rem;
  font-weight: 900;
  color: var(--brand-blue);
  line-height: 1.4;
  margin-bottom: 16px;
}
[data-theme="dark"] .hero-title { color: var(--brand-pink); }
.hero-desc {
  font-size: 1.05rem;
  color: var(--text-2);
  line-height: 1.85;
  margin-bottom: 28px;
}
.hero-cta {
  display: inline-flex;
  align-items: center;
  background-color: var(--brand-hot);
  color: #fff;
  padding: 13px 36px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 800;
  box-shadow: 0 5px 18px rgba(254,91,152,.42);
  transition: transform .2s, box-shadow .2s, background-color .2s;
}
.hero-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(254,91,152,.52);
  background-color: #e0447a;
}

/* Hero visual */
.hero-visual {
  flex: 0 0 280px;
  height: 280px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hv-bubble { position: absolute; border-radius: 50%; pointer-events: none; }
.b1 {
  width: 210px; height: 210px;
  background: radial-gradient(circle, rgba(237,177,208,.6), transparent 70%);
  top: 10px; left: 20px;
}
.b2 {
  width: 130px; height: 130px;
  background: radial-gradient(circle, rgba(200,215,255,.65), transparent 70%);
  bottom: 15px; right: 15px;
}
.b3 {
  width: 80px; height: 80px;
  background: radial-gradient(circle, rgba(254,91,152,.4), transparent 70%);
  top: 25px; right: 55px;
}
.hv-emoji {
  font-size: 5rem;
  position: relative;
  z-index: 1;
  animation: floatY 3s ease-in-out infinite;
  filter: drop-shadow(0 8px 18px rgba(0,0,0,.15));
}
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-14px); }
}

/* ── 5. PRODUCTS SECTION ──────────────────────────────────────── */
.products-section {
  padding: 65px 0;
  background-color: var(--bg-alt);
  transition: background-color .3s;
}
.section-title {
  text-align: center;
  font-size: 1.85rem;
  font-weight: 900;
  color: var(--brand-blue);
  margin-bottom: 6px;
}
[data-theme="dark"] .section-title { color: var(--brand-pink); }
.section-title::after {
  content: '';
  display: block;
  width: 55px; height: 4px;
  background: var(--brand-hot);
  border-radius: 2px;
  margin: 10px auto 30px;
}

/* ── Filter + Sort Bar (Sprint 2) ── */
.filter-sort-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.filter-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.filter-chip {
  background-color: var(--bg-card);
  color: var(--text-2);
  border: 2px solid var(--border);
  padding: 6px 16px;
  border-radius: 50px;
  font-size: .82rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s, transform .1s;
  white-space: nowrap;
}
.filter-chip:hover {
  border-color: var(--brand-blue);
  color: var(--brand-blue);
}
.filter-chip.active {
  background-color: var(--chip-active);
  color: var(--chip-text);
  border-color: var(--chip-active);
}
.filter-chip:active { transform: scale(.96); }

/* Sort Select */
.sort-wrap { flex-shrink: 0; }
.sort-select {
  background-color: var(--bg-card);
  color: var(--text);
  border: 2px solid var(--border);
  padding: 8px 14px;
  border-radius: 50px;
  font-size: .83rem;
  font-weight: 700;
  font-family: inherit;
  outline: none;
  cursor: pointer;
  transition: border-color .2s, background-color .3s;
  appearance: none;
  -webkit-appearance: none;
  padding-inline-end: 30px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23284192' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 12px center;
}
[dir="rtl"] .sort-select { background-position: right 12px center; padding-inline-end: 14px; padding-inline-start: 30px; }
.sort-select:focus { border-color: var(--brand-blue); }
[data-theme="dark"] .sort-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23EDB1D0' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
}

/* No Results */
.no-results {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.no-results[hidden] { display: none; }
.no-results i {
  font-size: 2.5rem;
  margin-bottom: 14px;
  display: block;
  opacity: .5;
}
.no-results p {
  font-size: 1rem;
  font-weight: 600;
}

/* Products Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 26px;
}

/* Product Card */
.product-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .22s, box-shadow .22s, background-color .3s;
  cursor: pointer;
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}
.product-img-wrap {
  position: relative;
  height: 200px;
  overflow: hidden;
  background-color: var(--bg-alt);
}
.product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s;
}
.product-card:hover .product-img { transform: scale(1.06); }

/* Quick View button — appears on card hover */
.quick-view-btn {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%) translateY(14px);
  background-color: rgba(255,255,255,.95);
  color: var(--brand-blue);
  border: none;
  padding: 6px 18px;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 800;
  font-family: inherit;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s, transform .22s;
  white-space: nowrap;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.product-card:hover .quick-view-btn {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

/* Category badge */
.product-cat {
  position: absolute;
  top: 10px; right: 10px;
  background-color: var(--brand-pink);
  color: var(--brand-blue);
  font-size: .68rem;
  font-weight: 800;
  padding: 3px 11px;
  border-radius: 20px;
  white-space: nowrap;
  z-index: 1;
}
[dir="ltr"] .product-cat { right: auto; left: 10px; }

.product-body { padding: 16px; }
.product-name {
  font-size: .95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 7px;
  line-height: 1.45;
  min-height: 2.9em;
}
.product-price {
  display: inline-block;
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--brand-hot);
  margin-bottom: 14px;
  direction: ltr;
}
.add-to-cart-btn {
  width: 100%;
  padding: 10px;
  background-color: var(--brand-blue);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: .9rem;
  font-weight: 700;
  transition: background-color .2s, transform .1s;
}
.add-to-cart-btn:hover  { background-color: var(--brand-blue2); }
.add-to-cart-btn:active { transform: scale(.97); }

/* ── 6. FOOTER ────────────────────────────────────────────────── */
.site-footer {
  background-color: var(--footer-bg);
  transition: background-color .3s;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 36px;
  padding: 52px 20px 40px;
}
.footer-col-title {
  font-size: 1rem;
  font-weight: 900;
  color: #fff;
  margin-bottom: 14px;
}
[data-theme="dark"] .footer-col-title { color: var(--brand-pink); }

/* Hotline */
.footer-hotline-box { display: flex; align-items: center; gap: 12px; }
.footer-phone-circle {
  width: 46px; height: 46px;
  border-radius: 50%;
  background-color: var(--brand-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
  flex-shrink: 0;
  transition: opacity .2s;
}
.footer-phone-circle:hover { opacity: .85; }
.footer-phone-num {
  font-size: 1.45rem;
  font-weight: 900;
  color: #fff;
  direction: ltr;
}
[data-theme="dark"] .footer-phone-num { color: var(--brand-pink); }
.footer-phone-tag { font-size: .65rem; font-weight: 800; letter-spacing: 2px; color: #fff; }

/* Policies */
.footer-divider { border: none; border-top: 2px solid rgba(255,255,255,.3); margin-bottom: 14px; }
.footer-link-list li { margin-bottom: 8px; }
.footer-link-list a {
  color: #fff;
  font-size: .87rem;
  transition: color .2s, padding .2s;
  display: inline-block;
}
.footer-link-list a:hover { color: var(--brand-pink); padding-inline-start: 5px; }
[data-theme="dark"] .footer-link-list a:hover { color: var(--brand-pink); }

/* Contact */
.footer-email {
  display: block;
  color: #fff;
  font-size: .86rem;
  margin-bottom: 6px;
  word-break: break-all;
  opacity: .95;
  transition: opacity .2s;
}
.footer-email:hover { opacity: .75; }
.footer-addr { color: #fff; font-size: .86rem; margin-bottom: 6px; opacity: .9; }
.social-row { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 14px; }
.soc-icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  background-color: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #69727D;
  font-size: .88rem;
  transition: background-color .2s, color .2s, transform .2s;
}
.soc-icon:hover { background-color: var(--brand-blue); color: #fff; transform: translateY(-3px); }

/* Brand Column */
.footer-brand-col { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; }
.footer-brand-oval {
  background-color: var(--brand-blue);
  color: #fff;
  padding: 10px 32px;
  border-radius: 50px;
  font-weight: 900;
  font-size: 1.05rem;
  letter-spacing: 2px;
}
.cert-row { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.cert-chip {
  background-color: rgba(255,255,255,.15);
  color: #fff;
  font-size: .62rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 5px;
  border: 1px solid rgba(255,255,255,.4);
  white-space: nowrap;
}
[data-theme="dark"] .cert-chip {
  background-color: rgba(255,255,255,.12);
  color: var(--brand-pink);
  border-color: var(--brand-pink);
}
.footer-brand-desc { color: rgba(255,255,255,.92); font-size: .82rem; line-height: 1.65; }

/* Footer Bottom */
.footer-bottom { background-color: var(--footer-bot); padding: 12px 0; transition: background-color .3s; }
.footer-bottom-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.footer-bottom-inner span { color: rgba(255,255,255,.9); font-size: .78rem; }
[dir="ltr"] #footerDesignerText { order: 2; }
[dir="ltr"] #footerRightsText   { order: 1; }

/* ── 7. FLOATING BUTTONS ──────────────────────────────────────── */
.floating-btns {
  position: fixed;
  right: 22px; bottom: 34px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 990;
}
.float-btn {
  width: 50px; height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.2rem;
  box-shadow: 0 4px 14px rgba(0,0,0,.22);
  transition: transform .22s, box-shadow .22s;
}
.float-btn:hover { transform: translateY(-4px) scale(1.07); box-shadow: 0 9px 22px rgba(0,0,0,.3); }
.float-phone    { background-color: var(--brand-blue); }
.float-whatsapp { background-color: #25D366; }

/* ── 8. TOAST ─────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 32px; left: 50%;
  transform: translateX(-50%) translateY(90px);
  background-color: var(--brand-blue);
  color: #fff;
  padding: 11px 28px;
  border-radius: 50px;
  font-size: .9rem;
  font-weight: 700;
  box-shadow: 0 5px 18px rgba(0,0,0,.25);
  z-index: 9999;
  pointer-events: none;
  white-space: nowrap;
  transition: transform .3s ease;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ── 9. QUICK VIEW MODAL (Sprint 2) ───────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.modal-box {
  background-color: var(--bg-card);
  border-radius: 20px;
  max-width: 720px;
  width: 100%;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
  transform: translateY(30px) scale(.96);
  transition: transform .28s ease, background-color .3s;
  overflow: hidden;
}
.modal-overlay.open .modal-box {
  transform: translateY(0) scale(1);
}
.modal-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 34px; height: 34px;
  border-radius: 50%;
  background-color: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: .9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color .2s, color .2s;
  z-index: 1;
}
[dir="rtl"] .modal-close { right: auto; left: 14px; }
.modal-close:hover { background-color: var(--brand-hot); color: #fff; border-color: var(--brand-hot); }

.modal-inner {
  display: flex;
  gap: 0;
}
.modal-img-wrap {
  flex: 0 0 280px;
  height: 300px;
  overflow: hidden;
  background-color: var(--bg-alt);
}
.modal-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.modal-details {
  flex: 1;
  padding: 30px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}
.modal-cat-badge {
  display: inline-block;
  background-color: var(--brand-pink);
  color: var(--brand-blue);
  font-size: .72rem;
  font-weight: 800;
  padding: 3px 12px;
  border-radius: 20px;
  align-self: flex-start;
}
.modal-name {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--text);
  line-height: 1.4;
}
.modal-price {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--brand-hot);
  direction: ltr;
}
.modal-cart-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  background-color: var(--brand-blue);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: .95rem;
  font-weight: 800;
  transition: background-color .2s, transform .1s;
  align-self: flex-start;
  min-width: 200px;
}
.modal-cart-btn:hover  { background-color: var(--brand-blue2); }
.modal-cart-btn:active { transform: scale(.97); }

/* ── 10. RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 1200px) {
  .nav-link   { font-size: .76rem; padding: 13px 8px; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 28px; }
}

@media (max-width: 900px) {
  .hero-inner  { flex-direction: column-reverse; text-align: center; }
  .hero-text   { max-width: 100%; }
  .hero-title  { font-size: 1.75rem; }
  .hero-visual { flex: 0 0 200px; height: 200px; }
  .b1          { width: 160px; height: 160px; }

  .hamburger { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%; right: 0; left: 0;
    background-color: var(--nav-bg);
    flex-direction: column;
    padding: 10px 0 16px;
    border-top: 1px solid rgba(255,255,255,.1);
    z-index: 999;
  }
  .nav-links.open { display: flex; }
  .nav-link { padding: 11px 20px; width: 100%; font-size: .88rem; }

  /* Modal: stack on mobile */
  .modal-inner     { flex-direction: column; }
  .modal-img-wrap  { flex: 0 0 220px; height: 220px; }
  .modal-details   { padding: 20px; }
  .modal-cart-btn  { align-self: stretch; min-width: 0; }
}

@media (max-width: 768px) {
  .top-bar-inner { flex-wrap: wrap; }
  .search-wrap   { order: 3; max-width: 100%; width: 100%; }
  .logo-wrap     { order: 1; }
  .top-actions   { order: 2; }
  .hotline-wrap  { display: none; }

  .filter-sort-bar { flex-direction: column; align-items: flex-start; }
  .sort-wrap       { align-self: flex-end; }

  .footer-grid       { grid-template-columns: 1fr; padding: 32px 20px; }
  .footer-brand-col  { border-top: 1px solid rgba(255,255,255,.2); padding-top: 20px; }
  .products-grid     { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
  .section-title     { font-size: 1.5rem; }
}

@media (max-width: 480px) {
  .products-grid   { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .product-img-wrap{ height: 160px; }
  .product-body    { padding: 11px; }
  .hero-title      { font-size: 1.45rem; }
  .hero-cta        { font-size: .92rem; padding: 11px 28px; }
  .footer-bottom-inner { flex-direction: column; text-align: center; }
  .floating-btns   { right: 14px; bottom: 22px; }
  .float-btn       { width: 44px; height: 44px; font-size: 1.05rem; }
  .filter-chip     { font-size: .76rem; padding: 5px 12px; }
}

/* ================================================================
   SPRINT 3 — Dropdown · Category Pages · Cart Page
   ================================================================ */

/* ── DROPDOWN MENU ──────────────────────────────────────────── */
.has-dropdown { position: relative; }

.dropdown-menu {
  position: absolute;
  top: 100%;
  inset-inline-start: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  min-width: 235px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity .22s, transform .22s;
  z-index: 1100;
  padding: 12px 0 8px;
  list-style: none;
}
.has-dropdown:hover .dropdown-menu,
.has-dropdown.open  .dropdown-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px;
  color: var(--text);
  font-size: .87rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color .15s, color .15s;
}
.dropdown-item:hover { background-color: var(--bg-alt); color: var(--brand-blue); }
[data-theme="dark"] .dropdown-item:hover { color: var(--brand-pink); }
.dropdown-item i {
  width: 18px;
  text-align: center;
  color: var(--brand-blue);
  font-size: .88rem;
  flex-shrink: 0;
  transition: color .15s;
}
[data-theme="dark"] .dropdown-item i { color: var(--brand-pink); }
.dropdown-item:hover i { color: inherit; }

@media (max-width: 900px) {
  .dropdown-menu {
    position: static;
    border-radius: 0;
    border: none;
    border-top: 1px solid rgba(255,255,255,.1);
    background: rgba(0,0,0,.18);
    box-shadow: none;
    opacity: 1;
    transform: none;
    pointer-events: none;
    max-height: 0;
    overflow: hidden;
    padding: 0;
    transition: max-height .3s ease;
    min-width: 0;
  }
  .has-dropdown.open .dropdown-menu {
    max-height: 300px;
    pointer-events: auto;
    padding: 6px 0;
  }
  .dropdown-item {
    color: rgba(255,255,255,.82);
    padding: 10px 36px;
    font-size: .86rem;
  }
  .dropdown-item:hover { background: rgba(255,255,255,.08); color: #fff; }
}

/* ── CATEGORY PAGE HERO / BREADCRUMB ───────────────────────── */
.category-hero {
  background: linear-gradient(140deg, #f5e2ef 0%, #dde6ff 55%, #fce6f2 100%);
  padding: 38px 0 32px;
  transition: background .3s;
}
[data-theme="dark"] .category-hero {
  background: linear-gradient(140deg, #1a0d30 0%, #0d1540 55%, #1c0b25 100%);
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.breadcrumb-link {
  color: var(--text-2);
  font-size: .83rem;
  font-weight: 600;
  transition: color .2s;
}
.breadcrumb-link:hover { color: var(--brand-blue); }
[data-theme="dark"] .breadcrumb-link:hover { color: var(--brand-pink); }
.breadcrumb-sep { color: var(--text-muted); font-size: .83rem; }
.breadcrumb-current {
  color: var(--brand-blue);
  font-size: .83rem;
  font-weight: 800;
}
[data-theme="dark"] .breadcrumb-current { color: var(--brand-pink); }
.category-hero-title {
  font-size: 1.85rem;
  font-weight: 900;
  color: var(--brand-blue);
  line-height: 1.4;
}
[data-theme="dark"] .category-hero-title { color: var(--brand-pink); }

@media (max-width: 768px) {
  .category-hero-title { font-size: 1.45rem; }
}

/* ── CART PAGE ─────────────────────────────────────────────── */
.cart-page-section {
  padding: 50px 0 70px;
  background-color: var(--bg-alt);
  min-height: 70vh;
  transition: background-color .3s;
}
.cart-page-title {
  font-size: 1.65rem;
  font-weight: 900;
  color: var(--brand-blue);
  margin-bottom: 28px;
}
[data-theme="dark"] .cart-page-title { color: var(--brand-pink); }

.cart-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 26px;
  align-items: start;
}

/* Cart Items Wrap */
.cart-items-wrap {
  background: var(--bg-card);
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: background-color .3s;
}
.cart-items-header {
  display: grid;
  grid-template-columns: 90px 1fr 130px 140px 120px 50px;
  gap: 10px;
  align-items: center;
  padding: 12px 20px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  font-size: .76rem;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: .4px;
  transition: background-color .3s;
}
.cart-items-header .ch-product { grid-column: 1 / 3; }

#cartItemsList { padding: 6px 0; }

.cart-item {
  display: grid;
  grid-template-columns: 90px 1fr 130px 140px 120px 50px;
  gap: 10px;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  transition: background-color .18s;
}
.cart-item:last-child { border-bottom: none; }
.cart-item:hover { background-color: var(--bg-alt); }

.cart-item-img-wrap {
  width: 78px; height: 78px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-alt);
  flex-shrink: 0;
}
.cart-item-img { width: 100%; height: 100%; object-fit: cover; }

.cart-item-info { display: flex; flex-direction: column; gap: 5px; }
.cart-item-name {
  font-size: .93rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
}
.cart-item-cat {
  display: inline-block;
  width: fit-content;
  font-size: .72rem;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  padding: 2px 10px;
  border-radius: 20px;
}
.cart-item-price-mobile { display: none; font-size: .87rem; font-weight: 700; color: var(--brand-hot); }

.cart-item-unit-price {
  font-size: .9rem;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  direction: ltr;
}

/* Qty controls */
.cart-item-qty-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 5px 8px;
  background: var(--bg);
  transition: border-color .2s, background-color .3s;
}
.qty-btn {
  width: 26px; height: 26px;
  border-radius: 6px;
  border: none;
  background: var(--bg-alt);
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: background-color .15s, color .15s;
  flex-shrink: 0;
  cursor: pointer;
  font-family: inherit;
}
.qty-btn:hover { background: var(--brand-blue); color: #fff; }
.qty-num {
  min-width: 26px;
  text-align: center;
  font-weight: 800;
  font-size: .9rem;
  color: var(--text);
}
.cart-item-line-total {
  font-size: .95rem;
  font-weight: 900;
  color: var(--brand-hot);
  text-align: center;
  direction: ltr;
}
.cart-item-remove {
  width: 34px; height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-muted);
  font-size: .88rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.cart-item-remove:hover { background: #fee2e2; color: #dc2626; border-color: #fca5a5; }
[data-theme="dark"] .cart-item-remove:hover { background: rgba(220,38,38,.2); border-color: #dc2626; }

/* Summary Card */
.cart-summary-card {
  background: var(--bg-card);
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  position: sticky;
  top: 100px;
  transition: background-color .3s;
}
.cart-summary-title {
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--border);
}
.cart-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: .9rem;
}
.cart-summary-label { color: var(--text-2); font-weight: 600; }
.cart-summary-value { color: var(--text); font-weight: 700; direction: ltr; }
.cart-summary-total-row {
  border-top: 2px solid var(--border);
  padding-top: 14px;
  margin-top: 6px;
  margin-bottom: 20px;
}
.cart-summary-total-row .cart-summary-label { font-size: 1rem; font-weight: 800; color: var(--text); }
.cart-summary-total-row .cart-summary-value { font-size: 1.15rem; font-weight: 900; color: var(--brand-hot); }

/* Shipping address */
.cart-shipping-addr {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 18px;
  transition: background-color .3s;
}
.cart-shipping-addr-text {
  font-size: .84rem;
  color: var(--text-2);
  line-height: 1.6;
  margin-bottom: 8px;
}
.change-addr-btn {
  background: none;
  border: none;
  color: var(--brand-blue);
  font-size: .82rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  transition: color .2s;
}
.change-addr-btn:hover { color: var(--brand-hot); }
[data-theme="dark"] .change-addr-btn { color: var(--brand-pink); }

/* Checkout button */
.checkout-btn {
  width: 100%;
  padding: 14px;
  background: var(--brand-hot);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 800;
  font-family: inherit;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 5px 18px rgba(254,91,152,.35);
  cursor: pointer;
  transition: background-color .2s, transform .1s, box-shadow .2s;
}
.checkout-btn:hover { background: #e0447a; transform: translateY(-2px); box-shadow: 0 9px 24px rgba(254,91,152,.45); }
.checkout-btn:active { transform: scale(.98); }

/* Empty cart */
.cart-empty-state {
  text-align: center;
  padding: 70px 20px;
}
.cart-empty-icon { font-size: 4rem; color: var(--text-muted); margin-bottom: 20px; display: block; opacity: .5; }
.cart-empty-title { font-size: 1.45rem; font-weight: 900; color: var(--text); margin-bottom: 8px; }
.cart-empty-text  { font-size: .95rem; color: var(--text-muted); margin-bottom: 28px; }
.cart-empty-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--brand-blue);
  color: #fff;
  padding: 12px 32px;
  border-radius: 50px;
  font-size: .95rem;
  font-weight: 800;
  font-family: inherit;
  border: none; cursor: pointer;
  transition: background-color .2s, transform .15s;
}
.cart-empty-btn:hover { background: var(--brand-blue2); transform: translateY(-2px); }

/* Address modal */
.address-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 3000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity .25s;
}
.address-modal-overlay.open { opacity: 1; pointer-events: auto; }
.address-modal-box {
  background: var(--bg-card);
  border-radius: 20px;
  padding: 32px 28px;
  max-width: 440px; width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
  transform: translateY(20px) scale(.97);
  transition: transform .28s ease, background-color .3s;
  position: relative;
}
.address-modal-overlay.open .address-modal-box { transform: translateY(0) scale(1); }
.address-modal-title { font-size: 1.1rem; font-weight: 900; color: var(--text); margin-bottom: 22px; }
.address-modal-close {
  position: absolute; top: 14px; inset-inline-end: 14px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: .88rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background-color .2s, color .2s;
}
.address-modal-close:hover { background: var(--brand-hot); color: #fff; border-color: var(--brand-hot); }

.addr-form-group { margin-bottom: 16px; }
.addr-form-label { display: block; font-size: .84rem; font-weight: 700; color: var(--text-2); margin-bottom: 6px; }
.addr-form-input {
  width: 100%; padding: 10px 14px;
  border: 2px solid var(--border); border-radius: 10px;
  background: var(--input-bg); color: var(--text);
  font-size: .9rem; font-family: inherit; outline: none;
  transition: border-color .2s, background-color .3s;
}
.addr-form-input:focus { border-color: var(--brand-blue); }
.addr-save-btn {
  width: 100%; padding: 12px;
  background: var(--brand-blue); color: #fff;
  border: none; border-radius: 10px;
  font-size: .95rem; font-weight: 800; font-family: inherit;
  cursor: pointer; margin-top: 6px;
  transition: background-color .2s;
}
.addr-save-btn:hover { background: var(--brand-blue2); }

/* Cart responsive */
@media (max-width: 1100px) {
  .cart-layout { grid-template-columns: 1fr 300px; }
}
@media (max-width: 820px) {
  .cart-layout { grid-template-columns: 1fr; }
  .cart-summary-card { position: static; }
  .cart-items-header { display: none; }
  .cart-item {
    grid-template-columns: 80px 1fr 42px;
    grid-template-rows: auto auto auto;
    gap: 8px; padding: 14px 16px;
  }
  .cart-item-img-wrap { grid-row: 1 / 3; }
  .cart-item-info     { grid-column: 2;     grid-row: 1; }
  .cart-item-remove   { grid-column: 3;     grid-row: 1; align-self: start; }
  .cart-item-qty-wrap { grid-column: 2 / 4; grid-row: 2; justify-self: start; }
  .cart-item-line-total { grid-column: 2 / 4; grid-row: 3; text-align: start; }
  .cart-item-unit-price { display: none; }
  .cart-item-price-mobile { display: block; }
}
@media (max-width: 480px) {
  .cart-page-title  { font-size: 1.3rem; }
  .cart-summary-card { padding: 18px; }
  .checkout-btn     { font-size: .92rem; }
}

/* ── CART SIDEBAR ──────────────────────────────────────────── */
.cart-sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}
.cart-sidebar-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.cart-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 360px;
  max-width: 100vw;
  height: 100%;
  background: var(--bg-card);
  z-index: 2001;
  display: flex;
  flex-direction: column;
  transform: translateX(-110%);
  transition: transform .33s cubic-bezier(.4,0,.2,1);
  box-shadow: 6px 0 30px rgba(0,0,0,.18);
}
.cart-sidebar.open { transform: translateX(0); }

/* Header */
.cart-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--bg-card);
  transition: background-color .3s;
}
.cart-sidebar-title {
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--text);
}
.cart-sidebar-close {
  display: flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: .82rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 8px;
  transition: background-color .15s, color .15s;
}
.cart-sidebar-close:hover { background: var(--bg-alt); color: var(--text); }

/* Body */
.cart-sidebar-body {
  flex: 1;
  overflow-y: auto;
  padding: 6px 0;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.cart-sidebar-body::-webkit-scrollbar { width: 4px; }
.cart-sidebar-body::-webkit-scrollbar-track { background: transparent; }
.cart-sidebar-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* Empty state */
.csb-empty {
  text-align: center;
  padding: 56px 20px;
  color: var(--text-muted);
  font-size: .93rem;
  font-weight: 600;
}
.csb-empty-icon {
  font-size: 2.8rem;
  opacity: .25;
  display: block;
  margin-bottom: 14px;
}

/* Item row */
.csb-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  transition: background-color .15s;
}
.csb-item:last-child { border-bottom: none; }
.csb-item:hover { background: var(--bg-alt); }

.csb-item-img {
  width: 66px; height: 66px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--bg-alt);
  flex-shrink: 0;
  border: 1px solid var(--border);
}
.csb-item-info {
  flex: 1;
  min-width: 0;
}
.csb-item-name {
  font-size: .87rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.45;
  margin-bottom: 9px;
  word-break: break-word;
}

/* Qty controls — kept LTR so + is always left, − always right */
.csb-item-qty-wrap {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  direction: ltr;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 3px 7px;
  margin-bottom: 7px;
  background: var(--bg);
}
.csb-qty-btn {
  width: 22px; height: 22px;
  border-radius: 5px;
  border: none;
  background: var(--bg-alt);
  color: var(--text);
  font-size: 1rem;
  line-height: 1;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  transition: background-color .15s, color .15s;
}
.csb-qty-btn:hover { background: var(--brand-blue); color: #fff; }
.csb-qty-num {
  font-size: .88rem;
  font-weight: 800;
  color: var(--text);
  min-width: 18px;
  text-align: center;
}
.csb-item-price {
  font-size: .83rem;
  font-weight: 700;
  color: var(--brand-hot);
  direction: ltr;
  display: inline-block;
}

/* Remove button */
.csb-item-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  padding: 2px 4px;
  flex-shrink: 0;
  border-radius: 4px;
  transition: color .15s, background-color .15s;
  margin-top: 2px;
}
.csb-item-remove:hover { color: #dc2626; background: rgba(220,38,38,.08); }

/* Footer */
.cart-sidebar-foot {
  border-top: 2px solid var(--border);
  padding: 16px 18px;
  flex-shrink: 0;
  background: var(--bg-card);
  transition: background-color .3s;
}
.csb-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.csb-total-label {
  font-size: .97rem;
  font-weight: 800;
  color: var(--text);
}
.csb-total-val {
  font-size: 1.08rem;
  font-weight: 900;
  color: var(--brand-hot);
  direction: ltr;
}
.csb-view-btn {
  display: block;
  width: 100%;
  text-align: center;
  padding: 10px;
  border: 2px solid var(--brand-blue);
  border-radius: 10px;
  color: var(--brand-blue);
  font-size: .9rem;
  font-weight: 800;
  margin-bottom: 9px;
  transition: background-color .2s, color .2s;
}
.csb-view-btn:hover { background: var(--brand-blue); color: #fff; }
[data-theme="dark"] .csb-view-btn { border-color: var(--brand-pink); color: var(--brand-pink); }
[data-theme="dark"] .csb-view-btn:hover { background: var(--brand-pink); color: var(--brand-blue); }

.csb-checkout-btn {
  width: 100%;
  padding: 11px;
  background: #25D366;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: .9rem;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  transition: background-color .2s, transform .1s;
}
.csb-checkout-btn:hover { background: #1da851; transform: translateY(-1px); }
.csb-checkout-btn:active { transform: scale(.98); }

@media (max-width: 480px) {
  .cart-sidebar { width: 100%; }
}

/* ================================================================
   Commerce upgrade: 5-column desktop grid + richer product cards
   ================================================================ */
@media (min-width: 1200px) {
  .products-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 18px;
  }
  .product-img-wrap { height: 170px; }
  .product-body { padding: 13px; }
}

.product-card {
  display: flex;
  flex-direction: column;
}
.product-body {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.product-name {
  min-height: 3.05em;
  margin-bottom: 8px;
}
.product-meta {
  min-height: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: .72rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  direction: ltr;
  justify-content: flex-end;
}
[dir="ltr"] .product-meta { justify-content: flex-start; }
.meta-dot { opacity: .55; }
.product-pricing {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: auto;
  margin-bottom: 12px;
}
.product-price {
  margin-bottom: 0;
  direction: inherit;
  line-height: 1.2;
}
.product-old-price {
  font-size: .78rem;
  color: var(--text-muted);
  text-decoration: line-through;
  font-weight: 700;
}
.stock-badge {
  position: absolute;
  bottom: 10px;
  right: 10px;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: .68rem;
  font-weight: 900;
  z-index: 2;
  box-shadow: 0 4px 12px rgba(0,0,0,.14);
}
[dir="ltr"] .stock-badge { right: auto; left: 10px; }
.stock-in {
  background: rgba(36, 155, 93, .95);
  color: #fff;
}
.stock-low {
  background: rgba(255, 193, 7, .98);
  color: #2e2500;
}
.stock-out {
  background: rgba(180, 35, 24, .96);
  color: #fff;
}
.add-to-cart-btn:disabled,
.modal-cart-btn:disabled {
  background-color: #9aa3b2;
  cursor: not-allowed;
  transform: none;
  opacity: .8;
}
.modal-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  margin: 12px 0 16px;
  font-size: .86rem;
  color: var(--text-2);
}
.modal-details div {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
}
@media (max-width: 600px) {
  .modal-details { grid-template-columns: 1fr; }
}

/* Bubbles v6 UI stability fixes */
.top-actions,
.nav-icons {
  direction: ltr;
  flex-direction: row;
}
.top-actions {
  min-width: 250px;
  justify-content: flex-end;
}
.nav-icons {
  min-width: 92px;
  justify-content: flex-end;
}
.ctrl-btn {
  min-width: 44px;
  justify-content: center;
}
#langBtn { width: 48px; }
#themeBtn {
  width: 48px;
  height: 36px;
  padding: 0;
  border-radius: 999px;
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-pink));
  box-shadow: 0 10px 24px rgba(40,65,146,.22);
  font-size: 1rem;
}
#themeBtn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(40,65,146,.28);
}
[data-theme="dark"] #themeBtn {
  background: linear-gradient(135deg, #ffd166, var(--brand-pink));
  color: #19215e;
}
.nav-icon-btn {
  width: 42px;
  height: 38px;
  padding: 0;
}
.address-modal-box {
  max-width: 620px;
}
.address-modal-note {
  margin: -10px 0 18px;
  color: var(--text-muted);
  line-height: 1.8;
}
#addressForm {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.addr-form-group {
  margin-bottom: 0;
}
.addr-form-group.wide,
.addr-save-btn {
  grid-column: 1 / -1;
}
.customer-summary-box {
  border-style: dashed;
}
@media (max-width: 720px) {
  .top-actions { min-width: 0; }
  #addressForm { grid-template-columns: 1fr; }
}

/* Bubbles v7 - wishlist, variants, checkout polish */
.nav-icons { gap: 12px; }
.nav-icon-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(255,255,255,.08);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05), 0 10px 24px rgba(22,34,93,.18);
}
.nav-icon-btn:hover {
  opacity: 1;
  transform: translateY(-1px);
  background: rgba(255,255,255,.16);
}
.nav-icon-btn .fa-heart { color: #fff; }
.icon-badge {
  top: -4px;
  right: -4px;
  width: 21px;
  height: 21px;
  border: 2px solid var(--brand-blue);
  font-size: .68rem;
}
[dir="rtl"] .icon-badge { left: -4px; right: auto; }
.wishlist-product-btn {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.8);
  background: rgba(255,255,255,.94);
  color: var(--brand-hot);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
  box-shadow: 0 8px 20px rgba(0,0,0,.16);
  transition: transform .2s, background-color .2s, color .2s;
}
[dir="ltr"] .wishlist-product-btn { left: auto; right: 10px; }
.wishlist-product-btn:hover { transform: scale(1.07); }
.wishlist-product-btn.active {
  background: var(--brand-hot);
  color: #fff;
}
.variant-picker {
  display: grid;
  gap: 6px;
  margin: 2px 0 12px;
  font-size: .78rem;
  font-weight: 900;
  color: var(--text-2);
}
.variant-picker select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 9px 12px;
  font-family: inherit;
  font-weight: 800;
  background: var(--bg-alt);
  color: var(--text);
  outline: none;
}
.variant-picker select:focus { border-color: var(--brand-blue); }
.modal-details .variant-picker {
  grid-column: 1 / -1;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
}
.checkout-details-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  margin: 16px 0 18px;
}
.checkout-step-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 900;
  color: var(--brand-blue);
  margin-bottom: 8px;
}
.checkout-step-title span {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--brand-blue);
  font-size: .82rem;
}
.checkout-hint {
  margin: 0 0 14px;
  color: var(--text-muted);
  line-height: 1.7;
  font-size: .82rem;
}
.checkout-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.checkout-form .wide { grid-column: 1 / -1; }
.checkout-form textarea.addr-form-input { resize: vertical; min-height: 86px; }
.secondary-save {
  grid-column: 1 / -1;
  background: var(--brand-blue);
}
.wishlist-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.wishlist-actions button {
  border: 0;
  border-radius: 999px;
  padding: 6px 10px;
  background: var(--brand-blue);
  color: #fff;
  font-family: inherit;
  font-weight: 900;
  cursor: pointer;
}
.wishlist-actions button:first-child { background: var(--bg-alt); color: var(--brand-blue); border: 1px solid var(--border); }
.wishlist-sidebar .csb-item { align-items: flex-start; }
@media (max-width: 820px) {
  .checkout-form { grid-template-columns: 1fr; }
  .nav-icon-btn { width: 42px; height: 42px; }
}
@media (min-width: 1000px) {
  .cart-layout { grid-template-columns: minmax(0, 1fr) minmax(420px, 500px); }
}
