/* ============================================================
   Asianmicro.biz — Main Stylesheet
   E-commerce Theme · Red & Gold · Matching asianmicro.biz
   Fonts: Cormorant Garamond (display) + DM Sans (body)
   ============================================================ */

:root {
  --gold:        #B5954F;
  --gold-light:  #D4BA7A;
  --gold-dark:   #8C6F30;
  --dark:        #8B1A1A;
  --dark-2:      #6B1515;
  --dark-3:      #A52424;
  --cream:       #FBFBFB;
  --cream-2:     #EFEFEF;
  --text:        #333333;
  --text-muted:  #777777;
  --white:       #FFFFFF;
  --danger:      #C0392B;
  --success:     #8B1A1A;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'DM Sans', sans-serif;

  --radius:      4px;
  --radius-lg:   8px;
  --shadow:      0 2px 12px rgba(0,0,0,.08);
  --shadow-hover: 0 8px 30px rgba(0,0,0,.12);
  --shadow-gold: 0 4px 24px rgba(181,149,79,.18);
  --transition:  .25s ease;
}

/* -------------------------------------------------------
   Reset & Base
   ------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; transition: color var(--transition); }
ul { list-style: none; }
address { font-style: normal; }

.container { width: min(1200px, 94%); margin-inline: auto; }

/* -------------------------------------------------------
   Typography
   ------------------------------------------------------- */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.25;
  color: var(--text);
}
h1 { font-size: clamp(1.8rem, 4vw, 3rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2.2rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.5rem); }
h4 { font-size: 1rem; }

.section-label {
  font-family: var(--font-body);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: .5rem;
  display: block;
}

/* -------------------------------------------------------
   Buttons
   ------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .65rem 1.5rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: .03em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition);
  text-transform: uppercase;
}
.btn--primary {
  background: var(--gold);
  color: var(--white);
  border-color: var(--gold);
}
.btn--primary:hover { background: var(--gold-dark); border-color: var(--gold-dark); }
.btn--outline {
  border-color: var(--text);
  color: var(--text);
  background: transparent;
}
.btn--outline:hover { background: var(--text); color: var(--white); }
.btn--ghost {
  border-color: var(--cream-2);
  color: var(--text);
  background: transparent;
}
.btn--ghost:hover { border-color: var(--gold); color: var(--gold-dark); }
.btn--dark {
  background: var(--dark);
  color: var(--white);
}
.btn--dark:hover { background: var(--dark-3); }
.btn--green {
  background: var(--dark);
  color: var(--white);
  border-color: var(--dark);
}
.btn--green:hover { background: var(--dark-3); }
.btn--sm { padding: .45rem .9rem; font-size: .75rem; }
.btn--lg { padding: .85rem 2rem; font-size: .9rem; }

/* -------------------------------------------------------
   Flash Messages
   ------------------------------------------------------- */
.flash {
  position: fixed;
  top: 1rem;
  right: 1.5rem;
  z-index: 9999;
  padding: .8rem 1.4rem;
  border-radius: var(--radius);
  font-size: .85rem;
  font-weight: 500;
  box-shadow: var(--shadow);
  animation: slideIn .3s ease;
}
.flash--success { background: #FDE8E8; color: #8B1A1A; border-left: 4px solid var(--success); }
.flash--error   { background: #f8d7da; color: #721c24; border-left: 4px solid var(--danger); }
.flash--info    { background: #fff3cd; color: #856404; border-left: 4px solid var(--gold); }
@keyframes slideIn { from { opacity:0; transform:translateY(-12px); } to { opacity:1; transform:translateY(0); } }

/* -------------------------------------------------------
   Top Bar (above header)
   ------------------------------------------------------- */
.top-bar {
  background: var(--dark);
  color: rgba(255,255,255,.85);
  font-size: .72rem;
  padding: .4rem 0;
}
.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.top-bar a { color: rgba(255,255,255,.85); }
.top-bar a:hover { color: var(--gold-light); }
.top-bar__links { display: flex; gap: 1.2rem; align-items: center; }
.top-bar__sep { color: rgba(255,255,255,.3); font-size: .65rem; }

/* Currency Switcher */
.currency-switcher {
  position: relative;
  display: inline-flex;
}
.currency-switcher__toggle {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  color: rgba(255,255,255,.9);
  font-size: .72rem;
  padding: .2rem .55rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background .2s, border-color .2s;
  font-family: inherit;
  line-height: 1.3;
}
.currency-switcher__toggle:hover {
  background: rgba(255,255,255,.14);
  border-color: rgba(255,255,255,.25);
}
.currency-switcher__toggle svg {
  transition: transform .2s;
  opacity: .7;
}
.currency-switcher__toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}
.currency-switcher__dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--white);
  border: 1px solid var(--cream-2);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
  min-width: 170px;
  padding: .35rem 0;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity .15s, visibility .15s, transform .15s;
}
.currency-switcher__dropdown.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.currency-switcher__option {
  display: flex;
  align-items: center;
  gap: .5rem;
  width: 100%;
  padding: .5rem .8rem;
  border: none;
  background: none;
  cursor: pointer;
  font-size: .78rem;
  color: var(--text);
  font-family: inherit;
  text-align: left;
  transition: background .15s;
}
.currency-switcher__option:hover {
  background: var(--cream);
}
.currency-switcher__option.is-active {
  background: var(--gold-light);
  font-weight: 600;
}
.currency-switcher__flag { font-size: 1rem; line-height: 1; }
.currency-switcher__code { font-weight: 600; }
.currency-switcher__symbol { color: var(--text-muted); font-size: .7rem; }
.currency-switcher__check { margin-left: auto; color: var(--gold-dark); }

