/* ============================================
   LineaUniversal — Estilos base
   Diseño serio pero creativo
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Playfair+Display:wght@600;700&display=swap');

/* --- Variables --- */
:root {
  --color-bg: #f0f4f8;
  --color-surface: #ffffff;
  --color-primary: #0066cc;
  --color-primary-light: #0052a3;
  --color-primary-dark: #004080;
  --color-accent: #00d4ff;
  --color-accent-hover: #00b8e6;
  --color-text: #1a2b3c;
  --color-text-muted: #5c6b7a;
  --color-border: #e1e8ed;
  --color-border-strong: #c9d3dc;
  --color-ink: #0c1524;
  --color-ink-light: #1c2c40;
  --color-success: #10b981;
  --color-danger: #ef4444;
  --color-warning: #f59e0b;
  --shadow-sm: 0 2px 8px rgba(0, 102, 204, 0.1);
  --shadow-md: 0 4px 20px rgba(0, 102, 204, 0.15);
  --shadow-lg: 0 8px 40px rgba(0, 102, 204, 0.2);
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 32px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-body: 'DM Sans', system-ui, sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;
  --max-width: 1200px;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  background-image:
    radial-gradient(circle at 1px 1px, rgba(0, 82, 163, 0.07) 1.5px, transparent 0);
  background-size: 28px 28px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-primary-light);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--color-accent);
}

ul {
  list-style: none;
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

main {
  flex: 1;
  padding: 2rem 0 4rem;
}

/* --- Header & Nav --- */
.site-header {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(10px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1rem 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.logo span {
  color: var(--color-accent);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-shrink: 0;
}

.site-nav a {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color var(--transition);
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--color-accent);
}

.nav-greeting {
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
}

.nav-cart {
  position: relative;
}

.cart-badge {
  position: absolute;
  top: -8px;
  right: -10px;
  background: var(--color-accent);
  color: var(--color-primary);
  font-size: 0.7rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- Footer --- */
.site-footer {
  background: linear-gradient(135deg, var(--color-ink) 0%, var(--color-ink-light) 100%);
  color: rgba(255, 255, 255, 0.65);
  text-align: center;
  padding: 1.5rem;
  font-size: 0.875rem;
  margin-top: auto;
  border-top: 3px solid var(--color-accent);
}

/* --- Typography --- */
.page-title {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.page-subtitle {
  color: var(--color-text-muted);
  font-size: 1.05rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border);
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 1.25rem;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-primary) 100%);
  color: #fff;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  filter: brightness(1.1);
}

.btn-secondary {
  background: var(--color-primary);
  color: #fff;
}

.btn-secondary:hover {
  background: var(--color-primary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
  box-shadow: none;
}

.btn-outline:hover {
  background: var(--color-primary);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.btn-danger {
  background: var(--color-danger);
  color: #fff;
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  filter: brightness(1.1);
}

.btn-success {
  background: var(--color-success);
  color: #fff;
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  filter: brightness(1.1);
}

.btn-whatsapp {
  background: #25d366;
  color: #fff;
}

.btn-whatsapp:hover {
  background: #1ebe5b;
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.35);
}

.btn-whatsapp .whatsapp-icon {
  flex-shrink: 0;
}

.btn-sm {
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* --- Cards --- */
.card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
  border: 1px solid var(--color-border);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
  border-color: var(--color-border-strong);
}

.card-body {
  padding: 1.5rem;
}

/* --- Modules (bloques tipo tarjeta para el home y otras páginas) --- */
.module {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
}

/* --- Tarjetas de estadísticas (panel admin) --- */
.admin-stat {
  text-align: center;
  padding: 1.25rem;
}

.admin-stat-value {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-primary);
}

.admin-stat-label {
  display: block;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: 0.25rem;
}

.module-title {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 1rem;
}

.module-link {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-primary-light);
}

.module-link:hover {
  color: var(--color-accent);
  text-decoration: underline;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

/* --- Tiles de categoría (módulo "Compra por categoría") --- */
.category-tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 0.85rem;
}

.category-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  aspect-ratio: 1;
  padding: 0.75rem;
  border: none;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.8rem;
  text-align: center;
  line-height: 1.2;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}

.category-tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.category-tile-icon {
  font-size: 1.6rem;
}

/* --- Módulo "¿Cómo comprar?" --- */
.how-it-works {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.how-it-works li {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 0.95rem;
  color: var(--color-text);
}

.how-it-works-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

/* --- Secciones alternas (fondo blanco entre bloques del home) --- */
.section-alt {
  background: var(--color-surface);
  padding: 2.5rem 0;
  margin: 2.5rem 0;
  border-radius: var(--radius-lg);
}

/* --- Tags / categorías --- */
.tag {
  display: inline-block;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--color-bg);
  color: var(--color-primary);
  border: 1px solid var(--color-border);
  transition: all var(--transition);
  cursor: pointer;
}

