/* ==========================================================================
   Sunidhi Suiting & Shirting — Luxury Light Theme Design System (2026)
   Mobile-First Architecture, Bale Cart & High-Performance Interactions
   ========================================================================== */

:root {
  /* Warm Luxury Light Palette */
  --bg-page: #F8F6F1;
  --bg-surface: #FFFFFF;
  --bg-surface-subtle: #F3EFE8;
  --bg-card: #FFFFFF;
  --bg-card-hover: #FCFBF9;
  
  /* Text & Typography */
  --text-primary: #1C1917;
  --text-secondary: #57534E;
  --text-muted: #8A857F;
  --text-inverse: #FFFFFF;

  /* Brand Accents */
  --color-terracotta: #C25E1A;      /* Warm Cognac/Amber Price Accent from Card Reference */
  --color-terracotta-dark: #9A450E;
  --color-terracotta-light: #FDF3EB;
  --color-whatsapp: #25D366;
  --color-whatsapp-dark: #1EBE5D;
  --color-tick-active: #059669;     /* Emerald Green for Selected Tick State */
  --color-tick-active-bg: #ECFDF5;

  /* Borders & Dividers */
  --border-subtle: #EAE6DF;
  --border-card: #ECE7DF;
  --border-active: #C25E1A;

  /* Shadows & Elevations */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-card: 0 4px 14px -2px rgba(28, 25, 23, 0.05), 0 2px 6px -1px rgba(28, 25, 23, 0.03);
  --shadow-card-hover: 0 14px 28px -4px rgba(28, 25, 23, 0.09), 0 6px 12px -2px rgba(28, 25, 23, 0.04);
  --shadow-dock: 0 10px 30px -5px rgba(28, 25, 23, 0.12), 0 4px 12px -2px rgba(28, 25, 23, 0.06);
  --shadow-drawer: -10px 0 40px rgba(0, 0, 0, 0.15);

  /* Radii */
  --radius-card: 18px;
  --radius-img: 14px;
  --radius-btn: 12px;
  --radius-pill: 9999px;

  /* Transitions */
  --transition-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

/* RESET & BASE */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background-color: var(--bg-page);
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.45;
  min-height: 100vh;
  padding-bottom: 120px; /* Space for bottom dock */
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   INITIAL LUXURY SPLASH SCREEN
   ========================================================================== */
.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--bg-page);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.splash-screen.fade-out {
  opacity: 0;
  transform: scale(1.04);
  pointer-events: none;
}

.splash-content {
  text-align: center;
  padding: 24px;
  animation: splashPop 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes splashPop {
  0% { transform: scale(0.85); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.splash-logo-container {
  margin-bottom: 18px;
}

.splash-logo {
  max-width: 320px;
  width: 78vw;
  height: auto;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.06));
}

.splash-shimmer-track {
  width: 180px;
  height: 4px;
  background: #EAE6DF;
  border-radius: var(--radius-pill);
  margin: 0 auto 14px auto;
  overflow: hidden;
  position: relative;
}

.splash-shimmer-bar {
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, #008F9B, #70B02A, #F39C12, #E74C3C);
  border-radius: var(--radius-pill);
  position: absolute;
  animation: splashShimmer 0.8s ease-in-out infinite alternate;
}

@keyframes splashShimmer {
  0% { left: 0%; }
  100% { left: 50%; }
}

.splash-tagline {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ==========================================================================
   SITE HEADER & NAVIGATION
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
}

.header-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (min-width: 768px) {
  .header-container {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    gap: 16px;
  }
}

/* BRANDING */
.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo-img {
  height: 42px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.04));
}

.brand-tagline {
  display: none;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  border-left: 1px solid var(--border-subtle);
  padding-left: 12px;
}

@media (min-width: 768px) {
  .brand-logo-img {
    height: 48px;
  }
  .brand-tagline {
    display: block;
  }
}

/* HEADER CONTROLS (SEARCH, SORT, CART) */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}
@media (max-width: 640px) {
  .header-container {
    padding: 10px 12px;
    gap: 8px;
  }
  .header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
  }
  .search-bar {
    order: 1;
    width: 100%;
    flex: 0 0 100%;
    height: 38px;
  }
  .sort-wrapper {
    order: 2;
    flex: 1;
    min-width: 0;
  }
  .sort-wrapper select {
    width: 100%;
    height: 38px;
    font-size: 0.76rem;
    padding: 0 8px;
  }
  .header-cart-btn {
    order: 3;
    flex-shrink: 0;
    height: 38px;
    padding: 0 12px;
  }
  .header-cart-btn .cart-btn-label {
    display: none;
  }
}