/* -------------------------------------------------------
   Header
   ------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  box-shadow: 0 1px 6px rgba(0,0,0,.06);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding-block: .7rem;
}
.logo img { height: 48px; }
.main-nav { margin-left: auto; }
.main-nav ul {
  display: flex;
  gap: 0;
}
.main-nav a {
  padding: .5rem .75rem;
  font-size: .82rem;
  font-weight: 500;
  border-radius: var(--radius);
  transition: all var(--transition);
  text-transform: uppercase;
  letter-spacing: .03em;
}
.main-nav a:hover { color: var(--dark); }
.main-nav a.is-active { color: var(--dark); font-weight: 600; }

.header-search {
  flex: 1;
  max-width: 380px;
  margin: 0 1rem;
  position: relative;
}
.header-search input {
  width: 100%;
  padding: .55rem 2.5rem .55rem 1rem;
  border: 1.5px solid var(--cream-2);
  border-radius: 100px;
  font-size: .82rem;
  font-family: var(--font-body);
  background: var(--cream);
  transition: border-color var(--transition);
}
.header-search input:focus {
  outline: none;
  border-color: var(--dark);
  background: var(--white);
}
.header-search button {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: .3rem;
}
.search-suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  background: var(--white);
  border: 1px solid var(--cream-2);
  border-radius: 10px;
  box-shadow: var(--shadow);
  z-index: 220;
  max-height: 320px;
  overflow: auto;
}
.search-suggest__item {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .6rem .8rem;
  border-bottom: 1px solid var(--cream-2);
}
.search-suggest__item:last-child { border-bottom: 0; }
.search-suggest__item:hover { background: var(--cream); }
.search-suggest__thumb {
  width: 42px;
  height: 42px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--cream-2);
  background: var(--cream);
}
.search-suggest__name {
  font-size: .84rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.25;
}
.search-suggest__meta {
  margin-top: .15rem;
  font-size: .72rem;
  color: var(--text-muted);
}

.header-actions { display: flex; gap: .6rem; }
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: .3rem;
  margin-left: auto;
}
.hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
}

/* -------------------------------------------------------
   Categories Navigation Bar
   ------------------------------------------------------- */
.categories-bar {
  background: var(--dark);
  padding: .5rem 0;
}
.categories-bar ul {
  display: flex;
  gap: 0;
  justify-content: center;
  overflow-x: auto;
}
.categories-bar a {
  display: block;
  padding: .4rem 1rem;
  font-size: .78rem;
  font-weight: 500;
  color: rgba(255,255,255,.85);
  text-transform: uppercase;
  letter-spacing: .05em;
  white-space: nowrap;
  transition: all var(--transition);
}
.categories-bar a:hover { color: var(--gold-light); }

/* -------------------------------------------------------
   Hero Slider
   ------------------------------------------------------- */
