/* ============================================
   PixelSub — Premium Digital Products Store
   Light Theme Design System
   ============================================ */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Poppins:wght@300;400;500;600;700;800&display=swap');

/* ---------- CSS Variables ---------- */
:root {
  /* Brand palette, taken from the logo: bright blue with a charcoal ink. */
  --primary: #1560f0;
  --primary-light: #4d87f5;
  --primary-dark: #0d47c4;
  --accent: #1560f0;
  --accent-light: #a9c6fb;
  --accent-alt: #12a37f;
  --blue: #1560f0;

  /* Same blue as RGB channels, for rgba() tints — keeps the colour in one
     place instead of repeating literal channel values. */
  --primary-rgb: 21, 96, 240;

  /* Faint blue washes used for selected/hover surfaces. */
  --primary-wash: #eef4fe;
  --primary-wash-strong: #e3ecfd;

  /* Background shades */
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  --bg-glass: #f5f5f5;
  --bg-glass-hover: #eeeeee;
  --bg-header: #ffffff;

  /* Text */
  --text-primary: #1c2434;
  --text-secondary: #555555;
  --text-muted: #999999;
  --text-accent: #1560f0;

  /* Borders */
  --border-color: #e8e8e8;
  --border-hover: #d0d0d0;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.1);
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-card-hover: 0 8px 25px rgba(0, 0, 0, 0.12);

  /* Layout */
  --container-width: 1280px;
  --header-height: 64px;
  --border-radius: 8px;
  --border-radius-lg: 12px;
  --border-radius-sm: 6px;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
  --transition-spring: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: 'Inter', 'Poppins', -apple-system, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-fast);
}

ul, ol { list-style: none; }

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

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

input, select, textarea {
  font-family: inherit;
  outline: none;
  border: none;
}

::selection {
  background: var(--primary);
  color: #fff;
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #aaa; }

/* ---------- Utilities ---------- */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 60px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 40px;
}

.section-title h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.section-title p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.section-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 30px;
}

.section-divider .line {
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

.section-divider .label {
  font-family: 'Poppins', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--border-radius-sm);
  transition: all var(--transition-normal);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3);
}

.btn-outline {
  border: 2px solid var(--text-primary);
  color: var(--text-primary);
  background: transparent;
}

.btn-outline:hover {
  background: var(--text-primary);
  color: #fff;
}

.btn-sm {
  padding: 8px 18px;
  font-size: 0.8rem;
}

/* ---------- Header ---------- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--bg-header);
  border-bottom: 1px solid var(--border-color);
  height: var(--header-height);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.header.hidden {
  transform: translateY(-100%);
}

.header.scrolled {
  box-shadow: var(--shadow-md);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 20px;
}

/* Desktop nav links */
.header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.header-nav-link {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s, background 0.2s;
}
.header-nav-link:hover {
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.08);
}
@media(max-width: 960px) {
  .header-nav { display: none; }
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--text-primary);
  border-radius: var(--border-radius-sm);
  transition: all var(--transition-fast);
}

.menu-toggle:hover {
  background: var(--bg-glass);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Poppins', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
}

.logo-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
}

/* Applied when an uploaded logo replaces the default icon glyph. */
.logo-icon-image {
  background: transparent;
  border-radius: 6px;
}

.logo-icon-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.logo span {
  color: var(--text-primary);
}

/* Search bar */
.search-bar {
  flex: 1;
  max-width: 480px;
  position: relative;
}

.search-bar input {
  width: 100%;
  padding: 10px 44px 10px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 50px;
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: all var(--transition-normal);
}

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

.search-bar input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.search-bar button {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.search-bar button:hover {
  background: var(--primary-dark);
}

/* Search Results */
.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  max-height: 350px;
  overflow-y: auto;
  display: none;
  z-index: 100;
  box-shadow: var(--shadow-lg);
}

.search-results.active { display: block; animation: fadeSlideDown 0.2s ease; }

.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.search-result-item:hover { background: var(--bg-secondary); }

.search-result-item img {
  width: 42px;
  height: 42px;
  border-radius: 6px;
  object-fit: cover;
}