@media (min-width: 768px) {
  .header-actions {
    width: auto;
    gap: 12px;
  }
}

.search-bar {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 0 12px;
  height: 42px;
  transition: all var(--transition-fast);
}

.search-bar:focus-within {
  background: var(--bg-surface);
  border-color: var(--color-terracotta);
  box-shadow: 0 0 0 3px rgba(194, 94, 26, 0.12);
}

.search-icon {
  color: var(--text-muted);
  flex-shrink: 0;
  margin-right: 6px;
}

.search-bar input {
  width: 100%;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.88rem;
  color: var(--text-primary);
  outline: none;
}

.search-bar input::placeholder {
  color: var(--text-muted);
}

.search-clear-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0 4px;
}

.sort-wrapper select {
  height: 42px;
  padding: 0 12px;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  outline: none;
  transition: all var(--transition-fast);
}

.sort-wrapper select:focus {
  border-color: var(--color-terracotta);
  background: var(--bg-surface);
}

/* HEADER CART TRIGGER BUTTON */
.header-cart-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 14px;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.header-cart-btn:hover {
  background: var(--bg-surface-subtle);
  border-color: var(--color-terracotta);
}

.cart-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-badge {
  position: absolute;
  top: -8px;
  right: -10px;
  background: var(--color-terracotta);
  color: #FFFFFF;
  font-size: 0.7rem;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  box-shadow: 0 2px 5px rgba(194, 94, 26, 0.4);
}

.cart-btn-label {
  font-size: 0.84rem;
  font-weight: 700;
  display: none;
}

@media (min-width: 480px) {
  .cart-btn-label {
    display: inline;
  }
}

/* FILTER CHIPS (Scrollable Strip) */
.filter-strip {
  border-top: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.85);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.filter-strip::-webkit-scrollbar {
  display: none;
}

.filter-chips {
  max-width: 1280px;
  margin: 0 auto;
  padding: 8px 16px;
  display: flex;
  gap: 8px;
  white-space: nowrap;
}

@media (min-width: 768px) {
  .filter-chips {
    padding: 8px 24px;
  }
}

.chip {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.chip:hover {
  background: var(--bg-surface-subtle);
  color: var(--text-primary);
}

.chip.active {
  background: var(--text-primary);
  border-color: var(--text-primary);
  color: var(--text-inverse);
  box-shadow: 0 2px 8px rgba(28, 25, 23, 0.15);
}

.chip-count {
  opacity: 0.75;
  font-size: 0.75rem;
}

/* ==========================================================================
   MAIN CATALOG LAYOUT
   ========================================================================== */
.main-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px;
}

@media (min-width: 768px) {
  .main-content {
    padding: 24px;
  }
}

/* META BAR */
.catalog-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 2px 4px;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.catalog-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.meta-separator {
  opacity: 0.5;
}

.tap-hint {
  display: none;
}

@media (min-width: 768px) {
  .tap-hint {
    display: inline;
    color: var(--text-secondary);
  }
}

.quick-selection-toggles {
  display: flex;
  gap: 10px;
}

.text-link-btn {
  background: transparent;
  border: none;
  color: var(--color-terracotta);
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background var(--transition-fast);
}

.text-link-btn:hover {
  background: var(--color-terracotta-light);
}

/* ==========================================================================
   GHOST LOADERS (SKELETON SHIMMER)
   ========================================================================== */
.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (min-width: 640px) {
  .skeleton-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
  }
}

@media (min-width: 1024px) {
  .skeleton-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
  }
}

