/* ==========================================================================
   JvelStore - Premium Customer Web Experience
   Design System & Styling
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Playfair+Display:ital,wght@0,600;0,700;1,600&display=swap');

:root {
  --primary: #d85f37;
  --primary-hover: #bf4d28;
  --primary-soft: rgba(216, 95, 55, 0.08);
  --primary-glow: rgba(216, 95, 55, 0.25);

  --gold: #d4a373;
  --gold-dark: #b8824f;

  --bg-main: #f8fafc;
  --bg-subtle: #f1f5f9;
  --surface: #ffffff;
  --surface-alt: #ffffff;

  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;

  --border-subtle: #e2e8f0;
  --border-focus: #cbd5e1;

  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --blue: #3b82f6;

  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 16px -2px rgba(15, 23, 42, 0.07), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 32px -4px rgba(15, 23, 42, 0.1), 0 4px 12px -2px rgba(15, 23, 42, 0.05);
  --shadow-xl: 0 24px 48px -12px rgba(15, 23, 42, 0.15);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
}

/* Dark mode overrides (applied conditionally if preferred) */
[data-theme="dark"] {
  --bg-main: #0b0f17;
  --bg-subtle: #131b28;
  --surface: #182234;
  --surface-alt: #1e2b40;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-light: #64748b;
  --border-subtle: #24324a;
  --border-focus: #334464;
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);
}

/* Reset & Basics */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  overflow-x: hidden;
  min-height: 100vh;
}

