/* ----------------------------------------------------
   Shopee Vibrant Theme & UI Design System
   ---------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@300;400;500;600;700&family=Prompt:wght@300;400;500;600;700&display=swap');

:root {
  --primary: #FF3D00;
  --primary-hover: #E63500;
  --primary-light: #FFF0ED;
  --secondary: #FF8F00;
  --accent: #9C27B0;
  --accent-pink: #FF007A;
  --success: #00C853;
  --warning: #FFD600;
  --danger: #FF1744;
  --dark: #1A1C23;
  --dark-surface: #242731;
  --gray-100: #F6F8FB;
  --gray-200: #E9ECEF;
  --gray-300: #DEE2E6;
  --gray-500: #8E9AAB;
  --gray-800: #343A40;
  --white: #FFFFFF;
  
  --gradient-main: linear-gradient(135deg, #FF3D00 0%, #FF6D00 50%, #FF007A 100%);
  --gradient-flash: linear-gradient(135deg, #FF1744 0%, #FF9100 100%);
  --gradient-card-glow: radial-gradient(circle at top right, rgba(255, 61, 0, 0.15), transparent 70%);
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 24px rgba(255, 61, 0, 0.12);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.15);
  --shadow-glow: 0 0 20px rgba(255, 61, 0, 0.35);
  
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Prompt', 'Kanit', -apple-system, sans-serif;
}

body {
  background-color: var(--gray-100);
  color: var(--dark);
  line-height: 1.5;
  overflow-x: hidden;
  padding-bottom: 60px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 4px;
}

/* Top Announcement Bar & Header */
.top-bar {
  background: #111319;
  color: var(--white);
  font-size: 0.85rem;
  padding: 6px 0;
  font-weight: 300;
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-bar-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  margin-left: 16px;
  transition: var(--transition-fast);
}

.top-bar-links a:hover {
  color: var(--warning);
}

.main-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--gradient-main);
  box-shadow: var(--shadow-md);
  padding: 16px 0;
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

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

.logo-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--white);
}

.logo-icon {
  width: 46px;
  height: 46px;
  background: var(--white);
  color: var(--primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 800;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  transform: rotate(-5deg);
  transition: var(--transition-bounce);
}

.logo-brand:hover .logo-icon {
  transform: rotate(0deg) scale(1.08);
}

.logo-text {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--white);
  font-family: 'Kanit', sans-serif;
  text-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.logo-tag {
  background: var(--warning);
  color: var(--dark);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 4px;
  text-transform: uppercase;
}

/* Search Bar */
.search-box {
  flex: 1;
  max-width: 620px;
  position: relative;
}

.search-input-wrapper {
  display: flex;
  background: var(--white);
  border-radius: var(--radius-full);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  padding: 4px;
  transition: var(--transition-fast);
}

.search-input-wrapper:focus-within {
  box-shadow: 0 0 0 4px rgba(255, 214, 0, 0.4), 0 6px 24px rgba(0, 0, 0, 0.2);
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 10px 20px;
  font-size: 0.95rem;
  color: var(--dark);
}

.search-btn {
  background: var(--gradient-main);
  border: none;
  color: var(--white);
  padding: 0 24px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-fast);
}

.search-btn:hover {
  filter: brightness(1.1);
  transform: scale(1.02);
}

.search-tags {
  display: flex;
  gap: 12px;
  margin-top: 6px;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.9);
  overflow-x: auto;
  white-space: nowrap;
}

.search-tags span {
  cursor: pointer;
  transition: var(--transition-fast);
}

.search-tags span:hover {
  text-decoration: underline;
  color: var(--warning);
}

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

.action-btn {
  position: relative;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--white);
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  cursor: pointer;
  transition: var(--transition-bounce);
}

.action-btn:hover {
  background: var(--white);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.badge-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--warning);
  color: var(--dark);
  font-size: 0.75rem;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  border: 2px solid var(--primary);
  animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* Hero Banner & Flash Sales Section */
