@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ===========================
   Party Teller — Design System
   Style: Vibrant & Block-based
   =========================== */

:root {
  /* Colors */
  --color-primary: #E11D48;
  --color-on-primary: #FFFFFF;
  --color-secondary: #FB7185;
  --color-accent: #2563EB;
  --color-background: #FFF1F2;
  --color-foreground: #881337;
  --color-muted: #F0ECF2;
  --color-border: #FECDD3;
  --color-destructive: #DC2626;
  --color-ring: #E11D48;
  --color-success: #16A34A;
  --color-warning: #F59E0B;
  --color-star: #FBBF24;

  /* Surfaces */
  --color-surface: #FFFFFF;
  --color-surface-alt: #FFF7F8;
  --color-text-primary: #1F2937;
  --color-text-secondary: #6B7280;
  --color-text-muted: #9CA3AF;

  /* Typography */
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;

  /* Font sizes */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;
  --text-4xl: 2.5rem;
  --text-5xl: 3.5rem;

  /* Spacing (8px rhythm) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.10);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.12);
  --shadow-xl: 0 20px 50px rgba(0,0,0,0.15);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms ease;

  /* Layout */
  --container-max: 1280px;
  --header-height: 72px;
  --sidebar-width: 260px;
}

/* Dark mode */
[data-theme="dark"] {
  --color-primary: #FB7185;
  --color-on-primary: #1A0A12;
  --color-secondary: #F43F5E;
  --color-accent: #60A5FA;
  --color-background: #1A0F14;
  --color-foreground: #FDA4AF;
  --color-muted: #2A1A22;
  --color-border: #3A2530;
  --color-surface: #251820;
  --color-surface-alt: #2E1E28;
  --color-text-primary: #F9FAFB;
  --color-text-secondary: #D1D5DB;
  --color-text-muted: #9CA3AF;
}

/* ===========================
   Reset & Base
   =========================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-body);
  background: var(--color-background);
  color: var(--color-text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.3;
  color: var(--color-text-primary);
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover { color: var(--color-primary); }

img { max-width: 100%; display: block; }

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

ul, ol { list-style: none; }

/* ===========================
   Layout utilities
   =========================== */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-5);
}

.section {
  padding: var(--space-8) 0;
}

.section--tight { padding: var(--space-6) 0; }

.section__header {
  text-align: center;
  margin-bottom: var(--space-6);
}

.section__title {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-2);
}

.section__subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
}