.tag:hover,
.tag.active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

/* --- Buscador --- */
.search-box {
  position: relative;
  flex: 1;
  min-width: 0;
  max-width: 480px;
}

.search-box input {
  width: 100%;
  padding: 0.6rem 1rem 0.6rem 2.6rem;
  border-radius: 999px;
  border: none;
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: rgba(255, 255, 255, 0.95);
  color: var(--color-text);
}

.search-box input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.45);
}

.search-box svg {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  pointer-events: none;
}

/* --- Menú móvil (hamburguesa) --- */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem 0.4rem;
}

/* --- Franja de categorías --- */
.category-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

/* --- Product Grid --- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.product-image-wrap {
  position: relative;
}

.product-card .product-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: var(--color-border);
}

.product-image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.product-badge {
  position: absolute;
  top: 0.6rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  box-shadow: var(--shadow-sm);
}

.product-badge-categoria {
  left: 0.6rem;
  background: rgba(255, 255, 255, 0.92);
  color: var(--color-primary);
}

.product-badge-stock {
  right: 0.6rem;
  background: var(--color-warning);
  color: #fff;
}

.product-badge-agotado {
  right: 0.6rem;
  background: var(--color-danger);
  color: #fff;
}

.product-card-agotado {
  opacity: 0.65;
}

.product-card-agotado:hover {
  transform: none;
}

.admin-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--color-border);
}

.admin-no-img {
  display: inline-block;
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.product-card .product-name {
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 0.35rem;
}

.product-card .product-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: 0.75rem;
}

.product-card .product-desc {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --- Forms --- */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
  color: var(--color-primary);
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.15);
}

.form-control::placeholder {
  color: #a0aab4;
}

.input-restricted {
  ime-mode: disabled;
}

textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

.form-error {
  color: var(--color-danger);
  font-size: 0.85rem;
  margin-top: 0.35rem;
}

.form-success {
  color: var(--color-success);
  font-size: 0.85rem;
  margin-top: 0.35rem;
}

/* --- Auth Pages --- */
.auth-container {
  max-width: 440px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.auth-container-wide {
  max-width: 520px;
}

.auth-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 2.5rem;
  border: 1px solid var(--color-border);
}

.auth-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  box-shadow: var(--shadow-sm);
}

.auth-card .page-title {
  text-align: center;
  font-size: 1.75rem;
  margin-bottom: 0.25rem;
  color: var(--color-primary);
}

.auth-card .page-subtitle {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 0;
  border-bottom: none;
}

.form-section-label {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin: 0.5rem 0 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
}

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* --- Cart --- */
.cart-list {
  overflow: hidden;
}

.cart-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--color-text-muted);
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  border-bottom: 1px solid var(--color-border);
  transition: background var(--transition);
}

.cart-item:hover {
  background: rgba(0, 102, 204, 0.03);
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-item-image {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--radius-md);
  background: var(--color-border);
  flex-shrink: 0;
}

.cart-item-no-img {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.cart-item-info {
  flex: 1;
  min-width: 0;
}

.cart-item-name {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.cart-item-price {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.cart-qty {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--color-bg);
  border-radius: var(--radius-sm);
  padding: 0.25rem;
}

.cart-qty-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--color-surface);
  color: var(--color-primary);
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition);
}

.cart-qty-btn:hover {
  background: var(--color-border);
}

.cart-qty-value {
  min-width: 24px;
  text-align: center;
  font-weight: 600;
}

.cart-item-actions {
  text-align: right;
  flex-shrink: 0;
}

.cart-item-subtotal {
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
}

.cart-toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--color-primary);
  color: #fff;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  max-width: 320px;
}

.cart-toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.cart-layout {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.cart-layout .cart-list {
  flex: 1;
  min-width: 0;
}

.cart-summary {
  flex: 0 0 360px;
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 6rem;
}

@media (max-width: 900px) {
  .cart-layout {
    flex-direction: column;
  }

  .cart-summary {
    flex-basis: auto;
    width: 100%;
    position: static;
  }
}

.cart-total {
  display: flex;
  justify-content: space-between;
  font-size: 1.25rem;
  font-weight: 700;
  padding-top: 1rem;
  border-top: 2px solid var(--color-border);
  margin-top: 1rem;
}

/* --- Admin Panel --- */
.admin-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2rem;
}

