@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Sarabun:wght@300;400;500;600;700&display=swap');

:root {
  /* Premium Light Theme - Clean Medical Teal & Sky Blue */
  --bg-primary: #ffffff;         /* Pure white main background */
  --bg-secondary: #f8fafc;       /* Off-white background for cards/panels (Slate-50) */
  --bg-tertiary: #f1f5f9;        /* Light gray for borders/hovers (Slate-100) */
  --bg-dark-accent: #0f172a;     /* Deep slate for dark headers or simulator */
  
  --accent-teal: #0d9488;        /* Teal primary medical color */
  --accent-cyan: #0284c7;        /* Medical sky blue secondary */
  --accent-glow: rgba(13, 148, 136, 0.08);
  
  --text-primary: #0f172a;       /* Dark slate for crisp text */
  --text-secondary: #475569;     /* Slate-600 for descriptions */
  --text-muted: #94a3b8;         /* Slate-400 for placeholders/labels */
  --border-color: #e2e8f0;       /* Slate-200 for clean subtle borders */
  
  --success: #10b981;            /* Emerald-500 */
  --warning: #f59e0b;            /* Amber-500 */
  --error: #ef4444;              /* Red-500 */
  
  /* Layout Dimensions */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --header-height: 80px;
  --max-width: 1400px;
  
  /* Fonts */
  --font-heading: 'Outfit', 'Sarabun', sans-serif;
  --font-body: 'Sarabun', 'Outfit', sans-serif;
  
  /* Transitions */
  --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-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset and Global Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
}

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

a:hover {
  color: var(--accent-teal);
}

button, input, textarea, select {
  font-family: var(--font-body);
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}
::-webkit-scrollbar-thumb {
  background: var(--text-muted);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-teal);
}

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

.section-padding {
  padding: 80px 0;
}

.text-gradient {
  background: linear-gradient(135deg, var(--accent-teal), var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.glow-hover {
  transition: var(--transition-normal);
}
.glow-hover:hover {
  box-shadow: 0 8px 25px var(--accent-glow);
  border-color: var(--accent-teal);
}

/* Glassmorphism utility - Light premium style */
.glass-panel {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 8px 32px 0 rgba(148, 163, 184, 0.15);
}

/* Header & Navigation */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  z-index: 1000;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

header.shrunk {
  height: 64px;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.05);
  border-bottom: 1px solid rgba(15, 23, 42, 0.05);
}

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

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.logo-icon {
  font-size: 24px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-teal));
  padding: 6px;
  border-radius: var(--radius-sm);
  line-height: 1;
  color: white;
}

.brand-logo-img {
  height: 40px;
  width: auto;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

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

.brand-title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: var(--text-primary);
}

.brand-subtitle {
  font-size: 11px;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 15px;
  position: relative;
  padding: 8px 0;
  transition: var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
  color: var(--accent-teal);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2.5px;
  background: linear-gradient(90deg, var(--accent-teal), var(--accent-cyan));
  transition: var(--transition-normal);
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.admin-link {
  color: #6366f1; /* Indigo for admin link on light theme */
}
.admin-link:hover, .admin-link.active {
  color: #4f46e5;
}
.admin-link::after {
  background: linear-gradient(90deg, #6366f1, #4f46e5);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.cart-btn {
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  transition: var(--transition-fast);
  color: var(--text-primary);
}

.cart-btn:hover {
  background: var(--bg-tertiary);
  border-color: var(--accent-teal);
}

.cart-icon-wrapper {
  position: relative;
  font-size: 18px;
  line-height: 1;
}

.cart-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background-color: var(--accent-teal);
  color: white;
  font-size: 9px;
  font-weight: 700;
  min-width: 15px;
  height: 15px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  opacity: 0;
  transform: scale(0);
  transition: var(--transition-normal);
}

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

.btn-line-login {
  background-color: #06c755; /* LINE Official Color */
  color: white;
  font-weight: 600;
  font-size: 14px;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(6, 199, 85, 0.2);
  transition: var(--transition-fast);
}

.btn-line-login:hover {
  background-color: #05b04b;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(6, 199, 85, 0.3);
}

.user-profile-menu {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-secondary);
  padding: 4px 12px 4px 4px;
  border-radius: 30px;
  border: 1px solid var(--border-color);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--accent-teal);
}

.user-name {
  font-size: 14px;
  font-weight: 500;
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-primary);
}

.btn-logout {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  padding: 2px;
  transition: var(--transition-fast);
}
.btn-logout:hover {
  transform: scale(1.2);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
}

.menu-toggle .bar {
  width: 25px;
  height: 2.5px;
  background-color: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition-normal);
}

/* Page Layout Wrapper */
main {
  margin-top: var(--header-height);
  min-height: calc(100vh - var(--header-height) - 450px);
}

.page-view {
  display: none;
  animation: fadeIn 0.4s var(--transition-normal) forwards;
}

.page-view.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 15px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: var(--transition-normal);
  text-align: center;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-teal), var(--accent-cyan));
  color: white;
  box-shadow: 0 4px 15px var(--accent-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(13, 148, 136, 0.25);
}

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

.btn-danger {
  background: var(--error);
  color: white;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.15);
}
.btn-danger:hover {
  background: #dc2626;
  transform: translateY(-2px);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
  border-radius: var(--radius-sm);
}

/* Form Styling */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
  font-size: 14px;
}

.form-control {
  width: 100%;
  background-color: var(--bg-secondary);
  border: 1.5px solid var(--border-color);
  color: var(--text-primary);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  transition: var(--transition-normal);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-teal);
  background-color: white;
  box-shadow: 0 0 10px rgba(13, 148, 136, 0.15);
}

.form-control:disabled {
  background-color: var(--bg-tertiary);
  color: var(--text-secondary);
  cursor: not-allowed;
  border-color: var(--border-color);
}

textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

/* Cards & Panels */
.card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: 0 4px 15px rgba(15, 23, 42, 0.04), 0 2px 4px rgba(15, 23, 42, 0.02);
  transition: var(--transition-normal);
}

/* Toast Notification Styling */
#toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.toast {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  min-width: 300px;
  max-width: 450px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
  pointer-events: auto;
  opacity: 0;
  transform: translateY(-20px) scale(0.9);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.toast.hide {
  opacity: 0;
  transform: translateY(-10px) scale(0.9);
}

.toast-success { border-left: 4px solid var(--success); }
.toast-error { border-left: 4px solid var(--error); }
.toast-warning { border-left: 4px solid var(--warning); }
.toast-info { border-left: 4px solid var(--accent-cyan); }

.toast-icon { font-size: 20px; }
.toast-message { font-size: 14px; font-weight: 600; color: var(--text-primary); }

/* --- HOME PAGE STYLE --- */
.hero-section {
  background: linear-gradient(180deg, rgba(13, 148, 136, 0.05) 0%, rgba(255, 255, 255, 0) 100%);
  padding: 80px 0 40px 0;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -20%;
  left: 50%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-glow) 0%, rgba(255, 255, 255, 0) 70%);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 60px;
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

.hero-content h1 {
  font-size: 44px;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.hero-content p {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 30px;
  max-width: 600px;
  line-height: 1.7;
}

.hero-stats {
  display: flex;
  gap: 40px;
  margin-top: 40px;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-num {
  font-size: 36px;
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--accent-teal);
}

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

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

.hero-image-frame {
  width: 100%;
  max-width: 380px;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: 0 15px 35px rgba(15, 23, 42, 0.08);
}

.hero-image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.category-card {
  cursor: pointer;
  background-color: var(--bg-secondary);
  border-color: var(--border-color);
}

.category-card h3 {
  margin-bottom: 10px;
  font-size: 18px;
  color: var(--text-primary);
}

.category-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Section Header */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 40px;
  border-bottom: 1.5px solid var(--bg-tertiary);
  padding-bottom: 16px;
}

.section-header h2 {
  font-size: 28px;
  color: var(--text-primary);
}

.section-header p {
  color: var(--text-secondary);
  font-size: 15px;
  margin-top: 6px;
}

