/* =========================================================
   VEGARIX DIGITAL - MODERN PREMIUM MARKETPLACE STYLESHEET
   100% Production Ready • Mobile-First • Zero Overflow • Zero Glitches
   Pixel-Perfect Cross-Device Support (320px Mobile to 4K Desktop)
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800;900&display=swap');

:root {
  /* Brand Colors */
  --primary: #0062ff;
  --primary-hover: #0050d4;
  --primary-dark: #003db3;
  --primary-light: #eff6ff;
  --primary-subtle: #dbeafe;
  
  --brand-navy: #0f172a;
  --brand-navy-dark: #090e17;
  --brand-blue: #0062ff;
  
  /* Surfaces */
  --bg-page: #F7F8FA;
  --surface: #ffffff;
  --surface-border: #E5E7EB;
  --surface-hover: #f8fafc;
  
  /* Typography */
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  
  /* Accents */
  --accent-deals: #f59e0b;
  --accent-deals-bg: #fef3c7;
  --badge-discount-bg: #fee2e2;
  --badge-discount-text: #ef4444;
  --badge-verified-bg: #ecfdf5;
  --badge-verified-text: #059669;

  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;

  /* Standard Geometry */
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  /* Subtle Elevations */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.03);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.08);

  --bottom-bar-height: 60px;
  --header-height-mobile: 56px;
}

/* 1. Global Reset & Zero-Overflow Engine */
*, *::before, *::after {
  box-sizing: border-box;
}

body, h1, h2, h3, h4, h5, h6, p, ul, ol, figure, blockquote, dl, dd {
  margin: 0;
  padding: 0;
}

html {
  font-size: 14px;
  -webkit-text-size-adjust: 100%;
}

body {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  background-color: var(--bg-page);
  color: var(--text-main);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  line-height: 1.5;
  scroll-behavior: smooth;
  word-break: normal;
  overflow-wrap: break-word;
  padding-bottom: calc(var(--bottom-bar-height) + env(safe-area-inset-bottom, 0px) + 12px);
  -webkit-tap-highlight-color: transparent;
}

@media (min-width: 900px) {
  body {
    padding-bottom: 0 !important;
  }
}

/* Body classes to hide bottom nav & support on specific pages */
body.hide-bottom-nav {
  padding-bottom: 0 !important;
}
body.hide-bottom-nav .mobile-bottom-bar,
body.hide-bottom-nav .floating-support-btn {
  display: none !important;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  outline: none;
  cursor: pointer;
}

input, select, textarea {
  font-family: inherit;
  outline: none;
  max-width: 100%;
}

/* Critical iOS Safari auto-zoom prevention: ONLY text inputs on phones */
@media (max-width: 768px) {
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  input[type="tel"],
  input[type="search"],
  select,
  textarea {
    font-size: 16px !important;
  }
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 16px;
  padding-right: 16px;
}
@media (min-width: 768px) {
  .container {
    padding-left: 24px;
    padding-right: 24px;
  }
}

/* 2. Phone Shell: 56px Clean White Header */
.main-header {
  background: #ffffff;
  border-bottom: 1px solid var(--surface-border);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: transform 0.25s ease-in-out;
}
.main-header.header-hidden {
  transform: translateY(-100%);
}

.mobile-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height-mobile);
  padding: 0 16px;
  gap: 12px;
}
@media (min-width: 900px) {
  .mobile-header-bar {
    display: none !important;
  }
}

