/* ========================================
   Google Fonts
   ======================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Playfair+Display:wght@600;700;800&display=swap');

/* ========================================
   CSS Custom Properties (Design Tokens)
   ======================================== */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #dbeafe;
  --accent: #f59e0b;
  --accent-dark: #d97706;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --info: #3b82f6;

  --bg: #f8fafc;
  --bg-secondary: #f1f5f9;
  --text: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --card-bg: #ffffff;
  --border: #e2e8f0;
  --input-bg: #ffffff;
  --input-border: #cbd5e1;

  --navbar-bg: #ffffff;
  --footer-bg: #0f172a;
  --footer-text: #e2e8f0;
  --footer-link: #94a3b8;
  --footer-border: #1e293b;
  --star-color: #f59e0b;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;

  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   Dark Mode
   ======================================== */
[data-theme="dark"] {
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --primary-light: #1e3a5f;

  --bg: #0f172a;
  --bg-secondary: #1e293b;
  --text: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --card-bg: #1e293b;
  --border: #334155;
  --input-bg: #1e293b;
  --input-border: #475569;

  --navbar-bg: #1e293b;
  --footer-bg: #020617;
  --star-color: #fbbf24;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 15px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 20px 25px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .navbar {
  background-color: var(--navbar-bg) !important;
  border-bottom-color: var(--border);
}
[data-theme="dark"] .navbar-light .navbar-nav .nav-link {
  color: var(--text);
}
[data-theme="dark"] .navbar-light .navbar-brand img {
  filter: brightness(1.5);
}
[data-theme="dark"] .navbar-toggler {
  border-color: var(--border);
}
[data-theme="dark"] .navbar-toggler-icon {
  filter: invert(1);
}
[data-theme="dark"] .bg-light {
  background-color: var(--bg) !important;
}
[data-theme="dark"] .bg-white {
  background-color: var(--card-bg) !important;
}
[data-theme="dark"] .card {
  background-color: var(--card-bg);
  border-color: var(--border);
  color: var(--text);
}
[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
  background-color: var(--input-bg);
  border-color: var(--input-border);
  color: var(--text);
}
[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}
[data-theme="dark"] .list-group-item {
  background-color: var(--card-bg);
  border-color: var(--border);
  color: var(--text);
}
[data-theme="dark"] .table {
  color: var(--text);
}
[data-theme="dark"] .table > :not(caption) > * > * {
  background-color: transparent;
  color: var(--text);
}
[data-theme="dark"] .border {
  border-color: var(--border) !important;
}
[data-theme="dark"] .border-bottom {
  border-bottom-color: var(--border) !important;
}
[data-theme="dark"] .border-end {
  border-right-color: var(--border) !important;
}
[data-theme="dark"] .text-muted {
  color: var(--text-muted) !important;
}
[data-theme="dark"] .hero-section {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}
[data-theme="dark"] .btn-outline-primary {
  color: var(--primary);
  border-color: var(--primary);
}
[data-theme="dark"] .btn-outline-secondary {
  color: var(--text-secondary);
  border-color: var(--border);
}
[data-theme="dark"] .carousel-caption {
  background-color: rgba(0, 0, 0, 0.7);
}
[data-theme="dark"] .breadcrumb-item a {
  color: var(--text-secondary);
}
[data-theme="dark"] .breadcrumb-item.active {
  color: var(--text);
}

/* ========================================
   Base Styles
   ======================================== */
html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background-color var(--transition), color var(--transition);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover {
  color: var(--primary-dark);
}

img {
  max-width: 100%;
  height: auto;
}

::selection {
  background-color: var(--primary);
  color: #fff;
}

/* ========================================
   Typography
   ======================================== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}

.heading-display {
  font-family: var(--font-display);
  font-weight: 800;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
}
.section-title h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}
.section-title p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
}

/* ========================================
   Navbar
   ======================================== */