/* --- PRODUCTS GRID & DETAIL --- */
.products-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  padding: 40px 0;
}

.filters-sidebar {
  height: sticky;
  top: 100px;
}

.filter-box {
  margin-bottom: 28px;
}

.filter-title {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-secondary);
  letter-spacing: 1.5px;
  margin-bottom: 16px;
  border-bottom: 1.5px solid var(--border-color);
  padding-bottom: 8px;
}

.category-filter-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 15px;
  text-align: left;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
}

.filter-btn:hover {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
}

.filter-btn.active {
  background-color: var(--bg-tertiary);
  color: var(--accent-teal);
  border-left: 3.5px solid var(--accent-teal);
  font-weight: 600;
  padding-left: 16px;
}

.search-wrapper {
  position: relative;
}

.search-input {
  padding-right: 40px;
  background-color: white;
  border-color: var(--border-color);
}

.search-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

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

.product-card {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: white;
}

.product-img-box {
  width: 100%;
  aspect-ratio: 1/1; /* 1:1 Aspect Ratio constraint */
  background-color: var(--bg-secondary);
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border-color);
}

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

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

.product-cat {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-cyan);
  margin-top: 16px;
}

.product-title {
  font-size: 16px;
  margin: 6px 0;
  font-weight: 600;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 48px;
  line-height: 1.5;
}

.product-price {
  font-size: 18px;
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--accent-teal);
  margin-top: auto;
  padding-top: 8px;
}

.product-stock {
  font-size: 12px;
  color: var(--success);
  margin-top: 4px;
  font-weight: 500;
}

.product-stock.out {
  color: var(--error);
}

/* Product Detail View */
.product-detail-container {
  display: flex;
  flex-direction: column;
  gap: 30px;
  padding: 40px 0;
}

.product-detail-top-grid {
  display: grid;
  grid-template-columns: 65fr 35fr;
  gap: 50px;
}

.detail-description-content {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-secondary);
}

.detail-description-content.plain-content {
  white-space: pre-line;
}

.detail-description-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 20px auto;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.product-gallery-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

/* Responsive layout wrappers */
.product-gallery-desktop {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.product-gallery-mobile {
  display: none;
}

.gallery-main-image-wrapper {
  width: 100%;
  aspect-ratio: 4/5; /* Base frame is vertical rectangular (4:5) */
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
  background-color: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.gallery-main-image-wrapper img {
  width: 100%;
  height: 100%;
  transition: var(--transition-normal);
}

/* 1:1 images are centered inside the frame using object-fit: contain */
.gallery-main-image-wrapper img.ratio-1-1 {
  object-fit: contain;
  padding: 20px; /* Gives some breathing room */
}

/* Portrait images fill the frame using object-fit: cover */
.gallery-main-image-wrapper img.ratio-portrait {
  object-fit: cover;
}

.gallery-thumbnails-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.gallery-thumb-item {
  width: 75px;
  height: 75px;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  overflow: hidden;
  cursor: pointer;
  background-color: var(--bg-secondary);
  transition: var(--transition-fast);
}

.gallery-thumb-item:hover {
  border-color: var(--border-color);
}

.gallery-thumb-item.active {
  border-color: var(--accent-teal);
}

.gallery-thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Mobile-only styles for horizontal swipeable slider */
@media (max-width: 768px) {
  .product-gallery-desktop {
    display: none;
  }
  
  .product-gallery-mobile {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
  }

  .product-gallery-slider {
    display: flex !important;
    flex-direction: row;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 0;
    -webkit-overflow-scrolling: touch;
    width: 100%;
  }
  
  .product-gallery-slider::-webkit-scrollbar {
    display: none; /* Hide scrollbar for cleaner mobile look */
  }
  
  .gallery-image-slide {
    min-width: 100%;
    width: 100%;
    scroll-snap-align: start;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    aspect-ratio: 4/5;
    background-color: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .gallery-image-slide img {
    width: 100%;
    height: 100%;
  }

  .gallery-image-slide img.ratio-1-1 {
    object-fit: contain;
    padding: 15px;
  }

  .gallery-image-slide img.ratio-portrait {
    object-fit: cover;
  }
  
  /* Dots navigation on mobile */
  .gallery-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
  }
  
  .gallery-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--border-color);
    transition: var(--transition-fast);
    cursor: pointer;
  }
  
  .gallery-dot.active {
    background-color: var(--accent-teal);
    transform: scale(1.2);
  }
}

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

.detail-category {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-cyan);
  letter-spacing: 1px;
}

.detail-title {
  font-size: 28px;
  margin: 8px 0 16px 0;
  color: var(--text-primary);
}

.detail-price {
  font-size: 24px;
  font-weight: 700;
  font-family: var(--font-heading);
  color: var(--accent-teal);
  margin-bottom: 24px;
  padding: 12px 20px;
  background: rgba(13, 148, 136, 0.05);
  border-radius: var(--radius-sm);
  border: 1.5px dashed var(--accent-teal);
  display: inline-block;
  align-self: flex-start;
}

.detail-description {
  color: var(--text-secondary);
  font-size: 15px;
  margin-bottom: 30px;
  white-space: pre-line;
  line-height: 1.7;
}

.detail-actions {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 40px;
}

.qty-control {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background-color: var(--bg-secondary);
}

.qty-btn {
  background: none;
  border: none;
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.qty-btn:hover {
  background: var(--bg-tertiary);
}

.qty-val {
  width: 40px;
  text-align: center;
  font-weight: 600;
  font-size: 15px;
}

.specs-section h3 {
  font-size: 18px;
  margin-bottom: 16px;
  border-left: 3.5px solid var(--accent-teal);
  padding-left: 12px;
  color: var(--text-primary);
}

.specs-table {
  width: 100%;
  border-collapse: collapse;
}

.specs-table tr {
  border-bottom: 1px solid var(--border-color);
}

.specs-table tr:last-child {
  border-bottom: none;
}

.specs-table td {
  padding: 12px 8px;
  font-size: 14px;
}

.specs-label {
  font-weight: 600;
  color: var(--text-secondary);
  width: 35%;
}

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

/* --- ARTICLES PAGE --- */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 32px;
}

.article-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: white;
}

.article-img-box {
  width: 100%;
  height: 200px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.article-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-slow);
}

.article-card:hover .article-img-box img {
  transform: scale(1.03);
}

.article-date {
  font-size: 12px;
  color: var(--accent-cyan);
  margin-top: 16px;
  font-weight: 600;
}

.article-title {
  font-size: 18px;
  margin: 8px 0;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
}

.article-excerpt {
  color: var(--text-secondary);
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 16px;
  line-height: 1.6;
}

/* Article detail container */
.article-detail-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 0;
}

.article-header {
  margin-bottom: 30px;
}

.article-header h1 {
  font-size: 32px;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.article-meta {
  font-size: 14px;
  color: var(--text-secondary);
}

.article-banner {
  width: 100%;
  height: 380px;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 40px;
  border: 1px solid var(--border-color);
}

.article-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-body-content {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-secondary);
  white-space: pre-line;
}

/* --- CART & CHECKOUT PAGE --- */
.cart-layout {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 40px;
  padding: 40px 0;
}

.cart-items-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cart-item-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px;
  background-color: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
}

.cart-item-img {
  width: 80px;
  height: 80px;
  aspect-ratio: 1/1;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid var(--border-color);
  background-color: var(--bg-secondary);
}

.cart-item-details {
  flex: 1;
}

.cart-item-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--text-primary);
}

.cart-item-price {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.btn-remove-item {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  padding: 8px;
  transition: var(--transition-fast);
}

.btn-remove-item:hover {
  transform: scale(1.15);
}

.checkout-summary-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 100px;
  height: fit-content;
}

.summary-heading {
  font-size: 18px;
  border-bottom: 1.5px solid var(--border-color);
  padding-bottom: 12px;
  color: var(--text-primary);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 15px;
  margin: 6px 0;
  color: var(--text-secondary);
}

.summary-row.total {
  font-weight: 700;
  color: var(--text-primary);
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
  margin-top: 16px;
  font-size: 18px;
}