.mobile-header-icon-btn {
  background: none;
  border: none;
  color: #0f172a;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}
.mobile-header-icon-btn:active {
  background: #f1f5f9;
}

.mobile-brand-logo {
  display: flex;
  align-items: center;
  height: 32px;
}
.mobile-brand-logo img {
  height: 28px;
  width: auto;
  object-fit: contain;
}

/* Slim in-flow search under header (Home & Shop) */
.page-subsearch-wrap {
  padding: 8px 16px 12px;
  background: #ffffff;
  border-bottom: 1px solid var(--surface-border);
}
@media (min-width: 900px) {
  .page-subsearch-wrap {
    display: none !important;
  }
}
.subsearch-bar-btn {
  width: 100%;
  height: 44px;
  background: #f8fafc;
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  padding: 0 14px;
  gap: 10px;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  box-sizing: border-box;
}
.subsearch-bar-btn:active {
  background: #f1f5f9;
}

/* Desktop Header */
.desktop-header-wrap {
  display: none;
}
@media (min-width: 900px) {
  .desktop-header-wrap {
    display: block;
    padding: 12px 24px;
  }
}
.desktop-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.desktop-brand img {
  height: 38px;
  width: auto;
  object-fit: contain;
}

.desktop-search-form {
  flex: 1;
  max-width: 520px;
  position: relative;
}
.desktop-search-input {
  width: 100%;
  height: 44px;
  background: #f8fafc;
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 0 16px 0 42px;
  font-size: 14px !important;
  color: var(--text-main);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.desktop-search-input:focus {
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(0, 98, 255, 0.1);
}
.desktop-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.desktop-nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.desktop-cart-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: #f8fafc;
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  color: #0f172a;
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  transition: all 0.15s;
}
.desktop-cart-btn:hover {
  background: #ffffff;
  border-color: #cbd5e1;
}

.desktop-auth-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: var(--primary);
  color: #ffffff;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 13.5px;
  transition: background 0.15s;
}
.desktop-auth-pill:hover {
  background: var(--primary-hover);
}

.desktop-nav-menu-row {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
  list-style: none;
}
.desktop-nav-menu-row a {
  font-size: 13.5px;
  font-weight: 600;
  color: #475569;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s;
}
.desktop-nav-menu-row a:hover,
.desktop-nav-menu-row a.active {
  color: var(--primary);
}

/* 3. Mobile Bottom Navigation Bar (Fixed 60px) */
.mobile-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100vw;
  height: calc(var(--bottom-bar-height) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: #ffffff;
  border-top: 1px solid var(--surface-border);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: center;
  z-index: 990;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.04);
}
@media (min-width: 900px) {
  .mobile-bottom-bar {
    display: none !important;
  }
}
.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: #64748b;
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  height: var(--bottom-bar-height);
  transition: color 0.15s;
  user-select: none;
}
.bottom-nav-item.active {
  color: var(--primary);
  font-weight: 700;
}
.bottom-nav-item:active {
  transform: scale(0.95);
}
.nav-badge-wrap {
  position: relative;
  display: inline-flex;
}
.cart-badge-chip {
  position: absolute;
  top: -6px;
  right: -10px;
  background: var(--primary);
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* 4. Single Floating Support Button & Sheet */
.floating-support-btn {
  position: fixed;
  right: 16px;
  bottom: calc(var(--bottom-bar-height) + env(safe-area-inset-bottom, 0px) + 12px);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #0f172a;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.25);
  border: none;
  cursor: pointer;
  z-index: 980;
  transition: transform 0.2s, background 0.2s;
}
@media (min-width: 900px) {
  .floating-support-btn {
    bottom: 24px;
    right: 24px;
    width: 50px;
    height: 50px;
  }
}
.floating-support-btn:hover {
  background: #0062ff;
  transform: scale(1.06);
}
.floating-support-btn:active {
  transform: scale(0.94);
}

/* Support Bottom Sheet Modal */
.support-sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  z-index: 2500;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.support-sheet-overlay.open {
  opacity: 1;
  visibility: visible;
}
.support-sheet-box {
  width: 100%;
  max-width: 440px;
  background: #ffffff;
  border-radius: 20px 20px 0 0;
  padding: 20px 20px calc(20px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -10px 30px rgba(0,0,0,0.15);
  transform: translateY(100%);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
@media (min-width: 600px) {
  .support-sheet-overlay {
    align-items: center;
  }
  .support-sheet-box {
    border-radius: 20px;
    transform: scale(0.95);
  }
}
.support-sheet-overlay.open .support-sheet-box {
  transform: translateY(0);
}
@media (min-width: 600px) {
  .support-sheet-overlay.open .support-sheet-box {
    transform: scale(1);
  }
}
.support-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 12px;
}
.support-sheet-title {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
}
.support-channels-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.support-channel-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: #f8fafc;
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  text-decoration: none;
  color: #0f172a;
  font-weight: 700;
  font-size: 14px;
  transition: background 0.15s, border-color 0.15s;
}
.support-channel-row:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
}