.grid { display: grid; gap: var(--space-5); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--auto { grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-5 { gap: var(--space-5); }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-sm { font-size: var(--text-sm); }
.text-lg { font-size: var(--text-lg); }
.text-muted { color: var(--color-text-secondary); }
.text-primary { color: var(--color-primary); }
.text-accent { color: var(--color-accent); }
.text-success { color: var(--color-success); }
.text-warning { color: var(--color-warning); }
.font-display { font-family: var(--font-display); }
.font-bold { font-weight: 600; }
.font-semibold { font-weight: 500; }

.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.mt-6 { margin-top: var(--space-6); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-5 { margin-bottom: var(--space-5); }
.mb-6 { margin-bottom: var(--space-6); }

.hidden { display: none !important; }

/* ===========================
   Header / Navigation
   =========================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  height: var(--header-height);
  display: flex;
  align-items: center;
}

.site-header__inner {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-5);
}

.logo {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 600;
  color: var(--color-primary);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.logo__icon {
  width: 36px;
  height: 36px;
  background: var(--color-primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-on-primary);
}

.nav {
  display: flex;
  gap: var(--space-5);
  flex: 1;
  flex-wrap: nowrap;
  overflow: hidden;
}

.nav__link {
  color: var(--color-text-primary);
  font-weight: 400;
  font-size: var(--text-base);
  padding: var(--space-2) 0;
  position: relative;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.nav__link:hover { color: var(--color-primary); }

.nav__link--active {
  color: var(--color-primary);
}

.nav__link--active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--color-primary);
  border-radius: var(--radius-full);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/* Search bar in header */
.search-bar {
  display: flex;
  align-items: center;
  background: var(--color-muted);
  border-radius: var(--radius-full);
  padding: var(--space-2) var(--space-4);
  min-width: 280px;
  flex: 1;
  max-width: 480px;
  border: 2px solid transparent;
  transition: border-color var(--transition-base);
}

.search-bar:focus-within {
  border-color: var(--color-primary);
  background: var(--color-surface);
}

.search-bar input {
  border: none;
  background: transparent;
  outline: none;
  flex: 1;
  padding: var(--space-1) var(--space-2);
  color: var(--color-text-primary);
}

.search-bar input::placeholder { color: var(--color-text-muted); }

.search-bar__btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-secondary);
  padding: var(--space-1);
  display: flex;
  align-items: center;
}

.search-bar__btn:hover { color: var(--color-primary); }

/* ===========================
   Buttons
   =========================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--text-base);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn--primary {
  background: var(--color-primary);
  color: var(--color-on-primary);
}

.btn--primary:hover:not(:disabled) {
  background: var(--color-secondary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn--accent {
  background: var(--color-accent);
  color: var(--color-on-primary);
}

.btn--accent:hover:not(:disabled) {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn--outline {
  background: transparent;
  border-color: var(--color-border);
  color: var(--color-text-primary);
}

.btn--outline:hover:not(:disabled) {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn--ghost {
  background: transparent;
  color: var(--color-text-primary);
  padding: var(--space-2) var(--space-3);
}

.btn--ghost:hover { color: var(--color-primary); background: var(--color-muted); }

.btn--sm { padding: var(--space-2) var(--space-3); font-size: var(--text-sm); }
.btn--lg { padding: var(--space-4) var(--space-6); font-size: var(--text-lg); }
.btn--full { width: 100%; }
.btn--icon {
  padding: var(--space-2);
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
}

/* Icon button in header */
.icon-btn {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-primary);
  transition: all var(--transition-fast);
}

.icon-btn:hover {
  background: var(--color-muted);
  color: var(--color-primary);
}

.icon-btn__badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background: var(--color-primary);
  color: var(--color-on-primary);
  font-size: 10px;
  font-weight: 600;
  min-width: 18px;
  height: 18px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* ===========================
   Cards
   =========================== */
.card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  overflow: hidden;
  transition: all var(--transition-slow);
  min-width: 0;
}

.card--hover:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.card__body { padding: var(--space-4); }
.card__body--tight { padding: var(--space-3); }

/* Product card */
.product-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  overflow: hidden;
  transition: all var(--transition-slow);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 100%;
}

.product-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.product-card__image {
  width: 100%;
  aspect-ratio: 1;
  background: var(--color-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  min-width: 0;
}

.product-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.product-card:hover .product-card__image img {
  transform: scale(1.05);
}

.product-card__badge {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
  background: var(--color-primary);
  color: var(--color-on-primary);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.product-card__badge--success { background: var(--color-success); }
.product-card__badge--warning { background: var(--color-warning); color: #000; }
.product-card__badge--accent { background: var(--color-accent); }

.product-card__body {
  padding: var(--space-3) var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  flex: 1;
}

.product-card__category {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.product-card__name {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  color: var(--color-text-primary);
  line-height: 1.3;
}

.product-card__designer {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

.product-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: var(--space-2);
}

.product-card__price {
  font-family: var(--font-body);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--color-primary);
}

.product-card__price--old {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: line-through;
  margin-right: var(--space-2);
}

.product-card__rating {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

/* ===========================
   Badges & Tags
   =========================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 500;
}

.badge--primary { background: var(--color-primary); color: var(--color-on-primary); }
.badge--accent { background: var(--color-accent); color: var(--color-on-primary); }
.badge--success { background: var(--color-success); color: #fff; }
.badge--warning { background: var(--color-warning); color: #000; }
.badge--outline { border: 1px solid var(--color-border); color: var(--color-text-secondary); }
.badge--muted { background: var(--color-muted); color: var(--color-text-secondary); }

.tag {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 400;
  background: var(--color-muted);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tag:hover, .tag--active {
  background: var(--color-primary);
  color: var(--color-on-primary);
}

/* ===========================
   Forms
   =========================== */
.form-group {
  margin-bottom: var(--space-4);
}

.form-label {
  display: block;
  font-weight: 500;
  font-size: var(--text-sm);
  margin-bottom: var(--space-2);
  color: var(--color-text-primary);
}

.form-label .required { color: var(--color-destructive); }

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text-primary);
  transition: border-color var(--transition-base);
  outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--color-primary);
}

.form-textarea { resize: vertical; min-height: 120px; }

.form-hint {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}

.form-error {
  font-size: var(--text-sm);
  color: var(--color-destructive);
  margin-top: var(--space-1);
}

.form-checkbox {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
}

.form-checkbox input {
  width: 20px;
  height: 20px;
  accent-color: var(--color-primary);
  cursor: pointer;
}

/* ===========================
   Breadcrumbs
   =========================== */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  padding: var(--space-4) 0;
}

