/* ============================================================
   SHOPWAVE - MAIN STYLESHEET
   ============================================================ */

:root {
  --primary: #FF3E00;
  --primary-dark: #CC3200;
  --primary-light: #FF6B3D;
  --accent: #FFB800;
  --accent-dark: #E6A600;
  --success: #00C853;
  --info: #0288D1;
  --warning: #FFB300;
  --danger: #F44336;
  --dark: #0D0D0D;
  --gray-900: #1A1A2E;
  --gray-800: #2D2D2D;
  --gray-700: #555;
  --gray-500: #888;
  --gray-300: #CCC;
  --gray-100: #F5F5F5;
  --white: #FFFFFF;
  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.15);
  --transition: all 0.2s ease;
}

* { box-sizing: border-box; }
body {
  font-family: var(--font-body);
  background: #FAFAFA;
  color: var(--dark);
  line-height: 1.6;
  overflow-x: hidden;
}
h1,h2,h3,h4,h5,h6 { font-family: var(--font-display); font-weight: 700; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }

/* Page Loader */
.page-loader {
  position: fixed; inset: 0; background: var(--white);
  z-index: 9999; display: flex; align-items: center; justify-content: center;
  transition: opacity 0.4s ease;
}
.page-loader.hidden { opacity: 0; pointer-events: none; }
.loader-logo { font-family: var(--font-display); font-size: 2rem; font-weight: 800; color: var(--primary); margin-bottom: 16px; }
.loader-bar { width: 200px; height: 3px; background: var(--gray-100); border-radius: 4px; overflow: hidden; }
.loader-bar span { display: block; height: 100%; width: 40%; background: var(--primary); border-radius: 4px; animation: loadSlide 1s ease-in-out infinite; }
@keyframes loadSlide { 0%{transform:translateX(-100%)} 100%{transform:translateX(550%)} }

/* Announcement Bar */
/* Announcement Bar */
.announcement-bar {
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  color: white; padding: 7px 16px; font-size: 0.78rem;
}
.announcement-bar .container { display: flex; align-items: center; justify-content: center; position: relative; }
.announcement-text { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; align-items: center; }
.announcement-text .sep { opacity: 0.4; }
.ann-close { background: none; border: none; color: white; position: absolute; right: 0; font-size: 1.1rem; cursor: pointer; opacity: 0.6; line-height: 1; padding: 0; }
.ann-close:hover { opacity: 1; }

/* ── Main Navbar ── */
.main-nav {
  background: #fff;
  box-shadow: 0 1px 0 rgba(0,0,0,0.07);
  padding: 0;
  z-index: 1000;
  overflow: visible;
}

/* Ensure nav-actions dropdown is never clipped */
.nav-actions { overflow: visible !important; }
.nav-actions .dropdown { position: static; }
.nav-actions .dropdown-menu {
  position: fixed !important;
  z-index: 9999 !important;
  top: auto !important;
  right: 12px !important;
  left: auto !important;
}
@media (max-width: 991.98px) {
  .nav-actions .dropdown-menu {
    right: 8px !important;
    max-width: calc(100vw - 16px);
  }
}

/* Top row: brand / search / actions */
.main-nav > .container {
  padding-top: 12px;
  padding-bottom: 12px;
}

/* Brand */
.navbar-brand {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--font-display); font-weight: 800; font-size: 1.35rem;
  text-decoration: none; flex-shrink: 0;
}
.brand-icon {
  background: var(--primary); color: white;
  width: 36px; height: 36px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.82rem; font-weight: 800; letter-spacing: -0.5px;
}
.brand-text { color: var(--dark); }

/* Search */
.nav-search { position: relative; }
.search-form {
  display: flex; align-items: center;
  border: 1.5px solid var(--gray-300);
  border-radius: 40px; overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: var(--gray-100);
}
.search-form:focus-within {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255,62,0,0.08);
}
.search-category-wrap select {
  border: none; border-right: 1px solid var(--gray-300);
  padding: 0 12px 0 16px; background: transparent;
  font-size: 0.78rem; font-weight: 500; cursor: pointer; outline: none;
  max-width: 130px; color: var(--gray-700); height: 42px;
}
.search-input {
  border: none; background: transparent;
  padding: 0 12px; flex: 1; font-size: 0.88rem; outline: none; height: 42px;
}
.search-btn {
  background: var(--primary); color: white; border: none;
  padding: 0 20px; height: 42px; cursor: pointer; font-size: 0.95rem;
  border-radius: 0 40px 40px 0; transition: background 0.2s;
  flex-shrink: 0;
}
.search-btn:hover { background: var(--primary-dark); }

.search-suggestions {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: white;
  border: 1px solid var(--gray-200); border-radius: 14px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
  z-index: 1001; display: none; max-height: 400px; overflow-y: auto;
}

/* Nav Action Icons */
.nav-actions { gap: 6px; }
.nav-icon-btn {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; position: relative; color: var(--gray-600);
  transition: var(--transition); font-size: 1.05rem;
  background: var(--gray-100); text-decoration: none;
}
.nav-icon-btn:hover { background: var(--gray-200); color: var(--primary); }
.badge-dot {
  position: absolute; top: 1px; right: 1px; background: var(--primary);
  color: white; border-radius: 50%; width: 17px; height: 17px; font-size: 0.6rem;
  display: flex; align-items: center; justify-content: center; border: 2px solid white;
}

/* Credits pill */
.nav-credits {
  display: flex; align-items: center; gap: 5px;
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: white; padding: 6px 13px; border-radius: 20px;
  font-size: 0.78rem; font-weight: 600; transition: var(--transition);
  text-decoration: none; white-space: nowrap;
}
.nav-credits:hover { transform: scale(1.04); box-shadow: 0 4px 12px rgba(255,165,0,0.3); color: white; }