/* 5. Mobile Menu Drawer (Zero Left Shadow Bleed) */
.mobile-nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  z-index: 2999;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.mobile-nav-backdrop.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.mobile-nav-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 85%;
  max-width: 320px;
  background: #ffffff;
  color: #0f172a;
  z-index: 3000;
  transform: translateX(-100%);
  visibility: hidden;
  pointer-events: none;
  box-shadow: none; /* No shadow when closed prevents left-edge bleed */
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s ease;
  display: flex;
  flex-direction: column;
  padding: 20px;
  box-sizing: border-box;
  overflow-y: auto;
}
.mobile-nav-drawer.open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
  box-shadow: 6px 0 24px rgba(0, 0, 0, 0.15);
}

.drawer-top-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--surface-border);
  margin-bottom: 16px;
}
.drawer-top-brand img {
  height: 28px;
  width: auto;
}

.drawer-group-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #94a3b8;
  margin: 14px 0 6px 8px;
}
.drawer-links-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.drawer-link-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  color: #334155;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.drawer-link-item:hover,
.drawer-link-item.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
}
.drawer-footer-auth {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--surface-border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* 5b. Hero Banner Slider (YouTube Thumbnail 16:9 Ratio - 100% Uncropped, Clean, Clickable Image) */
.hero-slider-wrap {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 24px;
  background: #0f172a;
  width: 100%;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--surface-border);
}
.hero-slider-track {
  display: flex;
  width: 100%;
  transition: transform 0.4s ease-in-out;
}
.hero-slide-link {
  min-width: 100%;
  width: 100%;
  display: block;
  line-height: 0;
  text-decoration: none;
}
.hero-slide-link img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #0f172a;
  display: block;
  border-radius: 12px;
}
@media (max-width: 600px) {
  .hero-slide-link img {
    aspect-ratio: 16 / 9;
    object-fit: contain;
    border-radius: 10px;
  }
}
.hero-dots-wrap {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
  z-index: 10;
}
.hero-dot-btn {
  height: 6px;
  border-radius: 999px;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* 5c. Responsive Full-Width Category Carousel (Pure Square Photo, 100% Fit, Zero Cuts) */
.cat-carousel-viewport {
  width: 100%;
  overflow: hidden;
  position: relative;
  touch-action: pan-y;
  user-select: none;
}
.cat-carousel-track {
  display: flex;
  gap: 10px;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
}
.cat-carousel-card {
  /* Mobile (< 540px): Exactly 3 full items across 100% width with 10px gap */
  flex: 0 0 calc((100% - 2 * 10px) / 3);
  width: calc((100% - 2 * 10px) / 3);
  display: block;
  text-decoration: none;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--surface-border);
  box-shadow: var(--shadow-xs);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.cat-carousel-card:hover {
  transform: translateY(-2px);
  border-color: #93c5fd;
  box-shadow: var(--shadow-sm);
}
.cat-carousel-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cat-arrow-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f1f5f9;
  border: 1px solid var(--surface-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0f172a;
  cursor: pointer;
  transition: all 0.15s ease;
}
.cat-arrow-btn:hover {
  background: #0062ff;
  color: #ffffff;
  border-color: #0062ff;
}

@media (min-width: 540px) {
  .cat-carousel-track {
    gap: 12px;
  }
  .cat-carousel-card {
    /* Tablet (540px - 768px): Exactly 4 full items */
    flex: 0 0 calc((100% - 3 * 12px) / 4);
    width: calc((100% - 3 * 12px) / 4);
  }
}
@media (min-width: 768px) {
  .cat-carousel-track {
    gap: 14px;
  }
  .cat-carousel-card {
    /* Small Desktop (768px - 1024px): Exactly 5 full items */
    flex: 0 0 calc((100% - 4 * 14px) / 5);
    width: calc((100% - 4 * 14px) / 5);
  }
}
@media (min-width: 1024px) {
  .cat-carousel-track {
    gap: 16px;
  }
  .cat-carousel-card {
    /* Large Desktop (> 1024px): Exactly 6 full items */
    flex: 0 0 calc((100% - 5 * 16px) / 6);
    width: calc((100% - 5 * 16px) / 6);
  }
}

/* Shop Visual Categories Grid (Multi-Row Responsive) */
.shop-categories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}
@media (min-width: 600px) {
  .shop-categories-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
  }
}
@media (min-width: 860px) {
  .shop-categories-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
  }
}
@media (min-width: 1100px) {
  .shop-categories-grid {
    grid-template-columns: repeat(8, 1fr);
    gap: 14px;
  }
}