.skeleton-card {
  background: var(--bg-surface);
  border-radius: var(--radius-card);
  border: 1px solid var(--border-card);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

@keyframes skeletonShimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.sk-shimmer,
.sk-media,
.sk-line,
.sk-price,
.sk-btn {
  background: linear-gradient(90deg, #EFECE6 25%, #FAF8F5 50%, #EFECE6 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.4s ease-in-out infinite;
}

.sk-media {
  width: 100%;
  aspect-ratio: 4 / 3;
}

.sk-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sk-line {
  border-radius: 4px;
}

.sk-title {
  height: 16px;
  width: 75%;
}

.sk-desc {
  height: 12px;
  width: 55%;
}

.sk-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
}

.sk-price {
  height: 20px;
  width: 35%;
  border-radius: 6px;
}

.sk-btn {
  height: 30px;
  width: 30px;
  border-radius: 50%;
}

/* ==========================================================================
   PRODUCT CARD DESIGN (With Tick Button & Bale Selector)
   ========================================================================== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (min-width: 640px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
  }
}

@media (min-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
  }
}

/* The Card */
.product-card {
  position: relative;
  background: var(--bg-card);
  border-radius: var(--radius-card);
  border: 1px solid var(--border-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth), border-color var(--transition-fast);
  cursor: pointer;
  user-select: none;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  border-color: #DDD6CE;
}

/* Selected State */
.product-card.selected {
  border-color: var(--color-terracotta);
  box-shadow: 0 0 0 2px var(--color-terracotta), 0 8px 20px -4px rgba(194, 94, 26, 0.18);
  background: #FFFDFB;
}

/* Image Container */
.card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background-color: var(--bg-surface-subtle);
  overflow: hidden;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--transition-smooth);
}

.product-card:hover .card-media img {
  transform: scale(1.04);
}

/* Card Selection Status Badge (Top-Left) */
.card-select-indicator {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border: 1.5px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  transition: all var(--transition-fast);
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.product-card.selected .card-select-indicator {
  background: var(--color-tick-active);
  border-color: var(--color-tick-active);
  color: #FFFFFF;
  transform: scale(1.08);
}

/* Card Top Actions: Zoom & Quick WhatsApp Share (Top-Right) */
.card-top-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 6px;
  z-index: 2;
}

.card-action-icon-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 2px 5px rgba(0,0,0,0.08);
}

.card-action-icon-btn:hover {
  background: #FFFFFF;
  transform: scale(1.1);
  color: var(--text-primary);
}

.card-action-icon-btn.btn-wa-quick:hover {
  color: var(--color-whatsapp);
}

/* Card Body Details */
.card-info {
  padding: 8px 8px 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .card-info {
    padding: 12px 14px 14px 14px;
    gap: 5px;
  }
}

/* Quality / Product Name - 2 lines max with auto-ellipsis and height alignment */
.card-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.2px;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.1em;
  word-break: break-word;
}

@media (min-width: 768px) {
  .card-title {
    font-size: 1.02rem;
    min-height: 2.3em;
  }
}

/* Packaging Description */
.card-desc-pill {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-surface-subtle);
  padding: 2px 5px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  width: fit-content;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .card-desc-pill {
    font-size: 0.72rem;
    padding: 3px 8px;
  }
}

/* BALE QUANTITY SELECTOR ON CARD */
.card-bale-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface-subtle);
  border-radius: 6px;
  padding: 2px 5px;
  margin: 1px 0 3px 0;
  font-size: 0.72rem;
  box-sizing: border-box;
}

.bale-label {
  font-weight: 600;
  color: var(--text-secondary);
}

.bale-controls {
  display: flex;
  align-items: center;
  gap: 5px;
}