.hero-section {
  padding: 24px 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

.hero-banner-main {
  background: linear-gradient(120deg, #FF3D00 0%, #9C27B0 100%);
  border-radius: var(--radius-lg);
  padding: 36px;
  color: var(--white);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 280px;
}

.hero-banner-main::after {
  content: '';
  position: absolute;
  right: -40px;
  bottom: -40px;
  width: 260px;
  height: 260px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  pointer-events: none;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--warning);
  color: var(--dark);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 12px;
  width: fit-content;
}

.hero-title {
  font-size: 2.2rem;
  font-weight: 700;
  font-family: 'Kanit', sans-serif;
  line-height: 1.2;
  margin-bottom: 10px;
}

.hero-desc {
  font-size: 1rem;
  opacity: 0.9;
  margin-bottom: 24px;
  max-width: 480px;
}

.hero-cta {
  background: var(--white);
  color: var(--primary);
  border: none;
  padding: 12px 28px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  width: fit-content;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  transition: var(--transition-bounce);
}

.hero-cta:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* Side Banners */
.hero-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.side-banner-card {
  flex: 1;
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  border: 2px solid transparent;
  transition: var(--transition-fast);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

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

.side-banner-card.purple {
  background: linear-gradient(135deg, #7C4DFF 0%, #E040FB 100%);
  color: var(--white);
}

.side-banner-card.orange {
  background: linear-gradient(135deg, #FF6D00 0%, #FFD600 100%);
  color: var(--dark);
}

.banner-content h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.banner-content p {
  font-size: 0.85rem;
  opacity: 0.9;
}

/* Flash Sale & Countdown Timer */
.flash-sale-bar {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 16px 24px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  border-left: 6px solid var(--primary);
}

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

.flash-title {
  font-size: 1.4rem;
  font-weight: 800;
  font-family: 'Kanit', sans-serif;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.timer-box {
  display: flex;
  align-items: center;
  gap: 6px;
}

.timer-num {
  background: var(--dark);
  color: var(--warning);
  font-weight: 700;
  font-size: 1rem;
  padding: 4px 8px;
  border-radius: 6px;
  min-width: 32px;
  text-align: center;
}

.timer-sep {
  font-weight: 700;
  color: var(--dark);
}

/* Categories Bar */
.categories-wrapper {
  margin-bottom: 28px;
}

.section-title-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: 8px;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
}

.category-chip {
  background: var(--white);
  padding: 14px 10px;
  border-radius: var(--radius-md);
  text-align: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  border: 2px solid transparent;
  transition: var(--transition-bounce);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.category-chip.active,
.category-chip:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.category-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255, 61, 0, 0.1), rgba(255, 0, 122, 0.1));
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.category-chip.active .category-icon {
  background: var(--gradient-main);
  color: var(--white);
}

.category-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--dark);
}

/* Product Card Matrix */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.product-card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-bounce);
  display: flex;
  flex-direction: column;
  position: relative;
  border: 1px solid rgba(0,0,0,0.05);
  cursor: pointer;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(255, 61, 0, 0.18);
  border-color: rgba(255, 61, 0, 0.3);
}

.product-thumb {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
  background: #f8f9fa;
}

.product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.badge-discount {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--gradient-flash);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 6px;
  box-shadow: 0 4px 10px rgba(255, 23, 68, 0.3);
}

.badge-options {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(26, 28, 35, 0.85);
  backdrop-filter: blur(4px);
  color: var(--warning);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.product-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

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

.product-options-preview {
  display: flex;
  gap: 4px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.preview-tag {
  background: var(--gray-100);
  color: var(--gray-800);
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--gray-300);
}

.product-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: auto;
  margin-bottom: 8px;
}

.current-price {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--primary);
  font-family: 'Kanit', sans-serif;
}

.original-price {
  font-size: 0.85rem;
  color: var(--gray-500);
  text-decoration: line-through;
}

.product-footer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--gray-500);
  border-top: 1px solid var(--gray-200);
  padding-top: 8px;
}

.rating-stars {
  color: var(--warning);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 2px;
}

/* Rich Product Details Modal (Multi-Level Options) */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-normal);
}

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

.modal-container {
  background: var(--white);
  border-radius: var(--radius-lg);
  max-width: 920px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  position: relative;
  transform: scale(0.9);
  transition: var(--transition-bounce);
}

.modal-overlay.active .modal-container {
  transform: scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gray-200);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  z-index: 10;
  transition: var(--transition-fast);
}

.modal-close-btn:hover {
  background: var(--danger);
  color: var(--white);
}

.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 24px;
  padding: 24px;
}