.checkout-platform-warning {
  margin-top: 10px;
}

.platform-card {
  padding: 16px;
  border-radius: var(--radius-sm);
  background-color: rgba(2, 132, 199, 0.05);
  border: 1px solid rgba(2, 132, 199, 0.2);
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.platform-card.mobile {
  background-color: rgba(6, 199, 85, 0.05);
  border-color: rgba(6, 199, 85, 0.2);
  color: #15803d;
}

/* --- PROFILE PAGE --- */
.profile-container {
  max-width: 700px;
  margin: 0 auto;
  padding: 40px 0;
}

.profile-card {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.profile-header-area {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.profile-lg-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent-teal);
}

.profile-title-text h3 {
  font-size: 22px;
  color: var(--text-primary);
}

.profile-title-text p {
  color: var(--accent-cyan);
  font-size: 13px;
  font-weight: 600;
}

/* Orders History inside profile */
.orders-history-section {
  margin-top: 40px;
}

.orders-history-section h3 {
  font-size: 20px;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.order-history-card {
  background-color: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.order-history-header {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
  margin-bottom: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

.order-badge {
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.order-badge.pending { background-color: rgba(245, 158, 11, 0.1); color: var(--warning); border: 1px solid rgba(245, 158, 11, 0.2); }
.order-badge.confirmed { background-color: rgba(2, 132, 199, 0.1); color: var(--accent-cyan); border: 1px solid rgba(2, 132, 199, 0.2); }
.order-badge.paid { background-color: rgba(16, 185, 129, 0.1); color: var(--success); border: 1px solid rgba(16, 185, 129, 0.2); }
.order-badge.cancelled { background-color: rgba(239, 68, 68, 0.1); color: var(--error); border: 1px solid rgba(239, 68, 68, 0.2); }
.order-badge.shipped { background-color: rgba(13, 148, 136, 0.1); color: var(--accent-teal); border: 1px solid rgba(13, 148, 136, 0.2); }

.order-history-items {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.order-history-qr-box {
  margin-top: 16px;
  display: flex;
  gap: 20px;
  align-items: center;
  background-color: var(--bg-secondary);
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 1.5px dashed var(--accent-teal);
}

.history-qr-img {
  width: 90px;
  height: 90px;
  border-radius: var(--radius-sm);
  background-color: white;
  padding: 4px;
  border: 1px solid var(--border-color);
}

.history-qr-text {
  flex: 1;
}

.history-qr-text h6 {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 700;
}

.history-qr-text p {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
  line-height: 1.4;
}

/* --- ADMIN BACKEND PORTAL --- */
.admin-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 40px;
  padding: 40px 0;
}

.admin-sidebar {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

.sidebar-group-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-top: 14px;
  margin-bottom: 4px;
  padding-left: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1.5px solid var(--bg-tertiary);
  padding-bottom: 4px;
  user-select: none;
}

.sidebar-group:first-child .sidebar-group-title {
  margin-top: 0;
}

.admin-tab-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  text-align: left;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
}

.admin-tab-btn:hover {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
}

.admin-tab-btn.active {
  background-color: var(--bg-tertiary);
  color: var(--accent-teal);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--accent-teal);
  padding-left: 16px;
}

.admin-content {
  background-color: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 30px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.02);
}

.admin-content-section {
  display: none;
}

.admin-content-section.active {
  display: block;
}

/* Orders Table */
.admin-table-wrapper {
  overflow-x: auto;
  margin-top: 20px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}

.admin-table th {
  background-color: var(--bg-secondary);
  padding: 14px 16px;
  font-weight: 700;
  color: var(--text-primary);
  border-bottom: 2px solid var(--border-color);
}

.admin-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.admin-table tr:hover td {
  background-color: var(--bg-secondary);
}

/* Dynamic Image Uploader & Organizer - 1:1 Aspect Ratio constraint */
.image-uploader-container {
  background-color: var(--bg-secondary);
  border: 1.5px dashed var(--border-color);
  border-radius: var(--radius-sm);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-normal);
  margin-bottom: 16px;
}

.image-uploader-container:hover {
  border-color: var(--accent-teal);
  background-color: rgba(13, 148, 136, 0.02);
}

.uploader-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.image-organizer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.organizer-item {
  aspect-ratio: 1/1; /* Forced 1:1 layout display */
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-color);
  position: relative;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

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

.organizer-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(15, 23, 42, 0.85);
  display: flex;
  justify-content: space-around;
  padding: 4px;
  opacity: 0;
  transition: var(--transition-fast);
}

.organizer-item:hover .organizer-controls {
  opacity: 1;
}

.org-btn {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  font-size: 13px;
  padding: 2px 4px;
}

.org-btn:hover {
  color: var(--accent-cyan);
  transform: scale(1.1);
}

/* --- MOCK LINE APP SIMULATOR SCREEN --- */
.simulator-page {
  padding: 40px 0;
}

.simulator-frame {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 40px;
  align-items: start;
}

.iphone-frame {
  width: 380px;
  height: 760px;
  background-color: #1e293b;
  border-radius: 40px;
  padding: 12px;
  border: 6px solid #475569;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.3);
  position: relative;
  display: flex;
  flex-direction: column;
}

.iphone-screen {
  background-color: #ededed; /* Typical LINE chat background color */
  border-radius: 30px;
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  color: #333333;
}

/* Simulated LINE Chat UI */
.line-chat-header {
  background-color: #242930;
  color: white;
  padding: 16px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: bold;
  font-size: 15px;
}

.line-chat-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: var(--accent-teal);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.line-chat-avatar-img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.line-chat-title-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.line-chat-title-info span:last-child {
  font-size: 9px;
  color: #94a3b8;
}

.line-chat-body {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.chat-bubble-wrapper {
  display: flex;
  flex-direction: column;
  max-width: 80%;
}

.chat-bubble-wrapper.user {
  align-self: flex-end;
  align-items: flex-end;
}

.chat-bubble-wrapper.bot {
  align-self: flex-start;
  align-items: flex-start;
}

.chat-bubble-time {
  font-size: 9px;
  color: #999999;
  margin-top: 3px;
}

.chat-bubble-text {
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 13px;
  line-height: 1.5;
  word-break: break-all;
}

.user .chat-bubble-text {
  background-color: #78e08f;
  color: black;
  border-top-right-radius: 2px;
}

.bot .chat-bubble-text {
  background-color: white;
  color: black;
  border-top-left-radius: 2px;
  box-shadow: 0 1.5px 3px rgba(0,0,0,0.1);
}

/* Render native-like Flex Message inside Simulator Chat */
.chat-flex-bubble {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  background: white;
  display: flex;
  flex-direction: column;
  width: 270px;
  font-size: 12px;
  color: #333333;
}

.flex-header {
  background-color: #0f172a;
  color: white;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.flex-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.flex-item-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
}

.flex-total-row {
  display: flex;
  justify-content: space-between;
  font-weight: bold;
  border-top: 1px solid #eeeeee;
  padding-top: 8px;
  margin-top: 4px;
}

.flex-user-box {
  background-color: #f8fafc;
  border-radius: 8px;
  padding: 8px;
  margin-top: 4px;
}

.flex-hero-qr {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-bottom: 1px solid #eeeeee;
  background-color: white;
}

.flex-footer {
  padding: 8px 12px 12px 12px;
}

.flex-btn {
  background-color: #0d9488;
  color: white;
  text-align: center;
  padding: 8px;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  transition: var(--transition-fast);
}

.flex-btn:hover {
  background-color: #0f766e;
}

.line-chat-footer {
  background-color: white;
  border-top: 1px solid #e2e8f0;
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.line-input-control {
  flex: 1;
  border: 1px solid #cbd5e1;
  padding: 8px 12px;
  border-radius: 20px;
  font-size: 13px;
  background-color: #f8fafc;
}

.line-input-control:focus {
  outline: none;
  border-color: #06c755;
  background-color: white;
}

.btn-line-send {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  color: #06c755;
  padding: 4px;
}

.line-menu-bar {
  background-color: #f1f5f9;
  border-top: 1px solid #cbd5e1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 4px 0;
  height: 60px;
}

.line-menu-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
}

.line-menu-item:hover {
  color: #06c755;
}

.line-menu-icon {
  font-size: 18px;
  margin-bottom: 2px;
}

/* LIFF Simulated WebView Modal Container */
.liff-webview-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--bg-primary);
  z-index: 2000;
  display: none;
  flex-direction: column;
  border-radius: 30px;
  overflow: hidden;
}