.hero-slider {
  position: relative;
  overflow: hidden;
  background: var(--cream);
}
.hero-slider__track {
  display: flex;
  transition: transform .5s ease;
}
.hero-slide {
  min-width: 100%;
  min-height: 420px;
  display: flex;
  align-items: center;
  position: relative;
  background-size: cover;
  background-position: center;
}
.hero-slide::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(139,26,26,.85) 0%, rgba(139,26,26,.4) 50%, transparent 100%);
}
.hero-slide__content {
  position: relative;
  z-index: 1;
  max-width: 500px;
  padding: 3rem 0;
  color: var(--white);
}
.hero-slide__subtitle {
  font-size: .75rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: .5rem;
}
.hero-slide h1 {
  color: var(--white);
  margin-bottom: 1rem;
  line-height: 1.15;
}
.hero-slide p {
  font-size: .95rem;
  color: rgba(255,255,255,.85);
  margin-bottom: 1.5rem;
  max-width: 420px;
}
.hero-slider__dots {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: .5rem;
  z-index: 2;
}
.hero-slider__dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,.4);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
}
.hero-slider__dot.active { background: var(--gold); width: 28px; border-radius: 100px; }
.hero-slider__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  backdrop-filter: blur(4px);
  border: none;
  color: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
.hero-slider__arrow:hover { background: rgba(255,255,255,.4); }
.hero-slider__arrow--prev { left: 1.5rem; }
.hero-slider__arrow--next { right: 1.5rem; }

/* -------------------------------------------------------
   Section Utilities
   ------------------------------------------------------- */
.section { padding: 3.5rem 0; }
.section--cream { background: var(--cream); }
.section--dark { background: var(--dark); color: var(--white); }
.section--grey { background: #f7f7f7; }
.section-header { margin-bottom: 2rem; }
.section-header h2 { margin-bottom: .4rem; }
.section-header p { color: var(--text-muted); max-width: 500px; font-size: .9rem; }
.section-header--center { text-align: center; }
.section-header--center p { margin-inline: auto; }

/* -------------------------------------------------------
   Category Cards
   ------------------------------------------------------- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
}
.category-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 1;
  background: var(--cream);
  transition: transform var(--transition);
}
.category-card:hover { transform: translateY(-3px); }
.category-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.category-card:hover img { transform: scale(1.08); }
.category-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.6) 0%, transparent 60%);
  display: flex;
  align-items: flex-end;
  padding: 1rem;
}
.category-card__name {
  color: var(--white);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
}
.category-card__count {
  color: rgba(255,255,255,.7);
  font-size: .72rem;
  display: block;
}

/* -------------------------------------------------------
   Features / Why Choose Us
   ------------------------------------------------------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}
.feature-card {
  text-align: center;
  padding: 2rem 1.2rem;
  background: var(--white);
  border: 1px solid var(--cream-2);
  border-radius: var(--radius-lg);
  transition: box-shadow var(--transition), transform var(--transition);
}
.feature-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}
.feature-card__icon {
  width: 52px; height: 52px;
  margin: 0 auto .8rem;
  background: rgba(139,26,26,.08);
  color: var(--dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}
.feature-card h4 { margin-bottom: .3rem; font-size: .95rem; }
.feature-card p { font-size: .82rem; color: var(--text-muted); }

/* -------------------------------------------------------
   Product Cards — E-commerce Style
   ------------------------------------------------------- */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.2rem;
}
.product-card {
  background: var(--white);
  border: 1px solid var(--cream-2);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow var(--transition);
  position: relative;
}
.product-card:hover {
  box-shadow: var(--shadow-hover);
}
.product-card__img-wrap {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: #f9f9f9;
}
.product-card__img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.product-card:hover .product-card__img-wrap img { transform: scale(1.05); }

/* Hover Action Buttons (side icons) */
.product-card__actions {
  position: absolute;
  top: .6rem;
  right: .6rem;
  display: flex;
  flex-direction: column;
  gap: .4rem;
  opacity: 0;
  transform: translateX(10px);
  transition: all .3s ease;
}
.product-card:hover .product-card__actions {
  opacity: 1;
  transform: translateX(0);
}
.product-card__action-btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--white);
  border: none;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  transition: all var(--transition);
}
.product-card__action-btn:hover {
  background: var(--dark);
  color: var(--white);
}
.product-card__action-btn svg { width: 16px; height: 16px; }

/* Add to cart button (bottom overlay) */
.product-card__cart-btn {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--dark);
  color: var(--white);
  border: none;
  padding: .6rem;
  font-size: .78rem;
  font-weight: 600;
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: .05em;
  cursor: pointer;
  text-align: center;
  transform: translateY(100%);
  transition: transform .3s ease;
  display: block;
  width: 100%;
}
.product-card__cart-btn:hover { background: var(--dark-3); }
.product-card:hover .product-card__cart-btn { transform: translateY(0); }

