:root {
  --primary: #f59e0b;
  --primary-bright: #fbbf24;
  --primary-soft: rgba(245, 158, 11, 0.16);
  --bg: #0b0d12;
  --surface: #141821;
  --surface-2: #1c222e;
  --text: #f8fafc;
  --muted: #94a3b8;
  --border: rgba(255, 255, 255, 0.08);
  --radius: 16px;
}

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

body {
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
  padding-bottom: 112px;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Cabecera oscura gastronómica */
.store-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding-bottom: 20px;
}

.cover-banner {
  position: relative;
  height: 175px;
  background: linear-gradient(135deg, #1f1608 0%, #0b0d12 100%);
  background-size: cover;
  background-position: center;
}

.cover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 13, 18, 0.35) 0%, rgba(11, 13, 18, 0.92) 100%);
}

.cover-top-actions {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
}

.status-pill,
.share-pill {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 13px;
  border-radius: 999px;
  backdrop-filter: blur(10px);
}

.status-pill {
  background: rgba(20, 24, 33, 0.82);
  color: var(--primary-bright);
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.share-pill {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(20, 24, 33, 0.72);
  color: #ffffff;
  cursor: pointer;
  transition: background 0.15s ease;
}

.share-pill:hover {
  background: rgba(255, 255, 255, 0.14);
}

.store-profile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: -42px;
  z-index: 3;
}

.store-logo {
  width: 78px;
  height: 78px;
  border-radius: 20px;
  background: #0b0d12;
  border: 2px solid var(--primary);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--primary-bright);
  overflow: hidden;
}

.store-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.store-identity h1 {
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.tagline {
  font-size: 0.92rem;
  color: var(--muted);
  margin-top: 2px;
}

.store-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.meta-chip {
  font-size: 0.77rem;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--surface-2);
  color: #cbd5e1;
  border: 1px solid var(--border);
}

.meta-chip-accent {
  background: var(--primary-soft);
  color: var(--primary-bright);
  border-color: rgba(245, 158, 11, 0.3);
}

/* Barra fija con glassmorphism oscuro */
.sticky-controls {
  position: sticky;
  top: 0;
  z-index: 15;
  background: rgba(11, 13, 18, 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}

.controls-inner {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.search-wrap {
  position: relative;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.9rem;
  opacity: 0.65;
  pointer-events: none;
}

.search-wrap input {
  width: 100%;
  padding: 11px 14px 11px 38px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.94rem;
  background: var(--surface);
  color: var(--text);
  outline: none;
}

.search-wrap input::placeholder {
  color: #64748b;
}

.search-wrap input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.categories {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.categories::-webkit-scrollbar {
  display: none;
}

.cat-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: #cbd5e1;
  padding: 8px 15px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.cat-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #0b0d12;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.32);
}

/* Sección Destacados / Más vendidos */
.main-content {
  margin-top: 18px;
}

.section-heading {
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.featured-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 22px;
  scrollbar-width: none;
}

.featured-strip::-webkit-scrollbar {
  display: none;
}

.featured-card {
  min-width: 220px;
  max-width: 220px;
  background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 100%);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.16s ease;
}

.featured-card:hover {
  transform: translateY(-2px);
}

.featured-media {
  position: relative;
  height: 120px;
  background: #1a1f2b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  overflow: hidden;
}

.featured-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-body {
  padding: 11px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.featured-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.featured-price {
  font-size: 0.96rem;
  font-weight: 800;
  color: var(--primary-bright);
}

/* Grid estilo App de Delivery */
.product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 680px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  display: flex;
  flex-direction: row;
  gap: 12px;
  align-items: stretch;
  transition: transform 0.16s ease, border-color 0.16s ease;
}

.card:hover {
  transform: translateY(-2px);
  border-color: rgba(245, 158, 11, 0.35);
}

.card-media {
  position: relative;
  width: 108px;
  min-width: 108px;
  height: 108px;
  border-radius: 12px;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.8rem;
  cursor: pointer;
  overflow: hidden;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background: var(--primary);
  color: #0b0d12;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: 999px;
}

.card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 4px;
}