.liff-webview-overlay.active {
  display: flex;
}

.liff-webview-header {
  background-color: #0f172a;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #1e293b;
  color: white;
  font-size: 12px;
}

.liff-webview-iframe {
  flex: 1;
  border: none;
  width: 100%;
  background-color: var(--bg-primary);
}

/* --- Cookie Consent Panel Styling --- */
/* --- Cookie Consent Panel Styling --- */
.cookie-banner {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1100;
  max-width: 440px;
  width: calc(100vw - 48px);
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12), 0 1px 3px rgba(15, 23, 42, 0.05);
  transform: translateY(150%) scale(0.95);
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.cookie-banner.show {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.cookie-content {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.cookie-icon {
  font-size: 32px;
  line-height: 1;
}

.cookie-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.cookie-text {
  width: 100%;
}

.cookie-text h5 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.cookie-text p {
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0;
}

.cookie-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  justify-content: flex-end;
}

.btn-cookie-accept {
  background: linear-gradient(135deg, var(--accent-teal), #0f766e);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-cookie-accept:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--accent-glow);
}

.btn-cookie-decline {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-cookie-decline:hover {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
}

/* Responsive Cookie Banner for Mobile */
@media (max-width: 768px) {
  .cookie-banner {
    bottom: 0;
    right: 0;
    left: 0;
    max-width: 100%;
    width: 100%;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
    padding: 20px;
    box-shadow: 0 -4px 25px rgba(15, 23, 42, 0.15);
    transform: translateY(100%) scale(1);
  }

  .cookie-banner.show {
    transform: translateY(0) scale(1);
  }

  .cookie-content {
    gap: 12px;
  }

  .cookie-icon {
    font-size: 28px;
  }

  .cookie-actions {
    width: 100%;
    margin-top: 16px;
    justify-content: stretch;
  }

  .btn-cookie-accept, .btn-cookie-decline {
    flex: 1;
    text-align: center;
    padding: 10px 14px;
    font-size: 13px;
    display: inline-block;
  }
}

/* Modals Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-normal);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  width: 100%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  transform: translateY(30px);
  transition: var(--transition-normal);
}

.modal-overlay.active .modal-box {
  transform: translateY(0);
}

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

.modal-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
}

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

.modal-body h4 {
  margin: 16px 0 8px 0;
  color: var(--text-primary);
}

/* Spec Creator tags for admin */
.specs-creator-row {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.specs-creator-row input {
  flex: 1;
}

/* --- FOOTER DESIGN SYSTEM --- */
footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 60px 0 30px 0;
  color: var(--text-secondary);
  margin-top: 80px;
}

.footer-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.2fr;
  gap: 60px;
  margin-bottom: 40px;
}

.footer-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-logo {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 20px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-logo-img {
  height: 32px;
  width: auto;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.footer-logo .logo-emoji {
  font-size: 24px;
}

.footer-desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.contact-info-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  margin-top: 8px;
}

.footer-heading {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

.footer-links-list a {
  color: var(--text-secondary);
  font-size: 14px;
  transition: var(--transition-fast);
}

.footer-links-list a:hover {
  color: var(--accent-teal);
  padding-left: 4px;
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-muted);
}

/* --- RESPONSIVE BREAKPOINTS (320px to 4K) --- */

/* 4K & Ultra-wide Screens (min-width: 2000px) */
@media (min-width: 2000px) {
  :root {
    --max-width: 1800px;
  }
  body { font-size: 18px; }
  .hero-content h1 { font-size: 60px; }
  .products-grid { grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); }
}

/* Desktops and Laptops (max-width: 1200px) */
@media (max-width: 1200px) {
  .hero-grid { gap: 40px; }
  .hero-content h1 { font-size: 40px; }
  .products-layout { gap: 30px; }
  .footer-grid { gap: 40px; }
}

/* Tablets & Small Laptops (max-width: 992px) */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-content p { margin: 0 auto 30px auto; }
  .hero-stats { justify-content: center; }
  .hero-visual { height: 300px; }
  
  .products-layout {
    grid-template-columns: 1fr;
  }
  .filters-sidebar {
    height: auto;
    position: relative;
    top: 0;
  }
  .category-filter-list {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 10px;
  }
  .filter-btn { white-space: nowrap; }
  
  .product-detail-top-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .cart-layout {
    grid-template-columns: 1fr;
  }
  .admin-layout {
    grid-template-columns: 1fr;
  }
  .admin-sidebar {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 20px;
  }
  .admin-tab-btn { white-space: nowrap; }
  
  .simulator-frame {
    grid-template-columns: 1fr;
    justify-items: center;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

/* Mobile Screens (max-width: 768px) */
@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: var(--header-height);
    left: -100%;
    width: 100%;
    height: calc(100vh - var(--header-height));
    background-color: white;
    flex-direction: column;
    padding: 40px 0;
    gap: 24px;
    transition: var(--transition-normal);
    z-index: 999;
    border-top: 1px solid var(--border-color);
  }
  
  .nav-menu.active {
    left: 0;
  }
  
  .menu-toggle {
    display: flex;
  }
  
  .menu-toggle.active .bar:nth-child(1) {
    transform: translateY(8.5px) rotate(45deg);
  }
  .menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
  }
  .menu-toggle.active .bar:nth-child(3) {
    transform: translateY(-8.5px) rotate(-45deg);
  }
  
  .menu-toggle .bar {
    background-color: var(--text-primary);
  }
  
  .user-name { display: none; }
  
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  /* Mobile Header Reordering & Beautification */
  .nav-brand {
    order: 1 !important;
  }
  .nav-actions {
    order: 2 !important;
    margin-left: auto !important;
    margin-right: 15px !important;
  }
  .menu-toggle {
    order: 3 !important;
  }
  .brand-text {
    gap: 0 !important;
  }
  .brand-logo-img {
    height: 32px !important;
    width: auto !important;
  }
  .brand-title {
    font-size: 13px !important;
    letter-spacing: 0.5px !important;
  }
  .brand-subtitle {
    font-size: 8px !important;
  }
  .nav-container {
    padding: 0 12px !important;
  }
  .nav-menu {
    background-color: var(--bg-primary) !important;
  }

  /* Article banner aspect-ratio fix (no squished 1:1) */
  .article-banner {
    height: auto !important;
    aspect-ratio: 16 / 9 !important;
    margin-bottom: 24px !important;
  }

  /* Mobile 2-column Grid for Home Categories and Products */
  .home-categories {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
    margin-top: 20px !important;
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
  }

  /* Compact Cards for mobile */
  .category-grid-card {
    aspect-ratio: 1 / 1 !important;
    border-radius: var(--radius-sm) !important;
  }

  .category-grid-content {
    padding: 12px !important;
  }

  .category-grid-content h3 {
    font-size: 14px !important;
    margin-bottom: 2px !important;
  }

  .category-grid-content p, 
  .category-grid-btn {
    display: none !important; /* Hide long descriptions and hover buttons on mobile */
  }

  .product-card {
    padding: 8px !important;
    border-radius: var(--radius-sm) !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    background: white !important;
    border: 1px solid var(--border-color) !important;
  }

  .product-img-box {
    width: 100% !important;
    height: 0 !important;
    padding-top: 100% !important;
    position: relative !important;
    overflow: hidden !important;
    border-radius: 6px !important;
  }

  .product-img-box img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }

  .product-cat {
    font-size: 9px !important;
    margin-top: 8px !important;
  }

  .product-title {
    font-size: 13px !important;
    margin: 4px 0 !important;
    min-height: 36px !important;
    -webkit-line-clamp: 2 !important;
    line-height: 1.3 !important;
  }

  .product-price {
    font-size: 14px !important;
    padding-top: 4px !important;
  }

  .product-stock {
    font-size: 10px !important;
    margin-top: 2px !important;
  }

  /* Admin Dashboard KPI grid for mobile */
  #admin-dashboard > div[style*="display:grid"] {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    margin-bottom: 16px !important;
  }

  #admin-dashboard .card {
    padding: 12px !important;
  }

  #admin-dashboard .card div[style*="font-size:20px"] {
    font-size: 16px !important;
    margin-top: 4px !important;
  }

  #admin-dashboard .card div[style*="font-size:12px"] {
    font-size: 11px !important;
  }

  #admin-dashboard .card div[style*="font-size:10px"] {
    font-size: 9px !important;
  }

  /* Admin Dashboard tables & forms mobile adaptation */
  #admin-dashboard div[style*="grid-template-columns:1.2fr 0.8fr"] {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  .admin-table-wrapper {
    overflow-x: auto !important;
    margin: 0 -12px !important;
    padding: 0 12px !important;
    -webkit-overflow-scrolling: touch;
  }

  .admin-table {
    min-width: 500px; /* Ensure table remains readable through horizontal scroll */
  }

  .dashboard-filter-bar {
    width: 100% !important;
    justify-content: space-between !important;
  }
}