/* Badges */
.product-card__badge {
  position: absolute;
  top: .6rem;
  left: .6rem;
  padding: .25rem .6rem;
  border-radius: var(--radius);
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  z-index: 1;
}
.product-card__badge--sale { background: var(--danger); color: var(--white); }
.product-card__badge--new { background: var(--dark); color: var(--white); }
.product-card__badge--auction { background: var(--gold); color: var(--white); }
.product-card__badge--hot { background: #e67e22; color: var(--white); }

/* Body */
.product-card__body { padding: .8rem 1rem; }
.product-card__cat {
  font-size: .7rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-bottom: .2rem;
}
.product-card__name {
  font-family: var(--font-body);
  font-size: .88rem;
  font-weight: 500;
  margin-bottom: .4rem;
  color: var(--text);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-card__name a:hover { color: var(--dark); }
.product-card__rating {
  display: flex;
  align-items: center;
  gap: .3rem;
  margin-bottom: .3rem;
}
.product-card__stars { color: #f5a623; font-size: .75rem; letter-spacing: 1px; }
.product-card__rating-count { font-size: .7rem; color: var(--text-muted); }
.product-card__price {
  font-weight: 700;
  color: var(--text);
  font-size: .95rem;
}
.product-card__price-old {
  text-decoration: line-through;
  color: var(--text-muted);
  font-size: .8rem;
  font-weight: 400;
  margin-left: .4rem;
}
.product-card__pv {
  font-size: .7rem;
  color: var(--dark);
  margin-top: .2rem;
  font-weight: 500;
}

/* Old footer style kept for backwards compat */
.product-card__footer {
  padding: .7rem 1rem;
  border-top: 1px solid var(--cream-2);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* -------------------------------------------------------
   Promo Banner Strip
   ------------------------------------------------------- */
.promo-banners {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}
.promo-banner {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 180px;
  display: flex;
  align-items: center;
  padding: 2rem;
  background-size: cover;
  background-position: center;
}
.promo-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(139,26,26,.8), transparent);
}
.promo-banner__content {
  position: relative;
  z-index: 1;
  color: var(--white);
}
.promo-banner__content h3 { color: var(--white); margin-bottom: .5rem; }

/* -------------------------------------------------------
   CTA Banner
   ------------------------------------------------------- */
.cta-banner {
  background: linear-gradient(110deg, var(--dark) 0%, #A52424 100%);
  color: var(--white);
  padding: 3.5rem 0;
  text-align: center;
}
.cta-banner h2 { color: var(--white); margin-bottom: .8rem; }
.cta-banner p { color: rgba(255,255,255,.8); margin-bottom: 1.5rem; font-size: .95rem; }

/* -------------------------------------------------------
   About / Values
   ------------------------------------------------------- */
.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.5rem;
}
.value-card {
  padding: 1.5rem;
  border-left: 3px solid var(--dark);
  background: var(--white);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.value-card h4 { margin-bottom: .3rem; color: var(--dark); }
.value-card p { font-size: .85rem; color: var(--text-muted); }

/* -------------------------------------------------------
   Forms
   ------------------------------------------------------- */
.form-group { margin-bottom: 1.2rem; }
.form-group label {
  display: block;
  font-size: .82rem;
  font-weight: 500;
  margin-bottom: .35rem;
  color: var(--text);
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: .65rem .9rem;
  border: 1px solid var(--cream-2);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: .85rem;
  color: var(--text);
  background: var(--white);
  transition: border-color var(--transition);
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--dark);
}
.form-group textarea { resize: vertical; min-height: 100px; }

.auth-card {
  max-width: 440px;
  margin: 3rem auto;
  padding: 2.2rem;
  background: var(--white);
  border: 1px solid var(--cream-2);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.auth-card h2 { margin-bottom: 1.4rem; font-size: 1.6rem; }

/* -------------------------------------------------------
   Dashboard
   ------------------------------------------------------- */
.dashboard-grid {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 1.5rem;
  min-height: 70vh;
}
.sidebar {
  background: var(--dark);
  border-radius: var(--radius-lg);
  padding: 1.3rem;
}
.sidebar ul { display: flex; flex-direction: column; gap: .3rem; }
.sidebar a {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .6rem .8rem;
  border-radius: var(--radius);
  font-size: .82rem;
  color: rgba(255,255,255,.7);
  transition: all var(--transition);
}
.sidebar a:hover,
.sidebar a.active {
  background: rgba(255,255,255,.1);
  color: var(--gold-light);
}
.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.stat-card {
  padding: 1.2rem;
  background: var(--white);
  border: 1px solid var(--cream-2);
  border-radius: var(--radius-lg);
}
.stat-card__value {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--dark);
}
.stat-card__label { font-size: .75rem; color: var(--text-muted); margin-top: .15rem; }

/* -------------------------------------------------------
   Table
   ------------------------------------------------------- */
.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: .82rem;
}
th, td {
  text-align: left;
  padding: .7rem .8rem;
  border-bottom: 1px solid var(--cream-2);
}
th {
  background: var(--cream);
  font-weight: 600;
  font-size: .72rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--text-muted);
}
tr:hover td { background: #fafafa; }

/* -------------------------------------------------------
   Badges
   ------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: .2rem .6rem;
  border-radius: 100px;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .03em;
}
.badge--gold    { background: #FFF3CD; color: #856404; }
.badge--green   { background: #FDE8E8; color: #8B1A1A; }
.badge--red     { background: #f8d7da; color: #721c24; }
.badge--grey    { background: #e9ecef; color: #495057; }

/* -------------------------------------------------------
   Footer — E-commerce Crimson
   ------------------------------------------------------- */
.site-footer {
  background: var(--dark);
  color: rgba(255,255,255,.8);
  padding-top: 3rem;
}
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.footer-brand img { margin-bottom: .8rem; }
.footer-brand p { font-size: .82rem; line-height: 1.6; color: rgba(255,255,255,.6); }
.footer-col h4 {
  font-family: var(--font-body);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: .8rem;
}
.footer-col ul { display: flex; flex-direction: column; gap: .4rem; }
.footer-col a { font-size: .82rem; color: rgba(255,255,255,.6); transition: color var(--transition); }
.footer-col a:hover { color: var(--gold-light); }
.footer-col address p { font-size: .8rem; margin-bottom: .3rem; color: rgba(255,255,255,.6); }
.footer-bottom {
  padding: 1.2rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .8rem;
  font-size: .75rem;
  color: rgba(255,255,255,.4);
}
.footer-payments {
  display: flex;
  gap: .5rem;
  align-items: center;
}
.footer-payments img { height: 22px; opacity: .6; }

/* -------------------------------------------------------
   Scroll to Top
   ------------------------------------------------------- */
.scroll-top {
  position: fixed;
  bottom: 5rem;
  right: 1.2rem;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--dark);
  color: var(--white);
  border: none;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 90;
  box-shadow: var(--shadow);
  transition: all var(--transition);
}
.scroll-top.visible { display: flex; }
.scroll-top:hover { background: var(--dark-3); }