.bale-btn {
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  width: 20px;
  height: 20px;
  border-radius: 4px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.bale-btn:hover {
  background: var(--color-terracotta);
  color: #FFFFFF;
  border-color: var(--color-terracotta);
}

.bale-num {
  font-weight: 800;
  color: var(--text-primary);
  min-width: 14px;
  text-align: center;
  font-size: 0.76rem;
}

/* Bottom Row: Price & Tick Button - Responsive & Overflow-Proof */
.card-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  margin-top: auto;
  padding-top: 3px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* Price in Warm Amber/Terracotta from Reference Image */
.card-price {
  font-size: 0.94rem;
  font-weight: 800;
  color: var(--color-terracotta);
  letter-spacing: -0.3px;
  display: flex;
  align-items: baseline;
  gap: 1px;
  white-space: nowrap;
  flex-shrink: 0;
}

.card-price .currency-symbol {
  font-size: 0.82rem;
  font-weight: 700;
}

.card-price .price-unit {
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-left: 2px;
}

@media (min-width: 768px) {
  .card-price {
    font-size: 1.2rem;
  }
  .card-price .currency-symbol {
    font-size: 0.95rem;
  }
  .card-price .price-unit {
    font-size: 0.7rem;
  }
}

/* TICK BUTTON (Invented to replace Like/Heart Button) */
.card-tick-btn {
  background: transparent;
  border: 1.5px solid #D1D5DB;
  color: #6B7280;
  border-radius: var(--radius-pill);
  padding: 3px 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-family: inherit;
  font-size: 0.65rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
  white-space: nowrap;
  box-sizing: border-box;
}

.card-tick-btn .tick-mark {
  font-size: 0.78rem;
  font-weight: 900;
}

.card-tick-btn:hover {
  border-color: var(--color-tick-active);
  color: var(--color-tick-active);
  background: var(--color-tick-active-bg);
}

.product-card.selected .card-tick-btn {
  background: var(--color-tick-active);
  border-color: var(--color-tick-active);
  color: #FFFFFF;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.3);
}

@media (min-width: 768px) {
  .card-tick-btn {
    padding: 4px 10px;
    font-size: 0.75rem;
    gap: 4px;
  }
  .card-tick-btn .tick-mark {
    font-size: 0.88rem;
  }
}

/* Ultra-Narrow Screens (under 370px, e.g. folded phones, narrow webviews): stack bottom row cleanly */
@media (max-width: 370px) {
  .card-info {
    padding: 6px 6px 8px 6px;
  }
  .card-bottom-row {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }
  .card-tick-btn {
    width: 100%;
    padding: 4px 6px;
    font-size: 0.7rem;
  }
}

/* Empty State */
.catalog-empty-state {
  grid-column: 1 / -1;
  padding: 60px 20px;
  text-align: center;
  background: var(--bg-surface);
  border-radius: var(--radius-card);
  border: 1px dashed var(--border-subtle);
  color: var(--text-muted);
}

.catalog-empty-state h3 {
  font-size: 1.2rem;
  color: var(--text-primary);
  margin-bottom: 6px;
}

/* ==========================================================================
   WHOLESALE BALE CART DRAWER
   ========================================================================== */
.cart-drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 280;
  background: rgba(28, 25, 23, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  justify-content: flex-end;
  animation: fadeIn 0.2s ease;
}

.cart-drawer-overlay.active {
  display: flex;
}

.cart-drawer {
  background: var(--bg-surface);
  width: 100%;
  max-width: 440px;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-drawer);
  animation: slideInRight 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (max-width: 640px) {
  .cart-drawer {
    max-width: 100%;
    width: 100%;
    height: 100dvh;
  }
}

@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.cart-mobile-handle {
  display: none;
  width: 36px;
  height: 4px;
  background: #D6D3D1;
  border-radius: 4px;
  margin: 10px auto 2px auto;
}

@media (max-width: 640px) {
  .cart-mobile-handle {
    display: block;
  }
}

.cart-drawer-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cart-header-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--color-terracotta-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cart-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}

.cart-subtitle {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.cart-close-btn {
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 1.3rem;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  padding: 0;
}

.cart-close-btn:hover {
  background: #FFFFFF;
  color: var(--text-primary);
  transform: scale(1.06);
}

.cart-items-container {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cart-empty-msg {
  text-align: center;
  padding: 50px 20px;
  color: var(--text-muted);
}

.cart-item-card {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: #FFFFFF;
  border-radius: 14px;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
  align-items: flex-start;
  transition: border-color var(--transition-fast);
}

.cart-item-card:hover {
  border-color: #D6D3D1;
}

.cart-item-img {
  width: 62px;
  height: 62px;
  border-radius: 10px;
  object-fit: cover;
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.cart-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.cart-item-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
}

.cart-item-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-remove-btn {
  background: transparent;
  border: none;
  color: #9CA3AF;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.cart-remove-btn:hover {
  background: #FEE2E2;
  color: #DC2626;
}

.cart-item-spec {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.cart-item-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  gap: 8px;
  flex-wrap: wrap;
}

.cart-item-price-calc {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-terracotta);
}

.cart-item-stepper {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-surface-subtle);
  padding: 2px 4px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
}

.cart-item-stepper .bale-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  font-size: 1.05rem;
  font-weight: 700;
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.cart-item-stepper .bale-btn:hover {
  background: var(--color-terracotta);
  color: #FFFFFF;
  border-color: var(--color-terracotta);
}

.cart-item-stepper .bale-num {
  font-weight: 800;
  color: var(--text-primary);
  min-width: 20px;
  text-align: center;
  font-size: 0.88rem;
}

.cart-drawer-footer {
  padding: 14px 18px;
  padding-bottom: max(14px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--border-subtle);
  background: #FFFFFF;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.05);
}