.shop-cat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 8px;
  background: #ffffff;
  border: 1.5px solid var(--surface-border);
  border-radius: 12px;
  text-decoration: none;
  box-shadow: var(--shadow-xs);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  min-width: 0;
}
.shop-cat-card:hover {
  transform: translateY(-2px);
  border-color: #93c5fd;
  box-shadow: var(--shadow-sm);
}
.shop-cat-card.active {
  border-color: #0062ff;
  background: #eff6ff;
  box-shadow: 0 4px 12px rgba(0, 98, 255, 0.15);
}
.shop-cat-card-img-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 6px;
  border-radius: 8px;
}
.shop-cat-card-img-wrap img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}
.shop-cat-card-name {
  font-size: 11.5px;
  font-weight: 700;
  color: #0f172a;
  text-align: center;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.shop-cat-card.active .shop-cat-card-name {
  color: #0062ff;
  font-weight: 800;
}

/* 6. Product Cards Grid (Standard 2 Columns on Phone, 4 on Desktop) */
.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
@media (min-width: 640px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
}
@media (min-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
  }
}
@media (min-width: 1280px) {
  .products-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
  }
}

.product-card {
  background: #ffffff;
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 10px;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: var(--shadow-xs);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  height: 100%;
  box-sizing: border-box;
}
.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.product-card-img-wrap {
  width: 100%;
  aspect-ratio: 1 / 1.18;
  background: #f8fafc;
  border-radius: var(--radius-sm);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  margin-bottom: 10px;
  border: 1px solid #f1f5f9;
}
.product-card-img-wrap img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform 0.25s ease;
  display: block;
}
.product-card:hover .product-card-img-wrap img {
  transform: scale(1.04);
}

.product-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}
.product-card-title {
  font-size: 13.5px;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.35;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 36px;
}

.product-card-price-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: auto;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.product-bold-price {
  font-size: 15.5px;
  font-weight: 800;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.product-struck-price {
  font-size: 12px;
  color: #94a3b8;
  text-decoration: line-through;
  font-weight: 600;
  white-space: nowrap;
}

/* Card Button Action Row: [Buy Now] + [🛒 Quick Cart] */
.product-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  width: 100%;
}
.btn-card-buy-now {
  flex: 1;
  height: 38px;
  background: #0062ff;
  color: #ffffff !important;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: none;
  transition: background 0.15s ease, transform 0.1s ease;
  white-space: nowrap;
}
.btn-card-buy-now:hover {
  background: #004edb;
}
.btn-card-buy-now:active {
  transform: scale(0.98);
}
.btn-card-quick-cart {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #0f172a;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-card-quick-cart:hover {
  background: #e2e8f0;
  color: #0062ff;
  border-color: #93c5fd;
}
.btn-card-quick-cart:active {
  transform: scale(0.95);
}

/* 7. Slide-Out Cart Drawer */
.cart-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.cart-drawer-overlay.open {
  opacity: 1;
  visibility: visible;
}
.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 340px;
  background: #ffffff;
  z-index: 2001;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: -6px 0 25px rgba(0,0,0,0.12);
}
.cart-drawer-overlay.open .cart-drawer {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--surface-border);
}
.drawer-title {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}
.drawer-close-btn {
  background: none;
  border: none;
  font-size: 20px;
  color: #64748b;
  cursor: pointer;
}

.drawer-items-list {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.drawer-item-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
}
.drawer-item-thumb {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  background: #f8fafc;
  border: 1px solid var(--surface-border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  padding: 4px;
}
.drawer-item-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.drawer-item-details {
  flex: 1;
  min-width: 0;
}
.drawer-item-name {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}
.drawer-item-price {
  font-size: 13px;
  font-weight: 800;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}

.drawer-footer {
  padding: 16px;
  border-top: 1px solid var(--surface-border);
  background: #f8fafc;
}
.drawer-subtotal-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 14px;
}
.drawer-subtotal-row span:last-child {
  font-size: 17px;
  font-weight: 900;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}
.drawer-btn-checkout {
  width: 100%;
  height: 46px;
  background: var(--primary);
  color: #ffffff;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0, 98, 255, 0.25);
  transition: background 0.15s;
}
.drawer-btn-checkout:hover {
  background: var(--primary-hover);
}
.drawer-view-cart-link {
  display: block;
  text-align: center;
  margin-top: 10px;
  font-size: 12.5px;
  font-weight: 700;
  color: #64748b;
  text-decoration: underline;
}