.search-result-item .sr-info h4 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.search-result-item .sr-info p {
  font-size: 0.75rem;
  color: var(--primary);
  font-weight: 600;
}

.search-no-results {
  padding: 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

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

.cart-btn {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-normal);
  cursor: pointer;
}

.cart-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 20px;
  height: 20px;
  background: var(--primary);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-primary);
  transform: scale(0);
  transition: transform var(--transition-spring);
}

.cart-badge.show { transform: scale(1); }

.login-btn {
  padding: 8px 22px;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  border-radius: 4px;
  transition: all var(--transition-normal);
  white-space: nowrap;
  text-transform: uppercase;
}

.login-btn:hover {
  background: var(--primary-dark);
}

/* ---------- Mobile Navigation ---------- */
.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.mobile-nav-overlay.active { opacity: 1; visibility: visible; }

.mobile-nav {
  position: fixed;
  top: 0;
  left: -320px;
  width: 300px;
  height: 100vh;
  background: var(--bg-primary);
  z-index: 2001;
  padding: 20px 0;
  overflow-y: auto;
  transition: left var(--transition-normal);
  border-right: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
}

.mobile-nav.active { left: 0; }

.mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px 16px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 8px;
}

.mobile-nav-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.mobile-nav-close:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.mobile-nav-links a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.mobile-nav-links a:hover,
.mobile-nav-links a.active {
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.05);
  border-left: 3px solid var(--primary);
  padding-left: 21px;
}

.mobile-nav-links a i {
  width: 22px;
  text-align: center;
  font-size: 1rem;
}

.mobile-nav-divider {
  height: 1px;
  background: var(--border-color);
  margin: 8px 20px;
}

/* ---------- Hero Carousel ---------- */
.hero {
  margin-top: var(--header-height);
  position: relative;
  overflow: hidden;
  background: var(--bg-secondary);
}

.hero-carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.hero-track {
  display: flex;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hero-slide {
  min-width: 100%;
  position: relative;
}

/* Uploaded banner images. The ratio stays 3:1 at every width — matching the
   shape banners are designed at — so the slot never gets taller than the image
   and `contain` has nothing to letterbox. */
.hero-slide-image {
  aspect-ratio: 3 / 1;
  background: var(--bg-secondary);
}

.hero-slide-image img,
.hero-slide-image a {
  display: block;
  width: 100%;
  height: 100%;
}

/* contain, not cover: a banner carries text to the edges, and cropping the
   sides cut words off. Any mismatch shows as background rather than lost text. */
.hero-slide-image img {
  object-fit: contain;
}

/* Text slides keep their own height via .hero-slide-content below. */
.hero-slide-content {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 340px;
  padding: 40px 20px;
}

.hero-text-overlay {
  text-align: center;
  max-width: 650px;
}

.hero-text-overlay h1 {
  font-family: 'Poppins', sans-serif;
  font-size: 2.6rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 12px;
  line-height: 1.15;
  text-shadow: 0 2px 15px rgba(0, 0, 0, 0.2);
}

.hero-text-overlay p {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 24px;
}

@media (max-width: 768px) {
  /* No aspect-ratio override here: forcing a taller box than the image made the
     banner huge and cropped the sides off. */
  .hero-slide-content { min-height: 220px; }
  .hero-text-overlay h1 { font-size: 1.5rem; }
  .hero-text-overlay p { font-size: 0.9rem; }
}

@media (max-width: 480px) {
  .hero-slide-content { min-height: 180px; }
  .hero-text-overlay h1 { font-size: 1.2rem; }
}

.hero-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all var(--transition-normal);
  border: none;
}

.hero-dot.active {
  background: var(--primary);
  width: 28px;
  border-radius: 5px;
}

/* ---------- Categories Section ---------- */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 14px;
}

.category-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 20px 10px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-normal);
}

.category-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
}

.category-card.active {
  border-color: var(--primary);
  background: rgba(var(--primary-rgb), 0.03);
}

.category-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 10px;
  border-radius: 10px;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  transition: all var(--transition-normal);
}

