/* ============================================================
   FRESH FOOD MARKET — Shared Component Styles
   Reusable UI components for all wireframes
   ============================================================ */

/* ── Reset & Base ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--color-text-primary);
  background: var(--color-background);
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
}

h1 { font-size: var(--text-h1); }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); }
h4 { font-size: var(--text-h4); }

a {
  color: var(--color-text-link);
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: center;
  white-space: nowrap;
  user-select: none;
}

.btn:active { transform: scale(0.97); }

/* Sizes */
.btn-lg {
  height: 48px;
  padding: 0 var(--space-6);
  font-size: var(--text-lg);
}

.btn-md {
  height: 40px;
  padding: 0 var(--space-4);
  font-size: var(--text-base);
}

.btn-sm {
  height: 32px;
  padding: 0 var(--space-3);
  font-size: var(--text-sm);
}

.btn-full { width: 100%; }

/* Variants */
.btn-primary {
  background: var(--color-accent);
  color: var(--color-text-on-accent);
  border-color: var(--color-accent);
}
.btn-primary:hover { background: var(--color-accent-hover); }

.btn-primary-dark {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  border-color: var(--color-primary);
}
.btn-primary-dark:hover { background: var(--color-primary-light); }

.btn-secondary {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn-secondary:hover { background: var(--color-primary); color: var(--color-text-inverse); }

.btn-ghost {
  background: transparent;
  color: var(--color-primary);
  border-color: transparent;
}
.btn-ghost:hover { background: var(--color-surface-hover); }

.btn-danger {
  background: var(--color-error);
  color: var(--color-text-inverse);
  border-color: var(--color-error);
}

.btn-disabled {
  background: var(--color-border-light);
  color: var(--color-text-disabled);
  border-color: var(--color-border-light);
  cursor: not-allowed;
  pointer-events: none;
}

/* Icon button (circular) */
.btn-icon {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ── Form Inputs ── */
.input-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.input-label {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-secondary);
}

.input-field {
  height: 48px;
  padding: 0 var(--space-4);
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text-primary);
  background: var(--color-white);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color var(--transition-fast);
}

.input-field:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(4, 63, 45, 0.1);
}

.input-field::placeholder {
  color: var(--color-text-muted);
}

.input-field--error {
  border-color: var(--color-error);
}

.input-field--success {
  border-color: var(--color-success);
}

.input-helper {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.input-error {
  font-size: var(--text-sm);
  color: var(--color-error);
}

/* Textarea */
.textarea-field {
  min-height: 96px;
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text-primary);
  background: var(--color-white);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  resize: vertical;
  outline: none;
}

.textarea-field:focus {
  border-color: var(--color-primary);
}

/* Search Input */
.search-input {
  position: relative;
}

.search-input .input-field {
  padding-left: 44px;
  border-radius: var(--radius-full);
  background: var(--color-surface);
}

.search-input .search-icon {
  position: absolute;
  left: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
}

/* ── OTP Input ── */
.otp-group {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
}

.otp-digit {
  width: 48px;
  height: 56px;
  text-align: center;
  font-family: var(--font-heading);
  font-size: var(--text-h2);
  font-weight: var(--weight-bold);
  color: var(--color-primary);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  outline: none;
}

.otp-digit:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(4, 63, 45, 0.1);
}

.otp-digit--filled {
  border-color: var(--color-primary);
  background: var(--color-background);
}

/* ── Product Card ── */
.product-card {
  position: relative;
  background: var(--color-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-fast);
}

.product-card:hover { box-shadow: var(--shadow-md); }

.product-card__badge {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
  padding: 2px var(--space-2);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  background: var(--color-accent);
  color: var(--color-text-on-accent);
  border-radius: var(--radius-sm);
  z-index: 1;
}

.product-card__wishlist {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.85);
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  z-index: 1;
}

.product-card__image {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--color-background);
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-card__image svg,
.product-card__image img {
  width: 60%;
  height: 60%;
  opacity: 0.3;
}

.product-card__body {
  padding: var(--space-3);
}