img {
  max-width: 100%;
  display: block;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Utilities */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

/* --------------------------------------------------------------------------
   App Banner / Top Notification Bar
   -------------------------------------------------------------------------- */
.top-notice-bar {
  background: linear-gradient(90deg, #1e293b 0%, #0f172a 100%);
  color: #f8fafc;
  font-size: 0.82rem;
  padding: 7px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.notice-content {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.notice-pill {
  background: var(--primary);
  color: white;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.notice-links {
  display: flex;
  align-items: center;
  gap: 16px;
}

.notice-app-btn {
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
  transition: var(--transition);
}

.notice-app-btn:hover {
  color: #fff;
}

/* --------------------------------------------------------------------------
   Navigation Bar
   -------------------------------------------------------------------------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  transition: var(--transition);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 20px;
  max-width: 1280px;
  margin: 0 auto;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  cursor: pointer;
  flex-shrink: 0;
}

.brand-logo-img {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  object-fit: cover;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-subtle);
}

.brand-text-group {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.5px;
  line-height: 1.1;
  display: flex;
  align-items: center;
}

.brand-title span {
  color: var(--primary);
  margin-left: 1px;
}

.brand-tagline {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 1.8px;
  text-transform: uppercase;
}

/* Search Bar */
.search-container {
  flex: 1;
  max-width: 520px;
  position: relative;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 0 16px;
  transition: var(--transition);
}

.search-input-wrapper:focus-within {
  background: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.search-icon {
  color: var(--text-light);
  font-size: 1.1rem;
  margin-right: 10px;
  display: flex;
}

.search-input {
  width: 100%;
  padding: 10px 0;
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.9rem;
  color: var(--text-main);
}

.search-clear-btn {
  display: none;
  color: var(--text-light);
  padding: 4px;
  border-radius: var(--radius-full);
}

.search-clear-btn:hover {
  color: var(--text-main);
}

/* Nav Actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 600;
  transition: var(--transition);
  border: 1px solid transparent;
}

.nav-btn-outline {
  border-color: var(--border-subtle);
  background: #fff;
  color: var(--text-main);
}

.nav-btn-outline:hover {
  background: var(--bg-subtle);
  border-color: var(--border-focus);
}

.nav-btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px var(--primary-glow);
}

.nav-btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.nav-cart-btn {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  transition: var(--transition);
  border: 1px solid var(--border-subtle);
}

.nav-cart-btn:hover {
  background: #fff;
  border-color: var(--primary);
  color: var(--primary);
}

.cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--primary);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
}

/* User Profile in Navbar */
.nav-user-dropdown {
  position: relative;
}

.user-profile-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  background: #fff;
  transition: var(--transition);
}

.user-profile-btn:hover {
  border-color: var(--primary);
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  object-fit: cover;
  background: var(--bg-subtle);
}

.user-name-label {
  font-size: 0.85rem;
  font-weight: 600;
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --------------------------------------------------------------------------
   Categories Bar (Horizontal Scrollable Chips)
   -------------------------------------------------------------------------- */
.categories-bar {
  background: #ffffff;
  border-bottom: 1px solid var(--border-subtle);
  padding: 10px 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.categories-bar::-webkit-scrollbar {
  display: none;
}

.categories-container {
  display: flex;
  gap: 10px;
  padding: 0 20px;
  align-items: center;
  max-width: 1280px;
  margin: 0 auto;
}

.cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 600;
  white-space: nowrap;
  transition: var(--transition);
  border: 1px solid transparent;
}

.cat-chip:hover {
  background: #ffffff;
  border-color: var(--border-focus);
  color: var(--text-main);
}

.cat-chip.active {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 8px var(--primary-glow);
}

/* --------------------------------------------------------------------------
   Hero Section & Banner
   -------------------------------------------------------------------------- */
.hero-section {
  padding: 24px 0 16px;
}

.hero-slider-card {
  position: relative;
  background: #0b0f19;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: none;
  width: 100%;
  height: 380px;
}

@media (max-width: 900px) {
  .hero-slider-card {
    height: 280px;
  }
}

@media (max-width: 600px) {
  .hero-slider-card {
    height: 200px;
    border-radius: var(--radius-lg);
  }
}

.hero-slides-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease-in-out, visibility 0.5s ease;
  z-index: 1;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}

.hero-slide-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}


/* Dots Navigation */
.slider-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 15;
}

.slider-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.38);
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  padding: 0;
}

.slider-dot.active {
  background: var(--primary);
  width: 26px;
  border-radius: 6px;
}

.hero-text-content {
  max-width: 580px;
  position: relative;
  z-index: 2;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(216, 95, 55, 0.2);
  color: #ff9d7b;
  border: 1px solid rgba(216, 95, 55, 0.4);
  padding: 4px 14px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.hero-heading {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1.15;
  font-weight: 700;
  margin-bottom: 14px;
  letter-spacing: -0.5px;
}

.hero-heading span {
  color: var(--primary);
  font-style: italic;
}

.hero-subtitle {
  font-size: 1rem;
  color: #cbd5e1;
  margin-bottom: 24px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.hero-btn-primary {
  background: var(--primary);
  color: #fff;
  padding: 12px 26px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
  box-shadow: 0 4px 14px var(--primary-glow);
}

.hero-btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
}

.hero-btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.hero-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: #fff;
}

.hero-visual {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-device-preview {
  width: 220px;
  height: 220px;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
  backdrop-filter: blur(8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  animation: float 4s ease-in-out infinite;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

.hero-preview-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 10px;
}

/* Feature Highlights Bar */
.features-ribbon {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.feature-item {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-sm);
}

.feature-icon-box {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.feature-text h4 {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
}

.feature-text p {
  font-size: 0.76rem;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Product Sections & Cards
   -------------------------------------------------------------------------- */
.section-wrapper {
  padding: 32px 0 20px;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 16px;
}

.section-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.section-pretitle {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary);
  letter-spacing: 1px;
}

.section-title {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-count-pill {
  font-size: 0.75rem;
  background: var(--bg-subtle);
  color: var(--text-muted);
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-weight: 600;
}

.section-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sort-select {
  padding: 8px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  background: #ffffff;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  outline: none;
  cursor: pointer;
  transition: var(--transition);
}

.sort-select:focus {
  border-color: var(--primary);
}

/* Products Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

/* Product Card */
.product-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: var(--shadow-sm);
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: rgba(216, 95, 55, 0.4);
  box-shadow: var(--shadow-lg);
}

.product-image-box {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #f8fafc;
  overflow: hidden;
  cursor: pointer;
}

.product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.product-card:hover .product-img {
  transform: scale(1.06);
}

/* Badges on Image */
.badge-group {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 2;
}

.badge-tag {
  background: rgba(15, 23, 42, 0.8);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  backdrop-filter: blur(4px);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-tag.tag-new {
  background: var(--primary);
}

.badge-tag.tag-discount {
  background: #10b981;
}

.card-wishlist-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  transition: var(--transition);
  z-index: 2;
  box-shadow: var(--shadow-sm);
}

.card-wishlist-btn:hover {
  color: #ef4444;
  transform: scale(1.1);
}

.card-wishlist-btn.active {
  color: #ef4444;
  background: #ffffff;
  box-shadow: 0 3px 10px rgba(239, 68, 68, 0.28);
}

.card-wishlist-btn.active i {
  color: #ef4444;
  animation: heartPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes heartPop {
  0% { transform: scale(0.6); }
  50% { transform: scale(1.35); }
  100% { transform: scale(1); }
}

/* Card Body */
.product-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
}

.product-cat-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.product-card-title {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.35;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
}

.product-card-title:hover {
  color: var(--primary);
}

.product-delivery-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  color: var(--text-muted);
  background: var(--bg-subtle);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  width: fit-content;
}

.product-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
  gap: 10px;
}

.price-group {
  display: flex;
  flex-direction: column;
}

.price-currency {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}

.price-amount {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1;
}

.btn-card-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--primary-soft);
  color: var(--primary);
  border: 1px solid rgba(216, 95, 55, 0.2);
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-card-add:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: translateY(-1px);
}