.category-card:hover .category-icon {
  transform: scale(1.1);
  background: var(--primary);
  color: #fff !important;
}

.category-card h3 {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.category-card:hover h3 { color: var(--text-primary); }

/* ---------- Products Grid ---------- */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: all var(--transition-normal);
  position: relative;
}

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

.product-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  background: var(--bg-secondary);
  cursor: pointer;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

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

.product-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 5;
}

.badge {
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #fff;
}

/* ---------- Sold out ---------- */
.stock-overlay {
  position: absolute;
  inset: 0;
  background: rgba(28, 36, 52, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 4;
}

.stock-overlay span {
  background: #d13b3b;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 6px 16px;
  border-radius: 4px;
  transform: rotate(-6deg);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
}

/* Dim the image but keep the name and price legible. */
.product-card.is-sold-out .product-image img {
  filter: grayscale(0.7);
}

.product-card.is-sold-out:hover .product-image img {
  transform: none;
}

.product-card.is-sold-out .buy-now-btn {
  background: var(--text-muted);
}

.product-card.is-sold-out .buy-now-btn:hover {
  background: var(--text-secondary);
  box-shadow: none;
}

.sr-out {
  display: inline-block;
  margin-left: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #d13b3b;
}

.badge-sale { background: var(--primary); }
/* Darkened from #f39c12: white on that was 2.19:1, effectively unreadable. */
.badge-hot { background: #c26f02; }
.badge-new { background: var(--accent-alt); }

.product-actions {
  position: absolute;
  bottom: -50px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.5));
  transition: bottom var(--transition-normal);
}

.product-card:hover .product-actions { bottom: 0; }

.product-action-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  color: var(--text-primary);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.product-action-btn:hover {
  background: var(--primary);
  color: #fff;
  transform: scale(1.1);
}

.product-info {
  padding: 14px;
  text-align: center;
}

.product-info h4 {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-info h4 a { color: inherit; }
.product-info h4 a:hover { color: var(--primary); }

.product-price {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 700;
}

.product-price .current-price { color: var(--primary); }

.product-price .original-price {
  color: var(--text-muted);
  text-decoration: line-through;
  font-size: 0.85rem;
  font-weight: 400;
}

/* ---------- Product Slider ---------- */
.product-slider-container {
  position: relative;
  overflow: hidden;
}

.product-slider {
  display: flex;
  gap: 20px;
  /* Cards size to their own content instead of all stretching to match the
     tallest one, which left empty space below the shorter cards. */
  align-items: flex-start;
  transition: transform 0.5s ease;
  cursor: grab;
}

.product-slider:active { cursor: grabbing; }

/* Fixed width, not just a minimum: the square image scales to whatever width
   the card ends up with, so an unbounded card grows tall as well as wide.
   240 + the 20px gap is the step size initProductSlider scrolls by. */
.product-slider .product-card {
  width: 240px;
  flex: 0 0 240px;
}

.slider-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-md);
}

.slider-nav:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.slider-prev { left: 0; }
.slider-next { right: 0; }

/* ---------- Why Choose Us ---------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.feature-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 30px 20px;
  text-align: center;
  transition: all var(--transition-normal);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--primary);
}

.feature-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 12px;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #fff;
  transition: transform var(--transition-normal);
}

.feature-card:hover .feature-icon { transform: scale(1.1); }

.feature-card h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.feature-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ---------- Cart Sidebar ---------- */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 3000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.cart-overlay.active { opacity: 1; visibility: visible; }

.cart-sidebar {
  position: fixed;
  top: 0;
  right: -420px;
  width: 400px;
  height: 100vh;
  background: var(--bg-primary);
  border-left: 1px solid var(--border-color);
  z-index: 3001;
  display: flex;
  flex-direction: column;
  transition: right var(--transition-normal);
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
}

.cart-sidebar.active { right: 0; }

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

.cart-header h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-header h3 i { color: var(--primary); }

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

.cart-close:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 14px 20px;
}

.cart-empty {
  text-align: center;
  padding: 40px 0;
  color: var(--text-muted);
}