.admin-sidebar {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  height: fit-content;
  position: sticky;
  top: 5rem;
  border: 1px solid var(--color-border);
}

.admin-sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.admin-sidebar a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-md);
  color: var(--color-text);
  font-weight: 500;
  transition: all var(--transition);
}

.admin-sidebar a:hover,
.admin-sidebar a.active {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  color: #fff;
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}

.admin-section {
  display: none;
}

.admin-section.active {
  display: block;
}

.admin-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
}

.admin-table th,
.admin-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.admin-table th {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.admin-table tr:hover td {
  background: rgba(0, 102, 204, 0.05);
}

.admin-table tr:first-child th:first-child {
  border-top-left-radius: var(--radius-lg);
}

.admin-table tr:first-child th:last-child {
  border-top-right-radius: var(--radius-lg);
}

.status-badge {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.status-pendiente {
  background: #fef3c7;
  color: var(--color-warning);
}

.status-confirmado,
.status-entregado {
  background: #d1fae5;
  color: var(--color-success);
}

.status-proceso {
  background: #dbeafe;
  color: var(--color-primary);
}

.status-enviado {
  background: #ede9fe;
  color: #7c3aed;
}

.status-rechazado {
  background: #fee2e2;
  color: var(--color-danger);
}

/* --- Historial de pedidos (mis-pedidos.html) --- */
.order-stepper {
  display: flex;
  align-items: flex-start;
  margin: 1.25rem 0 0.5rem;
}

.order-step {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  font-size: 0.72rem;
  color: var(--color-text-muted);
}

.order-step::before {
  content: '';
  position: absolute;
  top: 7px;
  left: -50%;
  width: 100%;
  height: 3px;
  background: var(--color-border);
  z-index: 0;
}

.order-step:first-child::before {
  content: none;
}

.order-step.done::before {
  background: var(--color-success);
}

.order-step-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color-border);
  border: 3px solid var(--color-surface);
  z-index: 1;
  margin-bottom: 0.4rem;
}

.order-step.done .order-step-dot {
  background: var(--color-success);
}

.order-step.current .order-step-label {
  color: var(--color-primary);
  font-weight: 700;
}

.order-rejected {
  color: var(--color-danger);
  font-weight: 600;
  font-size: 0.9rem;
  margin: 1.25rem 0 0.5rem;
}

.order-items {
  border-top: 1px solid var(--color-border);
  padding-top: 0.5rem;
}

.order-item-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--color-border);
}

.order-item-row:last-child {
  border-bottom: none;
}

.order-total {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  padding-top: 0.75rem;
  margin-top: 0.5rem;
  border-top: 2px solid var(--color-border);
}

/* --- Utilities --- */
.text-center { text-align: center; }
.text-muted { color: var(--color-text-muted); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-1 { gap: 0.5rem; }
.hidden { display: none !important; }

/* --- Loading --- */
.loading {
  text-align: center;
  padding: 3rem;
  color: var(--color-text-muted);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --- Hero (index) --- */
.hero {
  background:
    radial-gradient(circle at 88% 15%, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0) 45%),
    radial-gradient(circle at 12% 95%, rgba(12, 21, 36, 0.3) 0%, rgba(12, 21, 36, 0) 50%),
    linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  color: #fff;
  padding: 3rem 0;
  margin-bottom: 2.5rem;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.14)"/></svg>');
  background-size: 50px 50px;
  opacity: 0.6;
}

.hero::after {
  content: '';
  position: absolute;
  top: -70px;
  right: -70px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.16);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  position: relative;
}

.hero p {
  font-size: 1.1rem;
  opacity: 0.95;
  max-width: 500px;
  position: relative;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .header-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "logo toggle"
      "search search"
      "nav nav";
    row-gap: 0.75rem;
    align-items: center;
  }

  .logo {
    grid-area: logo;
  }

  .nav-toggle {
    grid-area: toggle;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    justify-self: end;
  }

  .search-box {
    grid-area: search;
    min-width: 0;
    max-width: 100%;
  }

  .site-nav {
    grid-area: nav;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
  }

  .site-nav.open {
    display: flex;
  }

  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
  }

  .admin-sidebar nav {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .hero h1 {
    font-size: 1.75rem;
  }

  .page-title {
    font-size: 1.75rem;
  }

  #admin-product-list,
  #admin-orders-list {
    overflow-x: auto;
  }
}

@media (max-width: 480px) {
  .cart-item {
    flex-wrap: wrap;
  }

  .cart-item-actions {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.5rem;
  }

  .order-step-label {
    font-size: 0.62rem;
  }
}