.navbar {
  background-color: var(--navbar-bg);
  border-bottom: 1px solid var(--border);
  transition: background-color var(--transition), box-shadow var(--transition), border-color var(--transition);
  padding: 0.75rem 0;
}
.navbar.scrolled {
  box-shadow: var(--shadow-sm);
}
.nav-link {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-secondary) !important;
  padding: 0.5rem 1rem !important;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background-color var(--transition-fast);
}
.nav-link:hover,
.nav-link.active {
  color: var(--primary) !important;
  background-color: var(--primary-light);
}
.navbar-brand img {
  transition: filter var(--transition);
}
.navbar-icons {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.navbar-icons .btn {
  position: relative;
}
.cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--danger);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.dark-mode-toggle .btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all var(--transition);
}
.dark-mode-toggle .btn:hover {
  transform: rotate(20deg);
}

/* ========================================
   Hero Section
   ======================================== */
.hero-section {
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 50%, #db2777 100%);
  color: #fff;
  padding: 5rem 0;
  position: relative;
  overflow: hidden;
}
.hero-section::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.hero-section .container {
  position: relative;
  z-index: 1;
}
.hero-title {
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.25rem;
}
.hero-subtitle {
  font-size: 1.2rem;
  opacity: 0.9;
  margin-bottom: 2rem;
  max-width: 500px;
}
.hero-stats {
  display: flex;
  gap: 2.5rem;
  margin-top: 2.5rem;
}
.hero-stat-number {
  font-size: 2rem;
  font-weight: 800;
}
.hero-stat-label {
  font-size: 0.85rem;
  opacity: 0.8;
}
.hero-image-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.hero-image-grid img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  height: 180px;
  object-fit: cover;
}
.hero-image-grid img:first-child {
  grid-row: span 2;
  height: 100%;
}

/* ========================================
   Breadcrumbs
   ======================================== */
.breadcrumb-wrapper {
  padding: 1rem 0;
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}
.breadcrumb {
  margin-bottom: 0;
  font-size: 0.875rem;
}
.breadcrumb-item a {
  color: var(--text-secondary);
}
.breadcrumb-item a:hover {
  color: var(--primary);
}
.breadcrumb-item.active {
  color: var(--text);
  font-weight: 500;
}

/* ========================================
   Category Cards
   ======================================== */
.category-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 220px;
  transition: transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
}
.category-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.category-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.category-card:hover img {
  transform: scale(1.08);
}
.category-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.1) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.25rem;
  color: #fff;
}
.category-card__name {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}
.category-card__count {
  font-size: 0.8rem;
  opacity: 0.85;
}

/* ========================================
   Product Cards
   ======================================== */
.product-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}
.product-card__image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  background: var(--bg-secondary);
}
.product-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.product-card:hover .product-card__image img {
  transform: scale(1.08);
}
.product-card__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 2;
}
.badge-sale {
  background: var(--danger);
  color: #fff;
}
.badge-new {
  background: var(--primary);
  color: #fff;
}
.badge-hot {
  background: var(--accent);
  color: #fff;
}
.product-card__discount {
  position: absolute;
  top: 12px;
  right: 56px;
  background: var(--success);
  color: #fff;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 700;
  z-index: 2;
}
.product-card__wishlist {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  z-index: 2;
  font-size: 0.95rem;
  color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
}
.product-card__wishlist:hover {
  background: #fff;
  transform: scale(1.1);
}
.product-card__wishlist .text-danger {
  color: var(--danger) !important;
}
.product-card__actions {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transform: translateY(100%);
  transition: transform var(--transition);
  background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
}
.product-card:hover .product-card__actions {
  transform: translateY(0);
}
.product-card__info {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.product-card__category {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--primary);
  margin-bottom: 0.35rem;
}
.product-card__name {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-card__name a {
  color: var(--text);
}
.product-card__name a:hover {
  color: var(--primary);
}
.product-card__rating {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
}
.product-card__rating i {
  color: var(--star-color);
}
.product-card__reviews {
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-left: 0.25rem;
}
.product-card__price {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.product-card__current-price {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
}
.product-card__original-price {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

/* ========================================
   Feature Cards
   ======================================== */
.feature-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition);
  height: 100%;
}
.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}
.feature-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-lg);
  background: var(--primary-light);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
  transition: background-color var(--transition), color var(--transition);
}
.feature-card:hover .feature-icon {
  background: var(--primary);
  color: #fff;
}
.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.feature-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 0;
  line-height: 1.6;
}