.cart-empty i { font-size: 2.5rem; margin-bottom: 12px; opacity: 0.3; }
.cart-empty p { font-size: 0.9rem; }

.cart-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
  animation: fadeSlideDown 0.3s ease;
}

.cart-item-image {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-secondary);
}

.cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-info { flex: 1; min-width: 0; }

.cart-item-info h4 {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item-info .cart-item-price {
  color: var(--primary);
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.cart-item-variant {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: capitalize;
  margin-bottom: 4px;
}

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.qty-btn {
  width: 26px;
  height: 26px;
  border-radius: 4px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.qty-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.cart-item-qty {
  font-size: 0.85rem;
  font-weight: 600;
  min-width: 22px;
  text-align: center;
}

.cart-item-remove {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  background: var(--primary-wash-strong);
  border: 1px solid #ffdddd;
  color: var(--primary);
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 4px;
  transition: all var(--transition-fast);
}

.cart-item-remove:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.cart-footer {
  padding: 18px 20px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-secondary);
}

.cart-subtotal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.cart-subtotal span:first-child { font-size: 0.95rem; color: var(--text-secondary); }
.cart-subtotal span:last-child { font-size: 1.2rem; font-weight: 700; color: var(--primary); }

.checkout-btn {
  width: 100%;
  padding: 13px;
  background: var(--primary);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: var(--border-radius-sm);
  transition: all var(--transition-normal);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-transform: uppercase;
}

.checkout-btn:hover {
  background: var(--primary-dark);
}

/* ---------- Footer ---------- */
.footer {
  background: var(--text-primary);
  color: #ccc;
  border-top: 3px solid var(--primary);
}

.footer-main {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  padding: 50px 0 30px;
}

.footer-brand .logo { margin-bottom: 14px; }
.footer-brand .logo span { color: #fff; }
.footer-brand .logo-icon { background: var(--primary); }

.footer-brand p {
  color: #aaa;
  font-size: 0.88rem;
  line-height: 1.6;
  margin-bottom: 18px;
}

.footer-social {
  display: flex;
  gap: 8px;
}

.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #aaa;
  font-size: 0.9rem;
  transition: all var(--transition-normal);
}

.footer-social a:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  transform: translateY(-2px);
}

.footer-col h4 {
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 18px;
  padding-bottom: 8px;
  position: relative;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 28px;
  height: 2px;
  background: var(--primary);
}

.footer-col ul li { margin-bottom: 8px; }

.footer-col ul a {
  color: #aaa;
  font-size: 0.88rem;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 6px;
}

.footer-col ul a::before {
  content: '›';
  color: var(--primary);
  font-weight: bold;
}

.footer-col ul a:hover {
  color: #fff;
  padding-left: 4px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 20px 0;
}

.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom p { color: #777; font-size: 0.82rem; }

.payment-methods {
  display: flex;
  align-items: center;
  gap: 10px;
}

.payment-methods span { color: #777; font-size: 0.78rem; }

.payment-icons { display: flex; gap: 6px; }

.payment-icon {
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  color: #aaa;
  letter-spacing: 0.5px;
}

/* ---------- Toast ---------- */
.toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 5000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 12px 18px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 260px;
  box-shadow: var(--shadow-lg);
  animation: slideInRight 0.4s ease, fadeOutRight 0.4s ease forwards;
  animation-delay: 0s, 2.5s;
}

.toast i { font-size: 1.05rem; }
.toast.success { border-left: 3px solid var(--accent-alt); }
.toast.success i { color: var(--accent-alt); }
.toast.error { border-left: 3px solid var(--primary); }
.toast.error i { color: var(--primary); }

/* ---------- Scroll to Top ---------- */
.scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 900;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all var(--transition-normal);
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.3);
}

.scroll-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.scroll-top:hover { transform: translateY(-3px); }

/* ---------- Floating WhatsApp ---------- */
/* Sits above the scroll-to-top button, which occupies bottom: 30px. */
.wa-float {
  position: fixed;
  bottom: 88px;
  right: 30px;
  z-index: 901;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px 11px 13px;
  border-radius: 30px;
  background: #25d366;
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.35);
  transition: all var(--transition-normal);
}