/* Small Devices / Tiny Phones (max-width: 480px) */
@media (max-width: 480px) {
  :root {
    --header-height: 70px;
  }
  body { font-size: 14px; }
  .container { padding: 0 16px; }
  
  .hero-content h1 { font-size: 30px; }
  .hero-stats { gap: 20px; }
  .stat-num { font-size: 26px; }
  
  .product-title { font-size: 12px !important; min-height: 32px !important; line-height: 1.3 !important; }
  .product-price { font-size: 13px !important; }
  
  .detail-title { font-size: 22px; }
  .detail-price { font-size: 20px; width: 100%; text-align: center; }
  
  .cart-item-card {
    flex-direction: column;
    align-items: flex-start;
    position: relative;
  }
  .cart-item-img { width: 100%; height: 160px; }
  .btn-remove-item {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    border: 1px solid var(--border-color);
  }
  
  .profile-header-area {
    flex-direction: column;
    text-align: center;
  }
  
  .iphone-frame {
    width: 100%;
    height: 700px;
  }
}

/* ==================== PREMIUM CATEGORY 1:1 IMAGE GRID ==================== */
.category-grid-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background-size: cover;
  background-position: center;
  cursor: pointer;
  transition: var(--transition-normal);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: flex-end;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.03);
}

.category-grid-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.15);
  border-color: var(--accent-teal);
}

.category-grid-content {
  padding: 24px;
  width: 100%;
  color: white;
  z-index: 2;
  transition: var(--transition-normal);
}

.category-grid-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(15, 23, 42, 0) 40%, rgba(15, 23, 42, 0.85) 100%);
  z-index: 1;
  transition: var(--transition-normal);
}

.category-grid-card:hover::before {
  background: linear-gradient(to bottom, rgba(15, 23, 42, 0.1) 20%, rgba(15, 23, 42, 0.95) 100%);
}

.category-grid-content h3 {
  font-size: 20px;
  font-weight: 700;
  color: white;
  margin-bottom: 8px;
  transform: translateY(0);
  transition: var(--transition-normal);
}

.category-grid-content p {
  font-size: 13px;
  opacity: 0;
  height: 0;
  overflow: hidden;
  transition: var(--transition-normal);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
}

.category-grid-card:hover .category-grid-content p {
  opacity: 0.95;
  height: auto;
  margin-bottom: 12px;
}

.category-grid-btn {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-teal);
  background-color: white;
  padding: 6px 16px;
  border-radius: 20px;
  display: inline-block;
  opacity: 0;
  transform: translateY(10px);
  transition: var(--transition-normal);
}

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

/* Adjust homepage categories spacing to grid spacing */
.home-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-top: 30px;
}

/* Category Slider Custom Styling */
.category-slider-wrapper {
  position: relative;
  width: 100%;
  margin-top: 30px;
  padding: 10px 0;
}

.home-categories-slider {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE 10+ */
  padding: 10px 4px;
  cursor: grab;
  user-select: none;
}

.home-categories-slider::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.home-categories-slider:active {
  cursor: grabbing;
}

.home-categories-slider .category-grid-card {
  flex: 0 0 280px; /* fixed width for category card inside the slider */
  aspect-ratio: 1 / 1;
}

.cat-slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--text-primary);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.cat-slider-arrow:hover {
  background: var(--accent-teal);
  border-color: var(--accent-teal);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(13, 148, 136, 0.25);
  transform: translateY(-50%) scale(1.08);
}

.cat-slider-arrow.prev-arrow {
  left: -20px;
}

.cat-slider-arrow.next-arrow {
  right: -20px;
}

@media (max-width: 768px) {
  .cat-slider-arrow {
    display: none; /* hide arrows on touch mobile screens, use native swipe */
  }
  .category-slider-wrapper {
    padding-left: 0;
    padding-right: 0;
  }
  .home-categories-slider {
    gap: 16px;
    padding: 10px 16px;
    margin: 0 -16px; /* bleed edges */
  }
  .home-categories-slider .category-grid-card {
    flex: 0 0 220px; /* slightly smaller cards on mobile */
  }
}

/* ==================== GALLERY SELECTOR STYLES ==================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 12px;
  max-height: 380px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
}

.gallery-item {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #fff;
}

.gallery-item:hover {
  transform: scale(1.05);
  border-color: var(--accent-teal);
}

.gallery-item.selected {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.4);
}

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-item-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 0;
  color: var(--text-secondary);
  font-size: 13px;
}

/* ==================== PREMIUM MEMBERSHIP CARD STYLES ==================== */
.crm-membership-card {
  position: relative;
  border-radius: 16px;
  padding: 24px;
  color: white;
  background: linear-gradient(135deg, #a87c53 0%, #8c5d33 100%); /* Default Bronze */
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15), 0 1px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  margin-bottom: 15px;
}

/* Luxury Metallic Glow Effects based on Tier (Dynamic styles added via JS) */
.crm-membership-card.silver-tier {
  box-shadow: 0 10px 30px rgba(189, 195, 199, 0.25), 0 0 15px rgba(189, 195, 199, 0.15);
}
.crm-membership-card.gold-tier {
  box-shadow: 0 10px 30px rgba(243, 156, 18, 0.3), 0 0 20px rgba(243, 156, 18, 0.2);
}
.crm-membership-card.platinum-tier {
  box-shadow: 0 10px 35px rgba(48, 207, 208, 0.35), 0 0 25px rgba(48, 207, 208, 0.25);
  border: 1px solid rgba(48, 207, 208, 0.3);
}

.card-glass-shine {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.15) 0%,
    rgba(255, 255, 255, 0.05) 50%,
    rgba(255, 255, 255, 0) 50.1%,
    rgba(255, 255, 255, 0) 100%
  );
  pointer-events: none;
}

.crm-membership-card::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.1) 30%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0.1) 70%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(30deg) translate(-100%, -100%);
  transition: transform 1s ease;
  pointer-events: none;
}

.crm-membership-card:hover::after {
  transform: rotate(30deg) translate(100%, 100%);
}

.card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.card-logo {
  font-weight: 900;
  font-size: 18px;
  letter-spacing: 1.5px;
  color: white;
}
.card-logo span {
  color: rgba(255,255,255,0.7);
}

.card-tier-badge {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.card-body-row {
  margin-bottom: 24px;
}

.card-user-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-avatar-control {
  padding: 2px 6px;
  font-size: 9px;
  font-weight: 700;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.15);
  color: white;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: all 0.2s;
}
.btn-avatar-control:hover {
  background: rgba(255, 255, 255, 0.3);
}

.card-name-area h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.5px;
}
.card-name-area p {
  margin: 4px 0 0 0;
  font-size: 12px;
  opacity: 0.9;
}

.card-footer-row {
  display: flex;
  gap: 24px;
  margin-bottom: 15px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.2);
  padding-bottom: 15px;
}

