/**
 * FLOWCOMMERCE - PROFESSIONAL STYLESHEET
 * Color Palette: #000000, #FBFBFB, #576A8F, #FD7979
 * Currency: Indian Rupees (₹)
 */

/* ============================================================================
   CSS VARIABLES
   ============================================================================ */

:root {
  /* Primary Colors */
  --black: #000000;
  --white: #FBFBFB;
  --primary: #576A8F;
  --accent: #FD7979;
  
  /* Derived Colors */
  --primary-light: #6b7fa6;
  --primary-dark: #455678;
  --accent-light: #fd9a9a;
  --accent-dark: #e05656;
  
  /* Light Mode */
  --bg: #FBFBFB;
  --bg-secondary: #f0f0f0;
  --surface: #ffffff;
  --text: #000000;
  --text-secondary: #555555;
  --border: #e0e0e0;
  
  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.16);
  
  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  
  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 50%;
  
  /* Transitions */
  --transition: 0.3s ease;
}

/* Dark Mode */
html.dark-mode {
  --bg: #000000;
  --bg-secondary: #111111;
  --surface: #1a1a1a;
  --text: #FBFBFB;
  --text-secondary: #aaaaaa;
  --border: #333333;
}

/* ============================================================================
   RESET & BASE
   ============================================================================ */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar {
  display: none;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  cursor: pointer;
  font-family: inherit;
}

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

ul, ol {
  list-style: none;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

.hidden {
  display: none !important;
}

/* ============================================================================
   BUTTONS
   ============================================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  transition: all var(--transition);
  cursor: pointer;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

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

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

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

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

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: transparent;
}

.btn-ghost:hover {
  background: var(--bg-secondary);
}

.btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1.1rem;
}

.btn-block {
  width: 100%;
}

/* ============================================================================
   FORM ELEMENTS
   ============================================================================ */

.form-group {
  margin-bottom: var(--spacing-lg);
}

.form-group label {
  display: block;
  margin-bottom: var(--spacing-sm);
  font-weight: 600;
  color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  transition: all var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(87, 106, 143, 0.15);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-secondary);
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.checkbox-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

/* ============================================================================
   NAVBAR
   ============================================================================ */

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.navbar-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  color: var(--text-secondary);
  font-weight: 500;
  padding: 0.5rem;
  transition: color var(--transition);
  position: relative;
}

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

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
}

.navbar-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
}

.navbar-search input {
  padding: 0.625rem 1rem;
  padding-right: 2.5rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg);
  color: var(--text);
  font-size: 0.95rem;
  width: 280px;
  transition: all var(--transition);
}

.navbar-search input::placeholder {
  color: var(--text-secondary);
}

.navbar-search input:focus {
  border-color: var(--primary);
  width: 320px;
}

.navbar-search .btn-search {
  position: absolute;
  right: 0.5rem;
  background: none;
  border: none;
  color: var(--text-secondary);
  padding: 0.5rem;
  font-size: 1.1rem;
}

.navbar-end {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  border: 2px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all var(--transition);
}

.theme-toggle:hover {
  border-color: var(--primary);
  background: var(--bg-secondary);
}

.cart-icon {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  border: 2px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all var(--transition);
}

.cart-icon:hover {
  border-color: var(--primary);
}

.cart-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--accent);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
}

.navbar-auth {
  display: flex;
  gap: 0.75rem;
}

/* User Menu Dropdown */
.user-menu {
  position: relative;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  border: none;
  cursor: pointer;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.user-avatar:hover {
  transform: scale(1.05);
  box-shadow: 0 0 0 3px rgba(87, 106, 143, 0.2);
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  min-width: 220px;
  padding: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all var(--transition);
  z-index: 1000;
}

.user-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-dropdown-header {
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.user-dropdown-header .user-name {
  font-weight: 600;
  color: var(--text);
}

.user-dropdown-header .user-email {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.user-dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 0.5rem 0;
}

.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--text);
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: all var(--transition);
  cursor: pointer;
  background: none;
  border: none;
  width: 100%;
  font-size: 0.95rem;
  text-align: left;
}

.user-dropdown-item:hover {
  background: var(--bg-secondary);
}

.user-dropdown-item.logout-btn {
  color: var(--accent);
}