.wa-float i { font-size: 1.35rem; }

.wa-float:hover {
  background: #1eb855;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(37, 211, 102, 0.45);
}

/* Draws the eye without being a constant distraction. */
.wa-float::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 2px solid #25d366;
  animation: waPulse 2.4s ease-out infinite;
  pointer-events: none;
}

@keyframes waPulse {
  0% { opacity: 0.7; transform: scale(1); }
  70% { opacity: 0; transform: scale(1.18); }
  100% { opacity: 0; transform: scale(1.18); }
}

@media (prefers-reduced-motion: reduce) {
  .wa-float::before { animation: none; }
}

/* On narrow screens the label would crowd the layout, so show only the icon.
   Kept low and tight to the edge so it overlaps as little content as possible;
   the scroll-to-top button moves up to sit above it. */
@media (max-width: 640px) {
  .wa-float {
    bottom: 20px;
    right: 14px;
    width: 48px;
    height: 48px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
  }
  .wa-float span { display: none; }
  .wa-float i { font-size: 1.4rem; }

  /* Stacked above WhatsApp rather than beside it, so neither covers content.
     44px is the minimum comfortable tap target. */
  .scroll-top {
    bottom: 78px;
    right: 14px;
    width: 44px;
    height: 44px;
  }
}

/* =====================================
   PRODUCT DETAIL PAGE STYLES
   ===================================== */
.breadcrumb {
  padding: 14px 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: var(--header-height);
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-secondary);
}

.breadcrumb a {
  color: var(--blue);
  transition: color var(--transition-fast);
}

.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { margin: 0 6px; color: var(--text-muted); }

.product-detail {
  padding: 30px 0 60px;
}

/* Two columns: content on the left, sticky order box on the right. */
.pd-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 28px;
  align-items: start;
}

/* ---------- Hero card ---------- */
.pd-hero {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 26px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-card);
}

.pd-hero-image {
  position: relative;
  background: var(--bg-secondary);
  border-radius: var(--border-radius);
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pd-hero-image img {
  width: 100%;
  max-height: 210px;
  object-fit: contain;
  border-radius: var(--border-radius-sm);
}

.pd-hero-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  background: var(--primary);
  color: #fff;
}

.pd-category {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 12px;
}

.pd-hero-body {
  /* Centred because this block is short — the image sets the row height. */
  align-self: center;
}

.pd-hero-body h1 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.pd-price-line {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.pd-price-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
}

.pd-price-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.pd-price-value .pd-original {
  color: var(--text-muted);
  text-decoration: line-through;
  font-size: 1rem;
  font-weight: 400;
}

.pd-price-value .pd-discount-pct {
  background: var(--primary-wash-strong);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
}

/* Stock line under the price on the product page. */
.pd-stock {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
}

.pd-stock.is-in {
  color: #0c7a5f;
  background: #e8f7f2;
  border: 1px solid #bfe8dc;
}

.pd-stock.is-out {
  color: #a82c2c;
  background: #fdeeee;
  border: 1px solid #f5cccc;
}

/* ---------- Tabs ---------- */
.pd-tabs {
  margin-top: 22px;
}