.gallery-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.main-preview-image {
  width: 100%;
  height: 340px;
  border-radius: var(--radius-md);
  object-fit: cover;
  box-shadow: var(--shadow-sm);
}

.gallery-thumbs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.gallery-thumb-item {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition-fast);
}

.gallery-thumb-item.active,
.gallery-thumb-item:hover {
  border-color: var(--primary);
  transform: scale(1.05);
}

/* Option Selectors Matrix */
.product-details-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.detail-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.3;
}

.detail-price-box {
  background: var(--primary-light);
  padding: 14px 20px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: baseline;
  gap: 12px;
  border: 1px dashed var(--primary);
}

.detail-current-price {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  font-family: 'Kanit', sans-serif;
}

.detail-original-price {
  font-size: 1rem;
  color: var(--gray-500);
  text-decoration: line-through;
}

.option-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.option-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--gray-800);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.selected-val-label {
  color: var(--primary);
  font-weight: 600;
}

.option-chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.option-chip {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--gray-300);
  background: var(--white);
  color: var(--dark);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 6px;
}

.option-chip:hover {
  border-color: var(--primary);
  background: rgba(255, 61, 0, 0.04);
}

.option-chip.selected {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(255, 61, 0, 0.15);
  position: relative;
}

.option-chip.selected::after {
  content: '✓';
  margin-left: 4px;
  font-size: 0.8rem;
}

.chip-img {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  object-fit: cover;
}

/* Custom Text Input Option */
.custom-input-box {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition-fast);
}

.custom-input-box:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 61, 0, 0.15);
}

/* Quantity Control */
.quantity-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qty-btn {
  width: 34px;
  height: 34px;
  border: 1px solid var(--gray-300);
  background: var(--white);
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qty-btn:hover {
  background: var(--gray-200);
}

.qty-val {
  width: 44px;
  text-align: center;
  font-weight: 700;
}

/* Modal Actions */
.modal-actions-row {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}

.btn-add-cart {
  flex: 1;
  background: var(--primary-light);
  color: var(--primary);
  border: 1.5px solid var(--primary);
  padding: 14px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition-fast);
}

.btn-add-cart:hover {
  background: rgba(255, 61, 0, 0.15);
}

.btn-buy-now {
  flex: 1;
  background: var(--gradient-main);
  color: var(--white);
  border: none;
  padding: 14px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(255, 61, 0, 0.3);
  transition: var(--transition-bounce);
}

.btn-buy-now:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(255, 61, 0, 0.4);
}

/* Cart Drawer & Checkout */
.drawer-overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 440px;
  background: var(--white);
  z-index: 1050;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.2);
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.drawer-overlay.active {
  transform: translateX(0);
}

.drawer-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--gradient-main);
  color: var(--white);
}

.drawer-header h3 {
  font-size: 1.2rem;
  font-weight: 700;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cart-item-card {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--gray-100);
  position: relative;
}

.cart-item-img {
  width: 70px;
  height: 70px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

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

.cart-item-title {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.2;
}

.cart-item-options {
  font-size: 0.75rem;
  color: var(--gray-500);
}

.cart-item-price {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary);
}

.remove-cart-item {
  position: absolute;
  top: 8px;
  right: 8px;
  color: var(--gray-500);
  cursor: pointer;
  border: none;
  background: none;
  font-size: 1rem;
}

.remove-cart-item:hover {
  color: var(--danger);
}

/* Voucher box */
.voucher-section {
  display: flex;
  gap: 8px;
  background: #FFF9E6;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--warning);
}

.voucher-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  font-size: 0.85rem;
  text-transform: uppercase;
}

.apply-voucher-btn {
  background: var(--dark);
  color: var(--warning);
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
}

.drawer-footer {
  padding: 20px;
  border-top: 1px solid var(--gray-200);
  background: var(--white);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.total-row {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary);
  border-top: 1px dashed var(--gray-300);
  padding-top: 8px;
  margin-top: 8px;
}

.btn-checkout {
  width: 100%;
  background: var(--gradient-main);
  color: var(--white);
  border: none;
  padding: 14px;
  border-radius: var(--radius-md);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 12px;
  box-shadow: 0 6px 20px rgba(255, 61, 0, 0.3);
  transition: var(--transition-bounce);
}

