/* ====================================================
   MASSAGE GUN PRO - MODERN PREMIUM UI
   Thiết kế giao diện hiện đại, tinh tế, vừa mắt, chuẩn UX/UI
   ==================================================== */
:root {
  --primary: #e11d48;          /* Rose-red cao cấp, sang và dịu mắt hơn đỏ chói */
  --primary-hover: #be123c;
  --primary-light: #fff1f2;
  --primary-border: #fecdd3;
  --accent: #f59e0b;           /* Gold ấm */
  --accent-light: #fef3c7;
  --emerald: #10b981;          /* Xanh lá uy tín */
  --emerald-light: #ecfdf5;
  --cyan: #06b6d4;
  --cyan-light: #ecfeff;
  
  --dark: #0f172a;             /* Slate 900 */
  --text-main: #1e293b;        /* Slate 800 */
  --text-secondary: #475569;   /* Slate 600 */
  --text-muted: #94a3b8;       /* Slate 400 */
  --border: #e2e8f0;           /* Slate 200 */
  --bg-page: #f1f5f9;          /* Slate 100 */
  --bg-card: #ffffff;
  --bg-subtle: #f8fafc;
  
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 2px 4px 0 rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 12px -1px rgba(15, 23, 42, 0.08), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 24px -4px rgba(15, 23, 42, 0.12), 0 4px 8px -2px rgba(15, 23, 42, 0.04);
  
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-pill: 9999px;
  
  --app-width: 480px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
  font-family: -apple-system, BlinkMacSystemFont, "Plus Jakarta Sans", "Roboto", "Segoe UI", Helvetica, Arial, sans-serif;
  color: var(--text-main);
  background-color: var(--bg-page);
  -webkit-font-smoothing: antialiased;
}

body {
  line-height: 1.5;
  font-size: 14px;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding-bottom: 78px; /* space for sticky bar */
}

/* App Container (Khung App di động tinh tế trên Desktop) */
.app-container {
  width: 100%;
  max-width: var(--app-width);
  background-color: var(--bg-card);
  min-height: 100vh;
  position: relative;
  box-shadow: 0 10px 40px rgba(15, 23, 42, 0.08);
  border-left: 1px solid rgba(226, 232, 240, 0.6);
  border-right: 1px solid rgba(226, 232, 240, 0.6);
}

/* ====================================================
   1. STICKY TOP HEADER
   ==================================================== */
.top-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
}

.brand-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
}

.brand-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--dark);
  letter-spacing: -0.3px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-header-icon {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  position: relative;
  transition: all 0.2s ease;
}

.btn-header-icon:hover {
  background: var(--primary-light);
  border-color: var(--primary-border);
  color: var(--primary);
}

.cart-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: var(--primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  width: 17px;
  height: 17px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
}

/* Navigation Tabs */
.nav-tabs {
  display: flex;
  border-top: 1px solid var(--border);
  background: #fff;
}

.nav-tab {
  flex: 1;
  text-align: center;
  padding: 10px 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  position: relative;
  transition: all 0.2s ease;
}

.nav-tab:hover {
  color: var(--dark);
}

.nav-tab.active {
  color: var(--primary);
}

.nav-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 24%;
  right: 24%;
  height: 2.5px;
  background: var(--primary);
  border-radius: var(--radius-pill);
}

/* ====================================================
   2. GALLERY & CAROUSEL
   ==================================================== */
.gallery-section {
  position: relative;
  background: #090d16;
  overflow: hidden;
}

.carousel-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  touch-action: pan-y;
}

.carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}

.carousel-slide {
  min-width: 100%;
  height: 100%;
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  cursor: zoom-in;
}

.carousel-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s ease;
}

.carousel-nav-btn:hover {
  background: rgba(15, 23, 42, 0.85);
  transform: translateY(-50%) scale(1.05);
}

.carousel-prev { left: 12px; }
.carousel-next { right: 12px; }

.slide-counter {
  position: absolute;
  bottom: 14px;
  right: 14px;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  letter-spacing: 0.5px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  z-index: 5;
}

/* Elegant floating badges over image */
.gallery-ribbon-badges {
  position: absolute;
  bottom: 14px;
  left: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 5;
}