.pd-tab-strip {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.pd-tab {
  flex: 1 1 auto;
  min-width: 120px;
  padding: 11px 18px;
  border: 1px solid var(--border-color);
  border-radius: 30px;
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 0.87rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.pd-tab:hover { border-color: var(--border-hover); color: var(--text-primary); }

.pd-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.pd-tab-panel {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.pd-tab-panel.active { display: block; }

.pd-tab-panel h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--text-primary);
}

.pd-description p {
  font-size: 0.92rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.pd-description p:last-child { margin-bottom: 0; }
.pd-empty { color: var(--text-muted); font-style: italic; }

/* ---------- Reviews ---------- */
.pd-rating-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.pd-rating-summary strong {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}

.pd-rating-summary small { color: var(--text-muted); font-size: 0.82rem; }

.pd-stars { color: #f39c12; font-size: 0.85rem; letter-spacing: 1px; }

.pd-review {
  padding: 14px 0;
  border-bottom: 1px solid var(--border-color);
}

.pd-review:last-child { border-bottom: none; padding-bottom: 0; }

.pd-review header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.pd-review header strong { font-size: 0.9rem; color: var(--text-primary); }

.pd-review p {
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

/* ---------- FAQ ---------- */
.pd-faq {
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  margin-bottom: 10px;
  overflow: hidden;
}

.pd-faq:last-child { margin-bottom: 0; }

.pd-faq summary {
  padding: 13px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  background: var(--bg-secondary);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.pd-faq summary::-webkit-details-marker { display: none; }

.pd-faq summary::after {
  content: '+';
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--primary);
  flex-shrink: 0;
}

.pd-faq[open] summary::after { content: '−'; }

.pd-faq p {
  padding: 14px 16px;
  font-size: 0.88rem;
  line-height: 1.75;
  color: var(--text-secondary);
}

/* ---------- Order box ---------- */
.pd-order-box {
  position: sticky;
  top: calc(var(--header-height) + 16px);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.pd-offer-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: var(--primary-wash);
  border-bottom: 1px solid var(--border-color);
}

.pd-offer-strip i { color: var(--primary); font-size: 1rem; }
.pd-offer-strip strong {
  display: block;
  font-size: 0.85rem;
  color: var(--text-primary);
}
.pd-offer-strip span { font-size: 0.75rem; color: var(--text-secondary); }

.pd-order-body { padding: 18px; }

.pd-order-heading {
  font-family: 'Poppins', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--text-primary);
}

.pd-plans {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.pd-plan {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 13px 14px;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  background: var(--bg-card);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.pd-plan:hover { border-color: var(--border-hover); }

.pd-plan.selected {
  border-color: var(--primary);
  background: var(--primary-wash);
}

.pd-plan-check { color: var(--border-hover); font-size: 1.05rem; flex-shrink: 0; }
.pd-plan.selected .pd-plan-check { color: var(--primary); }

.pd-plan-text { flex: 1; min-width: 0; }
.pd-plan-text strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}
.pd-plan-text small { font-size: 0.75rem; color: var(--text-muted); }

.pd-plan-pkg {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 1px 7px;
  border-radius: 20px;
  margin: 2px 0;
}

.pd-plan.selected .pd-plan-pkg {
  background: #fff;
  border-color: var(--primary-light);
  color: var(--primary);
}

.pd-plan-pricing { text-align: right; flex-shrink: 0; }
.pd-plan-pricing strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--primary);
}
.pd-plan-pricing s { font-size: 0.72rem; color: var(--text-muted); }
.pd-plan-pricing em {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  font-style: normal;
  color: var(--accent-alt);
}

.pd-order-summary {
  border-top: 1px solid var(--border-color);
  padding-top: 14px;
  margin-bottom: 16px;
}

.pd-order-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 4px 0;
}

.pd-order-row dt {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
}

.pd-order-row dd { font-size: 0.88rem; color: var(--text-primary); font-weight: 600; }

.pd-order-total dd {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary);
}

.pd-btn-order,
.pd-btn-addcart {
  width: 100%;
  padding: 14px;
  border-radius: var(--border-radius);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all var(--transition-fast);
}

.pd-btn-order {
  background: var(--primary);
  border: 2px solid var(--primary);
  color: #fff;
  margin-bottom: 10px;
}

.pd-btn-order:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.pd-btn-addcart {
  background: var(--bg-card);
  border: 2px solid var(--text-primary);
  color: var(--text-primary);
}