/* ========================================
   Newsletter Section
   ======================================== */
.newsletter-section {
  background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
  color: #fff;
  padding: 4rem 0;
  text-align: center;
}
.newsletter-section h2 {
  color: #fff;
  font-weight: 800;
}
.newsletter-section p {
  opacity: 0.9;
}
.newsletter-form {
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  gap: 0.5rem;
}
.newsletter-form input {
  flex: 1;
  padding: 0.75rem 1.25rem;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--transition-fast);
}
.newsletter-form input::placeholder {
  color: rgba(255,255,255,0.6);
}
.newsletter-form input:focus {
  border-color: #fff;
}
.newsletter-form button {
  padding: 0.75rem 1.75rem;
  border: none;
  border-radius: var(--radius-full);
  background: #fff;
  color: var(--primary);
  font-weight: 700;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  white-space: nowrap;
}
.newsletter-form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* ========================================
   Filter Sidebar
   ======================================== */
.filter-sidebar {
  position: sticky;
  top: 100px;
}
.filter-section {
  margin-bottom: 2rem;
}
.filter-section label.filter-label {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
  display: block;
  color: var(--text);
}
.filter-section .form-check {
  margin-bottom: 0.5rem;
}
.filter-section .form-check-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  cursor: pointer;
}
.filter-section .form-check-input:checked + .form-check-label {
  color: var(--primary);
  font-weight: 500;
}
.price-display {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--primary);
}

/* ========================================
   Product Detail Page
   ======================================== */
.product-detail__gallery {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.product-detail__gallery img {
  width: 100%;
  object-fit: cover;
}
.product-detail__thumbnails {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}
.product-detail__thumbnails img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color var(--transition-fast);
  opacity: 0.7;
}
.product-detail__thumbnails img.active,
.product-detail__thumbnails img:hover {
  border-color: var(--primary);
  opacity: 1;
}
.product-detail__title {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
}
.product-detail__category {
  display: inline-block;
  padding: 4px 14px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
}
.product-detail__rating {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.product-detail__rating i {
  color: var(--star-color);
}
.product-detail__rating span {
  color: var(--text-secondary);
  font-size: 0.9rem;
}
.product-detail__price {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 1rem;
}
.product-detail__price .original-price {
  font-size: 1.2rem;
  color: var(--text-muted);
  text-decoration: line-through;
  font-weight: 400;
  margin-left: 0.75rem;
}
.product-detail__price .discount-tag {
  display: inline-block;
  background: var(--success);
  color: #fff;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  margin-left: 0.75rem;
  vertical-align: middle;
}
.product-detail__description {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 1.5rem;
}
.product-detail__features {
  list-style: none;
  padding: 0;
  margin-bottom: 1.5rem;
}
.product-detail__features li {
  padding: 0.4rem 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
}
.product-detail__features li i {
  color: var(--success);
  margin-right: 0.5rem;
}
.qty-selector {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.qty-selector button {
  width: 40px;
  height: 40px;
  border: none;
  background: var(--bg-secondary);
  color: var(--text);
  font-size: 1rem;
  cursor: pointer;
  transition: background var(--transition-fast);
}
.qty-selector button:hover {
  background: var(--primary-light);
  color: var(--primary);
}
.qty-selector input {
  width: 50px;
  height: 40px;
  border: none;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  text-align: center;
  font-weight: 600;
  font-size: 0.95rem;
  background: var(--card-bg);
  color: var(--text);
}
.qty-selector input:focus {
  outline: none;
}

/* ========================================
   Cart Page
   ======================================== */
.cart-item {
  display: flex;
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}
.cart-item:last-child {
  border-bottom: none;
}
.cart-item__image {
  width: 100px;
  height: 100px;
  border-radius: var(--radius);
  overflow: hidden;
  flex-shrink: 0;
}
.cart-item__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cart-item__info {
  flex: 1;
}
.cart-item__name {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.25rem;
}
.cart-item__name a {
  color: var(--text);
}
.cart-item__name a:hover {
  color: var(--primary);
}
.cart-item__meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.cart-item__price {
  font-weight: 700;
  font-size: 1.05rem;
}
.cart-item__remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0;
  transition: color var(--transition-fast);
}
.cart-item__remove:hover {
  color: var(--danger);
}
.cart-summary {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  position: sticky;
  top: 100px;
}
.cart-summary h3 {
  font-size: 1.2rem;
  margin-bottom: 1.25rem;
  font-weight: 700;
}
.cart-empty {
  text-align: center;
  padding: 4rem 2rem;
}
.cart-empty i {
  font-size: 4rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.cart-empty h3 {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

/* ========================================
   Checkout Form
   ======================================== */
.checkout-form .form-control,
.checkout-form .form-select {
  padding: 0.65rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--input-border);
  font-size: 0.9rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.checkout-form .form-control:focus,
.checkout-form .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.checkout-form .form-label {
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--text);
  margin-bottom: 0.35rem;
}
.checkout-form .form-control.is-invalid {
  border-color: var(--danger);
}
.checkout-form .invalid-feedback {
  font-size: 0.8rem;
}

/* ========================================
   Search Page
   ======================================== */
.search-input-wrapper {
  position: relative;
  max-width: 600px;
  margin: 0 auto 2rem;
}
.search-input-wrapper input {
  width: 100%;
  padding: 0.85rem 1.25rem 0.85rem 3rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 1rem;
  background: var(--card-bg);
  color: var(--text);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.search-input-wrapper input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}
.search-input-wrapper .search-icon {
  position: absolute;
  left: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}
.search-results-count {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

/* ========================================
   Contact Page
   ======================================== */
.contact-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition);
  height: 100%;
}
.contact-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}
.contact-card__icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}
.contact-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.contact-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 0;
}
.contact-card a {
  color: var(--primary);
  font-weight: 500;
}

