/* Google-Style Premium Design System */

/* CSS Variables for design tokens */
:root {
  --font-heading: 'Outfit', 'Inter', 'Noto Sans SC', sans-serif;
  --font-body: 'Roboto', 'Noto Sans SC', sans-serif;

  /* Light Theme Colors (Google Store style) */
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-tertiary: #f1f3f4;
  --text-primary: #202124;
  --text-secondary: #5f6368;
  --text-light: #80868b;
  --accent: #1a73e8;
  --accent-hover: #1557b0;
  --accent-light: #e8f0fe;
  --border-color: #dadce0;
  --shadow-sm: 0 1px 2px 0 rgba(60,64,67,0.3), 0 1px 3px 1px rgba(60,64,67,0.15);
  --shadow-md: 0 4px 12px 0 rgba(60,64,67,0.15);
  --shadow-lg: 0 12px 30px 0 rgba(60,64,67,0.2);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Theme Variables */
body.dark-mode {
  --bg-primary: #121212;
  --bg-secondary: #1e1e1e;
  --bg-tertiary: #2d2d2d;
  --text-primary: #e8eaed;
  --text-secondary: #9aa0a6;
  --text-light: #70757a;
  --accent: #8ab4f8;
  --accent-hover: #aecbfa;
  --accent-light: #202b3d;
  --border-color: #3c4043;
  --shadow-sm: 0 1px 3px 0 rgba(0,0,0,0.5);
  --shadow-md: 0 4px 16px 0 rgba(0,0,0,0.6);
  --shadow-lg: 0 12px 36px 0 rgba(0,0,0,0.8);
}

/* Basic Reset & Base Styling */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  transition: var(--transition);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Scrollbar customization */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-light);
}

/* Layout Utilities */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

/* Sticky Header */
.site-header {
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: var(--transition);
}

body.dark-mode .site-header {
  background-color: rgba(18, 18, 18, 0.85);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

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

.logo-wrapper i {
  font-size: 24px;
  color: var(--accent);
}

.logo-text {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.5px;
}

/* Navigation tabs in Header */
.header-nav {
  display: flex;
  gap: 8px;
}

.nav-tab {
  background: none;
  border: none;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 15px;
  color: var(--text-secondary);
  padding: 10px 18px;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: var(--transition);
}

.nav-tab:hover {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
}

.nav-tab.active {
  background-color: var(--accent-light);
  color: var(--accent);
}

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

.action-btn {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: var(--transition);
}

.action-btn:hover {
  background-color: var(--bg-secondary);
  border-color: var(--text-light);
  transform: scale(1.05);
}

#lang-btn {
  width: auto;
  border-radius: var(--radius-lg);
  padding: 0 16px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 14px;
}

.cart-btn-wrapper {
  position: relative;
}

.badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background-color: #ea4335;
  color: white;
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Hero Section */
.hero-section {
  padding: 64px 0;
  text-align: center;
  background: radial-gradient(circle at top, var(--accent-light) 0%, transparent 70%);
}

.hero-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 48px;
  line-height: 1.15;
  letter-spacing: -1px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--text-primary) 30%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto 32px auto;
  line-height: 1.6;
}

/* Search Bar Wrapper */
.search-wrapper {
  max-width: 580px;
  margin: 0 auto;
  position: relative;
}

.search-wrapper i {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  font-size: 18px;
}

.search-input {
  width: 100%;
  height: 56px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  border-radius: var(--radius-lg);
  padding: 0 24px 0 54px;
  font-size: 16px;
  box-shadow: var(--shadow-sm);
  outline: none;
  transition: var(--transition);
}

.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-light);
}

/* Mobile Category bar styling */
.category-scroller {
  display: none; /* fallback wrapper */
}

/* Main Products Area */
.main-content {
  flex-grow: 1;
  padding-bottom: 96px;
}

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

/* Product Card */
.product-card {
  background-color: var(--bg-primary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition-slow);
  position: relative;
}

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