.pd-btn-addcart:hover { background: var(--text-primary); color: #fff; }

.pd-btn-chat {
  width: 100%;
  padding: 13px;
  margin-top: 10px;
  border-radius: var(--border-radius);
  background: #25d366;
  border: 2px solid #25d366;
  color: #fff;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all var(--transition-fast);
}

.pd-btn-chat:hover {
  background: #1eb855;
  border-color: #1eb855;
  color: #fff;
}

.pd-btn-chat i { font-size: 1.15rem; }

/* Sold-out order box: buttons inert, plans no longer selectable. */
.pd-btn-order:disabled,
.pd-btn-addcart:disabled {
  background: var(--text-muted);
  border-color: var(--text-muted);
  color: #fff;
  cursor: not-allowed;
}

.pd-btn-order:disabled:hover,
.pd-btn-addcart:disabled:hover {
  background: var(--text-muted);
  border-color: var(--text-muted);
  transform: none;
}

.pd-order-box.is-sold-out .pd-plans {
  opacity: 0.55;
  pointer-events: none;
}

.pd-order-box.is-sold-out .pd-offer-strip {
  background: #f4f5f7;
}

.pd-order-box.is-sold-out .pd-offer-strip i { color: var(--text-muted); }

.pd-secure {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 12px 0;
}

.pd-assurances {
  border-top: 1px solid var(--border-color);
  padding-top: 14px;
}

.pd-assurances li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 0.79rem;
  line-height: 1.5;
  color: var(--text-secondary);
  padding: 5px 0;
}

.pd-assurances i { color: var(--accent-alt); font-size: 0.75rem; margin-top: 3px; flex-shrink: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .pd-layout {
    grid-template-columns: 1fr;
  }
  .pd-order-box { position: static; }

  /* Single column: hero first, then the order box, with the
     Description / Reviews / FAQ tabs last. Flattening .pd-main lets the
     hero and the tabs be ordered independently of each other. */
  .pd-main { display: contents; }
  .pd-hero { order: 1; }
  .pd-order-box { order: 2; }
  .pd-tabs { order: 3; margin-top: 0; }
}

@media (max-width: 640px) {
  .pd-hero {
    grid-template-columns: 1fr;
    padding: 18px;
    gap: 18px;
  }
  .pd-hero-image { max-width: 200px; margin: 0 auto; }
  .pd-hero-body h1 { font-size: 1.3rem; }
  .pd-tab { min-width: 0; flex: 1; padding: 10px 12px; font-size: 0.8rem; }
  .pd-tab-panel { padding: 18px; }
}

/* ---------- Animations ---------- */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeSlideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(50px); } to { opacity: 1; transform: translateX(0); } }
@keyframes fadeOutRight { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(50px); } }
@keyframes modalSlideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .footer-main { grid-template-columns: 1fr 1fr; gap: 30px; }
  .products-grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
}

@media (max-width: 768px) {
  .section { padding: 40px 0; }
  .menu-toggle { display: flex; }
  .search-bar {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    max-width: 100%;
    padding: 10px 16px 14px;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
  }
  .search-bar.mobile-active { display: block; }
  .login-btn { display: none; }
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .product-info { padding: 10px; }
  .product-info h4 { font-size: 0.8rem; }
  .categories-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .features-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .footer-main { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom-inner { flex-direction: column; text-align: center; }
  .cart-sidebar { width: 100%; right: -100%; }
}

@media (max-width: 480px) {
  :root { --header-height: 58px; }
  .logo { font-size: 1.2rem; }
  .logo-icon { width: 32px; height: 32px; font-size: 0.9rem; }
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .product-actions { bottom: 0; background: transparent; }
  .product-action-btn { width: 32px; height: 32px; font-size: 0.75rem; }
  .categories-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .features-grid { grid-template-columns: 1fr; }
  .pd-info h1 { font-size: 1.2rem; }
}

/* ===== Buy Now Button ===== */
.buy-now-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 8px 12px;
  margin-top: 8px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  /* Rendered as an <a>, so the link defaults need overriding. */
  text-decoration: none;
  box-sizing: border-box;
}

.buy-now-btn:hover {
  background: var(--primary-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3);
}

/* ===== Customer Reviews Gallery ===== */
.reviews-gallery {
  display: flex;
  gap: 16px;
  overflow: hidden;
  padding: 10px 0;
  position: relative;
}
.reviews-track {
  display: flex;
  gap: 16px;
  animation: reviewScroll 30s linear infinite;
  width: max-content;
}
.reviews-track:hover { animation-play-state: paused; }
@keyframes reviewScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.review-card {
  flex-shrink: 0;
  width: 220px;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.review-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.review-card img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  display: block;
}
@media(max-width:600px) {
  .review-card { width: 170px; }
  .review-card img { height: 220px; }
}
.review-caption {
  padding: 8px 12px;
  font-size: 0.8rem;
  color: #555;
  text-align: center;
  font-weight: 500;
}