/* Skeleton Loaders */
.skeleton-card {
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  height: 340px;
  position: relative;
}

.skeleton-shimmer {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  grid-column: 1 / -1;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 12px;
  opacity: 0.5;
}

/* --------------------------------------------------------------------------
   MODAL DIALOGUES & DRAWERS
   -------------------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* Modal Z-Index Stacking Hierarchy: New Dialogue sits strictly ABOVE old dialog */
#productDetailOverlay {
  z-index: 1000 !important;
}

#choiceOverlay {
  z-index: 2000 !important;
}

.cart-choice-dialog {
  position: relative;
  z-index: 2001 !important;
}

#cartDrawerOverlay {
  z-index: 2100 !important;
}

#cartDrawer {
  z-index: 2101 !important;
}

#checkoutOverlay {
  z-index: 2200 !important;
}

#ordersOverlay {
  z-index: 2250 !important;
}

#toastContainer {
  z-index: 9999 !important;
}

.modal-dialog {
  background: #ffffff;
  border-radius: var(--radius-xl);
  max-width: 500px;
  width: 100%;
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  transform: scale(0.95) translateY(10px);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.modal-overlay.active .modal-dialog {
  transform: scale(1) translateY(0);
}

.modal-header {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
}

.modal-close-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  background: var(--bg-subtle);
  transition: var(--transition);
}

.modal-close-btn:hover {
  background: var(--border-subtle);
  color: var(--text-main);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
}

/* --------------------------------------------------------------------------
   THE SPECIAL ADD TO CART CHOICE DIALOGUE
   "Sign In with Google" vs "Open in App"
   -------------------------------------------------------------------------- */
.cart-choice-dialog {
  max-width: 480px;
}

.choice-header-intro {
  text-align: center;
  margin-bottom: 20px;
}

.choice-badge-icon {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-full);
  background: var(--primary-soft);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 10px;
}

.choice-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 6px;
}