/* -------------------------------------------------------
   Header Icons (logged-in user bar)
   ------------------------------------------------------- */
.header-icons {
  display: flex;
  align-items: center;
  gap: .3rem;
}
.header-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  color: var(--text);
  transition: all var(--transition);
  position: relative;
}
.header-icon:hover { background: var(--cream); color: var(--dark); }
.header-icon__badge {
  position: absolute;
  top: 0; right: 0;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--danger);
  color: var(--white);
  font-size: .6rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.header-icon__avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--dark);
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: .75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* Member tier avatar colors */
.avatar--pending        { background: #999 !important; }
.avatar--active         { background: #8B1A1A !important; }
.avatar--privilege      { background: #8E44AD !important; }
.avatar--gold           { background: #B5954F !important; }
.avatar--privilege_gold { background: #B5954F !important; border: 2px solid #8E44AD !important; }

/* -------------------------------------------------------
   Mobile Slide-Out Menu
   ------------------------------------------------------- */
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 199;
  opacity: 0;
  transition: opacity .3s ease;
}
.mobile-overlay.open { display: block; opacity: 1; }
.mobile-menu {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(300px, 85vw);
  background: var(--white);
  z-index: 200;
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding-bottom: 65px;
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--cream-2);
}
.mobile-menu__close {
  background: none; border: none; color: var(--text); cursor: pointer;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius);
}
.mobile-menu__close:hover { background: var(--cream); }
.mobile-menu__user {
  display: flex; align-items: center; gap: .7rem;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--cream-2);
  background: var(--cream);
}
.mobile-menu__avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--dark);
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: .85rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.mobile-menu__name { font-size: .85rem; font-weight: 600; color: var(--text); }
.mobile-menu__email { font-size: .72rem; color: var(--text-muted); }
.mobile-menu__links { padding: .4rem 0; }
.mobile-menu__links li a {
  display: flex; align-items: center; justify-content: space-between;
  padding: .6rem 1.2rem;
  font-size: .85rem; color: var(--text);
  transition: all var(--transition);
}
.mobile-menu__links li a:hover { background: var(--cream); color: var(--dark); }
.mobile-menu__divider { border-top: 1px solid var(--cream-2); margin: .2rem 1.2rem; }
.mobile-menu__actions { display: flex; gap: .6rem; padding: .8rem 1.2rem; }