/* Lightbox */
.review-lightbox {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.85); z-index: 99999;
  display: flex; align-items: center; justify-content: center;
  padding: 20px; cursor: pointer;
}
.review-lightbox-inner {
  position: relative; max-width: 600px; width: 100%; cursor: default;
}
.review-lightbox-inner img {
  width: 100%; border-radius: 12px; box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}
.review-lb-close {
  position: absolute; top: -12px; right: -12px; width: 36px; height: 36px;
  border-radius: 50%; border: none; background: #fff; color: #333;
  font-size: 1rem; cursor: pointer; display: flex; align-items: center;
  justify-content: center; box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.review-lb-close:hover { background: #f0f0f0; }

/* ===== Support CTA Card ===== */
.support-section-wrap {
  width: 100%;
}
.support-card {
  background: linear-gradient(135deg, #1a6ef5 0%, #0d47c2 60%, #0a3699 100%);
  border-radius: 0;
  padding: 80px 40px;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.support-card::before {
  content: '';
  position: absolute; top: -40%; right: -20%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(255,255,255,0.07) 0%, transparent 60%);
  pointer-events: none;
}
.support-card::after {
  content: 'PixelSub';
  position: absolute;
  bottom: -20px; left: 50%;
  transform: translateX(-50%);
  font-size: 9rem;
  font-weight: 900;
  color: rgba(255,255,255,0.05);
  letter-spacing: 10px;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}
.support-tag {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.75;
  margin-bottom: 16px;
}
.support-heading {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 16px;
  color: #fff;
  line-height: 1.2;
}
.support-desc {
  font-size: 1rem;
  line-height: 1.8;
  opacity: 0.88;
  margin-bottom: 36px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}
.support-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 36px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  border: 2px solid rgba(255,255,255,0.4);
}
.support-btn-wa {
  background: rgba(255,255,255,0.15);
  color: #fff;
  backdrop-filter: blur(6px);
}
.support-btn-wa:hover {
  background: rgba(255,255,255,0.25);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}
.support-btn-wa i { font-size: 1.2rem; }
@media(max-width:600px) {
  .support-card { padding: 60px 24px; }
  .support-heading { font-size: 2rem; }
  .support-desc { font-size: 0.9rem; }
  .support-btn { padding: 14px 28px; font-size: 0.9rem; }
  .support-card::after { font-size: 4rem; }
}

/* ===== How to Order ===== */
.hto-header { text-align: center; margin-bottom: 40px; }
.hto-title { font-size: 2rem; font-weight: 800; color: var(--text-primary); }
.hto-subtitle { color: #777; margin-top: 8px; font-size: 1rem; }
.hto-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  position: relative;
}
.hto-step {
  text-align: center;
  padding: 0 16px;
  position: relative;
}
.hto-num {
  width: 52px; height: 52px;
  border-radius: 50%;
  border: 2.5px solid var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; font-weight: 800;
  color: var(--primary);
  margin: 0 auto 10px;
  background: #fff;
  position: relative;
  z-index: 2;
}
.hto-line {
  position: absolute;
  top: 26px;
  left: calc(50% + 30px);
  width: calc(100% - 60px);
  height: 2px;
  background: #d0d8e8;
  z-index: 1;
}
.hto-line-last { display: none; }
.hto-step h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.hto-step p {
  font-size: 0.85rem;
  color: #777;
  line-height: 1.5;
}
@media(max-width:768px) {
  .hto-steps { grid-template-columns: 1fr; gap: 24px; }
  .hto-line { display: none; }
  .hto-step { display: flex; align-items: flex-start; gap: 16px; text-align: left; padding: 0; }
  .hto-num { margin: 0; flex-shrink: 0; }
  .hto-step h3 { margin-bottom: 4px; }
}