.user-dropdown-item.logout-btn:hover {
  background: rgba(253, 121, 121, 0.1);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: all var(--transition);
}

/* Categories Dropdown */
.nav-dropdown {
  position: relative;
}

.dropdown-categories {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  padding: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition);
  z-index: 100;
}

.dropdown-categories.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-categories a {
  display: block;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}

.dropdown-categories a:hover {
  background: var(--bg-secondary);
  color: var(--primary);
}

/* Search Results Dropdown */
.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  max-height: 400px;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition);
  z-index: 100;
  margin-top: 0.5rem;
}

.search-results.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: background var(--transition);
}

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

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

.search-result-item .info h4 {
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.search-result-item .info .price {
  color: var(--accent);
  font-weight: 600;
}

/* ============================================================================
   HERO SECTION
   ============================================================================ */

.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  padding: 4rem 2rem;
  text-align: center;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.25rem;
  opacity: 0.9;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

/* ============================================================================
   PRODUCTS PAGE LAYOUT WITH FILTERS
   ============================================================================ */

.products-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  padding: 0 2rem 2rem;
  max-width: 1600px;
  margin: 0 auto;
}

/* Filter Sidebar */
.filter-sidebar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  height: fit-content;
  position: sticky;
  top: 100px;
}

.filter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.filter-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
}

.filter-section {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.filter-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.filter-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text);
}

.filter-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.filter-checkbox {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: color var(--transition);
}

.filter-checkbox:hover {
  color: var(--text);
}

.filter-checkbox input {
  display: none;
}

.filter-checkbox .checkmark {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  flex-shrink: 0;
}

.filter-checkbox .checkmark.radio {
  border-radius: 50%;
}

.filter-checkbox input:checked + .checkmark {
  background: var(--primary);
  border-color: var(--primary);
}

.filter-checkbox input:checked + .checkmark::after {
  content: '✓';
  color: white;
  font-size: 0.7rem;
  font-weight: bold;
}

.filter-checkbox input:checked + .checkmark.radio::after {
  content: '';
  width: 8px;
  height: 8px;
  background: white;
  border-radius: 50%;
}

/* Price Range Slider */
.price-range-container {
  margin-bottom: 1rem;
}

.price-slider {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--border);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  margin-bottom: 0.5rem;
}

.price-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.price-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  border: none;
}

.price-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.price-inputs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.price-inputs input {
  width: 70px;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  background: var(--bg);
  color: var(--text);
}

.price-inputs span {
  color: var(--text-secondary);
}

/* Products Main Area */
.products-main {
  min-width: 0;
}

.products-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.products-header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.products-header-left p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.mobile-filter-btn {
  display: none;
}

.sort-select {
  padding: 0.6rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  font-size: 0.9rem;
  cursor: pointer;
}

/* ============================================================================
   PRODUCT CARDS - IMPROVED
   ============================================================================ */

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

.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
  border-color: var(--primary);
}

.product-image {
  position: relative;
  height: 200px;
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--surface) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

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

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

.product-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.1) 0%, transparent 60%);
  pointer-events: none;
  z-index: 1;
}

.product-wishlist {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 38px;
  height: 38px;
  background: var(--surface);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  transition: all 0.3s ease;
  z-index: 10;
}

.product-wishlist:hover {
  transform: scale(1.1);
  background: var(--accent);
}

.product-wishlist.active {
  background: var(--accent);
}

.product-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: linear-gradient(135deg, var(--accent) 0%, #ff6b6b 100%);
  color: white;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(253, 121, 121, 0.4);
}