/* -------------------------------------------------------
   Sidebar (shared component)
   ------------------------------------------------------- */
.sidebar__user {
  text-align: center;
  margin-bottom: 1.2rem;
}
.sidebar__avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto .6rem;
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
}
.sidebar__name { font-size: .82rem; font-weight: 600; color: var(--white); }
.sidebar__email { font-size: .68rem; color: rgba(255,255,255,.5); margin-top: .1rem; }
.sidebar__progress { margin-top: .6rem; }
.sidebar__progress-label { font-size: .62rem; color: rgba(255,255,255,.4); margin-bottom: .25rem; }
.sidebar__progress-bar { background: rgba(255,255,255,.1); border-radius: 100px; height: 3px; }
.sidebar__progress-fill { background: var(--gold); height: 100%; border-radius: 100px; transition: width .5s; }

/* -------------------------------------------------------
   Profile Completion Prompt (dashboard)
   ------------------------------------------------------- */
.profile-prompt {
  display: flex;
  align-items: center;
  gap: .8rem;
  background: var(--cream);
  border: 1px solid var(--cream-2);
  border-radius: var(--radius-lg);
  padding: 1rem 1.2rem;
  margin-bottom: 1.2rem;
}
.profile-prompt__info { flex: 1; }
.profile-prompt__title { font-weight: 600; font-size: .85rem; margin-bottom: .2rem; }
.profile-prompt__desc { font-size: .75rem; color: var(--text-muted); }
.profile-prompt__bar { width: 80px; height: 5px; background: var(--cream-2); border-radius: 100px; margin-top: .3rem; }
.profile-prompt__fill { height: 100%; background: var(--dark); border-radius: 100px; }

/* -------------------------------------------------------
   Breadcrumb
   ------------------------------------------------------- */
.breadcrumb {
  font-size: .78rem;
  color: var(--text-muted);
  margin-bottom: 1.2rem;
}
.breadcrumb a:hover { color: var(--dark); }
.breadcrumb span { color: var(--text-muted); margin: 0 .3rem; }

/* -------------------------------------------------------
   Product Detail — Tabs
   ------------------------------------------------------- */
.product-tabs {
  border-top: 1px solid var(--cream-2);
  margin-top: 2rem;
}
.product-tabs__nav {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--cream-2);
}
.product-tabs__btn {
  padding: .8rem 1.5rem;
  font-size: .85rem;
  font-weight: 500;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  color: var(--text-muted);
  transition: all var(--transition);
}
.product-tabs__btn.active,
.product-tabs__btn:hover {
  color: var(--dark);
  border-bottom-color: var(--dark);
}
.product-tabs__content { padding: 1.5rem 0; }

/* -------------------------------------------------------
   Responsive
   ------------------------------------------------------- */
@media (max-width: 900px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .sidebar { border-radius: var(--radius-lg); }
  .top-bar { display: none; }
}
@media (max-width: 700px) {
  .main-nav, .header-actions, .header-icons, .header-search { display: none; }
  .hamburger { display: flex; }
  .categories-bar { display: none; }
  .footer-inner { grid-template-columns: 1fr; gap: 1.5rem; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .hero-slide { min-height: 300px; }
  .hero-slide__content { padding: 2rem 0; }

  [style*="grid-template-columns: 1fr 360px"],
  [style*="grid-template-columns: 1fr 340px"],
  [style*="grid-template-columns:1fr 360px"],
  [style*="grid-template-columns:1fr 340px"],
  [style*="grid-template-columns:220px 1fr"],
  [style*="grid-template-columns: 220px 1fr"],
  [style*="grid-template-columns:1.1fr 1fr"],
  [style*="grid-template-columns: 1.1fr 1fr"],
  [style*="grid-template-columns:1fr 1fr;gap:4rem"] {
    grid-template-columns: 1fr !important;
  }

  body { padding-bottom: 60px; }
  .mobile-bottom-nav { display: flex !important; }
}

/* -------------------------------------------------------
   Mobile Sticky Bottom Navigation
   ------------------------------------------------------- */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 350;
  height: 56px;
  background: var(--white);
  border-top: 1px solid var(--cream-2);
  box-shadow: 0 -1px 8px rgba(0,0,0,.06);
  align-items: center;
  justify-content: space-around;
}
.mobile-bottom-nav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  flex: 1;
  height: 100%;
  color: var(--text-muted);
  font-size: .62rem;
  font-weight: 500;
  transition: color var(--transition);
  position: relative;
}
.mobile-bottom-nav__item.active,
.mobile-bottom-nav__item:hover {
  color: var(--dark);
}
.mobile-bottom-nav__item.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 25%;
  right: 25%;
  height: 2px;
  background: var(--dark);
  border-radius: 0 0 4px 4px;
}
.mobile-bottom-nav__badge {
  position: absolute;
  top: 4px;
  right: calc(50% - 18px);
  min-width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--danger);
  color: var(--white);
  font-size: .55rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* -------------------------------------------------------
   Comprehensive Responsive Fixes
   Catches every inline grid layout in pages that needs to
   collapse on smaller viewports. Works via attribute
   selector (CSS will match even with varied whitespace).
   ------------------------------------------------------- */

