:root {
  --bg: #fdf7f5;
  --surface: #ffffff;
  --border: #f1e0da;
  --text: #2a1e1c;
  --text-muted: #8a716c;
  --text-faint: #c4aea8;
  --primary: #d8577a;
  --primary-hover: #c1436a;
  --primary-light: #fce3ea;
  --accent: #c99a4a;
  --accent-dark: #a87c34;
  --success: #22c55e;
  --success-light: #e7f9ee;
  --danger-light: #fde8e8;
  --danger: #e05555;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(60, 20, 30, 0.05), 0 8px 24px rgba(60, 20, 30, 0.08);
}

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

body {
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, "Inter", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

a {
  color: inherit;
}

/* Cartel de promo deslizante */
.promo-marquee {
  background: var(--primary);
  overflow: hidden;
  white-space: nowrap;
}

.promo-marquee-track {
  display: flex;
  width: max-content;
  animation: promo-scroll 26s linear infinite;
}

.promo-marquee-group {
  display: flex;
  flex-shrink: 0;
}

.promo-marquee-group span {
  color: white;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 9px 40px;
  white-space: nowrap;
}

@keyframes promo-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .promo-marquee-track {
    animation: none;
  }
}

/* Topbar */
.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  object-fit: contain;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
}

.brand-tagline {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-dark);
}

.topbar-nav {
  display: flex;
  gap: 24px;
  align-items: center;
}

.nav-item {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 4px;
  border-bottom: 2px solid transparent;
}

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

.nav-item.active {
  border-bottom-color: var(--primary);
}

.cart-btn {
  position: relative;
  background: var(--primary-light);
  color: var(--primary-hover);
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-btn:hover {
  background: #f8cfdb;
}

.cart-count {
  background: var(--primary);
  color: white;
  border-radius: 999px;
  min-width: 20px;
  height: 20px;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}

/* Page */
.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 24px 120px;
}

.page-header {
  margin-bottom: 24px;
}

.page-header h1 {
  font-size: 28px;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.page-header p {
  color: var(--text-muted);
  font-size: 15px;
}

/* Toolbar: búsqueda + categorías */
.catalog-toolbar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 28px;
}

.search-box {
  position: relative;
  max-width: 360px;
}

.search-box input {
  width: 100%;
  padding: 12px 16px 12px 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 14px;
  outline: none;
}

.search-box input:focus {
  border-color: var(--primary);
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-faint);
  font-size: 14px;
}

.category-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.brand-filter {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.brand-filter[hidden] {
  display: none;
}

.picker-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.brand-chips .chip {
  padding: 6px 14px;
  font-size: 12.5px;
}

.chip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
}

.chip:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* Grid de productos */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}

.product-thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  overflow: hidden;
}

.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-thumb-gallery {
  width: 100%;
  height: 100%;
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.product-thumb-gallery::-webkit-scrollbar {
  display: none;
}

.product-thumb-gallery img {
  flex: 0 0 100%;
  scroll-snap-align: start;
}

.product-thumb-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  display: flex;
  justify-content: center;
  gap: 5px;
  pointer-events: none;
}

.product-thumb-dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.product-thumb-dots span.active {
  background: white;
  width: 6px;
  height: 6px;
}

.product-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.product-category {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent-dark);
}

.product-name {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}

.product-marca {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
}

.product-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.4;
}

.product-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
}

.product-price {
  font-weight: 700;
  font-size: 16px;
}

.product-stock {
  font-size: 11px;
  color: var(--text-faint);
}

.product-stock.sin-stock {
  color: var(--danger);
  font-weight: 600;
}

.add-btn {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}

.add-btn:hover {
  background: var(--primary-hover);
}

.add-btn:disabled {
  background: var(--text-faint);
  cursor: not-allowed;
}

.qty-control {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-light);
  border-radius: var(--radius-sm);
  padding: 4px 6px;
}

.qty-control button {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  width: 24px;
  height: 24px;
  font-weight: 700;
  cursor: pointer;
  color: var(--primary-hover);
}

.qty-control span {
  min-width: 18px;
  text-align: center;
  font-weight: 700;
  font-size: 13px;
}

.empty-msg {
  color: var(--text-muted);
  font-size: 14px;
  padding: 40px 0;
  text-align: center;
}

/* Carrito flotante (drawer) */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(30, 15, 15, 0.35);
  z-index: 30;
}

.cart-overlay[hidden] {
  display: none;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: min(400px, 100%);
  background: var(--surface);
  z-index: 31;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 30px rgba(0,0,0,0.15);
}

.cart-drawer[hidden] {
  display: none;
}