.card-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: #ffffff;
  cursor: pointer;
}

.card-desc {
  font-size: 0.8rem;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.price {
  font-size: 1rem;
  font-weight: 800;
  color: var(--primary-bright);
}

.btn-add {
  background: var(--primary);
  color: #0b0d12;
  border: none;
  border-radius: 10px;
  padding: 7px 12px;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

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

.qty-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-2);
  padding: 3px;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.qty-btn {
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 7px;
  background: var(--surface);
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
  font-size: 0.95rem;
}

.qty-value {
  min-width: 18px;
  text-align: center;
  font-weight: 700;
  font-size: 0.86rem;
}

.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 48px 16px;
}

.store-footer {
  margin-top: 28px;
  text-align: center;
  font-size: 0.82rem;
  color: var(--muted);
}

/* Barra flotante de carrito */
.cart-bar {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 28px);
  max-width: 620px;
  background: rgba(20, 24, 33, 0.96);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #ffffff;
  border-radius: 18px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.65);
  z-index: 25;
}

.cart-bar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cart-count-badge {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--primary);
  color: #0b0d12;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
}

.cart-bar-info {
  display: flex;
  flex-direction: column;
}

.cart-bar-sub {
  font-size: 0.74rem;
  color: var(--muted);
}

.cart-bar-info strong {
  font-size: 1.08rem;
  color: var(--primary-bright);
}

.btn-primary {
  background: var(--primary);
  color: #0b0d12;
  border: none;
  border-radius: 12px;
  padding: 11px 16px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
}

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

/* Modales oscuros */
.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
}

.modal-sheet {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: 92vh;
  overflow-y: auto;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 22px 22px 0 0;
  padding: 20px 18px 24px;
  z-index: 1;
}

@media (min-width: 640px) {
  .modal {
    align-items: center;
  }
  .modal-sheet {
    border-radius: 22px;
  }
}

.pm-sheet {
  padding: 0;
}

.pm-close {
  position: sticky;
  float: right;
  top: 12px;
  margin-right: 12px;
  z-index: 3;
  background: rgba(11, 13, 18, 0.85);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.pm-media {
  height: 190px;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4.5rem;
}

.pm-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pm-body {
  padding: 16px 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pm-category {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--primary-bright);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pm-desc {
  font-size: 0.88rem;
  color: var(--muted);
}

.pm-options {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 8px;
}

.option-group {
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.option-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.option-group-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: #ffffff;
}

.option-req {
  font-size: 0.71rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-bright);
}

.option-opt {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
}

.option-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.opt-pill {
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: #e2e8f0;
  padding: 8px 12px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.12s ease;
}

.opt-pill.selected {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary-bright);
  font-weight: 700;
}

.pm-error {
  color: #f87171;
  font-size: 0.82rem;
  font-weight: 700;
  margin-top: 4px;
}

.pm-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.pm-price-wrap {
  display: flex;
  flex-direction: column;
}

.pm-price-label {
  font-size: 0.72rem;
  color: var(--muted);
}

.pm-price {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary-bright);
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
}

.modal-sub {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 2px;
}

.icon-btn {
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: #ffffff;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  font-size: 1rem;
  cursor: pointer;
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.cart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.cart-item-info {
  flex: 1;
}

.cart-item-name {
  font-weight: 700;
  font-size: 0.93rem;
  color: #ffffff;
}

.cart-item-details {
  font-size: 0.77rem;
  color: #cbd5e1;
  margin-top: 2px;
}

.cart-item-sub {
  font-size: 0.8rem;
  color: var(--primary-bright);
  margin-top: 2px;
}

.checkout-form {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-row label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
}

.form-row input,
.form-row select {
  padding: 10px 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: #ffffff;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.92rem;
}

.summary-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  font-size: 1.05rem;
}

.summary-total strong {
  color: var(--primary-bright);
}

.btn-whatsapp {
  background: #25d366;
  color: #052e16;
  border: none;
  border-radius: 12px;
  padding: 13px 16px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
}

.toast {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #0b0d12;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 800;
  z-index: 60;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
}

.hidden {
  display: none !important;
}