.product-card__brand {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.product-card__title {
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  color: var(--color-text-primary);
  line-height: var(--leading-normal);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 38px;
}

.product-card__price {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  margin-top: var(--space-1);
}

.product-card__price-current {
  font-family: var(--font-heading);
  font-size: var(--text-price-md);
  font-weight: var(--weight-bold);
  color: var(--color-text-primary);
}

.product-card__price-was {
  font-size: var(--text-price-sm);
  color: var(--color-text-muted);
  text-decoration: line-through;
}

.product-card__delivery {
  margin-top: var(--space-1);
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
}

.product-card__add {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 36px;
  margin-top: var(--space-2);
  background: var(--color-accent);
  color: var(--color-text-on-accent);
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.product-card__add:hover { background: var(--color-accent-hover); }

/* Quantity Stepper (replaces Add button when item in cart) */
.qty-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  height: 36px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1.5px solid var(--color-primary);
}

.qty-stepper__btn {
  width: 36px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  color: var(--color-text-inverse);
  border: none;
  cursor: pointer;
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
}

.qty-stepper__value {
  width: 40px;
  text-align: center;
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  color: var(--color-primary);
  background: var(--color-white);
}

/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
  padding: var(--space-4);
}

.product-grid--3col {
  grid-template-columns: repeat(3, 1fr);
}

/* ── Cards ── */
.card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card--flat {
  box-shadow: none;
  border: 1px solid var(--color-border-light);
}

.card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4);
  border-bottom: 1px solid var(--color-divider);
}

.card__body {
  padding: var(--space-4);
}

.card__footer {
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--color-divider);
  background: var(--color-surface-hover);
}

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px var(--space-2);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.badge--accent {
  background: var(--color-accent);
  color: var(--color-text-on-accent);
}

.badge--primary {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}

.badge--success {
  background: var(--color-success-light);
  color: #166534;
}

.badge--warning {
  background: var(--color-warning-light);
  color: #92400E;
}

.badge--error {
  background: var(--color-error-light);
  color: #991B1B;
}

.badge--info {
  background: var(--color-info-light);
  color: #1E40AF;
}

.badge--outline {
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
}

/* Cart count badge */
.badge-count {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  font-size: 10px;
  font-weight: var(--weight-bold);
  background: var(--color-accent);
  color: var(--color-text-on-accent);
  border-radius: var(--radius-full);
  position: absolute;
  top: -4px;
  right: -4px;
}

/* ── Bottom Sheets ── */
.bottom-sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: var(--z-overlay);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.bottom-sheet-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-white);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  z-index: var(--z-modal);
  transform: translateY(100%);
  transition: transform var(--transition-normal);
  max-height: 85vh;
  overflow-y: auto;
}

.bottom-sheet.active {
  transform: translateY(0);
}

.bottom-sheet__handle {
  width: 36px;
  height: 4px;
  background: var(--color-border);
  border-radius: var(--radius-full);
  margin: var(--space-2) auto var(--space-4);
}

.bottom-sheet__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-4) var(--space-3);
}

.bottom-sheet__body {
  padding: 0 var(--space-4) var(--space-6);
}

/* ── List Items ── */
.list-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--color-white);
  border-bottom: 1px solid var(--color-divider);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.list-item:hover { background: var(--color-surface-hover); }

.list-item__icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-background);
  border-radius: var(--radius-md);
  color: var(--color-primary);
  flex-shrink: 0;
}

.list-item__content {
  flex: 1;
  min-width: 0;
}

.list-item__title {
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  color: var(--color-text-primary);
}