/* User button */
.nav-user-btn {
  display: flex; align-items: center; gap: 7px; background: var(--gray-100);
  border: 1.5px solid var(--gray-200); padding: 5px 12px 5px 6px;
  border-radius: 30px; cursor: pointer; transition: var(--transition);
}
.nav-user-btn:hover { border-color: var(--primary); background: #fff; }
.nav-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.nav-avatar-initial {
  width: 28px; height: 28px; border-radius: 50%; background: var(--primary);
  color: white; display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700;
}
.user-name-nav { font-size: 0.83rem; font-weight: 600; color: var(--dark); }

/* User dropdown */
.user-dropdown {
  min-width: 230px; border: 1px solid var(--gray-200);
  border-radius: 14px; box-shadow: 0 8px 30px rgba(0,0,0,0.12);
  overflow: hidden;
}
.user-dropdown .dropdown-header { padding: 14px 16px; background: var(--gray-50); }
.tier-badge { padding: 2px 8px; border-radius: 10px; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.tier-bronze { background: #CD7F32; color: white; }
.tier-silver { background: #C0C0C0; color: white; }
.tier-gold { background: #FFD700; color: #333; }
.tier-platinum { background: #E5E4E2; color: #333; }
.tier-diamond { background: linear-gradient(135deg, #0ea5e9, #8b5cf6); color: white; }

/* Cart button */
.nav-cart-btn {
  position: relative; display: flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 50%; background: var(--primary);
  color: white; font-size: 1rem; transition: var(--transition); text-decoration: none;
}
.nav-cart-btn:hover { background: var(--primary-dark); transform: scale(1.05); color: white; }
.cart-count {
  position: absolute; top: -3px; right: -3px; background: #FFD700;
  color: #222; border-radius: 50%; min-width: 19px; height: 19px; font-size: 0.62rem;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; border: 2px solid white; padding: 0 3px;
}

/* ── Category Nav Bar ── */
.category-nav {
  border-top: 1px solid var(--gray-100);
  background: #fff;
}
.category-nav-list {
  display: flex; align-items: center; list-style: none;
  margin: 0; padding: 0 4px; gap: 2px; overflow-x: auto;
}
.category-nav-list::-webkit-scrollbar { display: none; }
.category-nav-list li a {
  display: flex; align-items: center; gap: 5px;
  padding: 9px 13px; font-size: 0.81rem; font-weight: 500;
  color: var(--gray-600); white-space: nowrap;
  border-radius: 6px; transition: var(--transition); text-decoration: none;
}
.category-nav-list li a:hover { background: var(--gray-100); color: var(--primary); }
.category-nav-list li.active > a,
.category-nav-list li > a.active { color: var(--primary); font-weight: 600; }
.spin-link {
  background: linear-gradient(135deg, #FF6B6B, #FFE66D) !important;
  color: var(--dark) !important; font-weight: 600 !important; border-radius: 20px !important;
}

.has-mega-menu { position: relative; }
.mega-menu {
  position: absolute; top: 100%; left: 0; width: 700px; background: white;
  border: 1px solid var(--gray-300); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  z-index: 999; display: none; padding: 16px;
}
.has-mega-menu:hover .mega-menu { display: block; }
.mega-col { padding: 8px 16px; }
.mega-parent { display: block; font-weight: 600; font-size: 0.85rem; color: var(--dark); margin-bottom: 8px; }
.mega-parent:hover { color: var(--primary); }
.mega-sub { list-style: none; padding: 0; margin: 0; }
.mega-sub li a { font-size: 0.78rem; color: var(--gray-700); padding: 2px 0; display: block; }
.mega-sub li a:hover { color: var(--primary); }

/* Flash Alert */
.flash-alert { position: fixed; top: 80px; right: 20px; z-index: 9998; max-width: 350px; animation: slideInRight 0.3s ease; }
@keyframes slideInRight { from{transform:translateX(100%);opacity:0} to{transform:translateX(0);opacity:1} }

/* Sections */
.section-title { font-size: 1.5rem; font-weight: 800; margin-bottom: 4px; }
.section-subtitle { color: var(--gray-500); font-size: 0.9rem; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; flex-wrap: wrap; gap: 10px; }
.view-all-link { color: var(--primary); font-weight: 600; font-size: 0.85rem; white-space: nowrap; }
.view-all-link:hover { text-decoration: underline; }

/* Hero Carousel */
.hero-section { background: linear-gradient(135deg, #0D0D0D, #1A1A2E); overflow: hidden; }
.hero-carousel .carousel-item { min-height: 400px; }
.hero-slide { padding: 60px 0; color: white; }
.hero-tag { display: inline-block; background: var(--primary); color: white; padding: 4px 12px; border-radius: 20px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; margin-bottom: 12px; }
.hero-title { font-size: 2.8rem; font-weight: 800; line-height: 1.15; margin-bottom: 16px; }
.hero-title span { color: var(--accent); }
.hero-desc { font-size: 1rem; opacity: 0.85; margin-bottom: 24px; max-width: 420px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-img-wrap { display: flex; align-items: center; justify-content: center; height: 320px; }
.hero-img-wrap img { max-height: 300px; filter: drop-shadow(0 20px 40px rgba(0,0,0,0.5)); animation: floatHero 3s ease-in-out infinite; }
@keyframes floatHero { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-12px)} }
.hero-countdown { display: flex; gap: 8px; margin-bottom: 20px; }
.countdown-box { background: rgba(255,255,255,0.15); backdrop-filter: blur(10px); padding: 8px 14px; border-radius: var(--radius-sm); text-align: center; border: 1px solid rgba(255,255,255,0.2); }
.countdown-num { display: block; font-size: 1.4rem; font-weight: 800; line-height: 1; }
.countdown-lbl { display: block; font-size: 0.65rem; opacity: 0.7; text-transform: uppercase; }

/* Product Cards */
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
@media(min-width:768px) { .products-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; } }
@media(min-width:1200px) { .products-grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); } }

.product-card {
  background: white; border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06); transition: var(--transition); position: relative;
  border: 1px solid rgba(0,0,0,0.05);
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.product-card-img { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--gray-100); }
.product-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.product-card:hover .product-card-img img { transform: scale(1.08); }
.product-card-body { padding: 10px 12px 12px; }
.product-card-name {
    font-family: var(--font-body);
    font-size: 0.84rem;
    font-weight: 500;
    color: #1a1a2e;
    line-height: 1.5;
    letter-spacing: -0.01em;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-card-price { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.price-main { font-weight: 700; font-size: 1rem; color: var(--primary); font-family: var(--font-display); }
.price-original { font-size: 0.75rem; color: var(--gray-500); text-decoration: line-through; }
.price-discount { font-size: 0.7rem; background: #FFF3E0; color: #E65100; padding: 1px 5px; border-radius: 4px; font-weight: 600; }
.product-card-rating { display: flex; align-items: center; gap: 4px; font-size: 0.72rem; color: var(--gray-500); margin-bottom: 4px; }
.product-card-rating .stars { color: var(--warning); }

.product-badges { position: absolute; top: 8px; left: 8px; display: flex; flex-direction: column; gap: 4px; }
.badge-flash { background: var(--primary); color: white; font-size: 0.65rem; padding: 2px 7px; border-radius: 4px; font-weight: 700; }
.badge-new { background: var(--success); color: white; font-size: 0.65rem; padding: 2px 7px; border-radius: 4px; font-weight: 700; }
.badge-hot { background: var(--accent); color: var(--dark); font-size: 0.65rem; padding: 2px 7px; border-radius: 4px; font-weight: 700; }
.badge-sale { background: var(--danger); color: white; font-size: 0.65rem; padding: 2px 7px; border-radius: 4px; font-weight: 700; }

.product-wishlist-btn {
  position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 50%;
  background: white; border: 1px solid var(--gray-300); display: flex; align-items: center;
  justify-content: center; cursor: pointer; transition: var(--transition); color: var(--gray-500);
  font-size: 0.85rem; box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.product-wishlist-btn:hover, .product-wishlist-btn.active { color: var(--primary); border-color: var(--primary); background: #FFF5F5; }
.product-add-btn {
  width: 30px; height: 30px; border-radius: 50%; background: var(--primary); color: white;
  border: none; display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: var(--transition); font-size: 0.85rem; margin-left: auto; flex-shrink: 0;
}
.product-add-btn:hover { background: var(--primary-dark); transform: scale(1.1); }

.product-stock-bar { height: 3px; background: var(--gray-100); border-radius: 2px; margin-top: 8px; overflow: hidden; }
.product-stock-fill { height: 100%; background: linear-gradient(90deg, var(--success), var(--warning)); border-radius: 2px; }
.stock-text { font-size: 0.68rem; color: var(--danger); font-weight: 600; margin-top: 3px; }

/* Flash Deal Timer on card */
.flash-timer { font-size: 0.68rem; background: #FFF8E1; color: #E65100; padding: 3px 8px; border-radius: 4px; font-weight: 600; margin-top: 6px; }

/* Category Cards */
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 12px; }
@media(min-width:768px) { .category-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); } }
.category-card {
  background: white; border-radius: var(--radius); padding: 16px 8px;
  text-align: center; transition: var(--transition); border: 2px solid transparent;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06); cursor: pointer;
}
.category-card:hover { border-color: var(--primary); transform: translateY(-3px); }
.category-icon { font-size: 2rem; margin-bottom: 8px; display: block; }
.category-name { font-size: 0.78rem; font-weight: 600; color: var(--gray-800); }

/* Vendor Card */
.vendor-card { background: white; border-radius: var(--radius); padding: 20px; text-align: center; box-shadow: var(--shadow); transition: var(--transition); }
.vendor-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.vendor-logo { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 3px solid var(--gray-100); margin: 0 auto 12px; }
.vendor-name { font-weight: 700; font-size: 0.95rem; margin-bottom: 4px; }
.vendor-meta { font-size: 0.75rem; color: var(--gray-500); }
.vendor-badge-verified { color: var(--info); font-size: 0.75rem; }

/* Buttons */
.btn-primary { background: var(--primary) !important; border-color: var(--primary) !important; color: white !important; font-weight: 600; }
.btn-primary:hover { background: var(--primary-dark) !important; border-color: var(--primary-dark) !important; }
.btn-outline-primary { border-color: var(--primary) !important; color: var(--primary) !important; font-weight: 600; }
.btn-outline-primary:hover { background: var(--primary) !important; color: white !important; }
.btn-accent { background: var(--accent); border-color: var(--accent); color: var(--dark); font-weight: 600; }
.btn-accent:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn { border-radius: var(--radius-sm); }
.btn-lg { padding: 12px 28px; }

/* Forms */
.form-control:focus, .form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(255,62,0,0.1); }
.form-label { font-weight: 500; font-size: 0.85rem; margin-bottom: 4px; }

/* Cards */
.card { border-radius: var(--radius); border: 1px solid rgba(0,0,0,0.08); box-shadow: var(--shadow); }
.card-header { background: white; border-bottom: 1px solid rgba(0,0,0,0.08); }

/* Badges */
.badge-primary { background: var(--primary); }

/* Cart Drawer */
.cart-drawer { position: fixed; inset: 0; z-index: 9990; pointer-events: none; }
.cart-drawer.open { pointer-events: all; }
.cart-drawer-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.5); opacity: 0; transition: opacity 0.3s; }
.cart-drawer.open .cart-drawer-overlay { opacity: 1; }
.cart-drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: 380px; max-width: 100vw;
  background: white; transform: translateX(100%); transition: transform 0.3s ease;
  display: flex; flex-direction: column; box-shadow: -8px 0 30px rgba(0,0,0,0.15);
}
.cart-drawer.open .cart-drawer-panel { transform: translateX(0); }
.cart-drawer-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--gray-100); }
.cart-drawer-close { background: none; border: none; font-size: 1.2rem; cursor: pointer; color: var(--gray-700); }
.cart-drawer-body { flex: 1; overflow-y: auto; padding: 16px; }
.cart-drawer-footer { padding: 16px 20px; border-top: 1px solid var(--gray-100); background: var(--gray-100); }
.cart-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--gray-100); }
.cart-item-img { width: 60px; height: 60px; border-radius: var(--radius-sm); object-fit: cover; flex-shrink: 0; }
.cart-item-info { flex: 1; }
.cart-item-name { font-size: 0.82rem; font-weight: 500; margin-bottom: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cart-item-price { color: var(--primary); font-weight: 700; font-size: 0.9rem; }
.cart-item-qty { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.qty-btn { width: 24px; height: 24px; border-radius: 4px; border: 1px solid var(--gray-300); background: white; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 0.85rem; transition: var(--transition); }
.qty-btn:hover { background: var(--primary); color: white; border-color: var(--primary); }
.qty-num { font-weight: 600; font-size: 0.85rem; min-width: 20px; text-align: center; }
.cart-count-badge { background: var(--primary); color: white; border-radius: 20px; padding: 2px 8px; font-size: 0.75rem; }

/* Chat Bot */
.chatbot-widget { position: fixed; bottom: 24px; right: 24px; z-index: 9000; }
.chatbot-bubble {
  width: 56px; height: 56px; border-radius: 50%; background: var(--primary);
  display: flex; align-items: center; justify-content: center; color: white; font-size: 1.3rem;
  cursor: pointer; box-shadow: 0 4px 16px rgba(255,62,0,0.4); transition: var(--transition);
}
.chatbot-bubble:hover { transform: scale(1.1); }
.chatbot-badge { position: absolute; top: 0; right: 0; background: var(--accent); color: var(--dark); border-radius: 50%; width: 18px; height: 18px; font-size: 0.65rem; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.chatbot-panel {
  position: absolute; bottom: 70px; right: 0; width: 320px; background: white;
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden;
  border: 1px solid var(--gray-300); animation: slideUpChat 0.3s ease;
}
@keyframes slideUpChat { from{transform:translateY(20px);opacity:0} to{transform:translateY(0);opacity:1} }
.chatbot-header { background: var(--primary); color: white; padding: 14px 16px; display: flex; align-items: center; gap: 10px; }
.chatbot-avatar { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.2); display: flex; align-items: center; justify-content: center; font-size: 1rem; }
.online-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #4CAF50; margin-right: 4px; animation: pulse 1.5s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.5} }
.chatbot-body { height: 280px; overflow-y: auto; padding: 12px; background: #f8f9fa; }
.chat-message { margin-bottom: 10px; }
.chat-message.bot p { background: white; border-radius: 12px 12px 12px 0; padding: 10px 14px; font-size: 0.82rem; max-width: 85%; margin: 0; box-shadow: 0 1px 4px rgba(0,0,0,0.08); }
.chat-message.user p { background: var(--primary); color: white; border-radius: 12px 12px 0 12px; padding: 10px 14px; font-size: 0.82rem; max-width: 85%; margin: 0 0 0 auto; }
.chatbot-quick-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chatbot-quick-actions button { background: white; border: 1px solid var(--gray-300); border-radius: 20px; padding: 4px 10px; font-size: 0.72rem; cursor: pointer; transition: var(--transition); }
.chatbot-quick-actions button:hover { background: var(--primary); color: white; border-color: var(--primary); }
.chatbot-footer { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--gray-100); }
.chatbot-footer input { flex: 1; border: 1px solid var(--gray-300); border-radius: 20px; padding: 7px 14px; font-size: 0.82rem; outline: none; }
.chatbot-footer button { background: var(--primary); color: white; border: none; border-radius: 50%; width: 34px; height: 34px; cursor: pointer; display: flex; align-items: center; justify-content: center; }

/* Back to Top */
.back-to-top {
  position: fixed; bottom: 90px; right: 24px; z-index: 8999; width: 40px; height: 40px;
  border-radius: 50%; background: var(--gray-800); color: white; border: none; cursor: pointer;
  display: none; align-items: center; justify-content: center; transition: var(--transition);
  box-shadow: var(--shadow);
}
.back-to-top.visible { display: flex; }
.back-to-top:hover { background: var(--primary); }

/* Footer */
.main-footer { background: var(--gray-900); color: #ccc; margin-top: 48px; }
.footer-top { padding: 48px 0 32px; }
.footer-title { font-family: var(--font-display); font-weight: 700; color: white; margin-bottom: 16px; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-links li a { color: #aaa; font-size: 0.85rem; transition: var(--transition); }
.footer-links li a:hover { color: var(--primary); }
.brand-logo-lg { font-family: var(--font-display); font-size: 1.8rem; font-weight: 800; color: white; margin-bottom: 12px; }
.brand-logo-lg::after { content: ''; display: block; width: 40px; height: 3px; background: var(--primary); margin-top: 6px; }
.footer-social { display: flex; gap: 10px; margin-top: 16px; }
.footer-social a { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center; color: white; transition: var(--transition); font-size: 0.9rem; }
.footer-social a:hover { background: var(--primary); }
.footer-contact { font-size: 0.82rem; color: #aaa; }
.footer-contact div { margin-bottom: 6px; }

.newsletter-form .form-control { border-radius: var(--radius-sm) 0 0 var(--radius-sm); border-color: rgba(255,255,255,0.2); background: rgba(255,255,255,0.1); color: white; }
.newsletter-form .form-control::placeholder { color: #aaa; }
.app-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.app-badge { display: inline-flex; align-items: center; background: rgba(255,255,255,0.1); color: white; padding: 7px 14px; border-radius: var(--radius-sm); font-size: 0.8rem; transition: var(--transition); border: 1px solid rgba(255,255,255,0.2); }
.app-badge:hover { background: var(--primary); border-color: var(--primary); }

.footer-middle { border-top: 1px solid rgba(255,255,255,0.1); padding: 16px 0; }
.payment-icon { font-size: 1.6rem; margin-right: 8px; color: #ddd; }
.trust-badges { font-size: 0.78rem; color: #aaa; }
.trust-badges span { margin-left: 16px; }

.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 16px 0; font-size: 0.8rem; color: #777; }
.footer-bottom a { color: #888; transition: var(--transition); }
.footer-bottom a:hover { color: var(--primary); }

/* Mobile search bar */
.mobile-search { background: white; }

/* Gamification - Spin Wheel */
.spin-container { max-width: 500px; margin: 0 auto; text-align: center; }
.spin-wheel-wrap { position: relative; display: inline-block; }
.spin-wheel { border-radius: 50%; border: 8px solid var(--dark); box-shadow: 0 0 0 4px var(--primary), var(--shadow-lg); }
.spin-pointer { position: absolute; top: -20px; left: 50%; transform: translateX(-50%); font-size: 2rem; z-index: 10; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3)); }
.spin-btn-wrap { margin-top: 24px; }

/* Flash Deal Banner */
.flash-deal-banner { background: linear-gradient(135deg, var(--primary), #FF6B35); color: white; border-radius: var(--radius); padding: 20px 24px; margin-bottom: 24px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.flash-deal-title { font-size: 1.3rem; font-weight: 800; }
.flash-deal-timer { display: flex; gap: 8px; }
.timer-box { background: rgba(0,0,0,0.25); border-radius: var(--radius-sm); padding: 6px 10px; text-align: center; min-width: 50px; }
.timer-box .num { display: block; font-size: 1.4rem; font-weight: 800; line-height: 1; }
.timer-box .lbl { display: block; font-size: 0.6rem; opacity: 0.8; text-transform: uppercase; }

/* Group Buy Card */
.group-buy-progress { height: 6px; border-radius: 3px; background: var(--gray-100); margin-top: 8px; }
.group-buy-fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--success), var(--accent)); transition: width 0.5s ease; }

/* Review Stars */
.stars-fill { color: var(--warning); }
.review-card { padding: 16px; background: white; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 12px; }
.review-author { font-weight: 600; font-size: 0.85rem; }
.review-verified { color: var(--success); font-size: 0.72rem; }

/* Pagination */
.pagination .page-link { border-radius: var(--radius-sm) !important; margin: 0 2px; color: var(--primary); }
.pagination .page-item.active .page-link { background: var(--primary); border-color: var(--primary); }
.pagination .page-link:hover { background: var(--primary); color: white; }

/* Tabs */
.nav-tabs .nav-link { color: var(--gray-600); font-weight: 500; }
.nav-tabs .nav-link.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }

/* Breadcrumb */
.breadcrumb-item a { color: var(--primary); }
.breadcrumb-item.active { color: var(--gray-500); }

/* Range slider */
input[type=range] { accent-color: var(--primary); }

/* Sticky sidebar */
.sticky-sidebar { position: sticky; top: 100px; }

/* Order Status Steps */
.order-steps { display: flex; align-items: center; gap: 0; overflow-x: auto; padding: 8px 0; }
.order-step { display: flex; flex-direction: column; align-items: center; flex: 1; min-width: 80px; }
.step-icon { width: 40px; height: 40px; border-radius: 50%; background: var(--gray-100); display: flex; align-items: center; justify-content: center; font-size: 1rem; color: var(--gray-500); margin-bottom: 6px; position: relative; z-index: 1; }
.order-step.completed .step-icon { background: var(--success); color: white; }
.order-step.active .step-icon { background: var(--primary); color: white; box-shadow: 0 0 0 4px rgba(255,62,0,0.2); }
.step-label { font-size: 0.7rem; color: var(--gray-500); text-align: center; }
.order-step.completed .step-label, .order-step.active .step-label { color: var(--dark); font-weight: 600; }
.step-line { flex: 1; height: 2px; background: var(--gray-300); min-width: 20px; }
.step-line.completed { background: var(--success); }

/* Skeleton loading */
.skeleton { background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: var(--radius-sm); }
@keyframes shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }
.skeleton-img { aspect-ratio: 1; }
.skeleton-line { height: 12px; margin-bottom: 8px; }
.skeleton-line.short { width: 60%; }

/* Responsive tweaks */
@media(max-width:768px) {
  .hero-title { font-size: 1.8rem; }
  .hero-slide { padding: 32px 0; }
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .section-title { font-size: 1.2rem; }
}

/* Misc utilities */
.fw-800 { font-weight: 800; }
.text-primary { color: var(--primary) !important; }
.bg-primary-light { background: rgba(255,62,0,0.08); }
.border-primary { border-color: var(--primary) !important; }
.rounded-xl { border-radius: var(--radius-lg) !important; }
.gap-2 { gap: 8px; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--gray-100); }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-500); }

/* ================================================================
   SERVICE MODULES — Farms, Clothing, Restaurants, Car Wash, Cars
   ================================================================ */

/* Services strip on homepage */
.services-strip { overflow: hidden; }

/* Service page hero sections */
.service-hero { position: relative; overflow: hidden; }
.service-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,.15));
  pointer-events: none;
}

