/* ==========================================================================
   jerii.made Store — Artisan Handcrafted E-Commerce Design System
   Color Scheme: Periwinkle (#8B8FD8), Triadic Accents & Dark Slate / Porcelain Light
   Typography: Plus Jakarta Sans & Nunito
   Guiding Principles: Minimal Kawaii, Frosted Glassmorphism, 100% English, Zero Emojis
   ========================================================================== */

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

:root {
  color-scheme: dark;

  /* Periwinkle Signature Palette */
  --pw-base: #8B8FD8;
  --pw-hover: #7A7EC8;
  --pw-active: #676BB8;
  --pw-light: #CCCCFF;
  --pw-glow: rgba(139, 143, 216, 0.35);
  --pw-subtle: rgba(139, 143, 216, 0.12);
  --pw-border: rgba(139, 143, 216, 0.28);

  /* Figma Triadic & Functional Accents */
  --accent-mint: #34D399;
  --accent-mint-soft: rgba(52, 211, 153, 0.14);
  --accent-rose: #FB7185;
  --accent-rose-soft: rgba(251, 113, 133, 0.14);
  --accent-amber: #FBBF24;
  --accent-amber-soft: rgba(251, 191, 36, 0.14);
  --accent-cyan: #38BDF8;

  /* Dark Theme Surfaces */
  --bg-main: #0a0e14;
  --bg-surface: #111823;
  --bg-card: #151f2c;
  --bg-card-hover: #1b2637;
  --bg-elevated: #1e2a3c;
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-medium: rgba(255, 255, 255, 0.12);

  /* Typography Colors */
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;

  /* Glassmorphism & Depth */
  --glass-bg: rgba(17, 24, 35, 0.85);
  --glass-drawer: rgba(15, 22, 32, 0.94);
  --glass-border: rgba(255, 255, 255, 0.09);
  --glass-blur: blur(20px);
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  --shadow-hover: 0 20px 40px -12px rgba(139, 143, 216, 0.25);
  --shadow-drawer: -12px 0 36px rgba(0, 0, 0, 0.65);

  /* Dimensions & Radius */
  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-pill: 9999px;
  --max-width: 1280px;
}