.cart-summary-card {
  background: var(--bg-surface-subtle);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border: 1px solid var(--border-subtle);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.summary-row strong {
  font-size: 0.85rem;
  color: var(--text-primary);
  font-weight: 700;
}

.gst-row {
  color: #4B5563;
}

.gst-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.gst-pill {
  font-size: 0.62rem;
  font-weight: 700;
  background: #FEF3C7;
  color: #92400E;
  padding: 1px 5px;
  border-radius: 4px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.gst-row strong {
  color: #059669;
  font-weight: 700;
}

.summary-row.grand-total {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--text-primary);
  border-top: 1.5px dashed #D6D3D1;
  padding-top: 8px;
  margin-top: 3px;
}

.summary-row.grand-total strong {
  color: var(--color-terracotta);
  font-size: 1.25rem;
  font-weight: 900;
}

.cart-footer-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-whatsapp-order {
  background: var(--color-whatsapp);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-btn);
  padding: 13px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.4);
  transition: all var(--transition-fast);
  width: 100%;
}

.btn-whatsapp-order:hover {
  background: var(--color-whatsapp-dark);
}

.btn-whatsapp-order:active {
  transform: scale(0.98);
}

.btn-clear-cart {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-align: center;
  padding: 4px;
}

/* ==========================================================================
   FLOATING SELECTION DOCK (Bottom Bar)
   ========================================================================== */