.btn-checkout:hover {
  transform: scale(1.02);
}

/* Checkout Modal & PromptPay QR */
.checkout-modal {
  max-width: 600px;
}

.checkout-header {
  border-bottom: 1px solid var(--gray-200);
  padding: 16px 24px;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
}

.payment-methods-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 14px 0;
}

.payment-option {
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-sm);
  padding: 12px;
  text-align: center;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  transition: var(--transition-fast);
}

.payment-option.selected {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}

.qr-box {
  text-align: center;
  background: var(--gray-100);
  padding: 16px;
  border-radius: var(--radius-md);
  margin-top: 12px;
}

.qr-img {
  width: 180px;
  height: 180px;
  border-radius: 10px;
}

/* Seller Live Chat Widget */
.chat-widget-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--gradient-main);
  color: var(--white);
  padding: 12px 20px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  box-shadow: 0 8px 25px rgba(255, 61, 0, 0.4);
  cursor: pointer;
  z-index: 900;
  transition: var(--transition-bounce);
}

.chat-widget-btn:hover {
  transform: scale(1.08) translateY(-3px);
}

.chat-box-window {
  position: fixed;
  bottom: 80px;
  right: 24px;
  width: 340px;
  height: 440px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 950;
  display: none;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--gray-300);
}

.chat-box-window.active {
  display: flex;
}

.chat-box-header {
  background: var(--dark-surface);
  color: var(--white);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-messages {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--gray-100);
}

.chat-msg {
  max-width: 80%;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
}

.chat-msg.seller {
  background: var(--white);
  color: var(--dark);
  align-self: flex-start;
  box-shadow: var(--shadow-sm);
}

.chat-msg.user {
  background: var(--primary);
  color: var(--white);
  align-self: flex-end;
}

.chat-input-row {
  display: flex;
  padding: 8px;
  border-top: 1px solid var(--gray-200);
  background: var(--white);
}

.chat-input-row input {
  flex: 1;
  border: none;
  outline: none;
  padding: 6px 12px;
  font-size: 0.85rem;
}

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

.toast {
  background: var(--dark);
  color: var(--white);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  font-size: 0.9rem;
  border-left: 4px solid var(--primary);
  animation: slideInRight 0.3s forwards;
}

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

/* Responsive tweaks */
@media (max-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .modal-grid {
    grid-template-columns: 1fr;
  }
  .search-tags {
    display: none;
  }
}

/* ----------------------------------------------------
   User System & Auth Styling
   ---------------------------------------------------- */
.user-menu-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  color: var(--white);
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: var(--transition-fast);
}

.user-menu-btn:hover {
  background: var(--white);
  color: var(--primary);
}

.user-avatar-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--warning);
}

.user-name-text {
  font-size: 0.85rem;
  font-weight: 600;
}

.user-coins-pill {
  background: var(--warning);
  color: var(--dark);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* User Profile Modal & Tabs */
.user-modal-container {
  max-width: 720px;
}

.user-nav-tabs {
  display: flex;
  border-bottom: 2px solid var(--gray-200);
  margin-bottom: 20px;
}

.user-tab-btn {
  padding: 12px 20px;
  border: none;
  background: none;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gray-500);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: var(--transition-fast);
}

.user-tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.order-card {
  background: var(--gray-100);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 14px;
  border: 1px solid var(--gray-200);
}

.order-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px dashed var(--gray-300);
  padding-bottom: 10px;
  margin-bottom: 10px;
  font-size: 0.85rem;
}

.order-status-badge {
  background: #E8F5E9;
  color: var(--success);
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.auth-form-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 10px 0;
}

.auth-input-field {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  outline: none;
}

.auth-input-field:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 61, 0, 0.15);
}

.auth-submit-btn {
  background: var(--gradient-main);
  color: var(--white);
  border: none;
  padding: 14px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(255, 61, 0, 0.3);
}

/* ----------------------------------------------------
   Seller Dashboard Form Styles
   ---------------------------------------------------- */
.seller-form-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gray-800);
  display: block;
  margin-bottom: 5px;
}

.seller-form-input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  outline: none;
  background: var(--white);
  transition: var(--transition-fast);
  font-family: 'Prompt', sans-serif;
}

.seller-form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 61, 0, 0.12);
}

.option-builder-row {
  animation: slideIn 0.2s ease;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