.card-img-wrapper {
  position: relative;
  width: 100%;
  padding-top: 75%; /* 4:3 Aspect Ratio */
  overflow: hidden;
  cursor: pointer;
  background-color: var(--bg-secondary);
}

.card-img-wrapper img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-slow);
}

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

.card-overlay-btn {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background-color: rgba(255,255,255,0.9);
  color: #202124;
  padding: 8px 14px;
  border-radius: var(--radius-lg);
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0;
  transform: translateY(6px);
  transition: var(--transition);
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

body.dark-mode .card-overlay-btn {
  background-color: rgba(30,30,30,0.9);
  color: #e8eaed;
}

.product-card:hover .card-overlay-btn {
  opacity: 1;
  transform: translateY(0);
}

.card-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-header-info {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}

.card-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 18px;
  line-height: 1.3;
  cursor: pointer;
  color: var(--text-primary);
  transition: var(--transition);
}

.card-title:hover {
  color: var(--accent);
}

.card-price {
  font-weight: 700;
  font-size: 17px;
  color: var(--text-primary);
  white-space: nowrap;
}

.card-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 20px;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.add-to-cart-btn {
  width: 100%;
  border: none;
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  padding: 12px;
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: var(--transition);
}

.add-to-cart-btn:hover {
  background-color: var(--accent);
  color: white;
}

.add-to-cart-btn.added {
  background-color: #34a853 !important;
  color: white !important;
}

/* No Results State */
.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 0;
  color: var(--text-secondary);
}

.no-results i {
  font-size: 48px;
  margin-bottom: 16px;
  color: var(--border-color);
}

.no-results p {
  font-size: 16px;
}

/* Shopping Cart Drawer Overlay */
.cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  z-index: 150;
  transition: var(--transition);
}

.cart-overlay.visible {
  opacity: 1;
  pointer-events: all;
}

/* Cart Drawer container */
.cart-drawer {
  position: fixed;
  top: 0;
  right: -420px; /* Hidden state */
  width: 100%;
  max-width: 420px;
  height: 100%;
  background-color: var(--bg-primary);
  z-index: 200;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  transition: var(--transition-slow);
}

.cart-drawer.open {
  right: 0;
}

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

.cart-header h2 {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
}

.close-drawer-btn {
  background: none;
  border: none;
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  font-size: 18px;
  transition: var(--transition);
}

.close-drawer-btn:hover {
  background-color: var(--bg-secondary);
}

.cart-items-wrapper {
  flex-grow: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cart-item {
  display: flex;
  gap: 16px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 20px;
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-item img {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background-color: var(--bg-secondary);
}

.cart-item-info {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.cart-item-info h4 {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 4px;
}

.cart-item-price {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-secondary);
}

.cart-item-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

.qty-selector {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 30px;
}

.qty-selector button {
  background: none;
  border: none;
  cursor: pointer;
  width: 28px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text-secondary);
  transition: var(--transition);
}

.qty-selector button:hover {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
}

.qty-selector span {
  font-size: 13px;
  font-weight: 600;
  width: 24px;
  text-align: center;
  display: inline-block;
}

.remove-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #ea4335;
  font-size: 13px;
  font-weight: 500;
}

.remove-btn:hover {
  text-decoration: underline;
}

.cart-empty-state {
  text-align: center;
  margin: auto 0;
  color: var(--text-secondary);
}

.cart-empty-state i {
  font-size: 40px;
  margin-bottom: 12px;
  color: var(--border-color);
}

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

.subtotal-row {
  display: flex;
  justify-content: space-between;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 18px;
}

.subtotal-val {
  font-size: 20px;
  font-weight: 700;
}