body.theme-light {
  color-scheme: light;

  /* Light Theme Surfaces */
  --bg-main: #f8fafc;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-elevated: #e2e8f0;
  --border-subtle: rgba(15, 23, 42, 0.08);
  --border-medium: rgba(15, 23, 42, 0.15);

  /* Typography Colors */
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-subtle: #64748b;

  /* Glassmorphism Light */
  --glass-bg: rgba(255, 255, 255, 0.88);
  --glass-drawer: rgba(255, 255, 255, 0.96);
  --glass-border: rgba(0, 0, 0, 0.08);
  --shadow-card: 0 10px 25px -8px rgba(100, 116, 139, 0.12);
  --shadow-hover: 0 20px 35px -10px rgba(139, 143, 216, 0.22);
  --shadow-drawer: -12px 0 36px rgba(15, 23, 42, 0.15);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.55;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.font-num {
  font-family: 'Nunito', sans-serif;
  font-feature-settings: "tnum";
}

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

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

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

/* SVG Vector Icon Helper */
.icon {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

.icon-sm {
  width: 16px;
  height: 16px;
}

.icon-lg {
  width: 24px;
  height: 24px;
}

/* 1. Global Announcement Bar */
.announcement-bar {
  background: linear-gradient(90deg, #6c71c4 0%, #8b8fd8 50%, #9e7bc9 100%);
  color: #ffffff;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 8px 16px;
  text-align: center;
  position: relative;
  z-index: 100;
}

.announcement-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.announcement-badge {
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(4px);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* 2. Studio Navigation Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border-subtle);
  transition: all 0.25s ease;
}

.header-container {
  max-width: var(--max-width);
  margin: 0 auto;
  height: 72px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo-img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  object-fit: contain;
  background: rgba(139, 143, 216, 0.15);
  padding: 3px;
  border: 1px solid var(--pw-border);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.brand-name span {
  color: var(--pw-base);
}

.brand-tagline {
  font-size: 0.6875rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

/* Navigation Links */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.nav-link {
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--pw-base);
  background: var(--pw-subtle);
}

/* Header Action Controls */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.action-btn {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.action-btn:hover {
  border-color: var(--pw-border);
  background: var(--pw-subtle);
  color: var(--pw-base);
  transform: translateY(-2px);
}

.cart-counter-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: var(--radius-pill);
  background: var(--pw-base);
  color: #ffffff;
  font-size: 0.6875rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px var(--pw-glow);
  transition: transform 0.2s ease;
}

.cart-btn:hover .cart-counter-badge {
  transform: scale(1.15);
}

/* 3. Hero Showcase Section */
.hero-section {
  padding: 40px 24px 32px;
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
}

.hero-card {
  background: linear-gradient(135deg, rgba(139, 143, 216, 0.15) 0%, rgba(26, 32, 46, 0.8) 50%, rgba(17, 24, 35, 0.95) 100%);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 48px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 40px;
}

body.theme-light .hero-card {
  background: linear-gradient(135deg, rgba(139, 143, 216, 0.16) 0%, rgba(241, 245, 249, 0.9) 60%, #ffffff 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--pw-subtle);
  border: 1px solid var(--pw-border);
  border-radius: var(--radius-pill);
  color: var(--pw-base);
  font-size: 0.8125rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.hero-title {
  font-size: 2.75rem;
  line-height: 1.15;
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -0.03em;
}

.hero-title span {
  background: linear-gradient(135deg, #8B8FD8 0%, #A4A7E8 50%, #E5CCFF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 1.0625rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 28px;
  max-width: 540px;
}

.hero-features-list {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 32px;
}

.hero-feature-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
  background: var(--bg-surface);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
}

.hero-feature-item svg {
  color: var(--accent-mint);
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  background: var(--pw-base);
  color: #ffffff;
  font-size: 0.9375rem;
  font-weight: 700;
  border-radius: var(--radius-pill);
  box-shadow: 0 4px 18px var(--pw-glow);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-primary:hover {
  background: var(--pw-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--pw-glow);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  background: var(--bg-surface);
  color: var(--text-main);
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-medium);
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  border-color: var(--pw-border);
  color: var(--pw-base);
  background: var(--pw-subtle);
}

.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-visual-card {
  position: relative;
  width: 100%;
  max-width: 380px;
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.hero-product-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 15px 25px rgba(0, 0, 0, 0.4));
  transition: transform 0.5s ease;
}

.hero-visual-card:hover .hero-product-img {
  transform: scale(1.06) rotate(2deg);
}

.hero-badge-float {
  position: absolute;
  bottom: 16px;
  right: 16px;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--pw-border);
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--pw-base);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* 4. Filter Toolbar & Category Tabs */
.catalog-toolbar-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px 24px 16px;
  width: 100%;
}

.toolbar-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.toolbar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.category-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.category-tabs::-webkit-scrollbar {
  display: none;
}

.category-tab {
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.category-tab:hover {
  border-color: var(--pw-border);
  color: var(--text-main);
}

.category-tab.active {
  background: var(--pw-base);
  color: #ffffff;
  border-color: var(--pw-base);
  box-shadow: 0 4px 14px var(--pw-glow);
}

.category-tab-count {
  font-size: 0.75rem;
  padding: 1px 7px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.2);
}

.category-tab:not(.active) .category-tab-count {
  background: var(--border-subtle);
  color: var(--text-subtle);
}

.search-and-sort {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.search-box {
  position: relative;
  min-width: 240px;
}

.search-input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  border-radius: var(--radius-pill);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-size: 0.875rem;
  outline: none;
  transition: all 0.2s ease;
}

.search-input:focus {
  border-color: var(--pw-base);
  box-shadow: 0 0 0 3px var(--pw-subtle);
}

.search-icon-pos {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-subtle);
  pointer-events: none;
}

.sort-select {
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-size: 0.875rem;
  font-weight: 600;
  outline: none;
  cursor: pointer;
}

/* 5. Product Grid & Cards */
.catalog-grid-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 24px 60px;
  width: 100%;
  flex: 1;
}

.catalog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.catalog-count-label {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.product-card:hover {
  transform: translateY(-5px);
  border-color: var(--pw-border);
  box-shadow: var(--shadow-hover);
  background: var(--bg-card-hover);
}

.product-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-subtle);
}

.product-img {
  width: 86%;
  height: 86%;
  object-fit: contain;
  transition: transform 0.4s ease;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.25));
}

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

/* Card Badges */
.card-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 2;
}