.choice-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Product preview mini card in choice modal */
.choice-product-preview {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.choice-preview-img {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: #fff;
}

.choice-preview-info {
  flex: 1;
}

.choice-preview-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}

.choice-preview-price {
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--primary);
}

/* The Two Action Cards */
.choice-buttons-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* 1. Sign In with Google Card */
.btn-choice-google {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
  text-align: left;
  box-shadow: var(--shadow-sm);
}

.btn-choice-google:hover {
  border-color: #4285f4;
  box-shadow: 0 4px 14px rgba(66, 133, 244, 0.15);
  transform: translateY(-2px);
}

.google-icon-box {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--border-subtle);
}

.choice-btn-text h4 {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.choice-btn-text p {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* 2. Open App Card */
.btn-choice-app {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #ffffff;
  border: 1.5px solid transparent;
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
  text-align: left;
  box-shadow: var(--shadow-md);
}

.btn-choice-app:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.25);
  border-color: var(--primary);
}

.app-icon-box {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.3rem;
  color: #fff;
}

.btn-choice-app .choice-btn-text h4 {
  color: #fff;
}

.btn-choice-app .choice-btn-text p {
  color: #94a3b8;
}

.choice-footer-note {
  text-align: center;
  margin-top: 18px;
  font-size: 0.76rem;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Product Details View Modal (Large)
   -------------------------------------------------------------------------- */
.modal-product-details {
  max-width: 900px;
}

.product-detail-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

/* Media Gallery */
.gallery-column {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.main-media-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-lg);
  background: var(--bg-subtle);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.main-media-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.main-media-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumbnail-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.thumb-item {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
  background: var(--bg-subtle);
  transition: var(--transition);
}

.thumb-item.active {
  border-color: var(--primary);
}

.thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Info Column */
.info-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.product-meta-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.shop-name-pill {
  font-size: 0.78rem;
  color: var(--primary);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.detail-product-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.25;
}

.detail-price-box {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
}

.detail-price-val {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary);
}

.detail-shipping-info {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Options (Color, Size, Quantity) */
.option-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.option-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.color-chips-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.color-dot-btn {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  border: 2px solid #fff;
  outline: 2px solid var(--border-subtle);
  cursor: pointer;
  transition: var(--transition);
}

.color-dot-btn.active {
  outline-color: var(--primary);
  transform: scale(1.15);
}

.size-chips-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.size-pill-btn {
  padding: 6px 14px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-subtle);
  font-size: 0.84rem;
  font-weight: 600;
  background: #fff;
  transition: var(--transition);
}

.size-pill-btn.active {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
}

.quantity-control {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  overflow: hidden;
  width: fit-content;
}

.qty-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--text-main);
  transition: var(--transition);
}

.qty-btn:hover {
  background: #fff;
}

.qty-input {
  width: 44px;
  text-align: center;
  border: none;
  background: transparent;
  font-weight: 700;
  font-size: 0.95rem;
  outline: none;
}

/* Action Buttons Stack */
.detail-actions-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.btn-detail-add-cart {
  background: var(--primary);
  color: #fff;
  padding: 14px;
  border-radius: var(--radius-full);
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
  box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-detail-add-cart:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
}

.btn-detail-wishlist {
  background: var(--bg-subtle);
  color: var(--text-main);
  border: 1.5px solid var(--border-subtle);
  padding: 12px;
  border-radius: var(--radius-full);
  font-size: 0.92rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
  cursor: pointer;
}

.btn-detail-wishlist:hover {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #ef4444;
}

.btn-detail-wishlist.active {
  background: #fef2f2;
  border-color: #ef4444;
  color: #ef4444;
}