.card-stat {
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.8;
}

.stat-value {
  font-size: 18px;
  font-weight: 800;
  margin-top: 2px;
}

/* Progress bar styles on card */
.card-progress-container {
  background: rgba(0, 0, 0, 0.15);
  padding: 12px;
  border-radius: 8px;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.card-progress-bar-bg {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  overflow: hidden;
}

.card-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #06b6d4 0%, #34d399 100%);
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.5);
  border-radius: 3px;
  transition: width 0.8s ease-in-out;
}

/* Privileges card box */
.crm-privileges-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
  margin-top: -5px;
  margin-bottom: 20px;
}

.crm-privileges-card h5 {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 6px;
}

.crm-privileges-card ul {
  padding-left: 20px;
  margin-top: 8px;
}

.crm-privileges-card li {
  margin-bottom: 6px;
  font-size: 12px;
  color: #475569;
}


/* ========================================
   Product Form - Responsive 2-Column Grid 
   ======================================== */
.product-form-columns {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.product-form-column-left,
.product-form-column-right {
  min-width: 0; /* prevent grid blowout */
}

/* Desktop: side-by-side layout */
@media (min-width: 992px) {
  .product-form-columns {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 30px;
    align-items: start;
  }

  .product-form-column-left {
    border-right: 1.5px solid var(--border-color);
    padding-right: 28px;
  }
}

/* Price Row - 3 inputs side-by-side */
.product-price-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin-top: 6px;
}

.product-price-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.product-price-field .form-control {
  font-size: 14px;
}

.price-field-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* On small screens, stack the price fields */
@media (max-width: 600px) {
  .product-price-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

/* --- Article Comments & Q&A Thread Styles --- */
.comment-admin-badge {
  font-size: 10px;
  padding: 2px 6px;
  background-color: var(--accent-teal);
  color: white;
  border-radius: 4px;
  font-weight: bold;
  display: inline-block;
  vertical-align: middle;
}

.comment-card {
  transition: var(--transition-fast);
}

.comment-card:hover {
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

.replies-wrapper {
  margin-top: -5px;
  margin-bottom: 15px;
}

.notification-item {
  transition: var(--transition-fast);
}

.notification-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.05);
}

/* --- Article Product Card Widget --- */
.article-product-card-widget {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 20px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 250, 252, 0.95) 100%);
  border: 1px dashed var(--accent-teal);
  border-radius: var(--radius-md);
  padding: 16px;
  margin: 24px 0;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  overflow: hidden;
  max-width: 650px;
}

.article-product-card-widget:hover {
  transform: translateY(-2px);
  border-style: solid;
  border-color: var(--accent-teal);
  box-shadow: var(--shadow-md), 0 0 15px rgba(13, 148, 136, 0.1);
}

.article-product-card-widget .widget-image {
  width: 120px;
  height: 120px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: white;
}

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

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

.article-product-card-widget .widget-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.article-product-card-widget .widget-cat {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-teal);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.article-product-card-widget .widget-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.3;
}

.article-product-card-widget .widget-price {
  font-size: 18px;
  font-weight: 800;
  color: var(--accent-cyan);
}

.article-product-card-widget .widget-btn {
  align-self: flex-start;
  font-size: 13px;
  font-weight: 600;
  color: white;
  background-color: var(--accent-teal);
  padding: 6px 16px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all var(--transition-fast);
  box-shadow: 0 2px 4px rgba(13, 148, 136, 0.2);
}

.article-product-card-widget .widget-btn:hover {
  background-color: var(--accent-cyan);
  box-shadow: 0 4px 8px rgba(6, 182, 212, 0.3);
}

/* Mobile responsive for widget */
@media (max-width: 576px) {
  .article-product-card-widget {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    gap: 12px;
  }
  
  .article-product-card-widget .widget-image {
    width: 100%;
    height: 180px;
  }
  
  .article-product-card-widget .widget-btn {
    align-self: center;
    width: 100%;
    text-align: center;
  }
}

/* ==================== GLOBAL LOADING OVERLAY ==================== */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999;
  transition: opacity var(--transition-fast) ease;
}

.loading-spinner-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 30px 40px;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  max-width: 90%;
  text-align: center;
}

.loading-spinner-card p {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 16px;
  margin: 0;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--border-color);
  border-top-color: var(--accent-teal);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* ==================== MOBILE LAYOUT & SCROLL FIXES ==================== */
@media (max-width: 992px) {
  .products-layout {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
    padding: 20px 0 !important;
    min-width: 0;
    overflow: hidden;
  }
  .filters-sidebar {
    height: auto !important;
    position: relative !important;
    top: 0 !important;
    min-width: 0;
    overflow: hidden;
  }
  .category-filter-list {
    display: flex !important;
    flex-direction: row !important;
    gap: 8px !important;
    overflow-x: auto !important;
    padding: 4px 0 12px 0 !important;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE 10+ */
    min-width: 0;
  }
  .category-filter-list::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
  }
  .filter-btn {
    white-space: nowrap !important;
    padding: 8px 16px !important;
    border-radius: 30px !important;
    border: 1px solid var(--border-color) !important;
    background-color: var(--bg-secondary) !important;
    font-size: 13px !important;
    text-align: center !important;
    transition: all var(--transition-fast) !important;
    border-left: 1px solid var(--border-color) !important;
  }
  .filter-btn:hover {
    border-color: var(--accent-teal) !important;
    background-color: var(--bg-tertiary) !important;
  }
  .filter-btn.active {
    background-color: var(--accent-teal) !important;
    color: white !important;
    border-color: var(--accent-teal) !important;
    border-left: 1px solid var(--accent-teal) !important;
    padding-left: 16px !important;
    font-weight: 600 !important;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 16px !important;
  }
}

/* --- HERO CAROUSEL / SLIDER --- */
.hero-slider-inner {
  position: relative;
  width: 100%;
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease-in-out, transform 0.8s ease-in-out;
  transform: translateY(15px);
  z-index: 1;
}

.hero-slide.active {
  position: relative; /* Take up height layout dynamically */
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  z-index: 2;
}

/* Indicators styling */
.hero-indicators {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-color);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
}

.hero-dot:hover {
  background: var(--text-secondary);
}

.hero-dot.active {
  background: var(--accent-teal);
  transform: scale(1.25);
  box-shadow: 0 0 6px var(--accent-teal);
}

/* Slide Content Spacing adjustments */
.hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Admin Device Simulator styling */
.simulator-container {
  margin-top: 15px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.4);
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.simulator-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
}

.simulator-controls {
  display: flex;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  padding: 4px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.simulator-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border-radius: var(--radius-xs);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.simulator-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.simulator-btn.active {
  background: var(--accent-teal);
  color: #ffffff;
}

.simulator-viewport-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 10px 0;
  background: rgba(0,0,0,0.2);
  border-radius: var(--radius-sm);
  min-height: 350px;
}

.simulator-viewport {
  width: 100%;
  max-width: 100%;
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  border: 8px solid #334155; /* device bezel */
  position: relative;
  transition: width 0.4s ease, height 0.4s ease;
}

.simulator-viewport.device-desktop {
  width: 100%;
  min-height: auto;
}

.simulator-viewport.device-tablet {
  width: 768px;
  height: 500px;
  overflow-y: auto;
}

.simulator-viewport.device-mobile {
  width: 375px;
  height: 550px;
  overflow-y: auto;
}

/* Device screen size overrides within the simulator view */
.simulator-viewport.device-mobile .hero-grid {
  grid-template-columns: 1fr !important;
  gap: 20px !important;
  text-align: center !important;
  padding: 20px 16px !important;
}

.simulator-viewport.device-mobile .hero-content h1 {
  font-size: 26px !important;
}

.simulator-viewport.device-mobile .hero-content p {
  font-size: 14px !important;
  margin: 0 auto 15px auto !important;
}

.simulator-viewport.device-mobile .hero-stats {
  display: none !important;
}

.simulator-viewport.device-mobile .hero-visual {
  height: 180px !important;
}