.badge-extra-shipping {
  background: rgba(6, 182, 212, 0.95);
  backdrop-filter: blur(4px);
  color: #fff;
  border-radius: var(--radius-xs);
  padding: 3px 8px;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.badge-extra-shipping .badge-italic {
  font-style: italic;
  font-size: 11px;
}

.badge-bonus-cashback {
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(4px);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: var(--radius-xs);
  padding: 3px 8px;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Thumbnails Strip */
.carousel-thumbnails {
  display: flex;
  gap: 8px;
  padding: 10px 14px;
  background: #ffffff;
  overflow-x: auto;
  scrollbar-width: none;
}

.carousel-thumbnails::-webkit-scrollbar {
  display: none;
}

.thumb-item {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
  cursor: pointer;
  border: 2px solid transparent;
  opacity: 0.65;
  transition: all 0.2s ease;
}

.thumb-item:hover {
  opacity: 0.9;
}

.thumb-item.active {
  border-color: var(--primary);
  opacity: 1;
  box-shadow: 0 0 0 1px var(--primary);
}

/* ====================================================
   3. FLASH SALE BAR - CHUẨN SÀN BẮT MẮT & VỪA MẮT (DUAL-TONE)
   ==================================================== */
.mall-badge {
  background: #d0011b;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 2px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-left: 2px;
}

.shopee-flash-bar {
  display: flex;
  align-items: stretch;
  width: 100%;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(238, 77, 45, 0.15);
}

.flash-price-block {
  flex: 1.25;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 50%, #b91c1c 100%);
  color: #ffffff;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

.flash-diamond-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #fef08a;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.flash-price-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}

.flash-price-main {
  font-size: 24px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.5px;
  line-height: 1.1;
}

.flash-price-old {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: line-through;
}

.flash-discount-tag {
  background: #fef08a;
  color: #b91c1c;
  font-size: 10.5px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 3px;
}

.flash-timer-block {
  flex: 1;
  background: linear-gradient(135deg, #ffb703 0%, #f59e0b 60%, #d97706 100%);
  color: #ffffff;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  clip-path: polygon(14px 0%, 100% 0%, 100% 100%, 0% 100%);
  margin-left: -10px;
}

.flash-timer-title {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 800;
  color: #78350f;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 4px;
}

.flash-countdown {
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  background: #78350f;
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.order-notice[hidden] {
  display: none;
}

.tag-brand-pill {
  background: #f1f5f9;
  color: #0f172a;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  border: 1px solid #cbd5e1;
}

/* ====================================================
   5 HEADS SHOWCASE & ENGINE SPECS STYLING
   ==================================================== */
.heads-showcase-section, .engine-section {
  padding: 20px 16px;
  background: #ffffff;
  border-bottom: 8px solid var(--bg-subtle);
}

.section-header-box {
  margin-bottom: 16px;
  text-align: center;
}

.subhead-pill {
  display: inline-block;
  background: #fee2e2;
  color: #dc2626;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.section-main-heading {
  font-size: 18px;
  font-weight: 800;
  color: var(--dark);
  line-height: 1.35;
  margin-bottom: 4px;
}

.section-desc {
  font-size: 13px;
  color: var(--text-secondary);
}

.heads-cards-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.head-item-card {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  position: relative;
  transition: all 0.2s ease;
}

.head-item-card:hover {
  border-color: #cbd5e1;
  box-shadow: var(--shadow-sm);
}

.head-item-card.featured-head {
  background: #fff5f5;
  border: 1.5px solid #fecdd3;
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.08);
}

.head-badge-new {
  position: absolute;
  top: -9px;
  right: 14px;
  background: #e11d48;
  color: #fff;
  font-size: 9.5px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.3px;
  box-shadow: 0 2px 6px rgba(225, 29, 72, 0.3);
}

.head-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.head-icon-circle {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill);
  background: #ffffff;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: var(--shadow-xs);
  flex-shrink: 0;
}

.head-title {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--dark);
  line-height: 1.3;
}

.head-subtitle {
  font-size: 12px;
  color: #0284c7;
  font-weight: 600;
  margin-top: 2px;
}

.head-detail-desc {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* 6 Levels bar */
.levels-container-card {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-top: 14px;
}

.level-row {
  margin-bottom: 12px;
}

.level-row:last-child {
  margin-bottom: 0;
}

.level-num {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 4px;
}

.level-bar-wrap {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-bottom: 4px;
}

.level-bar-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  transition: width 0.6s ease;
}

.level-text {
  font-size: 11.5px;
  color: var(--text-secondary);
}

/* Color swatches with thumbnail images */
.color-swatches-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.color-option-card {
  background: #f8fafc;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--dark);
}

.color-option-card:hover {
  border-color: #cbd5e1;
}

.color-option-card.selected {
  border-color: var(--primary);
  background: #fff1f2;
  box-shadow: 0 0 0 1px var(--primary);
}

.color-thumb-img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: var(--radius-xs);
}

/* ====================================================
   4. PRODUCT INFO & DETAILS CARD
   ==================================================== */
.product-main-card {
  padding: 16px;
  background: #ffffff;
  border-bottom: 8px solid var(--bg-subtle);
}

.product-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.tag-hot-deal {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--primary-border);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  margin-right: 6px;
  vertical-align: middle;
}

