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

:root {
  /* Colors - Light (Default) */
  --primary: #f59e0b;
  --primary-hover: #d97706;
  --primary-soft: rgba(245, 158, 11, 0.1);
  
  --bg: #ffffff;
  --surface: #f9fafb;
  --surface-raised: #f3f4f6;
  --surface-glass: rgba(255, 255, 255, 0.7);
  
  --text: #111827;
  --text-muted: #4b5563;
  --text-faint: #9ca3af;
  
  --border: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(0, 0, 0, 0.15);
  
  /* Semantic */
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --info: #3b82f6;

  /* Sizing & Radius */
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-full: 999px;
  
  --header-h: 72px;
  --container: 1200px;
  
  /* Effects */
  --glass-blur: 12px;
  --shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme='dark'] {
  --bg: #050505;
  --surface: #0f0f0f;
  --surface-raised: #1a1a1a;
  --surface-glass: rgba(255, 255, 255, 0.03);
  
  --text: #f9fafb;
  --text-muted: #9ca3af;
  --text-faint: #4b5563;
  
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);
  
  --shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

/* Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4, .font-display {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

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

button, input, select, textarea {
  font-family: inherit;
  outline: none;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Glassmorphism */
.glass {
  background: var(--surface-glass);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--border);
}

.glass-hover:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-hover);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.6rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
  cursor: pointer;
  border: 1px solid transparent;
  gap: 0.5rem;
}

.btn-primary {
  background: var(--primary);
  color: #000;
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -8px var(--primary);
}

.btn-outline {
  border-color: var(--border);
  background: var(--surface-glass);
  color: var(--text);
}

.btn-outline:hover {
  background: var(--surface-raised);
  border-color: var(--border-hover);
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-h);
  border-bottom: 1px solid var(--border);
  background: var(--surface-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.logo span {
  background: var(--primary);
  color: #000;
  padding: 0.2rem 0.6rem;
  border-radius: 8px;
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-muted);
}

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

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

/* Hero Section */
.hero {
  height: 100vh;
  margin-top: calc(-1 * var(--header-h) - 1rem);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.08) 0%, transparent 70%);
  z-index: -1;
}

.hero-title {
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  margin-bottom: 1.5rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.hero-desc {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 2.5rem;
}

/* Product Cards */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}

.product-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-8px);
}

.product-img-wrap {
  aspect-ratio: 1;
  overflow: hidden;
  position: relative;
  background: var(--surface-raised);
}

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

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