/* 8. Full-Screen Instant Search Overlay */
.search-overlay {
  position: fixed;
  inset: 0;
  background: #ffffff;
  z-index: 3100;
  display: none;
  flex-direction: column;
}
.search-overlay.open {
  display: flex;
}
.search-overlay-header {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--surface-border);
  gap: 12px;
}
.search-overlay-input {
  flex: 1;
  height: 44px;
  border: none;
  font-size: 16px !important;
  color: #0f172a;
  outline: none;
}
.search-suggestions-container {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

/* 9. Product Page Sticky Buy Bar (Phones) */
.product-sticky-buy-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  border-top: 1px solid var(--surface-border);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  z-index: 995;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
}
@media (min-width: 900px) {
  .product-sticky-buy-bar {
    display: none !important;
  }
}
.sticky-buy-price-box {
  display: flex;
  flex-direction: column;
}
.sticky-buy-price-label {
  font-size: 10.5px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
}
.sticky-buy-price-val {
  font-size: 18px;
  font-weight: 900;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}
.sticky-buy-now-btn {
  flex: 1;
  max-width: 220px;
  height: 46px;
  background: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius);
  font-size: 14.5px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* 10. Toast Notification Engine */
.toast-container {
  position: fixed;
  bottom: calc(var(--bottom-bar-height) + env(safe-area-inset-bottom, 0px) + 16px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 3500;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  width: calc(100% - 32px);
  max-width: 380px;
}
@media (min-width: 900px) {
  .toast-container {
    bottom: 24px;
    left: auto;
    right: 24px;
    transform: none;
  }
}
.toast-msg {
  background: #0f172a;
  color: #ffffff;
  padding: 12px 18px;
  border-radius: var(--radius);
  font-size: 13.5px;
  font-weight: 700;
  box-shadow: 0 10px 25px rgba(0,0,0,0.25);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  pointer-events: auto;
  border-left: 4px solid var(--primary);
}
.toast-msg a {
  color: #38bdf8;
  text-decoration: underline;
  font-weight: 800;
  white-space: nowrap;
}

/* 11. Responsive Account Dashboard & Form Rules */
@media (max-width: 850px) {
  .account-inner-grid {
    grid-template-columns: 1fr !important;
  }
}

/* 12. SweetAlert2 Custom Theme */
.swal2-popup {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif !important;
  border-radius: 16px !important;
  padding: 1.5rem !important;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.16) !important;
}
.swal2-popup.swal2-toast {
  padding: 0.75rem 1rem !important;
  border-radius: 12px !important;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.15) !important;
}
.swal2-title {
  font-weight: 800 !important;
  color: #0f172a !important;
  font-size: 1.15rem !important;
}
.swal2-toast .swal2-title {
  font-size: 0.9rem !important;
  font-weight: 700 !important;
}
.swal2-html-container {
  color: #475569 !important;
  font-size: 0.95rem !important;
  line-height: 1.5 !important;
}
.swal2-confirm {
  background-color: var(--primary) !important;
  border-radius: 8px !important;
  font-weight: 700 !important;
  font-size: 0.9rem !important;
  padding: 8px 20px !important;
}
.swal2-cancel {
  border-radius: 8px !important;
  font-weight: 700 !important;
  font-size: 0.9rem !important;
  padding: 8px 20px !important;
}

/* Account Navigation & Layout - 100% Mobile Responsive & Anti-Cutoff */
.account-inner-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  align-items: flex-start;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.account-inner-grid > * {
  min-width: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
  box-sizing: border-box !important;
}
.account-sidebar-col {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
@media (max-width: 900px) {
  .account-inner-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
}
.account-nav-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 14px;
  border: none;
  background: transparent;
  border-radius: 10px;
  font-weight: 700;
  font-size: 13.5px;
  color: #475569;
  text-decoration: none;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
  box-sizing: border-box;
}
.account-nav-btn i {
  width: 18px;
  text-align: center;
  font-size: 15px;
  flex-shrink: 0;
}
.account-nav-btn:hover {
  background: #f1f5f9;
  color: #0062ff;
}
.account-nav-btn.active {
  background: #0062ff;
  color: #ffffff;
}
.account-nav-btn.active i {
  color: #ffffff;
}

/* Prevent inputs or tables inside account layout from causing horizontal blowout */
.account-inner-grid input,
.account-inner-grid select,
.account-inner-grid textarea {
  max-width: 100% !important;
  box-sizing: border-box !important;
}