.breadcrumbs a { color: var(--color-text-secondary); }
.breadcrumbs a:hover { color: var(--color-primary); }
.breadcrumbs__separator { color: var(--color-text-muted); }
.breadcrumbs__current { color: var(--color-text-primary); font-weight: 500; }

/* ===========================
   Footer
   =========================== */
.site-footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: var(--space-7) 0 var(--space-5);
  margin-top: var(--space-8);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-6);
  margin-bottom: var(--space-6);
}

.site-footer__col h4 {
  font-size: var(--text-base);
  margin-bottom: var(--space-3);
  color: var(--color-text-primary);
}

.site-footer__col ul { display: flex; flex-direction: column; gap: var(--space-2); }
.site-footer__col a { color: var(--color-text-secondary); font-size: var(--text-sm); }
.site-footer__col a:hover { color: var(--color-primary); }

.site-footer__bottom {
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-4);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.social-links { display: flex; gap: var(--space-3); }
.social-links a {
  width: 40px; height: 40px;
  border-radius: var(--radius-md);
  background: var(--color-muted);
  display: flex; align-items: center; justify-content: center;
  color: var(--color-text-secondary);
  transition: all var(--transition-fast);
}
.social-links a:hover { background: var(--color-primary); color: var(--color-on-primary); }

/* ===========================
   Hero
   =========================== */
.hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  color: var(--color-on-primary);
  padding: var(--space-9) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -5%;
  width: 300px;
  height: 300px;
  background: rgba(255,255,255,0.06);
  border-radius: 50%;
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin: 0 auto;
}

.hero__title {
  font-size: var(--text-5xl);
  font-weight: 600;
  margin-bottom: var(--space-4);
  color: var(--color-on-primary);
  line-height: 1.1;
}

.hero__subtitle {
  font-size: var(--text-xl);
  margin-bottom: var(--space-6);
  opacity: 0.95;
}

.hero__search {
  display: flex;
  background: var(--color-surface);
  border-radius: var(--radius-full);
  padding: var(--space-2);
  box-shadow: var(--shadow-xl);
  max-width: 600px;
  margin: 0 auto;
}

.hero__search input {
  flex: 1;
  border: none;
  outline: none;
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-lg);
  background: transparent;
  color: var(--color-text-primary);
}

.hero__search-btn {
  background: var(--color-primary);
  color: var(--color-on-primary);
  border: none;
  border-radius: var(--radius-full);
  padding: var(--space-2) var(--space-6);
  font-weight: 500;
  font-size: var(--text-base);
  cursor: pointer;
  transition: background var(--transition-base);
}

.hero__search-btn:hover { background: var(--color-secondary); }

.hero__popular {
  margin-top: var(--space-4);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  font-size: var(--text-sm);
}

.hero__popular span { opacity: 0.8; }

.hero__popular .tag {
  background: rgba(255,255,255,0.2);
  color: var(--color-on-primary);
}

.hero__popular .tag:hover {
  background: var(--color-on-primary);
  color: var(--color-primary);
}

/* ===========================
   Category cards
   =========================== */