/* ========================================
   About / Testimonials
   ======================================== */
.testimonial-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}
.testimonial-card .avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 1rem;
  border: 3px solid var(--primary-light);
}
.testimonial-card .avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.testimonial-card blockquote {
  font-style: italic;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1.25rem;
}
.testimonial-card .name {
  font-weight: 700;
  margin-bottom: 0.15rem;
}
.testimonial-card .role {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.testimonial-card .stars i {
  color: var(--star-color);
}

/* ========================================
   Order Confirmation
   ======================================== */
.order-success {
  text-align: center;
  padding: 3rem 0;
}
.order-success__icon {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  animation: scaleIn 0.5s ease;
}
.order-success h2 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}
.order-details {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  max-width: 500px;
  margin: 1.5rem auto;
  text-align: left;
}
.order-details dt {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.order-details dd {
  font-weight: 600;
  margin-bottom: 1rem;
  font-size: 1rem;
}

/* ========================================
   Buttons
   ======================================== */
.btn {
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--radius);
  transition: all var(--transition-fast);
  padding: 0.55rem 1.25rem;
}
.btn:hover {
  transform: translateY(-1px);
}
.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
}
.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}
.btn-lg {
  padding: 0.75rem 2rem;
  font-size: 1rem;
  border-radius: var(--radius-lg);
}
.btn-pill {
  border-radius: var(--radius-full);
}

/* ========================================
   Footer
   ======================================== */
.footer-section {
  background-color: var(--footer-bg);
  color: var(--footer-text);
  padding: 4rem 0 0;
}
.footer-brand {
  margin-bottom: 1rem;
}
.footer-brand img {
  filter: brightness(1.5);
}
.footer-description {
  color: var(--footer-link);
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 1.25rem;
}
.footer-social {
  display: flex;
  gap: 0.75rem;
}
.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: var(--footer-link);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  font-size: 0.85rem;
}
.footer-social a:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-2px);
}
.footer-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--footer-text);
  margin-bottom: 1.25rem;
}
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-links li {
  margin-bottom: 0.6rem;
}
.footer-links a {
  color: var(--footer-link);
  font-size: 0.875rem;
  transition: color var(--transition-fast), padding-left var(--transition-fast);
}
.footer-links a:hover {
  color: #fff;
  padding-left: 4px;
}
.footer-bottom {
  border-top: 1px solid var(--footer-border);
  margin-top: 3rem;
  padding: 1.25rem 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--footer-link);
}