.product-info {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.product-category {
  font-size: 0.75rem;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.product-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.product-rating .stars {
  color: #fbbf24;
  font-size: 0.9rem;
  letter-spacing: 1px;
}

.product-rating .rating-text {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.product-price {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.price-current {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--primary);
}

.price-original {
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-decoration: line-through;
}

.product-stock {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin: 0;
}

.product-stock.low {
  color: var(--accent);
}

.product-info .btn {
  margin-top: auto;
  padding-top: 0.75rem;
}

/* Responsive */
@media (max-width: 1024px) {
  .products-layout {
    grid-template-columns: 1fr;
    padding: 0 1rem 1rem;
  }
  
  .filter-sidebar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    border-radius: 0;
    overflow-y: auto;
    padding: 1rem;
  }
  
  .filter-sidebar.active {
    display: block;
  }
  
  .mobile-filter-btn {
    display: inline-flex;
  }
}

@media (max-width: 640px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  
  .product-image {
    height: 150px;
  }
  
  .product-info {
    padding: 1rem;
  }
  
  .price-current {
    font-size: 1.1rem;
  }
}

/* ============================================================================
   PRODUCT DETAIL PAGE
   ============================================================================ */

.product-detail-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.back-btn {
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.product-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.product-detail-images {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.main-image {
  background: var(--bg-secondary);
  border-radius: var(--radius-xl);
  overflow: hidden;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.main-image .product-emoji {
  font-size: 8rem;
}

.image-thumbnails {
  display: flex;
  gap: 0.75rem;
}

.image-thumbnails .thumbnail {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
}

.image-thumbnails .thumbnail:hover,
.image-thumbnails .thumbnail.active {
  border-color: var(--primary);
}

.product-detail-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.product-detail-info .product-category {
  font-size: 0.85rem;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.product-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  margin: 0;
}

.product-rating-large {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.product-rating-large .stars {
  color: #fbbf24;
  font-size: 1.25rem;
}

.product-rating-large .rating-text {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.product-price-large {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.product-price-large .price-current {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
}

.product-price-large .price-original {
  font-size: 1.25rem;
  color: var(--text-secondary);
  text-decoration: line-through;
}

.discount-badge {
  background: var(--accent);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
}

.product-description {
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 1rem;
}

.product-meta {
  background: var(--bg-secondary);
  padding: 1rem;
  border-radius: var(--radius-md);
}

.product-meta p {
  margin: 0.5rem 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.product-meta strong {
  color: var(--text);
}

.quantity-selector {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.quantity-selector label {
  font-weight: 600;
}

.quantity-controls {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.qty-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: var(--bg-secondary);
  font-size: 1.25rem;
  cursor: pointer;
  transition: background var(--transition);
}

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

.quantity-controls input {
  width: 60px;
  height: 40px;
  border: none;
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
  background: var(--surface);
  color: var(--text);
}

.product-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1rem;
}

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

.related-products {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.related-products h2 {
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
}

@media (max-width: 768px) {
  .product-detail-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .product-title {
    font-size: 1.5rem;
  }
  
  .product-price-large .price-current {
    font-size: 1.5rem;
  }
  
  .product-actions {
    flex-direction: column;
  }
  
  .product-detail-container {
    padding: 1rem;
  }
}

.stars {
  color: #fbbf24;
}

.rating-count {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.product-card-price {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.price-current {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
}

.price-original {
  font-size: 0.95rem;
  color: var(--text-secondary);
  text-decoration: line-through;
}

.product-card-actions {
  display: flex;
  gap: 0.5rem;
}

/* ============================================================================
   SECTION STYLES
   ============================================================================ */

.section {
  padding: 3rem 2rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
}

.section-subtitle {
  color: var(--text-secondary);
  margin-top: 0.5rem;
}

/* ============================================================================
   MODAL
   ============================================================================ */

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(4px);
}

.modal.active {
  display: flex;
  animation: fadeIn 0.3s ease;
}

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

.modal-content {
  background: var(--surface);
  border-radius: var(--radius-xl);
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s ease;
}

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

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

.modal-title {
  font-size: 1.5rem;
  font-weight: 700;
}

.modal-close {
  width: 36px;
  height: 36px;
  border: none;
  background: var(--bg-secondary);
  border-radius: var(--radius-full);
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
}

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

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

/* ============================================================================
   LOADING & TOAST
   ============================================================================ */

.loading-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 3000;
  align-items: center;
  justify-content: center;
}

.loading-overlay.active {
  display: flex;
}

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

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

.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 4000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  animation: slideInRight 0.3s ease;
  min-width: 300px;
}

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

.toast.success { border-left: 4px solid #10b981; }
.toast.error { border-left: 4px solid var(--accent); }
.toast.warning { border-left: 4px solid #f59e0b; }
.toast.info { border-left: 4px solid var(--primary); }

.toast-icon {
  font-size: 1.25rem;
}

.toast-message {
  flex: 1;
  font-weight: 500;
}

.toast-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity var(--transition);
}

.toast-close:hover {
  opacity: 1;
}

/* ============================================================================
   FOOTER
   ============================================================================ */

.footer {
  background: var(--black);
  color: var(--white);
  padding: 3rem 2rem 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto 2rem;
}

.footer-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--primary);
}

.footer-links a {
  display: block;
  padding: 0.5rem 0;
  color: rgba(255, 255, 255, 0.7);
  transition: color var(--transition);
}

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

.footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
}

/* ============================================================================
   PAGES
   ============================================================================ */

.page {
  min-height: calc(100vh - 80px);
}

.page.hidden {
  display: none;
}

.page-header {
  padding: 2rem;
  border-bottom: 1px solid var(--border);
}

.page-title {
  font-size: 2rem;
  font-weight: 700;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ============================================================================
   CART & CHECKOUT
   ============================================================================ */

.cart-container {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 2rem;
  padding: 2rem;
}

.cart-items {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.cart-item {
  display: grid;
  grid-template-columns: 100px 1fr auto;
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
  align-items: center;
}

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

.cart-item-image {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  overflow: hidden;
}

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

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

.cart-item-info h4 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  color: var(--text);
}

.cart-item-price {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 0;
}

.cart-item-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

.cart-quantity {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.cart-quantity .qty-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: var(--bg-secondary);
  font-size: 1.1rem;
  cursor: pointer;
  transition: background var(--transition);
}

.cart-quantity .qty-btn:hover {
  background: var(--primary);
  color: white;
}

.cart-quantity span {
  width: 40px;
  text-align: center;
  font-weight: 600;
}

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

.cart-item-quantity {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.cart-item-quantity button {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  background: var(--bg);
  border-radius: var(--radius-sm);
  font-size: 1.1rem;
}

.cart-item-quantity input {
  width: 50px;
  text-align: center;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

@media (max-width: 640px) {
  .cart-item {
    grid-template-columns: 70px 1fr;
    gap: 1rem;
  }
  
  .cart-item-actions {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.cart-summary {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  height: fit-content;
  position: sticky;
  top: 100px;
}

.cart-summary h3 {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0;
}

.summary-row.total {
  border-top: 2px solid var(--border);
  margin-top: 0.5rem;
  padding-top: 1rem;
  font-size: 1.25rem;
  font-weight: 700;
}

.summary-row.total .value {
  color: var(--accent);
}

/* ============================================================================
   ADMIN SIDEBAR (PROFESSIONAL VERTICAL MENU)
   ============================================================================ */

.admin-layout {
  display: block;
  min-height: 100vh;
  width: 100%;
}

.admin-sidebar {
  background: var(--black);
  color: var(--white);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 260px;
  z-index: 100;
}

.sidebar-brand {
  padding: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sidebar-brand .icon {
  width: 40px;
  height: 40px;
  background: var(--primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.sidebar-brand h2 {
  font-size: 1.25rem;
  font-weight: 700;
}

.sidebar-nav {
  flex: 1;
  padding: 1rem 0;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.sidebar-nav::-webkit-scrollbar {
  display: none;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.875rem 1.5rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
  transition: all var(--transition);
  cursor: pointer;
  border-left: 3px solid transparent;
  margin: 0.25rem 0;
}

.sidebar-nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--white);
}

.sidebar-nav-item.active {
  background: rgba(87, 106, 143, 0.2);
  color: var(--white);
  border-left-color: var(--primary);
}

.sidebar-nav-item .icon {
  width: 20px;
  text-align: center;
  font-size: 1.1rem;
}

.sidebar-nav-section {
  padding: 1rem 1.5rem 0.5rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 0.5rem;
}

.sidebar-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-footer .admin-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem;
  background: rgba(253, 121, 121, 0.1);
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: var(--radius-md);
  font-weight: 600;
  transition: all var(--transition);
}

.sidebar-footer .admin-btn:hover {
  background: var(--accent);
  color: var(--white);
}

.admin-main {
  margin-left: 260px;
  width: calc(100% - 260px);
  background: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
}

.admin-main::-webkit-scrollbar {
  display: none;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.admin-header-title {
  font-size: 1.25rem;
  font-weight: 600;
}

.admin-header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.admin-content {
  padding: 2rem;
}

/* Admin Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: all var(--transition);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-card .stat-icon {
  width: 48px;
  height: 48px;
  background: rgba(87, 106, 143, 0.1);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.stat-card .stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.stat-card .stat-label {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Admin Tables */
.admin-table-container {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

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

.admin-table th {
  background: var(--bg-secondary);
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}

.admin-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
}

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

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

/* Admin Section */
.admin-section {
  margin-bottom: 2rem;
}

.admin-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.admin-section-title {
  font-size: 1.5rem;
  font-weight: 700;
}

/* ============================================================================
   RESPONSIVE DESIGN
   ============================================================================ */

@media (max-width: 1024px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }
  
  .admin-sidebar {
    transform: translateX(-100%);
    transition: transform var(--transition);
  }
  
  .admin-sidebar.active {
    transform: translateX(0);
  }
  
  .admin-main {
    margin-left: 0;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .navbar-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    flex-direction: column;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
  }
  
  .navbar-menu.active {
    display: flex;
  }
  
  .hamburger {
    display: flex;
  }
  
  .navbar-search {
    display: none;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero-buttons {
    flex-direction: column;
  }
  
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    padding: 1rem;
    gap: 1rem;
  }
  
  .cart-container {
    grid-template-columns: 1fr;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
  }
  
  .toast-container {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
  }
  
  .toast {
    min-width: auto;
  }
}

@media (max-width: 480px) {
  .navbar {
    padding: 1rem;
  }
  
  .navbar-brand {
    font-size: 1.25rem;
  }
  
  .products-grid {
    grid-template-columns: 1fr;
  }
  
  .modal-content {
    margin: 0.5rem;
    max-height: 95vh;
  }
  
  .btn {
    padding: 0.625rem 1rem;
    font-size: 0.9rem;
  }
}

/* ============================================================================
   UTILITY CLASSES
   ============================================================================ */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--primary); }
.text-accent { color: var(--accent); }
.text-muted { color: var(--text-secondary); }

.bg-primary { background: var(--primary); }
.bg-accent { background: var(--accent); }
.bg-surface { background: var(--surface); }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

.w-full { width: 100%; }
.h-full { height: 100%; }

.rounded { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-full { border-radius: var(--radius-full); }

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

.border { border: 1px solid var(--border); }

/* ============================================================================
   ACCOUNT SETTINGS PAGE
   ============================================================================ */

.account-container {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  padding: 0 2rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.account-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.account-user-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
}

.account-avatar {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 1rem;
  color: white;
}

.account-user-card h3 {
  margin: 0 0 0.25rem;
  font-size: 1.1rem;
}

.account-user-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.account-nav {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.account-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: all var(--transition);
}

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

.account-nav-item:hover {
  background: var(--bg-secondary);
}

.account-nav-item.active {
  background: var(--primary);
  color: white;
}

.account-nav-item.danger {
  color: var(--accent);
}

.account-nav-item.danger:hover {
  background: var(--accent);
  color: white;
}

.account-content {
  min-width: 0;
}

.account-tab {
  display: none;
}

.account-tab.active {
  display: block;
}

.account-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.account-card h3 {
  margin: 0 0 1.5rem;
  font-size: 1.1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

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

.security-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.security-option:last-child {
  border-bottom: none;
}

.security-option p {
  margin: 0.25rem 0 0;
  font-size: 0.85rem;
}

.address-card {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.address-card .label {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  margin-bottom: 0.5rem;
}

.address-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
}

@media (max-width: 768px) {
  .account-container {
    grid-template-columns: 1fr;
    padding: 0 1rem 1rem;
  }
  
  .account-sidebar {
    order: -1;
  }
  
  .account-nav {
    display: flex;
    overflow-x: auto;
    border-radius: var(--radius-md);
  }
  
  .account-nav-item {
    flex-direction: column;
    padding: 0.75rem 1rem;
    border-bottom: none;
    border-right: 1px solid var(--border);
    white-space: nowrap;
    font-size: 0.85rem;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
}