/* Tablet breakpoint — 2 col layouts become 1 col */
@media (max-width: 900px) {
  /* Products grid: 2 columns minimum */
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
    gap: 1rem !important;
  }
  /* Stat cards wrap */
  .stat-cards { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) !important; }

  /* 3-column grids become 2-column on tablet */
  [style*="grid-template-columns: repeat(3,1fr)"],
  [style*="grid-template-columns:repeat(3,1fr)"],
  [style*="grid-template-columns: repeat(3, 1fr)"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* Mobile breakpoint — aggressive collapse */
@media (max-width: 700px) {
  /* Products grid: 2 compact columns on mobile */
  .products-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: .7rem !important;
  }
  .product-card__body { padding: .8rem !important; }
  .product-card__title { font-size: .82rem !important; }
  .product-card__price { font-size: .95rem !important; }

  /* Category grid: 2 compact columns */
  .category-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: .7rem !important;
  }

  /* Features grid: 2 cols, tighter */
  .features-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: .8rem !important;
  }
  .feature-card { padding: 1rem .8rem !important; }
  .feature-card__icon { font-size: 1.8rem !important; }

  /* Promo banners stack */
  .promo-banners { grid-template-columns: 1fr !important; }
  .promo-banner { min-height: 160px !important; }

  /* Stat cards: 2 cols on mobile */
  .stat-cards { grid-template-columns: repeat(2, 1fr) !important; gap: .7rem !important; }
  .stat-card { padding: 1rem !important; }
  .stat-card__value { font-size: 1.3rem !important; }

  /* Universal 2-column → 1-column collapse for inline styles */
  [style*="grid-template-columns:1fr 1fr"]:not([data-keep-grid]),
  [style*="grid-template-columns: 1fr 1fr"]:not([data-keep-grid]),
  [style*="grid-template-columns:1.1fr 1fr"],
  [style*="grid-template-columns: 1.1fr 1fr"],
  [style*="grid-template-columns:1fr 1.1fr"],
  [style*="grid-template-columns: 1fr 1.1fr"],
  [style*="grid-template-columns:1fr 1.2fr"],
  [style*="grid-template-columns: 1fr 1.2fr"],
  [style*="grid-template-columns:1fr 1.4fr"],
  [style*="grid-template-columns: 1fr 1.4fr"],
  [style*="grid-template-columns:1.4fr 1fr"],
  [style*="grid-template-columns: 1.4fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  /* Sidebar + main collapse */
  [style*="grid-template-columns:220px 1fr"],
  [style*="grid-template-columns: 220px 1fr"],
  [style*="grid-template-columns:200px 1fr"],
  [style*="grid-template-columns: 200px 1fr"],
  [style*="grid-template-columns:180px 1fr"],
  [style*="grid-template-columns: 180px 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* Main + sidebar (right) collapse */
  [style*="grid-template-columns:1fr 340px"],
  [style*="grid-template-columns: 1fr 340px"],
  [style*="grid-template-columns:1fr 360px"],
  [style*="grid-template-columns: 1fr 360px"],
  [style*="grid-template-columns:1fr 300px"],
  [style*="grid-template-columns: 1fr 300px"] {
    grid-template-columns: 1fr !important;
  }

  /* Cart/bids item rows: stack image + details */
  [style*="grid-template-columns:80px 1fr auto"],
  [style*="grid-template-columns: 80px 1fr auto"],
  [style*="grid-template-columns:80px 1fr 100px"],
  [style*="grid-template-columns: 80px 1fr 100px"] {
    grid-template-columns: 70px 1fr !important;
    gap: .8rem !important;
  }

  /* Form rows (wallet leadership/rto) stack */
  [style*="grid-template-columns:1fr 1fr auto"],
  [style*="grid-template-columns: 1fr 1fr auto"],
  [style*="grid-template-columns:1fr auto"],
  [style*="grid-template-columns: 1fr auto"] {
    grid-template-columns: 1fr !important;
    gap: .6rem !important;
  }

  /* 3-col grids become 1 col on small mobile */
  [style*="grid-template-columns:repeat(3,1fr)"],
  [style*="grid-template-columns: repeat(3,1fr)"],
  [style*="grid-template-columns:repeat(3, 1fr)"],
  [style*="grid-template-columns: repeat(3, 1fr)"] {
    grid-template-columns: 1fr !important;
  }

  /* 5-col inline grids (wallet forms) stack */
  [style*="grid-template-columns:1fr 1fr 1fr 120px 120px"],
  [style*="grid-template-columns: 1fr 1fr 1fr 120px 120px"] {
    grid-template-columns: 1fr 1fr !important;
    gap: .6rem !important;
  }

  /* Admin button rows wrap nicely */
  .btn { font-size: .78rem; padding: .5rem .9rem; }
  .btn--lg { font-size: .9rem; padding: .7rem 1.2rem; }

  /* Hero slide text wider on mobile */
  .hero-slide__content { max-width: 100% !important; padding: 1.5rem 0 !important; }
  .hero-slide h1 { font-size: 1.6rem !important; line-height: 1.2 !important; }
  .hero-slide p { font-size: .85rem !important; max-width: 100% !important; }
  .hero-slider__arrow { width: 32px !important; height: 32px !important; }
  .hero-slider__arrow--prev { left: .6rem !important; }
  .hero-slider__arrow--next { right: .6rem !important; }

  /* Tables: horizontal scroll — auto-wrap even without .table-wrap */
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
  .section table,
  main table,
  .container > table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    white-space: nowrap;
  }
  table { font-size: .78rem; }
  table th, table td { padding: .5rem .6rem !important; white-space: nowrap; }

  /* Admin dashboard: button rows wrap properly */
  .stat-card { min-width: 0; }
  .container > div { max-width: 100%; }

  /* Prevent any div from exceeding viewport */
  .section > .container > div,
  .section > .container {
    max-width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
  }

  /* Section headers wrap nicely */
  .section-header { flex-wrap: wrap !important; }
  .section { padding: 2rem 0 !important; }
  h2 { font-size: 1.5rem !important; }
  h3 { font-size: 1.2rem !important; }
  h4 { font-size: 1rem !important; }

  /* CTA banner padding */
  .cta-banner { padding: 2.5rem 1rem !important; }
  .cta-banner h2 { font-size: 1.4rem !important; }

  /* Container padding tighter */
  .container { padding-left: .9rem !important; padding-right: .9rem !important; }

  /* Form fields full width + comfortable tap targets */
  .form-group input,
  .form-group select,
  .form-group textarea,
  input[type="text"]:not(.currency-switcher__option *),
  input[type="email"],
  input[type="password"],
  input[type="number"],
  input[type="tel"],
  input[type="date"],
  input[type="file"],
  select,
  textarea {
    font-size: 16px !important; /* iOS prevents zoom on focus when font-size >= 16px */
  }

  /* Prevent horizontal overflow from rogue elements */
  body, html { overflow-x: hidden; }
  img { max-width: 100%; height: auto; }

  /* Grid/flex children default to min-width:auto, which causes overflow.
     Force them to allow shrinking below intrinsic content size. */
  [style*="display:grid"] > *,
  [style*="display: grid"] > *,
  [style*="display:flex"] > *,
  [style*="display: flex"] > *,
  .products-grid > *,
  .category-grid > *,
  .features-grid > *,
  .promo-banners > *,
  .stat-cards > *,
  .dashboard-grid > *,
  main > *,
  .container > * {
    min-width: 0;
  }
}

/* Extra small — iPhone SE etc. */
@media (max-width: 400px) {
  .hero-slide { min-height: 260px !important; }
  .hero-slide h1 { font-size: 1.35rem !important; }
  .stat-cards { grid-template-columns: 1fr 1fr !important; }
  .stat-card__value { font-size: 1.15rem !important; }
  .product-card__title { font-size: .75rem !important; }
  .product-card__price { font-size: .88rem !important; }
}