.category-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  padding: var(--space-5);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-slow);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary);
}

.category-card__icon {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-lg);
  background: var(--color-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
}

.category-card__name {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--text-base);
}

.category-card__count {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* ===========================
   Filters / Sidebar
   =========================== */
.filter-sidebar {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}

.filter-group {
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-4) 0;
}

.filter-group:last-child { border-bottom: none; }

.filter-group__title {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--text-base);
  margin-bottom: var(--space-3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.filter-option {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) 0;
  cursor: pointer;
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

.filter-option:hover { color: var(--color-primary); }

.filter-option input {
  width: 18px;
  height: 18px;
  accent-color: var(--color-primary);
}

.filter-option__count {
  margin-left: auto;
  color: var(--color-text-muted);
  font-size: var(--text-xs);
}

.price-range {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.price-range input {
  width: 80px;
  padding: var(--space-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
}

/* ===========================
   Product detail
   =========================== */
.product-gallery {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.product-gallery__main {
  aspect-ratio: 1;
  background: var(--color-muted);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.product-gallery__main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-gallery__thumbs {
  display: flex;
  gap: var(--space-2);
}

.product-gallery__thumb {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-md);
  border: 2px solid var(--color-border);
  overflow: hidden;
  cursor: pointer;
  transition: border-color var(--transition-fast);
}

.product-gallery__thumb--active { border-color: var(--color-primary); }
.product-gallery__thumb:hover { border-color: var(--color-primary); }
.product-gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }

.product-info__title {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-2);
}

.product-info__rating {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.rating-stars { display: flex; gap: 2px; color: var(--color-star); }

.product-info__price {
  font-family: var(--font-body);
  font-size: var(--text-3xl);
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: var(--space-4);
}

.product-info__description {
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-5);
}

.qty-selector {
  display: flex;
  align-items: center;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.qty-selector button {
  background: var(--color-muted);
  border: none;
  width: 44px;
  height: 44px;
  font-size: var(--text-xl);
  cursor: pointer;
  color: var(--color-text-primary);
  transition: background var(--transition-fast);
}

.qty-selector button:hover { background: var(--color-border); }

.qty-selector input {
  width: 60px;
  text-align: center;
  border: none;
  font-size: var(--text-lg);
  font-weight: 500;
  background: var(--color-surface);
  color: var(--color-text-primary);
  outline: none;
}

/* Tabs */
.tabs {
  border-bottom: 2px solid var(--color-border);
  display: flex;
  gap: var(--space-5);
}

.tab {
  padding: var(--space-3) var(--space-4);
  font-weight: 500;
  color: var(--color-text-secondary);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition-fast);
}

.tab:hover { color: var(--color-primary); }

.tab--active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

.tab-content { padding-top: var(--space-5); }

/* ===========================
   Cart
   =========================== */
.cart-item {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-3);
}

.cart-item__image {
  width: 100px;
  height: 100px;
  border-radius: var(--radius-md);
  background: var(--color-muted);
  overflow: hidden;
  flex-shrink: 0;
}

.cart-item__image img { width: 100%; height: 100%; object-fit: cover; }

.cart-item__details { flex: 1; }
.cart-item__name { font-family: var(--font-body); font-weight: 500; font-size: var(--text-lg); }
.cart-item__designer { font-size: var(--text-sm); color: var(--color-text-secondary); }
.cart-item__price { font-weight: 600; color: var(--color-primary); font-size: var(--text-lg); }

.cart-item__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-2);
}

.cart-summary {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  position: sticky;
  top: calc(var(--header-height) + var(--space-4));
}

.cart-summary__row {
  display: flex;
  justify-content: space-between;
  padding: var(--space-2) 0;
  font-size: var(--text-base);
}

.cart-summary__row--total {
  border-top: 2px solid var(--color-border);
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  font-size: var(--text-xl);
  font-weight: 600;
}

/* ===========================
   Order tracking
   =========================== */
.order-status-track {
  display: flex;
  align-items: center;
  gap: 0;
  margin: var(--space-5) 0;
}