.card-badge {
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.badge-stock-low {
  background: var(--accent-rose-soft);
  color: var(--accent-rose);
  border: 1px solid rgba(251, 113, 133, 0.3);
}

.badge-stock-in {
  background: var(--accent-mint-soft);
  color: var(--accent-mint);
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.badge-spin {
  background: var(--pw-subtle);
  color: var(--pw-base);
  border: 1px solid var(--pw-border);
}

/* Quick View Overlay Button */
.btn-quick-view {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--pw-border);
  color: var(--text-main);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.8125rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.product-card:hover .btn-quick-view {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.btn-quick-view:hover {
  background: var(--pw-base);
  color: #ffffff;
}

/* Card Content Details */
.product-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.product-fandom {
  font-size: 0.75rem;
  color: var(--pw-base);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.product-category-tag {
  font-size: 0.75rem;
  color: var(--text-subtle);
}

.product-title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.7em;
}

.product-specs-compact {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.spec-compact-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.product-card-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.product-price-block {
  display: flex;
  flex-direction: column;
}

.price-currency {
  font-size: 0.6875rem;
  color: var(--text-subtle);
  font-weight: 700;
  letter-spacing: 0.05em;
}

.price-amount {
  font-size: 1.3125rem;
  font-weight: 800;
  color: var(--text-main);
}

.btn-add-bag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  background: var(--pw-base);
  color: #ffffff;
  border-radius: var(--radius-pill);
  font-size: 0.8125rem;
  font-weight: 700;
  box-shadow: 0 3px 12px var(--pw-glow);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-add-bag:hover {
  background: var(--pw-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px var(--pw-glow);
}

.btn-add-bag:disabled {
  background: var(--border-subtle);
  color: var(--text-subtle);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

/* 6. Slide-Over Shopping Bag Drawer */
.cart-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.cart-drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 440px;
  height: 100%;
  background: var(--glass-drawer);
  border-left: 1px solid var(--border-medium);
  box-shadow: var(--shadow-drawer);
  z-index: 210;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.cart-drawer-backdrop.open .cart-drawer {
  transform: translateX(0);
}

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

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

.drawer-title {
  font-size: 1.1875rem;
  font-weight: 800;
}

.drawer-count-badge {
  background: var(--pw-subtle);
  color: var(--pw-base);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--pw-border);
}

.btn-drawer-close {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-drawer-close:hover {
  background: var(--accent-rose-soft);
  color: var(--accent-rose);
  border-color: rgba(251, 113, 133, 0.3);
}

/* Free Shipping Progress Indicator */
.drawer-shipping-meter {
  padding: 14px 24px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
}

.shipping-meter-text {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
}

.shipping-meter-text strong {
  color: var(--pw-base);
}

.meter-track {
  width: 100%;
  height: 6px;
  background: var(--border-subtle);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.meter-fill {
  height: 100%;
  background: linear-gradient(90deg, #8B8FD8 0%, #34D399 100%);
  border-radius: var(--radius-pill);
  transition: width 0.4s ease;
}

/* Cart Items List */
.drawer-items-list {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cart-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  gap: 16px;
  color: var(--text-muted);
  padding: 40px 20px;
}

.empty-icon-wrap {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--pw-subtle);
  border: 1px solid var(--pw-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pw-base);
}

.cart-item-card {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s ease;
}

.cart-item-card:hover {
  border-color: var(--border-medium);
}

.cart-item-thumb {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}

.cart-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cart-item-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cart-item-name {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.25;
}

.cart-item-price {
  font-size: 0.875rem;
  font-weight: 800;
  color: var(--pw-base);
}

.qty-control {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.btn-qty {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  font-weight: 700;
  transition: all 0.15s ease;
}

.btn-qty:hover {
  border-color: var(--pw-border);
  color: var(--pw-base);
}

.qty-display {
  font-size: 0.8125rem;
  font-weight: 700;
  min-width: 18px;
  text-align: center;
}

.btn-remove-item {
  color: var(--text-subtle);
  padding: 6px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.btn-remove-item:hover {
  color: var(--accent-rose);
  background: var(--accent-rose-soft);
}

/* Drawer Footer & Checkout Action */
.drawer-footer {
  padding: 20px 24px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.coupon-row {
  display: flex;
  gap: 8px;
}

.coupon-input {
  flex: 1;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-size: 0.8125rem;
  text-transform: uppercase;
  outline: none;
}

.coupon-input:focus {
  border-color: var(--pw-border);
}

.btn-apply-coupon {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-size: 0.8125rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-apply-coupon:hover {
  border-color: var(--pw-border);
  color: var(--pw-base);
}

.order-summary-breakdown {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.875rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
}

.summary-row.total {
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--text-main);
  padding-top: 8px;
  border-top: 1px dashed var(--border-subtle);
}

.summary-row.total .total-price {
  color: var(--pw-base);
}

.btn-checkout {
  width: 100%;
  padding: 16px;
  border-radius: var(--radius-pill);
  background: var(--pw-base);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 20px var(--pw-glow);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-checkout:hover {
  background: var(--pw-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--pw-glow);
}

/* 7. Quick View Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-dialog {
  width: 100%;
  max-width: 820px;
  max-height: 90vh;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-drawer);
  overflow-y: auto;
  position: relative;
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.open .modal-dialog {
  transform: scale(1);
}

.btn-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.2s ease;
}

.btn-modal-close:hover {
  background: var(--accent-rose-soft);
  color: var(--accent-rose);
}

.quick-view-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  padding: 32px;
}

.modal-image-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-main-img-box {
  width: 100%;
  aspect-ratio: 1;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-main-img-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 12px 20px rgba(0,0,0,0.3));
}

.modal-details-col {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.modal-category-fandom {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--pw-base);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.modal-title {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.2;
}

.modal-price-wrap {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.modal-price-wrap span {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 600;
}

.modal-desc {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.specs-table {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bg-card);
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  font-size: 0.8125rem;
}

.spec-table-row {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px dashed var(--border-subtle);
  padding-bottom: 6px;
}

.spec-table-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.spec-table-row span:first-child {
  color: var(--text-subtle);
}

.spec-table-row span:last-child {
  color: var(--text-main);
  font-weight: 600;
}

/* 8. Checkout Modal */
.checkout-steps {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.checkout-step-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-subtle);
}

.checkout-step-item.active {
  color: var(--pw-base);
}

.step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
}

.checkout-step-item.active .step-num {
  background: var(--pw-base);
  color: #ffffff;
  border-color: var(--pw-base);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group.col-span-2 {
  grid-column: span 2;
}

.form-label {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-muted);
}

.form-input, .form-textarea {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.form-input:focus, .form-textarea:focus {
  border-color: var(--pw-base);
}

/* Payment Gateway Selector */
.payment-methods-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 16px 0;
}

.payment-method-card {
  padding: 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 2px solid var(--border-subtle);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.2s ease;
}

.payment-method-card:hover {
  border-color: var(--pw-border);
}

.payment-method-card.selected {
  border-color: var(--pw-base);
  background: var(--pw-subtle);
}

.payment-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.payment-card-title {
  font-size: 0.9375rem;
  font-weight: 700;
}

.payment-card-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* PromptPay QR Container */
.qr-pay-box {
  background: #ffffff;
  color: #0f172a;
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
  margin: 16px 0;
}

.qr-code-img {
  width: 180px;
  height: 180px;
  border-radius: 8px;
  border: 2px solid #e2e8f0;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--pw-border);
  color: var(--text-main);
  padding: 12px 18px;
  border-radius: var(--radius-pill);
  font-size: 0.875rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-hover);
  animation: toastSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
}

@keyframes toastSlideUp {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* 9. Site Footer */
.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: 60px 24px 30px;
  margin-top: auto;
}

.footer-container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-heading {
  font-size: 0.875rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-main);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-link {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: var(--pw-base);
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: var(--text-subtle);
  flex-wrap: wrap;
  gap: 12px;
}

/* Responsive Adaptations */
@media (max-width: 960px) {
  .hero-card {
    grid-template-columns: 1fr;
    padding: 32px;
  }
  .hero-title {
    font-size: 2.25rem;
  }
  .quick-view-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px;
  }
  .footer-container {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 640px) {
  .header-container {
    height: 64px;
    padding: 0 16px;
  }
  .nav-menu {
    display: none;
  }
  .hero-card {
    padding: 24px;
  }
  .hero-title {
    font-size: 1.75rem;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-group.col-span-2 {
    grid-column: span 1;
  }
  .payment-methods-grid {
    grid-template-columns: 1fr;
  }
  .cart-drawer {
    max-width: 100%;
  }
  .footer-container {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}