.product-title-text {
  display: inline;
  font-size: 16px;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.45;
}

/* Product stats row */
.meta-stats-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--text-secondary);
  flex-wrap: wrap;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.comments-link {
  color: var(--blue-color);
  font-weight: 500;
}

.meta-divider {
  color: #cbd5e1;
}

.sold-count strong {
  color: var(--dark);
}

.freeship-chip {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #0d9488;
  font-weight: 700;
  font-size: 12px;
  background: #f0fdfa;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
}

/* Featured Top Product Banner */
.top-product-banner {
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(90deg, #fffbeb 0%, #fef3c7 100%);
  border: 1px solid #fde68a;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-top: 12px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.top-product-banner:hover {
  transform: translateY(-1px);
}

.trophy-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #92400e;
  font-size: 13px;
  font-weight: 700;
}

.trophy-link {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #b45309;
  font-size: 12px;
  font-weight: 500;
}

/* Trust Service Badges Grid */
.trust-badges-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.trust-badge-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  padding: 8px 6px;
  border-radius: var(--radius-sm);
  text-align: center;
}

/* ====================================================
   5. PRODUCT KEY HIGHLIGHTS (4 ICONS GRID)
   ==================================================== */
.highlights-section {
  padding: 16px;
  background: #ffffff;
  border-bottom: 8px solid var(--bg-subtle);
}

.section-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.highlights-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.highlight-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  transition: all 0.2s ease;
}

.highlight-card:hover {
  border-color: #cbd5e1;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.highlight-card-wide {
  grid-column: 1 / -1;
}

.highlight-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
}

.highlight-text h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 2px;
}

.highlight-text p {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.35;
}

/* ====================================================
   6. CUSTOMER REVIEWS (SECTION 3)
   ==================================================== */
.reviews-section {
  padding: 16px;
  scroll-margin-top: 16px;
  background: #ffffff;
  border-bottom: 8px solid var(--bg-subtle);
}

.review-summary {
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 12px;
}

.review-score {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.review-score strong {
  color: var(--dark);
  font-size: 26px;
  font-weight: 800;
}

.review-score-stars {
  margin-left: 6px;
  color: var(--accent);
  font-size: 14px;
}

.review-examples-title {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
}

.review-item {
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}

.review-item:last-child {
  border-bottom: none;
}

.reviewer-name {
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--dark);
}

.review-stars {
  margin-bottom: 4px;
  color: var(--accent);
  font-size: 12px;
}

.review-variant {
  margin-bottom: 8px;
  font-size: 11px;
  color: var(--text-secondary);
}

.review-body {
  font-size: 13px;
  color: var(--text-main);
  line-height: 1.5;
  margin-bottom: 8px;
}

.review-thumbnail-img {
  display: block;
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  background-size: cover;
  background-position: center;
  border: 1px solid var(--border);
  cursor: pointer;
}

.btn-more-reviews {
  width: 100%;
  padding: 10px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  margin-top: 10px;
  transition: all 0.2s ease;
}

.btn-more-reviews:hover {
  background: #f1f5f9;
  color: var(--dark);
}

/* ====================================================
   7. SHOP PROFILE & DETAILED BANNERS
   ==================================================== */
.store-section {
  padding: 16px;
  background: #ffffff;
  border-bottom: 8px solid var(--bg-subtle);
}

.store-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.store-avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-pill);
  object-fit: cover;
  border: 1px solid var(--border);
}