.list-item__subtitle {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-item__action {
  color: var(--color-text-muted);
  flex-shrink: 0;
}

/* ── Chips / Tags ── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  height: 32px;
  padding: 0 var(--space-3);
  font-size: var(--text-sm);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-full);
  background: var(--color-white);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.chip--active {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  border-color: var(--color-primary);
}

.chip-group {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  padding: var(--space-2) var(--space-4);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.chip-group::-webkit-scrollbar { display: none; }

/* ── Notification / Toast ── */
.toast {
  position: fixed;
  top: calc(var(--status-bar-height) + var(--space-2));
  left: var(--space-4);
  right: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  z-index: var(--z-toast);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  box-shadow: var(--shadow-lg);
  transform: translateY(-100px);
  opacity: 0;
  transition: all var(--transition-normal);
}

.toast.active {
  transform: translateY(0);
  opacity: 1;
}

.toast--success { background: var(--color-success); color: #fff; }
.toast--error { background: var(--color-error); color: #fff; }
.toast--warning { background: var(--color-warning); color: #fff; }

/* ── Progress Bar ── */
.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--color-border-light);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar__fill {
  height: 100%;
  background: var(--color-accent);
  border-radius: var(--radius-full);
  transition: width var(--transition-normal);
}

.progress-bar__fill--success { background: var(--color-success); }

/* Free delivery progress */
.delivery-progress {
  padding: var(--space-3) var(--space-4);
  background: var(--color-background);
  border-radius: var(--radius-md);
}

.delivery-progress__text {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-2);
}

.delivery-progress__text strong {
  color: var(--color-primary);
}

/* ── Tabs ── */
.tabs {
  display: flex;
  border-bottom: 2px solid var(--color-border-light);
}

.tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--tab-bar-height);
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  color: var(--color-text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tab--active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

/* ── Divider ── */
.divider {
  height: 1px;
  background: var(--color-divider);
  margin: var(--space-4) 0;
}

.divider--thick {
  height: 8px;
  background: var(--color-background);
}

/* ── Avatar ── */
.avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  color: var(--color-text-inverse);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: var(--weight-bold);
  font-size: var(--text-base);
  flex-shrink: 0;
}

.avatar--lg { width: 64px; height: 64px; font-size: var(--text-h3); }
.avatar--sm { width: 32px; height: 32px; font-size: var(--text-sm); }

/* ── Section Header ── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-4) var(--space-2);
}

.section-header__title {
  font-family: var(--font-heading);
  font-size: var(--text-h4);
  font-weight: var(--weight-bold);
  color: var(--color-text-primary);
}

.section-header__action {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-primary);
  cursor: pointer;
}

/* ── Horizontal Scroll Section ── */
.h-scroll {
  display: flex;
  gap: var(--space-3);
  overflow-x: auto;
  padding: var(--space-2) var(--space-4);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.h-scroll::-webkit-scrollbar { display: none; }

/* ── Category Card ── */
.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  min-width: 72px;
  cursor: pointer;
}

.category-card__icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  font-size: 24px;
  box-shadow: var(--shadow-sm);
}

.category-card__label {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  text-align: center;
  max-width: 72px;
}

/* ── Promo Banner ── */
.promo-banner {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-primary);
  color: var(--color-text-inverse);
  padding: var(--space-6) var(--space-4);
  min-height: 140px;
}

.promo-banner__title {
  font-family: var(--font-heading);
  font-size: var(--text-h3);
  font-weight: var(--weight-bold);
  margin-bottom: var(--space-1);
}

.promo-banner__subtitle {
  font-size: var(--text-sm);
  opacity: 0.85;
  margin-bottom: var(--space-3);
}

.promo-banner__cta {
  display: inline-flex;
  align-items: center;
  padding: var(--space-2) var(--space-4);
  background: var(--color-accent);
  color: var(--color-text-on-accent);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
}

/* Promo slider dots */
.slider-dots {
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) 0;
}

.slider-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--color-border);
}

.slider-dot--active {
  width: 20px;
  background: var(--color-primary);
}

/* ── Timeslot Picker ── */
.timeslot-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
}

.timeslot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  background: var(--color-white);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.timeslot--selected {
  border-color: var(--color-primary);
  background: rgba(4, 63, 45, 0.04);
}

.timeslot--unavailable {
  opacity: 0.4;
  cursor: not-allowed;
}

.timeslot__time {
  font-weight: var(--weight-medium);
  color: var(--color-text-primary);
}

.timeslot__price {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

.timeslot__price--free {
  color: var(--color-success);
  font-weight: var(--weight-bold);
}

/* ── Date Picker Quick Selects ── */
.date-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
}

.date-shortcut {
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-sm);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  background: var(--color-white);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.date-shortcut--active {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  border-color: var(--color-primary);
}