.checkout-btn {
  width: 100%;
  border: none;
  background-color: var(--accent);
  color: white;
  padding: 16px;
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.checkout-btn:hover:not(:disabled) {
  background-color: var(--accent-hover);
  transform: translateY(-2px);
}

.checkout-btn:disabled {
  background-color: var(--border-color);
  color: var(--text-light);
  cursor: not-allowed;
  box-shadow: none;
}

/* Modals Core Styling */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  z-index: 300;
  transition: var(--transition);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal-container {
  background-color: var(--bg-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 800px;
  width: calc(100% - 32px);
  max-height: 90vh;
  overflow: hidden;
  position: relative;
  transform: scale(0.92);
  transition: var(--transition-slow);
}

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

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background-color: rgba(0,0,0,0.5);
  border: none;
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  z-index: 10;
  transition: var(--transition);
}

.modal-close-btn:hover {
  background-color: rgba(0,0,0,0.8);
  transform: scale(1.05);
}

/* Product Detail Modal Content */
.product-detail-layout {
  display: flex;
  flex-direction: column;
  max-height: 90vh;
}

@media(min-width: 768px) {
  .product-detail-layout {
    flex-direction: row;
  }
}

.modal-img-section {
  flex: 1.1;
  position: relative;
  background-color: var(--bg-secondary);
}

.modal-img-section img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 280px;
}

@media(min-width: 768px) {
  .modal-img-section img {
    height: 100%;
    min-height: 480px;
  }
}

.modal-text-section {
  flex: 1;
  padding: 36px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.25;
}

.modal-description {
  font-size: 15px;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 20px;
  line-height: 1.4;
}

.modal-story {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
  white-space: pre-line;
}

/* Specifications Table */
.specs-table {
  margin-bottom: 28px;
  border-top: 1px solid var(--border-color);
}

.specs-title {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  color: var(--text-primary);
  margin-top: 16px;
}

.spec-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 13px;
}

.spec-label {
  color: var(--text-light);
  font-weight: 500;
}

.spec-value {
  font-weight: 600;
  color: var(--text-primary);
}

.modal-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 16px;
}

.modal-price-wrapper {
  display: flex;
  flex-direction: column;
}

.modal-price-label {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-light);
  font-weight: 600;
}

.modal-price {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
}