.store-details {
  flex: 1;
}

.store-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--dark);
}

.store-rating-sub {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-open-store {
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--primary-border);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.store-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px;
  text-align: center;
}

.stat-item-num {
  font-size: 14px;
  font-weight: 800;
  color: var(--dark);
}

.stat-item-label {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* Infographic Banners */
.product-infographics-list {
  margin-top: 16px;
}

.infographic-banner {
  width: 100%;
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  display: block;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
}

/* ====================================================
   8. CHECKOUT / ORDER FORM (SECTION 5)
   ==================================================== */
.checkout-section {
  padding: 20px 16px;
  background: #ffffff;
  border-bottom: 8px solid var(--bg-subtle);
}

.checkout-heading-box {
  text-align: center;
  margin-bottom: 18px;
}

.checkout-title-main {
  font-size: 18px;
  font-weight: 800;
  color: var(--dark);
}

.checkout-desc-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Combo Option Cards */
.combos-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.combo-select-card {
  display: flex;
  align-items: center;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  background: #ffffff;
  position: relative;
}

.combo-select-card:hover {
  border-color: #cbd5e1;
}

.combo-select-card.selected {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 0 0 1px var(--primary);
}

.combo-radio-circle {
  margin-right: 12px;
  accent-color: var(--primary);
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.combo-card-content {
  flex: 1;
}

.combo-card-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.combo-highlight-tag {
  background: var(--primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--radius-xs);
}

.combo-price-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 2px;
}

.combo-price-val {
  font-size: 16px;
  font-weight: 800;
  color: var(--primary);
}

.combo-oldprice-val {
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: line-through;
}

.combo-freeship-tag {
  font-size: 11px;
  color: var(--emerald);
  font-weight: 600;
}

/* Color Variant Swatches */
.color-picker-header {
  font-size: 13px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.color-swatches-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.color-option-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 4px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: #ffffff;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.color-option-card:hover {
  border-color: #cbd5e1;
}

.color-option-card.selected {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
}

.swatch-circle {
  width: 22px;
  height: 22px;
  border-radius: var(--radius-pill);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.swatch-black { background: #18181b; }
.swatch-green { background: #065f46; }
.swatch-silver { background: #94a3b8; }
.swatch-red { background: #be123c; }

/* Order Form Inputs */
.order-form-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.input-field-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.field-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
}

.field-label .req-star {
  color: var(--primary);
}

.clean-input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  color: var(--dark);
  background: var(--bg-subtle);
  outline: none;
  transition: all 0.2s ease;
}

.clean-input:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.12);
}

.clean-input.input-error {
  border-color: #ef4444;
  background-color: #fef2f2;
}

.order-submit-error {
  color: #b91c1c;
  font-size: 14px;
  margin: 12px 0;
}

.input-err-msg {
  font-size: 11px;
  color: #ef4444;
  display: none;
  margin-top: 2px;
}

.clean-input.input-error + .input-err-msg {
  display: block;
}

/* Order Summary Box */
.summary-receipt-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  margin: 6px 0;
}

.receipt-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.receipt-row > *:last-child {
  min-width: 0;
  text-align: right;
  overflow-wrap: anywhere;
}

.receipt-total-row {
  border-top: 1px dashed var(--border);
  padding-top: 10px;
  margin-top: 10px;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--dark);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.receipt-total-row > *:last-child {
  flex-shrink: 0;
  white-space: nowrap;
}

.total-cash {
  color: var(--primary);
  font-size: 20px;
  font-weight: 800;
}

/* CTA Submit Button */
.btn-submit-order-clean {
  background: linear-gradient(135deg, #e11d48 0%, #be123c 100%);
  color: #fff;
  border: none;
  padding: 15px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(225, 29, 72, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-submit-order-clean:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(225, 29, 72, 0.45);
}

.btn-submit-order-clean:active {
  transform: translateY(1px);
}

.guarantee-note-center {
  font-size: 12px;
  color: #059669;
  text-align: center;
  font-weight: 600;
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

/* ====================================================
   9. FOOTER
   ==================================================== */
.clean-footer {
  padding: 24px 16px;
  background: #0f172a;
  color: #94a3b8;
  font-size: 12px;
}

.footer-title {
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 14px;
  letter-spacing: 0.3px;
}

.footer-links-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  line-height: 1.5;
}

.footer-link-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.footer-link-row svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: #cbd5e1;
}

.footer-link-row strong {
  color: #ffffff;
}

/* ====================================================
   10. STICKY BOTTOM BAR (TỰ NHIÊN, VỪA MẮT)
   ==================================================== */
.sticky-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--app-width);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--border);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 99;
  box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.06);
}