/* ── Empty States ── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-12) var(--space-8);
  text-align: center;
}

.empty-state__icon {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-background);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-6);
  font-size: 36px;
  color: var(--color-text-muted);
}

.empty-state__title {
  font-family: var(--font-heading);
  font-size: var(--text-h3);
  font-weight: var(--weight-bold);
  color: var(--color-text-primary);
  margin-bottom: var(--space-2);
}

.empty-state__text {
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  max-width: 260px;
  margin-bottom: var(--space-6);
}

/* ── Skeleton Loading ── */
.skeleton {
  background: linear-gradient(90deg, var(--color-border-light) 25%, var(--color-background) 50%, var(--color-border-light) 75%);
  background-size: 200% 100%;
  animation: skeleton-pulse 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

@keyframes skeleton-pulse {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton--text { height: 14px; width: 80%; }
.skeleton--text-short { height: 14px; width: 50%; }
.skeleton--title { height: 20px; width: 60%; }
.skeleton--image { aspect-ratio: 1; width: 100%; }
.skeleton--circle { border-radius: var(--radius-full); }
.skeleton--button { height: 48px; width: 100%; border-radius: var(--radius-md); }

/* ── Order Status Timeline ── */
.status-timeline {
  display: flex;
  flex-direction: column;
  padding: var(--space-4);
}

.status-step {
  display: flex;
  gap: var(--space-3);
  position: relative;
  padding-bottom: var(--space-6);
}

.status-step:last-child { padding-bottom: 0; }

.status-step__indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

.status-step__dot {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  border: 2px solid var(--color-border);
  background: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.status-step__dot--completed {
  background: var(--color-success);
  border-color: var(--color-success);
  color: #fff;
}

.status-step__dot--active {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(4, 63, 45, 0.1);
}

.status-step__line {
  width: 2px;
  flex: 1;
  background: var(--color-border-light);
  margin-top: var(--space-1);
}

.status-step__line--completed {
  background: var(--color-success);
}

.status-step__content {
  padding-top: 2px;
}

.status-step__title {
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  color: var(--color-text-primary);
}

.status-step__time {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* ── Swipe Action ── */
.swipe-container {
  position: relative;
  overflow: hidden;
}

.swipe-action {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-error);
  color: #fff;
}

/* ── Rating Stars ── */
.rating {
  display: flex;
  gap: var(--space-1);
}

.rating__star {
  width: 32px;
  height: 32px;
  color: var(--color-border);
  cursor: pointer;
}

.rating__star--filled {
  color: #FBBF24;
}

.rating--lg .rating__star {
  width: 44px;
  height: 44px;
}

/* ── Toggle / Switch ── */
.toggle {
  width: 48px;
  height: 28px;
  background: var(--color-border);
  border-radius: var(--radius-full);
  position: relative;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.toggle--active {
  background: var(--color-primary);
}

.toggle__knob {
  width: 22px;
  height: 22px;
  background: var(--color-white);
  border-radius: var(--radius-full);
  position: absolute;
  top: 3px;
  left: 3px;
  transition: transform var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.toggle--active .toggle__knob {
  transform: translateX(20px);
}

/* ── Utility Classes ── */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--color-text-muted); }
.text-secondary { color: var(--color-text-secondary); }
.text-primary { color: var(--color-primary); }
.text-success { color: var(--color-success); }
.text-error { color: var(--color-error); }
.text-sm { font-size: var(--text-sm); }
.text-xs { font-size: var(--text-xs); }
.text-lg { font-size: var(--text-lg); }
.font-heading { font-family: var(--font-heading); }
.font-bold { font-weight: var(--weight-bold); }
.font-medium { font-weight: var(--weight-medium); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-center { align-items: center; justify-content: center; }
.flex-between { justify-content: space-between; }
.flex-1 { flex: 1; }
.items-center { align-items: center; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }

.p-4 { padding: var(--space-4); }
.p-6 { padding: var(--space-6); }
.px-4 { padding-left: var(--space-4); padding-right: var(--space-4); }
.py-2 { padding-top: var(--space-2); padding-bottom: var(--space-2); }
.py-4 { padding-top: var(--space-4); padding-bottom: var(--space-4); }
.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }

.w-full { width: 100%; }
.hidden { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ── Wireframe Annotation ── */
.wireframe-annotations {
  margin-top: var(--space-8);
  padding: var(--space-6);
  background: #FFF9DB;
  border-top: 3px dashed #F59E0B;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 12px;
  color: #333;
}

.wireframe-annotations h3 {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 14px;
  color: #92400E;
  margin-bottom: var(--space-4);
}

.wireframe-annotations .annotation {
  margin-bottom: var(--space-3);
  padding: var(--space-2) var(--space-3);
  background: rgba(255, 255, 255, 0.7);
  border-left: 3px solid #F59E0B;
}

.wireframe-annotations .annotation strong {
  color: #92400E;
}

/* ── State Toggle Bar (wireframe utility) ── */
.state-toggle-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #1F2937;
  color: #E5E7EB;
  padding: var(--space-2) var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  z-index: 9999;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 11px;
}

.state-toggle-bar__label {
  color: #9CA3AF;
  white-space: nowrap;
}

.state-toggle-bar button {
  padding: 3px 10px;
  border: 1px solid #4B5563;
  border-radius: 4px;
  background: transparent;
  color: #E5E7EB;
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
}

.state-toggle-bar button.active {
  background: #3B82F6;
  border-color: #3B82F6;
  color: #fff;
}

.state-toggle-bar__nav {
  margin-left: auto;
  display: flex;
  gap: var(--space-2);
}

.state-toggle-bar__nav a {
  color: #93C5FD;
  text-decoration: none;
}

.state-toggle-bar__nav a:hover {
  text-decoration: underline;
}