.btn-detail-wishlist.active i {
  color: #ef4444;
  animation: heartPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-detail-open-app {
  background: var(--bg-subtle);
  color: var(--text-main);
  border: 1.5px solid var(--border-subtle);
  padding: 12px;
  border-radius: var(--radius-full);
  font-size: 0.92rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
}

.btn-detail-open-app:hover {
  background: #fff;
  border-color: var(--primary);
  color: var(--primary);
}

.btn-detail-share {
  background: transparent;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px;
}

.btn-detail-share:hover {
  color: var(--text-main);
}

.detail-desc-text {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
  white-space: pre-line;
}

/* --------------------------------------------------------------------------
   CART DRAWER & CHECKOUT MODAL
   -------------------------------------------------------------------------- */
.cart-drawer {
  position: fixed;
  top: 0;
  right: -420px;
  width: 100%;
  max-width: 420px;
  height: 100vh;
  background: #ffffff;
  box-shadow: var(--shadow-xl);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cart-drawer.active {
  right: 0;
}

.cart-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.cart-drawer-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.cart-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-items-list {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cart-item-card {
  display: flex;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.cart-item-img {
  width: 70px;
  height: 70px;
  border-radius: var(--radius-md);
  object-fit: cover;
  background: var(--bg-subtle);
  flex-shrink: 0;
}

.cart-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.cart-item-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
}

.cart-item-meta {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.cart-item-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
}

.cart-item-price {
  font-weight: 800;
  color: var(--text-main);
}

.cart-item-remove-btn {
  color: var(--text-light);
  font-size: 0.8rem;
  padding: 4px;
}

.cart-item-remove-btn:hover {
  color: #ef4444;
}

.cart-footer {
  padding: 20px;
  border-top: 1px solid var(--border-subtle);
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.summary-row.total {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  padding-top: 8px;
  border-top: 1px dashed var(--border-subtle);
}

.btn-checkout {
  background: var(--primary);
  color: #fff;
  padding: 14px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
  box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-checkout:hover {
  background: var(--primary-hover);
}

/* Checkout Form Dialog */
.checkout-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-main);
}

.form-input {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
}

.form-input:focus {
  background: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* --------------------------------------------------------------------------
   MY ORDERS & ORDER STATUS TRACKING
   -------------------------------------------------------------------------- */
.modal-orders {
  max-width: 700px;
}

.orders-filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.order-search-input {
  flex: 1;
  padding: 10px 16px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  font-size: 0.88rem;
  outline: none;
}

.order-search-input:focus {
  border-color: var(--primary);
}

.orders-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.order-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.order-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.order-id-group h5 {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text-main);
}

.order-date-text {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.order-status-badge {
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-placed {
  background: #fef3c7;
  color: #b45309;
}

.status-confirmed {
  background: #e0e7ff;
  color: #4338ca;
}

.status-shipped {
  background: #dbeafe;
  color: #1d4ed8;
}

.status-out {
  background: #fce7f3;
  color: #be185d;
}

.status-delivered {
  background: #d1fae5;
  color: #047857;
}

/* Status Stepper Tracker */
.order-stepper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  padding: 12px 10px;
  margin: 6px 0;
}

.order-stepper::before {
  content: '';
  position: absolute;
  top: 24px;
  left: 20px;
  right: 20px;
  height: 3px;
  background: var(--border-subtle);
  z-index: 1;
}

.order-step {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.step-node {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-full);
  background: #ffffff;
  border: 2px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: var(--transition);
}

.order-step.completed .step-node {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}

.order-step.current .step-node {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 0 0 4px var(--primary-soft);
}

.step-title {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.order-step.current .step-title {
  color: var(--primary);
  font-weight: 700;
}

.order-items-preview {
  display: flex;
  align-items: center;
  gap: 12px;
}

.order-preview-thumb {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-md);
  object-fit: cover;
  background: var(--bg-subtle);
}

.order-preview-details {
  flex: 1;
}

.order-preview-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
}

.order-preview-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   FOOTER
   -------------------------------------------------------------------------- */
.app-footer {
  background: #0f172a;
  color: #f8fafc;
  padding: 60px 0 24px;
  margin-top: 60px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand h3 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.footer-brand h3 span {
  color: var(--primary);
}

.footer-brand p {
  color: #94a3b8;
  font-size: 0.88rem;
  line-height: 1.6;
  max-width: 320px;
  margin-bottom: 18px;
}

.footer-col h5 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: #ffffff;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a {
  color: #94a3b8;
  font-size: 0.86rem;
  transition: var(--transition);
}

.footer-col a:hover {
  color: #ffffff;
}

.playstore-footer-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 10px 18px;
  border-radius: var(--radius-md);
  color: #fff;
  transition: var(--transition);
}

.playstore-footer-badge:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: #64748b;
}

/* --------------------------------------------------------------------------
   TOAST NOTIFICATIONS
   -------------------------------------------------------------------------- */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: #0f172a;
  color: #ffffff;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: var(--shadow-xl);
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
  animation: toastIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  max-width: 380px;
  border-left: 4px solid var(--primary);
}