.simulator-viewport.device-mobile .detail-actions {
  justify-content: center !important;
}

.simulator-viewport.device-tablet .hero-grid {
  grid-template-columns: 1fr !important;
  gap: 30px !important;
  text-align: center !important;
  padding: 30px 24px !important;
}

.simulator-viewport.device-tablet .hero-content h1 {
  font-size: 32px !important;
}

.simulator-viewport.device-tablet .hero-content p {
  font-size: 16px !important;
  margin: 0 auto 20px auto !important;
}

.simulator-viewport.device-tablet .hero-visual {
  height: 220px !important;
}

.simulator-viewport.device-tablet .detail-actions {
  justify-content: center !important;
}

/* Admin slides management UI list styling */
.admin-slide-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 15px;
  position: relative;
  transition: border-color var(--transition-fast);
}

.admin-slide-card.active {
  border-color: var(--accent-teal);
  box-shadow: 0 0 8px rgba(13, 148, 136, 0.15);
}

.admin-slide-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
}

.admin-slide-title-lbl {
  font-weight: 700;
  color: var(--accent-teal);
  font-size: 14px;
}

/* ============================================
   ADMIN SETTINGS SUB-TABS (Pill Navigation)
   ============================================ */
.admin-settings-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 24px;
  padding: 4px;
  background: var(--bg-card);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  flex-wrap: wrap;
}

.admin-settings-tabs .tab-pill {
  flex: 1;
  min-width: 140px;
  padding: 10px 16px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.25s ease;
  text-align: center;
  white-space: nowrap;
}

.admin-settings-tabs .tab-pill:hover {
  background: rgba(var(--accent-teal-rgb, 0,200,150), 0.08);
  color: var(--text-primary);
}

.admin-settings-tabs .tab-pill.active {
  background: var(--accent-teal);
  color: #fff;
  box-shadow: 0 2px 8px rgba(var(--accent-teal-rgb, 0,200,150), 0.35);
}

.settings-tab-panel {
  display: none;
}

.settings-tab-panel.active {
  display: block;
  animation: fadeSlideIn 0.3s ease;
}

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   HERO GRID LAYOUT-LEFT (Image on Left side)
   ============================================ */
.hero-grid.layout-left {
  direction: rtl;
}

.hero-grid.layout-left > * {
  direction: ltr;
}

/* ============================================
   SLIDE EDITOR ADVANCED FIELDS
   ============================================ */
.slide-advanced-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-color);
}

.slide-advanced-fields label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 3px;
  display: block;
}

.slide-advanced-fields select,
.slide-advanced-fields input {
  width: 100%;
  padding: 6px 8px;
  font-size: 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--bg-main);
  color: var(--text-primary);
}

.slide-advanced-fields .field-group {
  display: flex;
  flex-direction: column;
}

/* Autoplay speed input */
.autoplay-speed-control {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
}

.autoplay-speed-control label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}

.autoplay-speed-control input[type="number"] {
  width: 80px;
  padding: 6px 10px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--bg-main);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

.autoplay-speed-control .speed-unit {
  font-size: 12px;
  color: var(--text-secondary);
}

@media (max-width: 768px) {
  .admin-settings-tabs {
    flex-direction: column;
  }
  .admin-settings-tabs .tab-pill {
    min-width: auto;
  }
  .slide-advanced-fields {
    grid-template-columns: 1fr;
  }
}

/* Scroll-triggered Fade-up animations */
.fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Feature card styles & micro-animations */
.feature-card {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, border-color 0.3s ease !important;
}

.feature-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: var(--accent-teal) !important;
  box-shadow: 0 15px 35px rgba(13, 148, 136, 0.1) !important;
}

.feature-card .feature-icon {
  transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon {
  transform: scale(1.18) rotate(3deg);
}

/* Glassmorphic header shrinking adjustments */
header.shrunk {
  height: 64px;
  background: rgba(255, 255, 255, 0.85); /* Premium light frosted glassmorphism */
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px 0 rgba(148, 163, 184, 0.08);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

header.shrunk .nav-container {
  padding: 0 24px;
}

header.shrunk .brand-logo-img {
  height: 36px;
}

header.shrunk .brand-title {
  font-size: 16px;
}

header.shrunk .brand-subtitle {
  font-size: 9px;
}

/* Product Reviews & Star Rating styles */
.review-star-rating-selector {
  display: flex;
  flex-direction: row-reverse; /* For CSS-only hover effect from left to right */
  justify-content: flex-end;
  gap: 4px;
}

.review-star-rating-selector input[type="radio"] {
  display: none;
}

.review-star-rating-selector label {
  font-size: 30px;
  color: #475569;
  cursor: pointer;
  transition: color 0.2s ease, transform 0.1s ease;
}

.review-star-rating-selector label:hover,
.review-star-rating-selector label:hover ~ label,
.review-star-rating-selector input[type="radio"]:checked ~ label {
  color: #fbbf24;
  transform: scale(1.1);
}

.review-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.review-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  border-color: rgba(20, 184, 166, 0.3) !important;
}

.star.filled {
  color: #fbbf24;
  text-shadow: 0 0 4px rgba(251, 191, 36, 0.4);
}

.star.empty {
  color: #475569;
}


/* Clinical Toolkit Tabs & Responsive layout */
.clinical-tabs-container {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.clinical-tabs-scroll-wrapper {
  overflow-x: auto;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none;  /* IE and Edge */
  border-bottom: 2px solid rgba(13, 148, 136, 0.1);
  padding-bottom: 4px;
}

.clinical-tabs-scroll-wrapper::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.clinical-tabs-bar {
  display: flex;
  gap: 8px;
  white-space: nowrap;
}

.toolkit-tab-btn {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 10px 20px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.toolkit-tab-btn:hover {
  background: rgba(13, 148, 136, 0.05);
  color: var(--accent-teal);
  border-color: rgba(13, 148, 136, 0.3);
}

.toolkit-tab-btn.active {
  background: var(--accent-teal);
  color: white;
  border-color: var(--accent-teal);
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.2);
}

/* Toolkit Panel Content and Grid Adjustments */
.toolkit-panel {
  display: none;
  animation: fadeIn 0.4s ease;
}

.toolkit-panel.active {
  display: block;
}

/* Responsive fixes for inputs inside Toolkit */
@media (max-width: 768px) {
  .clinical-panel-card {
    padding: 20px !important;
  }
  
  .toolkit-panel h3 {
    font-size: 16px !important;
  }
}

/* Custom Premium Toolkit Dropdown Select */
.custom-toolkit-dropdown {
  position: relative;
  width: 100%;
  user-select: none;
}

.toolkit-dropdown-trigger {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.75);
  border: 1.5px solid rgba(13, 148, 136, 0.2);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 15px;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 15px rgba(13, 148, 136, 0.05);
}

.toolkit-dropdown-trigger:hover {
  background: rgba(255, 255, 255, 0.95);
  border-color: var(--accent-teal);
  box-shadow: 0 4px 20px rgba(13, 148, 136, 0.1);
}

.dropdown-chevron {
  font-size: 10px;
  color: var(--accent-teal);
  transition: transform 0.2s ease;
}

.custom-toolkit-dropdown.open .dropdown-chevron {
  transform: rotate(180deg);
}

.toolkit-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.1);
  z-index: 100;
  max-height: 320px;
  overflow-y: auto;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  animation: slideDown 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.toolkit-dropdown-item {
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toolkit-dropdown-item:hover {
  background: rgba(13, 148, 136, 0.06);
  color: var(--accent-teal);
  padding-left: 24px;
}

.toolkit-dropdown-item.active {
  background: rgba(13, 148, 136, 0.1);
  color: var(--accent-teal);
  font-weight: 600;
  border-left: 4px solid var(--accent-teal);
}

/* ==================== PRODUCT BADGES & PROMOTIONS ==================== */
.product-badges {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 10;
}

.product-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
  color: white;
  text-transform: uppercase;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 3px;
  width: fit-content;
}

.product-badge.recommended {
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
}