.modal-add-btn {
  flex-grow: 1;
  max-width: 200px;
  border: none;
  background-color: var(--accent);
  color: white;
  padding: 16px;
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.modal-add-btn:hover {
  background-color: var(--accent-hover);
  transform: translateY(-2px);
}

/* Checkout Modal Content */
.checkout-modal-container {
  max-width: 480px;
  padding: 32px;
  position: relative;
}

.checkout-modal-container h3 {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 24px;
  text-align: center;
}

.checkout-form-group {
  margin-bottom: 16px;
}

.checkout-form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.checkout-input {
  width: 100%;
  height: 48px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 0 16px;
  font-size: 14px;
  outline: none;
  transition: var(--transition);
}

.checkout-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

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

.pay-btn {
  width: 100%;
  height: 52px;
  border: none;
  background-color: var(--text-primary);
  color: var(--bg-primary);
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.pay-btn:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

/* Success Modal Content */
.success-modal-container {
  max-width: 460px;
  padding: 40px 32px;
  text-align: center;
}

.success-icon-wrapper {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background-color: #e6f4ea;
  color: #137333;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  margin: 0 auto 24px auto;
  animation: scale-up 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

body.dark-mode .success-icon-wrapper {
  background-color: #1b3d22;
  color: #81c995;
}

.success-modal-container h3 {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 12px;
}

.success-modal-container p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 24px;
}

.receipt-box {
  background-color: var(--bg-secondary);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 30px;
  border: 1px dashed var(--border-color);
  text-align: left;
}

.receipt-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 8px;
}

.receipt-row:last-child {
  margin-bottom: 0;
  padding-top: 8px;
  border-top: 1px solid var(--border-color);
  font-weight: 700;
}

.receipt-label {
  color: var(--text-light);
}

.receipt-value {
  color: var(--text-primary);
}

.success-btn {
  width: 100%;
  height: 48px;
  border: none;
  background-color: var(--accent);
  color: white;
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: var(--transition);
}

.success-btn:hover {
  background-color: var(--accent-hover);
}

/* Toast Notifications */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #323232;
  color: #f5f5f5;
  padding: 12px 24px;
  border-radius: var(--radius-lg);
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast.fade-out {
  opacity: 0;
  transform: translate(-50%, 10px);
}

/* Keyframes & Animations */
@keyframes scale-up {
  from { transform: scale(0.6); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.animate-fade-in {
  animation: fadeIn 0.5s ease forwards;
}

.animate-fade-in-up {
  animation: fadeInUp 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translate(-50%, 20px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* Site Footer */
.site-footer {
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-secondary);
  padding: 40px 0;
  margin-top: auto;
  text-align: center;
  color: var(--text-light);
  font-size: 13px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 16px;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--accent);
}

/* Responsive adjustements */
@media(max-width: 992px) {
  .hero-title {
    font-size: 38px;
  }
  .header-nav {
    display: none; /* In production: should toggle or show dropdown. Here we keep layout clean or horizontal scrolling */
  }
  /* Show horizontal scrolling categories in mobile instead of tabs in header */
  .category-scroller {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding: 16px 24px;
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    scrollbar-width: none;
  }
  .category-scroller::-webkit-scrollbar {
    display: none;
  }
  .category-scroller .nav-tab {
    white-space: nowrap;
    padding: 8px 16px;
    font-size: 14px;
  }
}

@media(max-width: 480px) {
  .hero-title {
    font-size: 32px;
  }
  .hero-subtitle {
    font-size: 14px;
  }
  .products-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .cart-drawer {
    max-width: 100%;
    right: -100%;
  }
}

/* Payment Tab Navigation */
.payment-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
}

.pay-tab-btn {
  flex: 1;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
}

.pay-tab-btn.active {
  background-color: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
}

.pay-tab-btn:hover:not(.active) {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
}

/* Alipay QR Code styling */
.alipay-qr-wrapper {
  text-align: center;
  padding: 16px;
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  background-color: var(--bg-secondary);
}

.alipay-qr-box {
  width: 140px;
  height: 140px;
  margin: 0 auto 16px auto;
  border: 2px solid #00a0e9; /* Alipay Blue */
  background-color: white;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px;
  box-shadow: var(--shadow-sm);
}

.alipay-qr-box .qr-icon {
  font-size: 48px;
  color: #00a0e9;
  margin-bottom: 8px;
}

.qr-placeholder-text {
  font-size: 10px;
  font-weight: 700;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.alipay-rate-note {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 4px 10px;
  margin: 10px 0 6px;
}

.alipay-instruction {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.alipay-pay-btn {
  background-color: #00a0e9 !important;
  color: white !important;
}

.alipay-pay-btn:hover {
  background-color: #008cd1 !important;
}

/* Step 2 Customer Receipt styling */
.step-header {
  text-align: center;
  margin-bottom: 24px;
}

.step-success-icon {
  font-size: 48px;
  color: #34a853; /* Google Green */
  margin-bottom: 12px;
}

.step-header h4 {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.step-header p {
  font-size: 13px;
  color: var(--text-secondary);
  max-width: 320px;
  margin: 0 auto;
}

.complete-order-btn {
  background-color: #34a853 !important;
  color: white !important;
}

.complete-order-btn:hover {
  background-color: #2b8c47 !important;
}

/* Info Modal Split Layout */
.info-modal-container {
  max-width: 760px;
  width: calc(100% - 32px);
  min-height: 400px;
}

.info-layout {
  display: flex;
  flex-direction: column;
}

@media(min-width: 600px) {
  .info-layout {
    flex-direction: row;
    min-height: 400px;
  }
}

.info-sidebar {
  flex: 1;
  background-color: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  padding: 24px 16px;
  display: flex;
  flex-direction: row;
  overflow-x: auto;
  gap: 8px;
}

@media(min-width: 600px) {
  .info-sidebar {
    flex-direction: column;
    overflow-x: visible;
    padding: 32px 24px;
    max-width: 220px;
  }
}

.info-tab-btn {
  background: none;
  border: none;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 14px;
  color: var(--text-secondary);
  text-align: left;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

.info-tab-btn.active {
  background-color: var(--accent-light);
  color: var(--accent);
}

.info-tab-btn:hover:not(.active) {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
}

.info-content-area {
  flex: 2.2;
  padding: 32px;
  display: flex;
  flex-direction: column;
}

.info-content-title {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 20px;
}

.info-body-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  text-align: left;
}

.info-body-text ol, .info-body-text ul {
  padding-left: 20px;
  margin-top: 10px;
}

.info-body-text li {
  margin-bottom: 12px;
}

/* V3 Payment Integrations & Accessibility Extensions */
.alipay-qr-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.paypal-qr-wrapper {
  text-align: center;
  padding: 20px 16px;
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  background-color: var(--bg-secondary);
}

.paypal-instruction {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

/* Keyboard Accessibility Focus Styles */
.nav-tab:focus-visible,
.action-btn:focus-visible,
button:focus-visible,
.card-img-wrapper:focus-visible,
.card-title-btn:focus-visible,
.checkout-input:focus-visible,
a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Make card titles using buttons focusable and clean */
.card-title-btn {
  background: none;
  border: none;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  padding: 0;
  text-align: left;
  transition: var(--transition);
  display: block;
  width: 100%;
}

.card-title-btn:hover {
  color: var(--accent);
}

/* V5 Utility and Accessibility Classes */
.hidden {
  display: none !important;
}

.fa-alipay-btn-icon {
  font-size: 24px;
  line-height: 0;
}

#paypal-button-container {
  margin-top: 15px;
}

/* ===== V12: PayPal resilient-loader states (spinner + graceful fallback) ===== */
.paypal-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 26px 12px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
}

.paypal-spinner {
  width: 34px;
  height: 34px;
  border: 3px solid var(--border-color);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: paypal-spin 0.8s linear infinite;
}

@keyframes paypal-spin {
  to { transform: rotate(360deg); }
}

/* V15: virtual-goods no-refund notice in the checkout payment step */
.checkout-norefund-note {
  margin: 0 0 14px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
}

.checkout-norefund-note i {
  color: var(--accent);
  margin-right: 6px;
}

/* V14: inline retry panel — payment done but order submission failed */
.order-retry-panel {
  margin-top: 14px;
  padding: 14px;
  text-align: center;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
}

.order-retry-panel p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  line-height: 1.55;
}

.paypal-fallback {
  text-align: center;
  padding: 20px 14px;
}

.paypal-fallback-icon {
  font-size: 26px;
  color: #fbbc04;
  margin-bottom: 10px;
}

.paypal-fallback-title {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.paypal-fallback-text {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.55;
}

.paypal-fallback-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.paypal-btn-primary,
.paypal-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: var(--radius-sm);
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.paypal-btn-primary {
  border: none;
  background: var(--accent);
  color: #fff;
}

.paypal-btn-primary:hover {
  filter: brightness(1.06);
}

.paypal-btn-secondary {
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-primary);
}

.paypal-btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

#alipay-form {
  display: block;
}

#paypal-form {
  display: none;
}

#checkout-step-receipt {
  display: none;
}

/* Dynamic HTML replacements */
.text-danger {
  color: #ea4335 !important;
}

.text-center {
  text-align: center !important;
}

.list-style-none {
  list-style: none !important;
}

.pl-0 {
  padding-left: 0 !important;
}

.mt-15 {
  margin-top: 15px !important;
}

.mb-10 {
  margin-bottom: 10px !important;
}

.mr-8 {
  margin-right: 8px !important;
}

.text-accent {
  color: var(--accent) !important;
}

/* Alipay Pending Review Modal */
.pending-icon-wrapper {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background-color: #fef7e0;
  color: #b06000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  margin: 0 auto 24px auto;
  animation: scale-up 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

body.dark-mode .pending-icon-wrapper {
  background-color: #3e2723;
  color: #fb8c00;
}

/* Prefers Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}