@keyframes toastIn {
  from {
    transform: translateY(20px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.toast.toast-success {
  border-left-color: var(--success);
}

.toast.toast-error {
  border-left-color: var(--danger);
}

/* --------------------------------------------------------------------------
   RESPONSIVE DESIGN (Tablets & Mobile)
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }

  .hero-slider-card {
    height: 300px;
  }

  .features-ribbon {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }
}

@media (max-width: 820px) {
  .hero-slider-card {
    height: 260px;
  }

  .product-detail-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .cart-drawer {
    width: 360px;
  }
}

@media (max-width: 680px) {
  .container {
    padding: 0 14px;
  }

  .nav-container {
    padding: 10px 14px;
    gap: 10px;
    flex-wrap: wrap;
  }

  .brand-tagline {
    display: none;
  }

  .search-container {
    order: 3;
    width: 100%;
    max-width: 100%;
    margin-top: 6px;
  }

  .hero-slider-card {
    height: 210px;
    border-radius: var(--radius-lg);
  }

  .slider-dots {
    bottom: 10px;
    gap: 6px;
  }

  .slider-dot {
    width: 8px;
    height: 8px;
  }

  .slider-dot.active {
    width: 22px;
  }

  .categories-bar {
    padding: 8px 0;
  }

  .categories-container {
    padding: 0 14px;
    gap: 8px;
  }

  .cat-chip {
    padding: 6px 14px;
    font-size: 0.8rem;
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .product-card-body {
    padding: 10px;
  }

  .product-card-title {
    font-size: 0.82rem;
  }

  .price-amount {
    font-size: 0.98rem;
  }

  .btn-card-add {
    padding: 6px 8px;
    font-size: 0.72rem;
  }

  .features-ribbon {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 14px;
  }

  .feature-item {
    padding: 10px 12px;
    gap: 10px;
  }

  .feature-icon-box {
    width: 34px;
    height: 34px;
    font-size: 1rem;
  }

  .feature-text h4 {
    font-size: 0.78rem;
  }

  .feature-text p {
    font-size: 0.68rem;
  }

  .cart-drawer {
    width: 100%;
    max-width: 100%;
  }

  .modal-dialog {
    padding: 20px 16px;
    width: 95%;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

@media (max-width: 380px) {
  .products-grid {
    grid-template-columns: 1fr;
  }

  .features-ribbon {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   PRODUCT IN HAND & STOCK STYLES
   ========================================================================== */
.badge-tag.tag-out-of-stock {
  background: #ef4444;
  color: #fff;
  font-weight: 700;
}

.badge-tag.tag-low-stock {
  background: #f59e0b;
  color: #fff;
  font-weight: 700;
}

.product-card.is-out-of-stock .product-img {
  opacity: 0.75;
}

.btn-card-add.btn-card-out-of-stock {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.3);
}

.btn-card-add.btn-card-out-of-stock:hover {
  background: #ef4444;
  color: #ffffff;
}

.detail-stock-box {
  margin: 10px 0 14px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.stock-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.84rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-full);
}

.stock-pill.in-stock {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.stock-pill.low-stock {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.stock-pill.out-of-stock {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-detail-add-cart.btn-out-of-stock {
  background: #ef4444;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
}

.btn-detail-add-cart.btn-out-of-stock:hover {
  background: #dc2626;
}

.cart-item-stock-tag {
  font-size: 0.74rem;
  font-weight: 600;
  color: #10b981;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 3px;
}

.cart-item-stock-tag.low-stock {
  color: #f59e0b;
}

.choice-preview-stock {
  font-size: 0.78rem;
  font-weight: 700;
  color: #10b981;
  margin-top: 2px;
}

.choice-preview-stock.out-of-stock {
  color: #ef4444;
}

/* ==========================================================================
   TRENDING YOUTUBE SHORTS / REELS CAROUSEL & IMMERSIVE PLAYER
   Matches Android JvelStore: item_youtube_short.xml & DialogShortsPagerAdapter
   ========================================================================== */

/* Slider navigation button */
.slider-nav-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  font-size: 0.85rem;
}

.slider-nav-btn:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  transform: scale(1.05);
  box-shadow: 0 4px 12px var(--primary-glow);
}

.slider-nav-btn:active {
  transform: scale(0.95);
}

/* Horizontal Reels Carousel Container */
.shorts-carousel-wrapper {
  position: relative;
  width: 100%;
  margin-top: 4px;
}

.shorts-carousel {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 6px 4px 16px 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(216, 95, 55, 0.4) transparent;
}

.shorts-carousel::-webkit-scrollbar {
  height: 6px;
}

.shorts-carousel::-webkit-scrollbar-track {
  background: transparent;
}

.shorts-carousel::-webkit-scrollbar-thumb {
  background: rgba(216, 95, 55, 0.25);
  border-radius: var(--radius-full);
}

.shorts-carousel::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* Individual Short Card (9:16 vertical ratio) */
.short-card {
  flex: 0 0 170px;
  height: 280px;
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: #090d16;
  scroll-snap-align: start;
  transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.32s ease, border-color 0.32s ease;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-md);
  user-select: none;
}

@media (min-width: 768px) {
  .short-card {
    flex: 0 0 185px;
    height: 300px;
  }
}

.short-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 16px 36px -4px rgba(0, 0, 0, 0.45), 0 0 0 2px var(--primary);
  border-color: var(--primary);
}