/* ========================================
   Scroll to Top Button
   ======================================== */
#button {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  border: none;
  outline: none;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  z-index: 1000;
  box-shadow: var(--shadow);
  transition: background var(--transition-fast), transform var(--transition-fast), opacity var(--transition), visibility var(--transition);
}
#button:hover {
  background: var(--primary-dark);
  transform: translateY(-4px);
}
#button.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
#button.hide {
  opacity: 0;
  visibility: hidden;
  transform: translateY(50px);
}

/* ========================================
   Toast Notifications
   ======================================== */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 360px;
}
.toast-notification {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.15rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  font-size: 0.875rem;
  font-weight: 500;
  opacity: 0;
  transform: translateX(100%);
  transition: opacity 0.3s ease, transform 0.3s ease;
  background: var(--card-bg);
  color: var(--text);
  border-left: 4px solid var(--info);
}
.toast-notification.toast-enter {
  opacity: 1;
  transform: translateX(0);
}
.toast-notification.toast-exit {
  opacity: 0;
  transform: translateX(100%);
}
.toast-success {
  border-left-color: var(--success);
}
.toast-success i { color: var(--success); }
.toast-error {
  border-left-color: var(--danger);
}
.toast-error i { color: var(--danger); }
.toast-info {
  border-left-color: var(--info);
}
.toast-info i { color: var(--info); }
.toast-warning {
  border-left-color: var(--warning);
}
.toast-warning i { color: var(--warning); }
.toast-close {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--text-muted);
  margin-left: auto;
  line-height: 1;
  padding: 0;
}
.toast-close:hover {
  color: var(--text);
}

/* ========================================
   Animations
   ======================================== */
@keyframes scaleIn {
  from { transform: scale(0); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
@keyframes fadeInUp {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.animate-fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
}
.animate-fade-in {
  animation: fadeIn 0.4s ease forwards;
}

/* ========================================
   Utility
   ======================================== */
.text-gradient {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.bg-pattern {
  background-color: var(--bg-secondary);
}
.skeleton {
  background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--border) 50%, var(--bg-secondary) 75%);
  background-size: 200% 100%;
  animation: skeleton 1.5s infinite;
  border-radius: var(--radius-sm);
}
@keyframes skeleton {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 991px) {
  .hero-title {
    font-size: 2.5rem;
  }
  .hero-image-grid {
    display: none;
  }
  .hero-stats {
    justify-content: flex-start;
  }
  .filter-sidebar {
    position: static;
    margin-bottom: 2rem;
  }
}

@media (max-width: 767px) {
  .hero-section {
    padding: 3rem 0;
  }
  .hero-title {
    font-size: 2rem;
  }
  .hero-subtitle {
    font-size: 1rem;
  }
  .hero-stats {
    gap: 1.5rem;
  }
  .hero-stat-number {
    font-size: 1.5rem;
  }
  .section-title h2 {
    font-size: 1.5rem;
  }
  .product-card__actions {
    transform: translateY(0);
    position: static;
    background: none;
    padding: 0 1rem 0.75rem;
  }
  .product-card__actions .btn-outline-light {
    display: none;
  }
  .product-card__actions .btn {
    width: 100%;
    color: #fff;
  }
  .cart-item {
    flex-wrap: wrap;
  }
  .cart-item__image {
    width: 80px;
    height: 80px;
  }
  .newsletter-form {
    flex-direction: column;
  }
  .footer-section .row > div {
    margin-bottom: 1.5rem;
  }
  .category-card {
    height: 160px;
  }
  #toast-container {
    left: 10px;
    right: 10px;
    max-width: none;
  }
}

@media (max-width: 575px) {
  .product-card__name {
    font-size: 0.8rem;
  }
  .product-card__current-price {
    font-size: 1rem;
  }
  .product-card__original-price {
    font-size: 0.75rem;
  }
  .product-card__info {
    padding: 0.75rem;
  }
  .product-card__category {
    font-size: 0.6rem;
  }
  .product-card__rating {
    font-size: 0.7rem;
  }
}