.order-notice {
  position: fixed;
  right: max(12px, calc((100% - var(--app-width)) / 2 + 12px));
  bottom: calc(128px + env(safe-area-inset-bottom));
  z-index: 98;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100% - 24px);
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
  color: var(--dark);
  font-size: 12px;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.order-notice img {
  flex-shrink: 0;
  border-radius: var(--radius-xs);
  object-fit: cover;
}

.order-notice button {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: var(--radius-xs);
  background: var(--bg-subtle);
  color: var(--text-secondary);
  font-size: 18px;
  cursor: pointer;
}

.bottom-icon-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-secondary);
  gap: 2px;
  min-width: 44px;
}

.bottom-icon-btn svg {
  width: 19px;
  height: 19px;
  color: var(--text-secondary);
}

.btn-add-cart-outline {
  text-decoration: none;
  flex: 1;
  background: var(--primary-light);
  color: var(--primary);
  border: 1.5px solid var(--primary-border);
  padding: 11px 4px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
}

.btn-add-cart-outline:hover {
  background: #ffe4e6;
}

.btn-buy-now-solid {
  flex: 1.3;
  background: linear-gradient(135deg, #e11d48 0%, #be123c 100%);
  color: #fff;
  border: none;
  padding: 12px 8px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 800;
  text-transform: uppercase;
  cursor: pointer;
  text-align: center;
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.3);
  transition: all 0.2s ease;
}

.btn-buy-now-solid:hover {
  transform: translateY(-1px);
}

/* ====================================================
   11. MODALS
   ==================================================== */
.order-dialog {
  margin: auto;
  width: min(420px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  border: 0;
  border-radius: var(--radius-lg);
  color: var(--text-main);
  box-shadow: var(--shadow-lg);
  overflow: auto;
  overflow-wrap: anywhere;
}

.order-dialog::backdrop {
  background: rgba(15, 23, 42, 0.65);
}

.modal-box {
  background: #fff;
}

.modal-header-success {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #fff;
  padding: 24px 16px;
  text-align: center;
}

.success-icon-circle {
  width: 52px;
  height: 52px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}

.modal-body {
  padding: 18px 16px;
  font-size: 13px;
  color: var(--text-main);
}

.order-code-badge {
  background: var(--bg-subtle);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  text-align: center;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 14px;
}

.modal-info-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bg-subtle);
  padding: 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
}

.modal-info-row {
  display: flex;
  justify-content: space-between;
}

.modal-info-label {
  color: var(--text-muted);
}

.modal-info-value {
  font-weight: 600;
  color: var(--dark);
  text-align: right;
}

.modal-footer {
  padding: 0 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-modal-primary {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
}

.btn-modal-secondary {
  background: var(--bg-subtle);
  color: var(--text-main);
  border: 1px solid var(--border);
  padding: 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}

/* Floating Orders Drawer Button */
.btn-floating-orders {
  position: fixed;
  right: 14px;
  bottom: 85px;
  background: var(--dark);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-pill);
  padding: 8px 12px;
  font-size: 11.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  z-index: 95;
  transition: transform 0.2s ease;
}

.btn-floating-orders:hover {
  transform: scale(1.05);
}

.orders-drawer-list {
  max-height: 280px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 10px 0;
}

.order-history-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px;
  background: #fff;
  font-size: 12px;
}

.order-history-header {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  margin-bottom: 4px;
}

/* Lightbox Modal */
.lightbox-modal {
  margin: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  border: 0;
  background: transparent;
}

.lightbox-modal[open] {
  display: grid;
  place-items: center;
}

.lightbox-modal::backdrop {
  background: rgba(15, 23, 42, 0.95);
}

.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
}

.lightbox-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border: none;
  border-radius: var(--radius-pill);
  width: 38px;
  height: 38px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.color-option-card input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.color-option-card:focus-within {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.btn-submit-order-clean:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .carousel-track { transition: none; }
}