.short-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.short-card:hover .short-card-img {
  transform: scale(1.08);
}

/* Top Subtle Shadow & Reel Badge */
.short-card-top-shadow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.35) 45%, transparent 100%);
  pointer-events: none;
  z-index: 2;
}

.short-reel-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(6px);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.short-reel-badge i {
  color: #ef4444;
  font-size: 0.78rem;
}

/* Play Icon Center Pulse on Card Hover */
.short-card-play-overlay {
  position: absolute;
  top: 42%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.85);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(216, 95, 55, 0.88);
  backdrop-filter: blur(4px);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  padding-left: 3px;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  z-index: 3;
}

.short-card:hover .short-card-play-overlay {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* Bottom Shadow & Content */
.short-card-bottom-shadow {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 140px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.65) 55%, transparent 100%);
  pointer-events: none;
  z-index: 2;
}

.short-card-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.short-card-title {
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.28;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
}

.short-card-stats {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #f1f5f9;
  font-size: 0.72rem;
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

.short-card-stats i {
  font-size: 0.75rem;
  color: #ef4444;
}

/* Skeleton loader for shorts */
.skeleton-short-card {
  flex: 0 0 170px;
  height: 280px;
  border-radius: var(--radius-lg);
  background: #1e293b;
  position: relative;
  overflow: hidden;
}

@media (min-width: 768px) {
  .skeleton-short-card {
    flex: 0 0 185px;
    height: 300px;
  }
}

/* ==========================================================================
   IMMERSIVE REELS PLAYER MODAL
   ========================================================================== */
.shorts-player-overlay {
  background: rgba(5, 8, 15, 0.92);
  backdrop-filter: blur(16px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

.shorts-player-overlay.active {
  display: flex;
  animation: fadeIn 0.25s ease-out;
}

.shorts-player-container {
  position: relative;
  width: 100%;
  max-width: 440px;
  height: 92vh;
  max-height: 800px;
  background: #000000;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
}

@media (max-width: 520px) {
  .shorts-player-container {
    max-width: 100%;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }
  .shorts-player-overlay {
    padding: 0;
  }
}

/* Top Bar */
.shorts-top-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  padding: 12px 16px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.85) 0%, transparent 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 20;
  pointer-events: none;
}

.shorts-brand-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
}