.cart-drawer-header {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-drawer-header h2 {
  font-size: 18px;
}

.cart-close {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--text-muted);
  line-height: 1;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 12px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.cart-item-thumb {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  overflow: hidden;
}

.cart-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-info {
  flex: 1;
  min-width: 0;
}

.cart-item-name {
  font-size: 13.5px;
  font-weight: 600;
}

.cart-item-price {
  font-size: 12px;
  color: var(--text-muted);
}

.cart-item-remove {
  background: none;
  border: none;
  color: var(--text-faint);
  font-size: 18px;
  cursor: pointer;
}

.cart-item-remove:hover {
  color: var(--danger);
}

.cart-drawer-footer {
  padding: 16px 20px 22px;
  border-top: 1px solid var(--border);
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 14px;
}

.shipping-msg {
  font-size: 12.5px;
  font-weight: 600;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  text-align: center;
}

.shipping-msg[hidden] {
  display: none;
}

.shipping-msg.shipping-free {
  background: var(--success-light);
  color: #1a8a4a;
}

.shipping-msg.shipping-pending {
  background: var(--primary-light);
  color: var(--primary-hover);
}

.whatsapp-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: #25d366;
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 13px;
  font-weight: 700;
  font-size: 14.5px;
  cursor: pointer;
  text-decoration: none;
}

.whatsapp-btn:hover {
  background: #1ebe5b;
}

.whatsapp-btn:disabled {
  background: var(--text-faint);
  cursor: not-allowed;
}

.cart-hint {
  font-size: 11.5px;
  color: var(--text-faint);
  text-align: center;
  margin-top: 8px;
}

.floating-whatsapp {
  position: fixed;
  bottom: 22px;
  left: 22px;
  background: #25d366;
  color: white;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  text-decoration: none;
  box-shadow: var(--shadow);
  z-index: 15;
}

/* ==== Admin ==== */
.login-card {
  max-width: 380px;
  margin: 60px auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}

.login-card h1 {
  font-size: 22px;
  margin-bottom: 6px;
}

.login-hint {
  color: var(--text-muted);
  font-size: 13.5px;
  margin-bottom: 20px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.field span {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
}

.field input,
.field select,
.field textarea {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 14px;
  outline: none;
  font-family: inherit;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--primary);
}

.confirm-btn {
  width: 100%;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 13px;
  font-weight: 700;
  font-size: 14.5px;
  cursor: pointer;
  margin-top: 4px;
}

.confirm-btn:hover {
  background: var(--primary-hover);
}

.confirm-btn:disabled {
  background: var(--text-faint);
  cursor: not-allowed;
}

.booking-status {
  font-size: 13px;
  min-height: 18px;
  margin: 8px 0;
}

.booking-status.error {
  color: var(--danger);
}

.booking-status.success {
  color: var(--success);
}

.admin-panel {
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

.admin-page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.logout-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 16px;
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  color: var(--text-muted);
}

.logout-btn:hover {
  border-color: var(--danger);
  color: var(--danger);
}

.admin-section-header {
  margin: 32px 0 14px;
}

.admin-section-header h2 {
  font-size: 18px;
  margin-bottom: 4px;
}

.admin-section-header p {
  color: var(--text-muted);
  font-size: 13.5px;
}

.admin-toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.category-manage-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.category-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-light);
  color: var(--primary-hover);
  border-radius: 999px;
  padding: 6px 8px 6px 14px;
  font-size: 13px;
  font-weight: 600;
}

.category-tag button {
  background: none;
  border: none;
  color: var(--primary-hover);
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  opacity: 0.7;
}

.category-tag button:hover {
  opacity: 1;
}

.add-category-form,
.add-product-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.add-category-form input {
  flex: 1;
  min-width: 160px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 14px;
}

.add-product-form input,
.add-product-form select {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 14px;
}

.add-product-form input[name="nombre"] {
  flex: 2;
  min-width: 180px;
}

.add-product-form input[name="descripcion"] {
  flex: 2;
  min-width: 180px;
}

.add-product-form input[name="precio"],
.add-product-form input[name="stock"] {
  width: 110px;
}

.add-product-form select {
  min-width: 160px;
}

.add-product-form input[name="imagen_url"] {
  flex: 2;
  min-width: 200px;
}

.add-category-form button,
.add-product-form button {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  white-space: nowrap;
}

.add-category-form button:hover,
.add-product-form button:hover {
  background: var(--primary-hover);
}

.category-multiselect {
  position: relative;
  display: inline-block;
}

.category-multiselect summary {
  list-style: none;
  cursor: pointer;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 30px 10px 12px;
  font-size: 14px;
  background: var(--surface);
  color: var(--text);
  min-width: 170px;
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
}

.category-multiselect summary::-webkit-details-marker {
  display: none;
}

.category-multiselect summary::after {
  content: "▾";
  position: absolute;
  right: 12px;
  color: var(--text-faint);
}

.category-multiselect[open] summary {
  border-color: var(--primary);
}

.category-multiselect-panel {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 8px;
  min-width: 210px;
  max-height: 220px;
  overflow-y: auto;
  z-index: 20;
}

.category-multiselect-panel label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  font-size: 13.5px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}

.category-multiselect-panel label:hover {
  background: var(--bg);
}

.products-table .category-multiselect summary {
  min-width: 140px;
  max-width: 170px;
  padding: 5px 26px 5px 8px;
  font-size: 13px;
}

/* Dentro de la tabla el contenedor scrollea horizontalmente y recorta
   cualquier panel position:absolute que se salga de su caja — por eso acá
   el panel se abre en flujo normal (empuja la fila) en vez de flotar. */