.order-status-step {
  flex: 1;
  text-align: center;
  position: relative;
}

.order-status-step__dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-muted);
  border: 3px solid var(--color-border);
  margin: 0 auto var(--space-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  position: relative;
  z-index: 1;
}

.order-status-step--done .order-status-step__dot {
  background: var(--color-success);
  border-color: var(--color-success);
  color: #fff;
}

.order-status-step--current .order-status-step__dot {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-on-primary);
  box-shadow: 0 0 0 6px rgba(225,29,72,0.15);
}

.order-status-step__label {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-secondary);
}

.order-status-step--current .order-status-step__label,
.order-status-step--done .order-status-step__label {
  color: var(--color-text-primary);
}

.order-status-step__line {
  position: absolute;
  top: 18px;
  left: 50%;
  right: -50%;
  height: 3px;
  background: var(--color-border);
  z-index: 0;
}

.order-status-step--done .order-status-step__line { background: var(--color-success); }

/* ===========================
   Alerts / Banners
   =========================== */
.alert {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-sm);
  margin-bottom: var(--space-4);
}

.alert--info { background: rgba(37,99,235,0.1); color: var(--color-accent); border: 1px solid rgba(37,99,235,0.2); }
.alert--success { background: rgba(22,163,74,0.1); color: var(--color-success); border: 1px solid rgba(22,163,74,0.2); }
.alert--warning { background: rgba(245,158,11,0.1); color: var(--color-warning); border: 1px solid rgba(245,158,11,0.2); }
.alert--error { background: rgba(220,38,38,0.1); color: var(--color-destructive); border: 1px solid rgba(220,38,38,0.2); }

/* Cookie banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: var(--space-4) var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  z-index: 200;
  box-shadow: var(--shadow-lg);
}

.cookie-banner__text { flex: 1; font-size: var(--text-sm); color: var(--color-text-secondary); }

/* ===========================
   Placeholder
   =========================== */