.shorts-avatar {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  border: 2px solid var(--primary);
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.shorts-brand-meta {
  display: flex;
  flex-direction: column;
}

.shorts-brand-name {
  color: #ffffff;
  font-weight: 800;
  font-size: 0.9rem;
  letter-spacing: -0.2px;
}

.shorts-brand-badge {
  color: #38bdf8;
  font-size: 0.68rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.shorts-close-btn {
  pointer-events: auto;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  font-size: 1.1rem;
}

.shorts-close-btn:hover {
  background: rgba(239, 68, 68, 0.85);
  border-color: #ef4444;
  transform: rotate(90deg);
}

/* Video Viewport */
.shorts-video-viewport {
  position: relative;
  width: 100%;
  height: 100%;
  background: #000000;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.shorts-iframe-wrapper {
  width: 100%;
  height: 100%;
  position: relative;
}

.shorts-iframe-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
  object-fit: cover;
}

/* Double-Tap Heart Animation */
.shorts-double-tap-heart {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  font-size: 5.5rem;
  color: #ef4444;
  opacity: 0;
  pointer-events: none;
  z-index: 15;
  filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.6));
}

.shorts-double-tap-heart.animate {
  animation: doubleTapHeart 0.75s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes doubleTapHeart {
  0% {
    transform: translate(-50%, -50%) scale(0.2);
    opacity: 0;
  }
  35% {
    transform: translate(-50%, -50%) scale(1.3);
    opacity: 1;
  }
  70% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.9;
  }
  100% {
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
  }
}

/* Bottom Info Overlay */
.shorts-bottom-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 75px;
  padding: 20px 16px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.4) 65%, transparent 100%);
  z-index: 10;
  pointer-events: none;
}

.shorts-info-title {
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 6px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

.shorts-info-channel {
  color: #cbd5e1;
  font-size: 0.76rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 5px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

/* Floating Vertical Action Rail */
.shorts-action-rail {
  position: absolute;
  right: 12px;
  bottom: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  z-index: 25;
}

.shorts-action-btn {
  background: transparent;
  border: none;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: transform 0.2s ease;
  padding: 0;
}

.shorts-action-btn:hover {
  transform: scale(1.12);
}

.shorts-action-btn:active {
  transform: scale(0.92);
}

.shorts-action-icon-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.shorts-action-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

/* Active / Liked State */
.shorts-action-btn.liked .shorts-action-icon-circle {
  background: #ef4444;
  border-color: #ef4444;
  color: #ffffff;
  box-shadow: 0 0 18px rgba(239, 68, 68, 0.6);
  animation: heartBounce 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes heartBounce {
  0% { transform: scale(0.8); }
  50% { transform: scale(1.35); }
  100% { transform: scale(1); }
}

.shorts-rail-divider {
  width: 24px;
  height: 1px;
  background: rgba(255, 255, 255, 0.25);
  margin: 2px 0;
}

.shorts-nav-step-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.95rem;
}

.shorts-nav-step-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: scale(1.1);
}