.product-badge.best-seller {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.product-badge.sale {
  position: absolute;
  top: 8px;
  right: 8px;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 3px;
}

/* Pricing Layouts with Sale */
.product-price-container {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 8px;
}

.product-price-original {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: line-through;
  font-weight: 500;
}

.product-price-sale {
  font-size: 18px;
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--error);
}

/* Detail View Price Layouts */
.product-detail-price-box {
  background: rgba(13, 148, 136, 0.04);
  border: 1px solid var(--border-color);
  padding: 16px 20px;
  border-radius: var(--radius-md);
  margin-top: 15px;
}

.product-detail-price-original {
  font-size: 15px;
  color: var(--text-muted);
  text-decoration: line-through;
  font-weight: 500;
}

.product-detail-price-sale {
  font-size: 28px;
  font-family: var(--font-heading);
  font-weight: 800;
  color: var(--error);
}

.product-detail-discount-badge {
  background: var(--error);
  color: white;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  margin-left: 8px;
  display: inline-block;
  vertical-align: middle;
}

/* Toolkit tools check list styling */
.toolkit-tools-checklist {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: var(--bg-secondary);
}

/* Row Price Styling for Admin Product list */
.admin-price-sale-tag {
  color: var(--error);
  font-weight: 700;
}

.admin-price-original-tag {
  text-decoration: line-through;
  font-size: 11px;
  color: var(--text-muted);
}



/* ==========================================
   PREMIUM WYSIWYG RICH TEXT EDITOR STYLES
   ========================================== */
.wysiwyg-container {
  display: flex;
  flex-direction: column;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
  overflow: hidden;
  transition: var(--transition-normal);
  position: relative;
  margin-bottom: 8px;
}

.wysiwyg-container:focus-within {
  border-color: var(--accent-teal);
  box-shadow: 0 0 10px rgba(13, 148, 136, 0.15);
}

.wysiwyg-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px;
  background: var(--bg-secondary);
  border-bottom: 1.5px solid var(--border-color);
  align-items: center;
}

.wysiwyg-toolbar-group {
  display: flex;
  align-items: center;
  gap: 4px;
  padding-right: 6px;
  border-right: 1.5px solid var(--border-color);
}

.wysiwyg-toolbar-group:last-child {
  border-right: none;
  padding-right: 0;
}

.wysiwyg-btn {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: var(--transition-fast);
  user-select: none;
}

.wysiwyg-btn:hover {
  background: var(--bg-tertiary);
  border-color: var(--text-secondary);
}

.wysiwyg-btn.active {
  background: var(--accent-teal);
  color: white;
  border-color: var(--accent-teal);
}

.wysiwyg-select {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 6px 8px;
  font-size: 12.5px;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  outline: none;
  height: 30px;
  transition: var(--transition-fast);
}

.wysiwyg-select:hover {
  border-color: var(--text-secondary);
}

.wysiwyg-editor {
  min-height: 220px;
  max-height: 450px;
  overflow-y: auto;
  padding: 16px;
  outline: none;
  color: var(--text-primary);
  background: white;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
}

/* Styled Content inside WYSIWYG editor */
.wysiwyg-editor p {
  margin-bottom: 12px;
}

.wysiwyg-editor h3 {
  font-size: 18px;
  font-weight: 700;
  margin-top: 18px;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.wysiwyg-editor h4 {
  font-size: 16px;
  font-weight: 700;
  margin-top: 14px;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.wysiwyg-editor ul, .wysiwyg-editor ol {
  margin-left: 24px;
  margin-bottom: 12px;
}

.wysiwyg-editor li {
  margin-bottom: 4px;
}

.wysiwyg-editor img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 16px 0;
  display: block;
  border: 1px solid var(--border-color);
}

.wysiwyg-editor a {
  color: var(--accent-cyan);
  text-decoration: underline;
  font-weight: 600;
}

.wysiwyg-editor hr {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 16px 0;
}

/* Image/Link insert popup inside container */
.wysiwyg-popup {
  position: absolute;
  top: 48px;
  left: 12px;
  z-index: 10;
  width: 340px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.15);
  padding: 14px;
  display: none;
  flex-direction: column;
  gap: 10px;
  animation: wysiwygPopupShow 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.wysiwyg-popup.active {
  display: flex;
}

.wysiwyg-popup-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wysiwyg-popup-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: var(--text-muted);
}

.wysiwyg-popup-close:hover {
  color: var(--error);
}

.wysiwyg-popup-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wysiwyg-popup-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.wysiwyg-popup-btn {
  padding: 8px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
}

.wysiwyg-size-warning {
  font-size: 11px;
  color: var(--warning);
  background: rgba(245, 158, 11, 0.08);
  border-radius: 4px;
  padding: 6px 8px;
  line-height: 1.35;
}

.wysiwyg-raw-textarea {
  font-family: 'Courier New', Courier, monospace;
  font-size: 13.5px;
  line-height: 1.45;
  background: #1e293b;
  color: #f8fafc;
  min-height: 220px;
  max-height: 450px;
  width: 100%;
  padding: 16px;
  border: none;
  outline: none;
  resize: vertical;
}

/* --- PRODUCT VARIANTS STYLING --- */
.variant-selection-section {
  margin-top: 15px;
  margin-bottom: 20px;
}
.variant-pills-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}
.variant-pill-btn {
  padding: 10px 18px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 13.5px;
  font-weight: 600;
  text-align: left;
  min-width: 140px;
  display: flex;
  flex-direction: column;
}
.variant-pill-btn:hover {
  border-color: var(--accent-cyan);
  background: var(--bg-tertiary);
}
.variant-pill-btn.active {
  border-color: var(--accent-teal);
  background: #f0fdfa; /* Light teal bg */
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}
.var-btn-name {
  font-size: 14px;
  color: var(--text-primary);
}
.var-btn-desc {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: normal;
  margin-top: 2px;
}

/* Layout Full Background Cover */
.hero-slide.layout-full {
  background-size: cover;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  position: relative;
  min-height: 480px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  padding: 60px;
}

.hero-slide-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.hero-slide-overlay.overlay-dark {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.85) 0%, rgba(15, 23, 42, 0.4) 100%);
}

.hero-slide-overlay.overlay-light {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0.4) 100%);
}

.hero-slide-overlay.overlay-teal {
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.8) 0%, rgba(15, 23, 42, 0.6) 100%);
}

.full-overlay-content {
  position: relative;
  z-index: 2;
  width: 100%;
}

/* Text alignment helpers */
.hero-slide.text-center {
  text-align: center;
}

.hero-slide.text-center .detail-actions {
  justify-content: center !important;
}

.hero-slide.text-center p {
  margin-left: auto;
  margin-right: auto;
}

.hero-slide.text-right {
  text-align: right;
}

.hero-slide.text-right .detail-actions {
  justify-content: flex-end !important;
}

.hero-slide.text-right p {
  margin-left: auto;
}

@media (max-width: 768px) {
  .hero-slide.layout-full {
    padding: 30px 20px;
    min-height: 380px;
  }
}

/* SVG Feature Icons & Animations */
.svg-feature-icon {
  transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), filter 0.4s ease;
  will-change: transform;
}

.feature-card:hover .svg-feature-icon {
  transform: translateY(-8px) scale(1.12);
  filter: drop-shadow(0 8px 16px rgba(13, 148, 136, 0.25));
}

/* Login Modal Premium Styling */
#login-modal .modal-box {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
  border-radius: 20px;
  overflow: visible; /* to allow close button offset if needed */
}

#login-modal .modal-close {
  color: var(--text-primary);
  opacity: 0.6;
  transition: opacity 0.2s ease, transform 0.2s ease;
  font-size: 32px;
  line-height: 0.8;
}

#login-modal .modal-close:hover {
  opacity: 1;
  transform: scale(1.15) rotate(90deg);
}

.login-profile-card {
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
  border-radius: 12px !important;
}

.login-profile-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(13, 148, 136, 0.12);
  border-color: var(--accent-teal) !important;
}

/* Inline SVG icon adjustments for alignment with Thai text */
.svg-icon {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  backface-visibility: hidden;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.animate-spin {
  animation: spin 1s linear infinite;
}