.floating-selection-dock {
  position: fixed;
  bottom: 14px;
  left: 12px;
  right: 12px;
  z-index: 90;
  max-width: 760px;
  margin: 0 auto;
  background: rgba(28, 25, 23, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 10px 14px;
  box-shadow: var(--shadow-dock);
  transform: translateY(120%);
  opacity: 0;
  pointer-events: none;
  transition: transform var(--transition-smooth), opacity var(--transition-smooth);
}

.floating-selection-dock.active {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.dock-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.dock-summary {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dock-counter-badge {
  background: var(--color-tick-active);
  color: #FFFFFF;
  font-size: 0.85rem;
  font-weight: 800;
  min-width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.dock-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.dock-text strong {
  color: #FFFFFF;
  font-size: 0.9rem;
  font-weight: 700;
}

.dock-text span {
  color: #A8A29E;
  font-size: 0.72rem;
  display: none;
}

@media (min-width: 480px) {
  .dock-text span {
    display: inline;
  }
}

.dock-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dock-btn {
  border: none;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 9px 14px;
  border-radius: var(--radius-btn);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-whatsapp {
  background: var(--color-whatsapp);
  color: #FFFFFF;
  box-shadow: 0 2px 10px rgba(37, 211, 102, 0.35);
}

.btn-whatsapp:hover {
  background: var(--color-whatsapp-dark);
  transform: translateY(-1px);
}

.btn-pdf {
  background: rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-pdf:hover {
  background: rgba(255, 255, 255, 0.25);
}

.btn-more {
  background: rgba(255, 255, 255, 0.1);
  color: #E7E5E4;
}

.btn-more:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
}

@media (max-width: 520px) {
  .dock-btn {
    padding: 8px 10px;
    font-size: 0.8rem;
  }
  .btn-text-full {
    display: none;
  }
}

/* ==========================================================================
   LIGHTBOX MODAL
   ========================================================================== */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(28, 25, 23, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 0.2s ease;
}

.lightbox-overlay.active {
  display: flex;
}

.lightbox-container {
  position: relative;
  background: var(--bg-surface);
  border-radius: 20px;
  max-width: 680px;
  width: 100%;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  animation: scaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.lightbox-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all var(--transition-fast);
}

.lightbox-close:hover {
  background: #FFFFFF;
  transform: scale(1.08);
}

.lightbox-img-wrapper {
  width: 100%;
  max-height: 60vh;
  background: var(--bg-surface-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.lightbox-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  max-height: 60vh;
}

.lightbox-details {
  padding: 16px 20px;
  background: #FFFFFF;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.lightbox-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  width: 100%;
}

.lightbox-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lightbox-price {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--color-terracotta);
}

.lightbox-packaging {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-surface-subtle);
  padding: 4px 10px;
  border-radius: 8px;
}

.lightbox-actions-row {
  display: flex;
  gap: 10px;
}

.lightbox-btn-tick {
  background: var(--color-tick-active);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-btn);
  padding: 9px 16px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.lightbox-btn-tick.selected {
  background: #1C1917;
}

.lightbox-btn-wa {
  background: var(--color-whatsapp);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-btn);
  padding: 9px 16px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

/* ==========================================================================
   STATUS & SHARE DIALOGS
   ========================================================================== */
.status-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(28, 25, 23, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.status-modal-overlay.active {
  display: flex;
}

.status-modal-card {
  background: var(--bg-surface);
  border-radius: 20px;
  padding: 32px 28px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-dock);
}

.spinner-ring {
  width: 44px;
  height: 44px;
  margin: 0 auto 16px auto;
  border: 3.5px solid var(--border-subtle);
  border-top-color: var(--color-terracotta);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.status-modal-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.status-modal-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* SHARE DIALOG */
.share-dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 250;
  background: rgba(28, 25, 23, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.share-dialog-overlay.active {
  display: flex;
}

.share-dialog-card {
  background: var(--bg-surface);
  border-radius: 22px;
  max-width: 480px;
  width: 100%;
  padding: 22px;
  box-shadow: var(--shadow-dock);
  animation: scaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.share-dialog-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.share-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #E8FDF0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.share-dialog-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  flex: 1;
}

.share-dialog-close {
  background: transparent;
  border: none;
  font-size: 1.4rem;
  color: var(--text-muted);
  cursor: pointer;
}

.share-dialog-lead {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 14px;
  line-height: 1.4;
}

.share-options-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.share-opt-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 10px 12px;
}

.opt-icon {
  font-size: 1.4rem;
}

.opt-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.opt-text strong {
  font-size: 0.85rem;
  color: var(--text-primary);
}

.opt-text span {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Individual Items Share List in Share Dialog */
.share-individual-section {
  margin-bottom: 14px;
}

.share-section-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.share-individual-list {
  max-height: 180px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 8px;
}

.share-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: #FFFFFF;
  border-radius: 8px;
  padding: 6px 10px;
  border: 1px solid var(--border-subtle);
}

.share-item-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.share-item-thumb {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

.share-item-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}

.share-item-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.share-item-spec {
  font-size: 0.68rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-share-item-wa {
  background: var(--color-whatsapp);
  color: #FFFFFF;
  border: none;
  border-radius: 6px;
  padding: 5px 9px;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.btn-share-item-wa:hover {
  background: var(--color-whatsapp-dark);
}

.share-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bg-surface-subtle);
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 16px;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-primary);
}

.step-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--text-primary);
  color: #FFFFFF;
  font-size: 0.7rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-item kbd {
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 1px 4px;
  font-size: 0.72rem;
  font-family: inherit;
}

.share-dialog-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.btn {
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 9px 16px;
  border-radius: var(--radius-btn);
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.78rem;
}

.btn-primary {
  background: var(--color-terracotta);
  color: #FFFFFF;
}

.btn-outline {
  background: var(--bg-surface-subtle);
  color: var(--text-primary);
}

.btn-outline:hover {
  background: #EAE6DF;
}

.btn-whatsapp-direct {
  background: var(--color-whatsapp);
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp-direct:hover {
  background: var(--color-whatsapp-dark);
}

/* ANIMATIONS */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleUp {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* HEADER SHARE SITE BUTTON */
.header-share-site-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 42px;
  padding: 0 12px;
  background: #F0FDF4;
  border: 1.5px solid #BBF7D0;
  border-radius: var(--radius-pill);
  color: #15803D;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.header-share-site-btn:hover {
  background: #DCFCE7;
  border-color: #86EFAC;
  transform: translateY(-1px);
}

.share-btn-label {
  display: none;
}

@media (min-width: 480px) {
  .share-btn-label {
    display: inline;
  }
}

@media (max-width: 640px) {
  .header-share-site-btn {
    order: 2;
    height: 38px;
    padding: 0 10px;
  }
}


/* ACCESSIBILITY & BRAND HEADING FOR SEO */
.brand-heading {
  margin: 0;
  padding: 0;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  display: flex;
  align-items: center;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}


/* Unlinked Card Media Placeholder */
.card-no-image {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #F8FAFC 0%, #EEF2F6 100%);
  border: 1px dashed rgba(203, 213, 225, 0.9);
}

.card-no-image-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.card-no-image-badge svg {
  color: var(--color-terracotta);
  opacity: 0.85;
}

.cart-item-no-img {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F1F5F9;
  font-size: 1.4rem;
  border: 1px solid var(--border-subtle);
}