.products-table .category-multiselect-panel,
.products-table .photos-panel {
  position: static;
  box-shadow: none;
  border: none;
  padding: 8px 0 0;
  margin-top: 4px;
  width: auto;
  min-width: 220px;
  max-height: none;
}

.photos-manager {
  position: relative;
  display: inline-block;
}

.photos-manager summary {
  list-style: none;
  cursor: pointer;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 13px;
  background: var(--surface);
  color: var(--text);
  white-space: nowrap;
}

.photos-manager summary::-webkit-details-marker {
  display: none;
}

.photos-manager[open] summary {
  border-color: var(--primary);
}

.photos-panel {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 12px;
  width: 260px;
  z-index: 25;
}

.photos-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}

.photo-thumb-item {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.photo-thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-thumb-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  background: rgba(20, 10, 10, 0.6);
  color: white;
  border: none;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.photos-dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 8px;
  text-align: center;
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--text-muted);
  cursor: pointer;
}

.photos-dropzone.dragover {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary-hover);
}

.photos-browse-link {
  color: var(--primary);
  font-weight: 700;
  text-decoration: underline;
}

.photos-status {
  font-size: 11px;
  margin-top: 6px;
  min-height: 14px;
  color: var(--text-muted);
}

.products-table-wrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.products-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.products-table th,
.products-table td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.products-table th {
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: var(--bg);
}

.products-table tr:last-child td {
  border-bottom: none;
}

.products-table input[type="text"],
.products-table input[type="number"],
.products-table select {
  border: 1px solid transparent;
  background: transparent;
  padding: 5px 6px;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  width: 100%;
}

.products-table input:hover,
.products-table select:hover {
  border-color: var(--border);
}

.products-table input:focus,
.products-table select:focus {
  border-color: var(--primary);
  outline: none;
  background: var(--surface);
}

.products-table input[name="precio"],
.products-table input[name="stock"],
.products-table input[name="costo"] {
  width: 80px;
}


.row-actions {
  display: flex;
  gap: 6px;
}

.icon-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 30px;
  height: 30px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-btn.danger:hover {
  border-color: var(--danger);
  background: var(--danger-light);
}

.icon-btn.success:hover {
  border-color: var(--success);
  background: var(--success-light);
}

.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.badge.activo {
  background: var(--success-light);
  color: #1a8a4a;
}

.badge.inactivo {
  background: var(--danger-light);
  color: var(--danger);
}

.badge.estado-pendiente {
  background: var(--primary-light);
  color: var(--primary-hover);
}

.badge.estado-confirmado {
  background: var(--success-light);
  color: #1a8a4a;
}

.badge.estado-cancelado {
  background: var(--danger-light);
  color: var(--danger);
}

/* ==== Pedidos ==== */
.pedidos-toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.pedidos-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pedido-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.pedido-card-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
}

.pedido-card-summary::-webkit-details-marker {
  display: none;
}

.pedido-card-summary-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pedido-cliente-nombre {
  font-weight: 700;
  font-size: 14px;
}

.pedido-fecha {
  font-size: 12.5px;
  color: var(--text-muted);
}

.pedido-total-chip {
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
}

.pedido-card-body {
  padding: 4px 16px 18px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pedido-section-label {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  margin-top: 14px;
}

.pedido-cliente-fields {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.pedido-cliente-fields input {
  flex: 1;
  min-width: 140px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
}

.pedido-items-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.pedido-items-table th,
.pedido-items-table td {
  text-align: left;
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
}

.pedido-items-table input[type="number"] {
  width: 56px;
  padding: 4px 6px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
}

.pedido-add-item {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 8px;
}

.pedido-add-item select {
  flex: 1;
  min-width: 160px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.pedido-add-item input {
  width: 60px;
  padding: 7px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.pedido-add-item button {
  background: var(--primary-light);
  color: var(--primary-hover);
  border: none;
  border-radius: var(--radius-sm);
  padding: 7px 14px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

.pedido-totales {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 15px;
  padding-top: 10px;
  margin-top: 6px;
  border-top: 1px dashed var(--border);
}

.pedido-pago-fields {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 13px;
  color: var(--text-muted);
}

.pedido-pago-fields select {
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.pedido-montos-mixto {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.pedido-montos-mixto[hidden] {
  display: none;
}

.pedido-montos-mixto input {
  width: 90px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.pedido-acciones {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 10px;
}

.pedido-acciones .confirm-btn,
.pedido-acciones .logout-btn {
  width: auto;
  margin-top: 0;
}

.bulk-import-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  margin-bottom: 10px;
}

.bulk-import-card textarea {
  width: 100%;
  min-height: 120px;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-family: "Consolas", monospace;
  font-size: 12.5px;
  resize: vertical;
  margin: 10px 0 12px;
}

.bulk-import-hint {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
}

.bulk-import-hint code {
  background: var(--bg);
  padding: 1px 5px;
  border-radius: 4px;
}

@media (max-width: 640px) {
  .add-product-form input,
  .add-product-form select {
    flex: 1 1 100%;
  }
}