.product-info {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.product-cat {
  font-size: 0.8rem;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.product-name {
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.product-price-row {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

/* Forms */
.form-control {
  width: 100%;
  background: var(--surface-glass);
  border: 1px solid var(--border);
  padding: 0.8rem 1rem;
  border-radius: var(--radius);
  color: var(--text);
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--primary);
  background: var(--surface-raised);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

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

/* Responsive */
@media (max-width: 1024px) {
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
}

@media (max-width: 991px) {
  /* Mobile / Tablet Sidebar Drawer */
  .grid-2-mobile {
    grid-template-columns: 1fr !important;
  }
  
  .sidebar {
    position: fixed !important;
    top: 0;
    left: -320px !important; /* Hidden offscreen by default */
    width: 300px !important;
    height: 100vh !important;
    background: var(--bg) !important;
    z-index: 1000 !important;
    box-shadow: var(--shadow) !important;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    overflow-y: auto !important;
    padding: 1.5rem !important;
    margin: 0 !important;
  }
  
  .sidebar.open {
    left: 0 !important;
  }
  
  .filter-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
  }
  
  .filter-overlay.open {
    display: block;
  }
}

@media (max-width: 768px) {
  :root { --header-h: 64px; }
  .nav-links { display: none; }
  .hero { height: 100vh; margin-top: calc(-1 * var(--header-h) - 1rem); }
  .hero-title { font-size: 2.2rem; }
  .hero-desc { font-size: 1.05rem; }
  body { padding-bottom: 70px; }
  
  .container { padding: 0 1rem; }
  
  .mobile-dock {
    display: flex !important;
  }

  dialog {
    width: 95% !important;
    max-width: none !important;
    padding: 1.5rem !important;
  }

  /* Logo adjustment to prevent wrap/overlap */
  .logo {
    font-size: 1.15rem !important;
    gap: 0.4rem !important;
    white-space: nowrap !important;
  }
  .logo span {
    padding: 0.15rem 0.45rem !important;
    border-radius: 6px !important;
  }

  /* Keep exactly two items in a row for products */
  .product-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.75rem !important;
  }
  .product-info {
    padding: 0.75rem !important;
  }
  .product-name {
    font-size: 0.95rem !important;
    margin-bottom: 0.5rem !important;
  }
  .product-price {
    font-size: 1.05rem !important;
  }
  .product-cat {
    font-size: 0.7rem !important;
    margin-bottom: 0.25rem !important;
  }
}

@media (max-width: 480px) {
  .hero-title { font-size: 1.8rem; }
  .logo {
    font-size: 0.95rem !important;
    gap: 0.3rem !important;
  }
  .logo span {
    padding: 0.1rem 0.35rem !important;
    border-radius: 4px !important;
  }
  .btn { width: 100%; }
}

/* Mobile Filter Toggle Button & Close Button */
.mobile-filter-btn {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  background: var(--surface-raised);
  border: 1px solid var(--border);
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 1.5rem;
  width: 100%;
  color: var(--text);
  font-family: inherit;
  transition: var(--transition);
}

.mobile-filter-btn:hover {
  background: var(--surface-glass);
  border-color: var(--primary);
}

.sidebar-close-btn {
  display: none;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0.25rem;
}

@media (max-width: 991px) {
  .mobile-filter-btn {
    display: inline-flex;
  }
  .sidebar-close-btn {
    display: block;
  }
}

/* Mobile Dock */
.mobile-dock {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 70px;
  background: var(--surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  z-index: 2000;
  justify-content: space-around;
  align-items: center;
  padding: 0 1rem;
}

[data-theme='dark'] .mobile-dock {
  background: rgba(5, 5, 5, 0.85);
}

.dock-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  color: var(--text-muted);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: var(--transition);
}

.dock-item svg {
  width: 22px;
  height: 22px;
  stroke-width: 2;
}

/* Auth Pages */
.auth-container {
  min-height: 80vh;
  display: grid;
  place-items: center;
  padding: 4rem 0;
}

.auth-card {
  width: 100%;
  max-width: 450px;
  padding: 3rem;
  border-radius: var(--radius-lg);
  background: var(--surface-glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.auth-card h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  text-align: center;
}

.auth-card p {
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

.oauth-button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 0.9rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 1.5rem;
}

.oauth-button:hover {
  background: var(--surface-raised);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.oauth-button svg {
  width: 20px;
  height: 20px;
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.5rem 0;
  color: var(--text-faint);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border);
}

.auth-divider:not(:empty)::before { margin-right: 1rem; }
.auth-divider:not(:empty)::after { margin-left: 1rem; }

.form-field {
  margin-bottom: 1.25rem;
}

.form-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.auth-links {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.auth-links a:hover {
  color: var(--primary);
}

.auth-form input:not([type='checkbox']):not([type='radio']) {
  width: 100%;
  background: var(--surface-glass);
  border: 1px solid var(--border);
  padding: 0.8rem 1rem;
  border-radius: var(--radius);
  color: var(--text);
  transition: var(--transition);
  font-family: inherit;
}

.auth-form input:focus {
  border-color: var(--primary);
  background: var(--surface-raised);
  outline: none;
}

/* Account & Dashboard */
.dashboard-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 3rem;
  padding: 4rem 0;
}

.account-sidebar {
  position: sticky;
  top: calc(var(--header-h) + 2rem);
  height: fit-content;
}

.account-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.account-nav-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-radius: var(--radius);
  color: var(--text-muted);
  font-weight: 600;
  transition: var(--transition);
  border: 1px solid transparent;
}

.account-nav-link:hover, .account-nav-link.active {
  background: var(--surface-glass);
  color: var(--primary);
  border-color: var(--border);
}

.account-nav-link svg {
  width: 20px;
  height: 20px;
  stroke-width: 2;
}

.account-panel {
  padding: 3rem;
  border-radius: var(--radius-lg);
  background: var(--surface-glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
}

.account-panel h1 {
  font-size: 2.25rem;
  margin-bottom: 2rem;
}

@media (max-width: 992px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .account-sidebar {
    position: static;
  }
  
  .account-nav {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 1rem;
    scrollbar-width: none;
  }
  
  .account-nav-link {
    white-space: nowrap;
    padding: 0.75rem 1.25rem;
  }
}
/* Filter Sidebar */
.sidebar {
  transition: var(--transition);
}

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

.sidebar label {
  transition: var(--transition);
}

.sidebar label:hover {
  color: var(--primary);
}

.sidebar input[type="checkbox"] {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 2px solid var(--border);
  appearance: none;
  cursor: pointer;
  position: relative;
  transition: var(--transition);
  background: var(--bg);
  flex-shrink: 0;
}

.sidebar input[type="checkbox"]:checked {
  background: var(--primary);
  border-color: var(--primary);
}

.sidebar input[type="checkbox"]:checked::after {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 10px;
  font-weight: 800;
}

.sidebar select.form-control,
.sidebar input.form-control {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  width: 100%;
}

.sidebar select.form-control:focus,
.sidebar input.form-control:focus {
  border-color: var(--primary);
  background: var(--bg);
}

.sidebar::-webkit-scrollbar {
  width: 4px;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: var(--text-faint);
}

/* Hero Slider */
.hero-slider {
  position: relative;
  width: 100%;
  height: 100vh;
  margin-top: calc(-1 * var(--header-h) - 1rem);
  overflow: hidden;
  margin-bottom: 3rem;
  background: #000;
}

.slides-container {
  width: 100%;
  height: 100%;
  position: relative;
}

.slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
  display: flex;
  align-items: center;
}

.slide.active {
  opacity: 1;
  z-index: 2;
}

.slide-content {
  color: #ffffff;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
  padding-top: calc(var(--header-h) + 2rem);
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.slide-content .hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  color: #ffffff;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  line-height: 1.1;
}

.slide-content .hero-desc {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  max-width: 60ch;
}

.slider-dots {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.75rem;
  z-index: 10;
}

.slider-dots .dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: var(--transition);
}

.slider-dots .dot.active {
  background: var(--primary);
  transform: scale(1.2);
  width: 28px;
}

/* Responsive checkout & order detail layout */
.checkout-layout,
.checkout-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 3rem;
  align-items: start;
}

@media (max-width: 992px) {
  .checkout-layout,
  .checkout-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }
}

/* Order List Cards */
.order-list-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  border-radius: var(--radius);
  transition: var(--transition);
  text-decoration: none;
}

.order-card-info {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.order-card-meta {
  text-align: right;
  display: flex;
  align-items: center;
  gap: 3rem;
}

@media (max-width: 768px) {
  .order-list-card {
    flex-direction: column;
    align-items: stretch;
    gap: 1.5rem;
    padding: 1.25rem;
  }
  
  .order-card-info {
    gap: 1rem;
  }
  
  .order-card-meta {
    display: flex;
    flex-direction: row !important;
    justify-content: space-between;
    text-align: left;
    gap: 1rem;
    border-top: 1px solid var(--border);
    padding-top: 1rem;
  }
  
  .order-card-meta > div {
    text-align: left !important;
  }
  
  .order-list-card svg.chevron-icon {
    display: none;
  }
}

/* Account Panel mobile padding */
@media (max-width: 768px) {
  .account-panel {
    padding: 1.5rem !important;
  }
}

/* Responsive 2-column form grids */
.form-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 576px) {
  .form-row-2col {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }
}