.placeholder-img {
  background: linear-gradient(135deg, var(--color-muted) 0%, var(--color-border) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.placeholder-icon {
  width: 48px;
  height: 48px;
  color: var(--color-text-muted);
  opacity: 0.5;
}

/* ===========================
   Modal
   =========================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
  padding: var(--space-4);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

.modal-overlay--open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  max-width: 500px;
  width: 100%;
  padding: var(--space-6);
  box-shadow: var(--shadow-xl);
  transform: scale(0.95);
  transition: transform var(--transition-base);
}

.modal-overlay--open .modal { transform: scale(1); }

.modal__title {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-4);
}

.modal__close {
  float: right;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-muted);
  padding: var(--space-1);
}

.modal__close:hover { color: var(--color-text-primary); }

/* ===========================
   Two-column page layouts
   =========================== */
.product-layout,
.catalog-layout,
.summary-layout,
.account-layout,
.feedback-layout {
  display: grid;
  gap: var(--space-5);
  align-items: start;
}
.product-layout { grid-template-columns: 1fr 1fr; gap: var(--space-6); }
.catalog-layout { grid-template-columns: var(--sidebar-width) 1fr; }
.summary-layout { grid-template-columns: 1fr 360px; }
.account-layout { grid-template-columns: 260px 1fr; }
.feedback-layout { grid-template-columns: 1fr 1fr; }

/* Grid children must not force overflow (min-width: auto is the default) */
.product-layout > *,
.catalog-layout > *,
.summary-layout > *,
.account-layout > *,
.feedback-layout > * {
  min-width: 0;
}

/* Mobile-only toggles (hidden on desktop) */
.mobile-menu-btn,
#filterToggle,
.filter-close-btn { display: none; }

/* ===========================
   Pagination
   =========================== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin-top: var(--space-6);
  max-width: 100%;
}

.pagination .btn {
  min-width: 40px;
  height: 40px;
  padding: 0 var(--space-2);
  font-size: var(--text-sm);
}

.pagination .btn--prev,
.pagination .btn--next {
  padding: 0 var(--space-3);
}

.pagination__ellipsis {
  padding: 0 var(--space-1);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

/* On very small screens, hide the text label of Prev/Next and keep only the arrow */
@media (max-width: 480px) {
  .pagination .btn--prev .pagination__label,
  .pagination .btn--next .pagination__label {
    display: none;
  }
  .pagination .btn {
    min-width: 36px;
    height: 36px;
  }
}

/* ===========================
   Responsive
   =========================== */
@media (max-width: 1024px) {
  .grid--4 { grid-template-columns: repeat(3, 1fr); }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .product-layout,
  .catalog-layout,
  .summary-layout,
  .account-layout,
  .feedback-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  /* Header: two rows — controls on row 1, full-width search on row 2 */
  .site-header {
    height: auto;
    padding: var(--space-2) 0;
  }
  .site-header__inner {
    flex-wrap: wrap;
    gap: var(--space-2);
    padding: 0 var(--space-3);
  }
  .logo {
    flex: 1;
    min-width: 0;
    font-size: var(--text-lg);
  }
  .logo__icon { width: 32px; height: 32px; }
  .logo__icon svg { width: 18px; height: 18px; }
  .search-bar {
    order: 2;
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
    max-width: none;
  }
  .header-actions { gap: var(--space-1); flex-shrink: 0; }
  .icon-btn { width: 40px; height: 40px; }

  .nav { display: none; }
  .mobile-menu-btn { display: flex; }
  #filterToggle { display: inline-flex; }
  .filter-close-btn { display: inline-flex; }

  .hero { padding: var(--space-7) 0; }
  .hero__title { font-size: var(--text-4xl); }
  .hero__subtitle { font-size: var(--text-lg); }
  .hero__search { flex-wrap: wrap; padding: var(--space-2); }
  .hero__search input { font-size: var(--text-base); min-width: 0; }

  .grid--2, .grid--3, .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--auto { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  .site-footer__bottom { flex-direction: column; gap: var(--space-2); text-align: center; }

  .cart-item { flex-direction: column; }
  .cart-item__actions { flex-direction: row; align-items: center; }
  .cookie-banner { flex-direction: column; text-align: center; gap: var(--space-3); }

  .tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .tab { white-space: nowrap; }

  /* Account sidebar stacks normally above content on mobile */
  .filter-sidebar { position: static; }

  /* Catalog filter sidebar becomes a slide-out drawer */
  #filterSidebar {
    position: fixed;
    left: -100%;
    top: 0;
    bottom: 0;
    width: 85%;
    max-width: 360px;
    z-index: 200;
    overflow-y: auto;
    transition: left var(--transition-slow);
    box-shadow: var(--shadow-xl);
  }
  #filterSidebar.filter-sidebar--open { left: 0; }

  /* Sticky summary no longer sticky on mobile (single column) */
  .cart-summary { position: static; }

  /* Product gallery thumbs scroll horizontally instead of overflowing */
  .product-gallery__thumbs {
    overflow-x: auto;
    padding-bottom: var(--space-2);
    -webkit-overflow-scrolling: touch;
  }
  .product-gallery__thumb { flex-shrink: 0; }

  .order-status-step__label { font-size: var(--text-xs); }

  /* Mobile menu drops down below the header (auto-height safe) */
  .nav--mobile-open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-surface);
    flex-direction: column;
    padding: var(--space-4);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    z-index: 99;
    gap: var(--space-3);
    box-shadow: var(--shadow-md);
  }
}

@media (max-width: 480px) {
  .grid--2, .grid--3, .grid--4, .grid--auto { grid-template-columns: minmax(0, 1fr); }
  .hero__title { font-size: var(--text-3xl); }
  .hero__subtitle { font-size: var(--text-base); }
  .container { padding: 0 var(--space-3); }
  .hero__search-btn { width: 100%; }
  .btn--lg { padding: var(--space-3) var(--space-5); font-size: var(--text-base); }
  .section { padding: var(--space-6) 0; }
  .section__title { font-size: var(--text-2xl); }
  .product-info__title { font-size: var(--text-2xl); }
  .product-info__price { font-size: var(--text-2xl); }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