/* Service category chips */
.svc-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 14px; border-radius: 20px; font-size: .82rem;
  font-weight: 600; text-decoration: none; transition: .15s;
  border: 1.5px solid currentColor; opacity: .85;
}
.svc-chip:hover { opacity: 1; transform: translateY(-1px); text-decoration: none; }

/* Booking widget */
.booking-widget { border-radius: 14px !important; overflow: hidden; }
.booking-widget .card-header { padding: 12px 18px; font-size: .9rem; }
.slot-btn {
  padding: 6px 14px; border-radius: 20px; font-size: .8rem; font-weight: 600;
  border: 1.5px solid #0d6efd; background: transparent; color: #0d6efd;
  cursor: pointer; transition: .15s;
}
.slot-btn:hover, .slot-btn.selected { background: #0d6efd; color: #fff; }
.slot-btn:disabled { border-color: #dee2e6; color: #adb5bd; cursor: not-allowed; background: transparent; }

/* Service type cards (vendor register) */
.svc-type-opt {
  border: 2px solid #dee2e6; border-radius: 14px;
  padding: 14px 10px; text-align: center; cursor: pointer; transition: .15s;
}
.svc-type-opt:hover { border-color: #0d6efd; background: #f0f4ff; }
.svc-radio:checked + .svc-type-opt {
  border-color: #0d6efd !important;
  background: #f0f4ff;
  box-shadow: 0 0 0 3px rgba(13,110,253,.15);
}

/* Vendor register service type grid */
.svc-type-opt .icon { font-size: 1.6rem; margin-bottom: 6px; }
.svc-type-opt .label { font-weight: 700; font-size: .82rem; color: #333; }
.svc-type-opt .desc  { font-size: .7rem; color: #888; margin-top: 2px; }

/* Booking confirmation page */
.booking-status-icon {
  width: 80px; height: 80px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem; margin: 0 auto 16px;
}
.booking-detail-row {
  display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
}
.booking-detail-icon {
  width: 34px; height: 34px; border-radius: 8px;
  background: #f0f4ff; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* My Bookings page */
.booking-card { border-radius: 16px !important; overflow: hidden; transition: .15s; }
.booking-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,.1); transform: translateY(-1px); }

/* Vehicle listing card — price badge */
.vehicle-price {
  font-size: 1.2rem; font-weight: 800; color: #212121;
}
.vehicle-specs { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.vehicle-spec  {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: .72rem; color: #666; background: #f5f5f5;
  border-radius: 6px; padding: 3px 8px;
}

/* Farm produce badges */
.organic-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: #e8f5e9; color: #2e7d32; border-radius: 20px;
  padding: 3px 10px; font-size: .75rem; font-weight: 700;
}

/* Restaurant card */
.restaurant-card .card-img-overlay-bottom {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,.7));
  padding: 16px 14px 12px;
}

/* Car wash package highlight */
.wash-package-card {
  border-radius: 14px; padding: 20px; text-align: center;
  transition: .2s; cursor: pointer;
}
.wash-package-card:hover { transform: translateY(-3px); }
.wash-package-card.featured { border: 2px solid #0288d1; }

/* Admin services page */
.svc-stat-card {
  border-radius: 14px; padding: 16px; text-align: center;
}
.svc-stat-val { font-size: 1.4rem; font-weight: 800; }

/* Responsive tweaks */
@media (max-width: 576px) {
  .service-hero h1 { font-size: 1.8rem !important; }
  .svc-type-opt { padding: 10px 6px; }
}

/* ================================================================
   PUBLIC — COMPREHENSIVE MOBILE RESPONSIVE
   ================================================================ */

/* ── Prevent horizontal scroll globally ── */
html, body { overflow-x: hidden; max-width: 100vw; }
.container, .container-fluid { overflow-x: visible; }

/* ================================================================
   NAVBAR
   ================================================================ */

/* Announcement bar: single line on mobile */
@media (max-width: 575px) {
  .announcement-bar { padding: 5px 12px; font-size: .72rem; }
  .announcement-text { gap: 8px; }
  .announcement-text span:not(:first-child) { display: none; }
}

/* Main nav top row */
@media (max-width: 991px) {
  .main-nav > .container { padding-top: 8px; padding-bottom: 8px; flex-wrap: wrap; gap: 8px; }
}

/* Brand: smaller on mobile */
@media (max-width: 575px) {
  .navbar-brand { font-size: 1.1rem; gap: 6px; }
  .brand-icon { width: 30px; height: 30px; font-size: .72rem; border-radius: 8px; }
}

/* Search bar: full-width second row on mobile */
@media (max-width: 767px) {
  .nav-search { order: 10; width: 100%; flex: 0 0 100%; }
  .main-nav > .container { flex-wrap: wrap; }
  .search-category-wrap { display: none; } /* hide category dropdown on mobile */
  .search-input { font-size: .85rem; }
  .search-btn { padding: 0 14px; }
}
@media (max-width: 575px) {
  .search-form { border-radius: 30px; }
  .search-input { height: 38px; font-size: .82rem; }
  .search-btn { height: 38px; padding: 0 12px; }
}

/* Nav actions: hide labels, compress on mobile */
@media (max-width: 575px) {
  .nav-icon-btn { width: 36px; height: 36px; font-size: .95rem; }
  .nav-credits { padding: 5px 10px; font-size: .72rem; }
  .nav-credits span:not(.fas) { display: none; } /* hide text, keep icon */
  .nav-user-btn .user-name-nav { display: none; }
  .nav-user-btn { padding: 4px 8px 4px 4px; }
  .nav-cart-btn { width: 38px; height: 38px; font-size: .9rem; }
}

/* Category nav: scrollable on mobile */
@media (max-width: 767px) {
  .category-nav-list { gap: 0; padding: 0 8px; }
  .category-nav-list li a { padding: 8px 10px; font-size: .77rem; }
}
@media (max-width: 575px) {
  .category-nav-list li a { padding: 7px 8px; font-size: .73rem; gap: 3px; }
  .mega-menu { display: none !important; } /* no mega menu on mobile */
}

/* Mobile search bar (secondary bar below nav) */
@media (max-width: 575px) {
  .mobile-search { padding: 8px 12px; border-top: 1px solid #f0f0f0; }
}

/* Flash alert: full-width on mobile */
@media (max-width: 575px) {
  .flash-alert { right: 8px; left: 8px; max-width: unset; top: 70px; }
}

/* ================================================================
   HERO / BANNERS
   ================================================================ */
@media (max-width: 767px) {
  .hero-carousel .carousel-item { min-height: 280px; }
  .hero-slide { padding: 28px 0; }
  .hero-title { font-size: 1.6rem; line-height: 1.2; }
  .hero-desc { font-size: .88rem; margin-bottom: 16px; }
  .hero-img-wrap { height: 180px; }
  .hero-img-wrap img { max-height: 160px; }
  .hero-tag { font-size: .68rem; padding: 3px 10px; }
  .hero-actions .btn { font-size: .82rem; padding: 8px 18px; }
  .countdown-box { padding: 5px 9px; }
  .countdown-num { font-size: 1.1rem; }
}
@media (max-width: 575px) {
  .hero-title { font-size: 1.35rem; }
  .hero-img-wrap { display: none; } /* hide product image on very small screens */
  .hero-slide { padding: 24px 0; min-height: 220px; display: flex; align-items: center; }
  .hero-actions { gap: 8px; }
  .hero-actions .btn-lg { font-size: .82rem; padding: 8px 16px; }
  .hero-countdown { gap: 5px; }
  .countdown-box { min-width: 42px; padding: 4px 7px; }
  .countdown-num { font-size: .95rem; }
  .countdown-lbl { font-size: .55rem; }
}

/* ================================================================
   PRODUCT CARDS & GRIDS
   ================================================================ */
@media (max-width: 575px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .product-card-body { padding: 8px 9px 10px; }
  .product-card-name { font-size: .8rem; font-weight: 500; -webkit-line-clamp: 2; }
  .price-main { font-size: .9rem; }
  .price-original { font-size: .68rem; }
  .price-discount { font-size: .65rem; }
  .product-add-btn { width: 26px; height: 26px; font-size: .75rem; }
  .product-wishlist-btn { width: 26px; height: 26px; font-size: .75rem; }
  .product-card-rating { font-size: .67rem; }
}

/* Category grid */
@media (max-width: 575px) {
  .category-grid { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .category-card { padding: 10px 4px; }
  .category-icon { font-size: 1.5rem; margin-bottom: 5px; }
  .category-name { font-size: .68rem; }
}

/* ================================================================
   SECTION HEADERS
   ================================================================ */
@media (max-width: 575px) {
  .section-header { margin-bottom: 14px; }
  .section-title { font-size: 1.1rem; }
  .section-subtitle { font-size: .8rem; }
  .view-all-link { font-size: .78rem; }
}

/* ================================================================
   FLASH DEAL BANNER
   ================================================================ */
@media (max-width: 767px) {
  .flash-deal-banner { flex-direction: column; align-items: flex-start; gap: 10px; padding: 16px; }
  .flash-deal-title { font-size: 1.1rem; }
  .flash-deal-timer .timer-box { min-width: 42px; padding: 5px 8px; }
  .flash-deal-timer .timer-box .num { font-size: 1.1rem; }
}

/* ================================================================
   CART DRAWER
   ================================================================ */
@media (max-width: 575px) {
  .cart-drawer-panel { width: 100vw; border-radius: 16px 16px 0 0; top: auto; max-height: 88vh; }
  .cart-drawer.open .cart-drawer-panel { transform: translateX(0); }
  .cart-drawer-header { padding: 12px 16px; }
  .cart-item-img { width: 52px; height: 52px; }
}

/* ================================================================
   CART PAGE
   ================================================================ */
@media (max-width: 767px) {
  .col-lg-8, .col-lg-4 { width: 100%; }
}
@media (max-width: 575px) {
  .cart-item { gap: 8px; }
  .cart-item-img { width: 56px; height: 56px; border-radius: 8px; }
  .cart-item-name { font-size: .8rem; }
  .cart-item-price { font-size: .85rem; }
}

/* ================================================================
   CHECKOUT PAGE
   ================================================================ */
@media (max-width: 767px) {
  .col-md-7, .col-md-5, .col-md-8, .col-md-4 { width: 100%; }
}
@media (max-width: 575px) {
  .sticky-sidebar { position: static; top: auto; }
}

/* ================================================================
   PRODUCT DETAIL PAGE
   ================================================================ */
@media (max-width: 767px) {
  .col-md-5, .col-md-7 { width: 100%; }
  .sticky-sidebar { position: static; }
}
@media (max-width: 575px) {
  .product-gallery-main { border-radius: 10px; }
  .btn-lg.add-to-cart-btn, .btn-lg { font-size: .88rem; padding: 10px 18px; }
  /* Variant option buttons: wrap on mobile */
  .variant-options { flex-wrap: wrap; gap: 6px; }
}

/* ================================================================
   ORDER STEPS (track order)
   ================================================================ */
@media (max-width: 575px) {
  .order-steps { gap: 0; padding: 6px 0; }
  .order-step { min-width: 60px; }
  .step-icon { width: 32px; height: 32px; font-size: .85rem; }
  .step-label { font-size: .6rem; }
  .step-line { min-width: 12px; }
}

/* ================================================================
   FOOTER
   ================================================================ */
@media (max-width: 767px) {
  .footer-top { padding: 32px 0 24px; }
  .footer-top .col-md-3, .footer-top .col-md-4, .footer-top .col-lg-3, .footer-top .col-lg-4 { width: 50%; }
  .brand-logo-lg { font-size: 1.4rem; }
  .footer-social a { width: 32px; height: 32px; font-size: .85rem; }
}
@media (max-width: 575px) {
  .footer-top .col-md-3, .footer-top .col-md-4, .footer-top .col-lg-3, .footer-top .col-lg-4,
  .footer-top [class*="col-"] { width: 100%; margin-bottom: 8px; }
  .footer-title { margin-bottom: 10px; }
  .footer-links li { margin-bottom: 5px; }
  .footer-bottom { text-align: center; }
  .footer-bottom .d-flex { flex-direction: column; gap: 8px; align-items: center; }
  .payment-icon { font-size: 1.3rem; }
  .app-badges { gap: 6px; }
  .app-badge { font-size: .75rem; padding: 5px 10px; }
  .newsletter-form .input-group { flex-wrap: nowrap; }
  .newsletter-form .btn { white-space: nowrap; border-radius: 0 var(--radius-sm) var(--radius-sm) 0 !important; }
}

/* ================================================================
   MOBILE NAV (bottom bar)
   ================================================================ */
/* mobile-bottom-nav: defined in footer.php */

/* body padding-bottom for mobile nav: set in footer.php */

/* ================================================================
   FORMS (login, register, etc.)
   ================================================================ */
@media (max-width: 575px) {
  .container { padding-left: 14px; padding-right: 14px; }
  .py-5 { padding-top: 2rem !important; padding-bottom: 2rem !important; }
  .card.p-4, .card.p-5 { padding: 16px !important; }
  .card.p-4 .btn-lg, .card.p-5 .btn-lg { width: 100%; }
  input.form-control, select.form-select, textarea.form-control { font-size: 16px; } /* prevent iOS zoom */
}

/* ================================================================
   ACCOUNT / ORDERS / RETURNS PAGES
   ================================================================ */
@media (max-width: 767px) {
  .col-md-3, .col-md-9, .col-md-4, .col-md-8 { width: 100%; }
}
@media (max-width: 575px) {
  .order-steps { overflow-x: auto; }
  .table-responsive { border-radius: 8px; }
}

/* ================================================================
   VENDOR DASHBOARD (shared with admin styles above)
   ================================================================ */
@media (max-width: 575px) {
  .stat-card { padding: 14px; }
  .stat-val { font-size: 1.2rem; }
}

/* ================================================================
   CHATBOT
   ================================================================ */
@media (max-width: 575px) {
  .chatbot-widget { bottom: 80px; right: 14px; }
  .chatbot-bubble { width: 48px; height: 48px; font-size: 1.1rem; }
  .chatbot-panel { width: calc(100vw - 28px); right: 0; bottom: 62px; }
  .chatbot-body { height: 220px; }
}

/* ================================================================
   SEARCH PAGE / RESULTS
   ================================================================ */
@media (max-width: 767px) {
  .col-md-3.sidebar-filters { width: 100%; }
  .col-md-9 { width: 100%; }
}
@media (max-width: 575px) {
  .filters-bar { flex-direction: row; flex-wrap: wrap; }
  .filters-bar select, .filters-bar .form-select { flex: 1 1 calc(50% - 4px); min-width: 0; font-size: .78rem; }
}

/* ================================================================
   VENDOR STORE PAGE
   ================================================================ */
@media (max-width: 575px) {
  .vendor-card { padding: 14px; }
  .vendor-logo { width: 52px; height: 52px; }
  .vendor-name { font-size: .88rem; }
}

/* ================================================================
   MISC PAGE FIXES
   ================================================================ */
@media (max-width: 575px) {
  /* Help, fees, vendor-guide, dispute pages */
  .accordion-button { font-size: .85rem; padding: 12px 14px; }
  .accordion-body { font-size: .82rem; padding: 12px 14px; }
  .breadcrumb { font-size: .78rem; }

  /* Order detail */
  .order-summary-table td, .order-summary-table th { font-size: .8rem; padding: 8px 10px; }

  /* Spin wheel */
  .spin-wheel { max-width: 280px; }
  .spin-container { padding: 0 8px; }

  /* Group buy */
  .group-buy-progress { height: 5px; }

  /* Pagination */
  .pagination .page-link { padding: 6px 10px; font-size: .8rem; }
}

/* ================================================================
   VENDOR PORTAL — RESPONSIVE
   ================================================================ */
@media (max-width: 575px) {
  /* Product add/edit form */
  .kind-grid { grid-template-columns: 1fr 1fr !important; gap: 10px; max-width: 100%; }
  .kind-card { padding: 16px 10px; }
  .kind-card .kc-icon { font-size: 2.2rem; }
  .kind-card .kc-title { font-size: .88rem; }
  .kind-card .kc-desc { font-size: .7rem; }
  .type-grid { grid-template-columns: repeat(2, 1fr) !important; }

  /* Option rows */
  .option-row .d-flex.align-items-start { flex-direction: column; gap: 10px; }
  .option-row .d-flex.align-items-start > div:first-child { width: 100% !important; flex: none !important; }
  .option-row .d-flex.align-items-start > div:nth-child(2) { width: 100%; }
  .option-row .btn-outline-danger { align-self: flex-end; }

  /* Variant table */
  #variantTable { font-size: .75rem; }
  #variantTable input { min-width: 65px; font-size: .75rem; }
  .vrow-img-placeholder, .vrow-img-wrap img { width: 44px; height: 44px; }
}

/* ================================================================
   SAFE AREA (notched phones, iOS PWA)
   ================================================================ */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .mobile-bottom-nav { padding-bottom: calc(6px + env(safe-area-inset-bottom)); }
  body { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
}

/* ================================================================
   TOUCH IMPROVEMENTS
   ================================================================ */
@media (max-width: 991px) {
  /* Larger touch targets */
  .btn { min-height: 38px; }
  .nav-icon-btn, .qty-btn { min-height: 36px; min-width: 36px; }
  /* Remove hover effects that look odd on touch */
  .product-card:hover { transform: none; }
  .category-card:hover { transform: none; }
  /* Faster tap response */
  a, button { -webkit-tap-highlight-color: transparent; }
}

/* ================================================================
   IMAGE OVERFLOW FIX
   ================================================================ */
img { max-width: 100%; height: auto; }
.product-card-img img { height: 100%; }
