﻿/* ============================================================
   TIENDA ONLINE â€” CSS
   Mobile-first, standalone, sin dependencias externas
   ============================================================ */

/* === VARIABLES ============================================= */
:root {
--primary: #2294f2;
    --primary-dark: #1178d4;
    --primary-light: #7bbff8;
    --accent: #f97316;
    --accent-light: #fb923c;
  --surface:        #ffffff;
--bg: #f8fafc;
  --bg-card:        #ffffff;
--text: #0f172a;
    --text-secondary: #475569;
    --text-light: #94a3b8;
    --border: #e2e8f0;
    --success: #16a34a;
    --warning: #d97706;
    --danger: #dc2626;
    --info: #2563eb;
    --radius: 14px;
    --radius-sm: 9px;
    --radius-lg: 24px;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 8px 32px rgba(34, 148, 242, 0.18);
  --transition:     0.22s ease;
  --header-h:       60px;
  --bottom-nav-h:   64px;
  --max-w:          1200px;
  --font:           -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* === RESET & BASE ========================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: var(--font); border: none; background: none; }
input, textarea, select { font-family: var(--font); font-size: 1rem; }
ul { list-style: none; }

/* === LAYOUT =============================================== */
#ev-app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
}

.ev-container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 16px;
}

/* === HEADER =============================================== */
#ev-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
background: #ffffff;
    color: var(--text);
  z-index: 200;
box-shadow: 0 1px 0 var(--border), 0 2px 8px rgba(0, 0, 0, 0.05);
}

.ev-header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  max-width: var(--max-w);
  margin: 0 auto;
}

.ev-header-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  cursor: pointer;
}

.ev-header-logo img {
  height: 36px;
  width: 36px;
  object-fit: contain;
border-radius: 8px;
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 2px;
}

.ev-header-logo-placeholder {
  height: 36px;
  width: 36px;
border-radius: 8px;
    background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
font-size: 1rem;
    color: #fff;
    flex-shrink: 0;
}

.ev-header-title {
  font-size: 1.05rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
color: var(--text);
}

.ev-header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.ev-header-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: transparent;
color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
transition: background var(--transition), color var(--transition);
  position: relative;
font-size: 1.1rem;
}
.ev-header-btn:hover,
.ev-header-btn:active {
    background: var(--bg);
    color: var(--primary);
}

.ev-header-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.ev-header-btn i {
    font-size: 1.05rem;
}

.ev-cart-badge {
  position: absolute;
  top: 4px; right: 4px;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
  pointer-events: none;
}
.ev-cart-badge.hidden { display: none; }

/* === MAIN CONTENT ========================================= */
#ev-main {
  flex: 1;
  padding-top: var(--header-h);
  padding-bottom: calc(var(--bottom-nav-h) + 16px);
}

/* === BOTTOM NAV (mobile) ================================== */
#ev-bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--bottom-nav-h);
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 200;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.08);
}

.ev-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 8px 4px;
  color: var(--text-light);
  transition: color var(--transition);
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
}
.ev-nav-item.active { color: var(--primary); }
.ev-nav-item svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.ev-nav-item i {
    font-size: 18px;
}

.ev-nav-item span {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.2px;
}

.ev-nav-badge {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(2px);
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
}
.ev-nav-badge.hidden { display: none; }

/* === VIEWS ================================================ */
.ev-view { display: none; }
.ev-view.active { display: block; }

/* === SKELETON LOADER ====================================== */
@keyframes ev-shimmer {
  0%   { background-position: -468px 0; }
  100% { background-position: 468px 0; }
}
.ev-skeleton {
  background: linear-gradient(to right, #eee 8%, #ddd 18%, #eee 33%);
  background-size: 800px 100%;
  animation: ev-shimmer 1.4s linear infinite;
  border-radius: var(--radius-sm);
}

.ev-product-skeleton {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.ev-product-skeleton .sk-img { height: 170px; }
.ev-product-skeleton .sk-body { padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.ev-product-skeleton .sk-line { height: 14px; }
.ev-product-skeleton .sk-line.short { width: 60%; }
.ev-product-skeleton .sk-line.medium { width: 80%; }

/* === PRODUCT GRID ========================================= */
.ev-products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 0 16px;
}

@media (min-width: 560px) {
  .ev-products-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
}
@media (min-width: 800px) {
  .ev-products-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
}
@media (min-width: 1024px) {
  .ev-products-grid { grid-template-columns: repeat(5, 1fr); }
}

/* === PRODUCT CARD ========================================= */
.ev-product-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
  position: relative;
}
.ev-product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.ev-product-img-wrap {
  position: relative;
  width: 100%;
  padding-top: 100%; /* 1:1 aspect ratio */
  background: var(--bg);
  overflow: hidden;
}
.ev-product-img-wrap img {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 8px;
  transition: transform 0.3s ease;
}
.ev-product-card:hover .ev-product-img-wrap img { transform: scale(1.05); }

.ev-product-img-placeholder {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--border);
}
.ev-product-img-placeholder svg { width: 48px; height: 48px; fill: currentColor; }

.ev-badge-promo {
  position: absolute;
  top: 8px; left: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 12px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.ev-badge-nuevo {
  position: absolute;
  top: 8px; right: 8px;
  background: var(--info);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 12px;
}

.ev-product-body {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.ev-product-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ev-product-cat {
  font-size: 0.72rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.ev-product-prices {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.ev-price {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary-dark);
}
.ev-price.promo { color: var(--accent); }

.ev-price-anterior {
  font-size: 0.78rem;
  color: var(--text-light);
  text-decoration: line-through;
}

.ev-product-footer {
  padding: 0 10px 10px;
}

.ev-btn-agregar {
  width: 100%;
  padding: 8px;
background: var(--accent);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  transition: background var(--transition), opacity var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.ev-btn-agregar:hover {
    background: #ea580c;
}
.ev-btn-agregar:disabled {
  background: var(--border);
  color: var(--text-light);
  cursor: not-allowed;
}
.ev-btn-agregar svg { width: 16px; height: 16px; fill: currentColor; flex-shrink: 0; }

.ev-sin-stock {
  text-align: center;
  font-size: 0.75rem;
  color: var(--danger);
  font-weight: 500;
  padding: 6px 0;
}

/* === HOME VIEW ============================================ */
#ev-view-home { min-height: calc(100vh - var(--header-h) - var(--bottom-nav-h)); }

/* Banner hero */
.ev-hero {
  position: relative;
  width: 100%;
  min-height: 230px;
  background: linear-gradient(150deg, var(--primary-dark) 0%, var(--primary) 60%, #38b6ff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.ev-hero img.ev-hero-bg {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.55;
  z-index: 0;
}

.ev-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.08) 0%, rgba(0,0,0,0.52) 100%);
  z-index: 1;
}

.ev-hero-content {
  position: relative;
  z-index: 2;
  color: #fff;
  padding: 28px 20px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
}

.ev-hero-avatar {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(6px);
  border: 3px solid rgba(255,255,255,0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  overflow: hidden;
  font-size: 2rem;
  color: #fff;
  flex-shrink: 0;
}

.ev-hero-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ev-hero-title {
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 6px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.35);
  text-align: center;
}

.ev-hero-subtitle {
  font-size: 0.9rem;
  opacity: 0.92;
  font-weight: 400;
  text-shadow: 0 1px 5px rgba(0,0,0,0.3);
  text-align: center;
  max-width: 320px;
}

/* Search bar in home */
.ev-search-bar-wrap {
  padding: 16px 16px 8px;
}

.ev-search-bar {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 50px;
  padding: 10px 16px;
  gap: 10px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.ev-search-bar:focus-within {
  border-color: var(--primary);
box-shadow: 0 0 0 3px rgba(34, 148, 242, 0.12);
}
.ev-search-bar svg { width: 20px; height: 20px; fill: var(--text-light); flex-shrink: 0; }
.ev-search-bar input {
  border: none;
  outline: none;
  flex: 1;
  background: transparent;
  color: var(--text);
  font-size: 0.95rem;
}
.ev-search-bar input::placeholder { color: var(--text-light); }
.ev-search-clear {
  color: var(--text-light);
  cursor: pointer;
  padding: 0 2px;
  background: none;
  border: none;
  line-height: 1;
  font-size: 18px;
}

/* Category chips */
.ev-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 16px 10px;
}

.ev-section-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.ev-ver-todos {
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
  background: none;
  border: none;
}

.ev-chips-wrap {
  padding: 0 12px 4px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}
.ev-chips-wrap::-webkit-scrollbar { display: none; }

.ev-chip {
  flex-shrink: 0;
  padding: 7px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 500;
  background: var(--surface);
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  white-space: nowrap;
}
.ev-chip:hover, .ev-chip.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Horizontal scroll product list */
.ev-products-scroll {
  display: flex;
  gap: 12px;
  padding: 4px 16px 16px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}
.ev-products-scroll::-webkit-scrollbar { display: none; }

.ev-products-scroll .ev-product-card {
  width: 155px;
  min-width: 155px;
}
@media (min-width: 420px) {
  .ev-products-scroll .ev-product-card { width: 170px; min-width: 170px; }
}

/* === CATALOG VIEW ========================================= */
.ev-catalog-top {
  background: var(--surface);
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: var(--header-h);
  z-index: 100;
}

.ev-results-info {
  font-size: 0.82rem;
  color: var(--text-secondary);
  padding: 8px 16px 0;
}

.ev-catalog-grid-wrap {
  padding: 12px 0 8px;
}

/* === PAGINATION =========================================== */
.ev-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px 16px;
  flex-wrap: wrap;
}

.ev-page-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  background: var(--surface);
  color: var(--text);
  border: 1.5px solid var(--border);
}
.ev-page-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.ev-page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.ev-page-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.ev-page-btn.nav { width: auto; padding: 0 14px; border-radius: 19px; gap: 4px; }
.ev-page-btn.nav svg { width: 16px; height: 16px; fill: currentColor; }

/* === PRODUCT DETAIL VIEW ================================== */
.ev-detail-back {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px 10px;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
}
.ev-detail-back svg { width: 20px; height: 20px; fill: currentColor; }

/* Image gallery */
.ev-detail-gallery {
  position: relative;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}

.ev-gallery-main {
  position: relative;
  width: 100%;
  padding-top: 75%;
  overflow: hidden;
  background: var(--bg);
}
.ev-gallery-main img {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 12px;
}

.ev-gallery-thumbs {
  display: flex;
  gap: 8px;
  padding: 10px 16px;
  overflow-x: auto;
  scrollbar-width: none;
}
.ev-gallery-thumbs::-webkit-scrollbar { display: none; }

.ev-gallery-thumb {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  border: 2px solid var(--border);
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
  background: var(--bg);
  transition: border-color var(--transition);
}
.ev-gallery-thumb.active { border-color: var(--primary); }
.ev-gallery-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }

/* Detail info */
.ev-detail-info {
  padding: 16px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}

.ev-detail-cat {
  font-size: 0.75rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.ev-detail-name {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 8px;
  color: var(--text);
}

.ev-detail-sku {
  font-size: 0.78rem;
  color: var(--text-light);
  margin-bottom: 12px;
}

.ev-detail-prices {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.ev-detail-price {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary-dark);
}
.ev-detail-price.promo { color: var(--accent); }

.ev-detail-price-ant {
  font-size: 1rem;
  color: var(--text-light);
  text-decoration: line-through;
}

.ev-promo-badge-lg {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
  text-transform: uppercase;
}

.ev-detail-desc-corta {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 14px;
}

.ev-detail-stock {
  font-size: 0.82rem;
  color: var(--success);
  font-weight: 500;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.ev-detail-stock svg { width: 16px; height: 16px; fill: currentColor; flex-shrink: 0; }
.ev-detail-stock.sin-stock { color: var(--danger); }

/* Quantity + Add to cart */
.ev-detail-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.ev-qty-control {
  display: flex;
  align-items: center;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.ev-qty-btn {
  width: 38px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--primary);
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition);
}
.ev-qty-btn:hover { background: var(--bg); }
.ev-qty-btn:disabled { color: var(--border); cursor: not-allowed; }

.ev-qty-value {
  min-width: 44px;
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  padding: 0 4px;
}

.ev-btn-add-cart {
  flex: 1;
  padding: 12px 16px;
background: var(--accent);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background var(--transition);
  border: none;
}
.ev-btn-add-cart:hover {
    background: #ea580c;
}
.ev-btn-add-cart:disabled {
  background: var(--border);
  color: var(--text-light);
  cursor: not-allowed;
}
.ev-btn-add-cart svg { width: 20px; height: 20px; fill: currentColor; }

/* Description tabs */
.ev-detail-tabs {
  display: flex;
  border-bottom: 2px solid var(--border);
  margin: 0 16px;
  gap: 0;
}

.ev-tab-btn {
  flex: 1;
  padding: 12px 8px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-light);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition);
}
.ev-tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }

.ev-tab-content {
  display: none;
  padding: 16px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.7;
}
.ev-tab-content.active { display: block; }
.ev-tab-content img { max-width: 100%; border-radius: var(--radius-sm); }

.ev-detail-attr {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  font-size: 0.85rem;
  margin-bottom: 8px;
}
.ev-detail-attr strong { color: var(--text); min-width: 100px; flex-shrink: 0; }
.ev-detail-attr span { color: var(--text-secondary); }

/* === CART DRAWER ========================================== */
#ev-cart-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 300;
  animation: ev-fade-in 0.2s ease;
}
#ev-cart-overlay.open { display: block; }

#ev-cart-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(400px, 100vw);
  background: var(--surface);
  z-index: 301;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -4px 0 24px rgba(0,0,0,0.15);
}
#ev-cart-drawer.open { transform: translateX(0); }

.ev-cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.ev-cart-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ev-cart-header h2 svg { width: 22px; height: 22px; fill: var(--primary); }
.ev-cart-header h2 i {
    font-size: 1.1rem;
    color: var(--primary);
}

.ev-cart-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border: none;
  cursor: pointer;
  transition: background var(--transition);
}
.ev-cart-close:hover { background: var(--border); }
.ev-cart-close svg { width: 20px; height: 20px; fill: var(--text); }
.ev-cart-close i {
    font-size: 1rem;
    color: var(--text-secondary);
}

.ev-cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ev-cart-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-light);
  padding: 40px 20px;
}
.ev-cart-empty svg {
    width: 48px;
    height: 48px;
    fill: var(--border);
}

.ev-cart-empty i {
    font-size: 42px;
    color: var(--border);
}
.ev-cart-empty p { font-size: 0.95rem; text-align: center; }

.ev-cart-item {
  display: flex;
  gap: 10px;
  padding: 10px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  align-items: center;
}

.ev-cart-item-img {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-sm);
  object-fit: contain;
  background: var(--surface);
  padding: 4px;
  flex-shrink: 0;
}
.ev-cart-item-img-placeholder {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--border);
}
.ev-cart-item-img-placeholder svg { width: 28px; height: 28px; fill: currentColor; }

.ev-cart-item-info { flex: 1; min-width: 0; }
.ev-cart-item-name {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}

.ev-cart-item-price { font-size: 0.88rem; color: var(--primary-dark); font-weight: 700; }

.ev-cart-item-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.ev-cart-item-qty {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
}

.ev-cart-qty-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--primary);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}

.ev-cart-qty-num {
  min-width: 24px;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 700;
}

.ev-cart-item-remove {
  background: none;
  border: none;
  color: var(--danger);
  cursor: pointer;
  font-size: 0.75rem;
  padding: 2px;
}

.ev-cart-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--surface);
}

.ev-cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.ev-cart-total-label { font-size: 0.95rem; color: var(--text-secondary); font-weight: 500; }
.ev-cart-total-value { font-size: 1.3rem; font-weight: 800; color: var(--primary-dark); }

.ev-btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition);
letter-spacing: 0.2px;
}
.ev-btn-primary:hover {
    background: #ea580c;
}

.ev-btn-primary i {
    font-size: 0.95rem;
}
.ev-btn-primary svg { width: 20px; height: 20px; fill: currentColor; }
.ev-btn-primary:disabled { background: var(--border); color: var(--text-light); cursor: not-allowed; }

.ev-btn-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
  margin-top: 8px;
}
.ev-btn-secondary:hover {
    background: rgba(34, 148, 242, 0.06);
}

/* === CHECKOUT VIEW ======================================== */
.ev-checkout-wrap {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 0 24px;
}

.ev-checkout-section {
  background: var(--bg-card);
  margin-bottom: 12px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.ev-checkout-section-title {
  font-size: 1rem;
  font-weight: 700;
  padding: 14px 16px 10px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}
.ev-checkout-section-title svg { width: 18px; height: 18px; fill: var(--primary); }

.ev-form-group {
  padding: 12px 16px;
  border-bottom: 1px solid var(--bg);
}
.ev-form-group:last-child { border-bottom: none; }

.ev-form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 6px;
}
.ev-form-label .required { color: var(--danger); }

.ev-form-input {
  width: 100%;
  padding: 11px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--surface);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.ev-form-input:focus {
  border-color: var(--primary);
box-shadow: 0 0 0 3px rgba(34, 148, 242, 0.10);
}
.ev-form-input.error { border-color: var(--danger); }

.ev-form-textarea {
  resize: vertical;
  min-height: 80px;
}

.ev-form-error {
  font-size: 0.78rem;
  color: var(--danger);
  margin-top: 4px;
  display: none;
}
.ev-form-error.visible { display: block; }

/* Checkout order summary */
.ev-checkout-summary-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--bg);
}
.ev-checkout-summary-item:last-child { border-bottom: none; }
.ev-checkout-summary-item .name {
  flex: 1;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ev-checkout-summary-item .qty { color: var(--text-secondary); font-size: 0.82rem; margin: 0 10px; flex-shrink: 0; }
.ev-checkout-summary-item .subtotal { font-weight: 700; color: var(--primary-dark); flex-shrink: 0; }

.ev-checkout-total-row {
  display: flex;
  justify-content: space-between;
  padding: 14px 16px;
  border-top: 2px solid var(--border);
  font-weight: 700;
}
.ev-checkout-total-row .label { font-size: 1rem; }
.ev-checkout-total-row .total { font-size: 1.2rem; color: var(--primary-dark); }

.ev-checkout-submit-wrap { padding: 16px; }

/* Methods display */
.ev-method-card {
  margin: 0 16px 8px;
  padding: 12px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
}
.ev-method-card h4 { font-size: 0.9rem; font-weight: 700; margin-bottom: 4px; color: var(--text); }
.ev-method-card p { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.4; }
.ev-method-card .instrucciones { font-size: 0.82rem; color: var(--info); margin-top: 4px; }

/* === CONFIRMATION VIEW ==================================== */
.ev-confirmation-wrap {
  max-width: 520px;
  margin: 0 auto;
  padding: 24px 16px;
}

.ev-confirmation-top {
  text-align: center;
  padding: 32px 16px 24px;
  background: var(--bg-card);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  border-bottom: 1px solid var(--border);
}

.ev-confirmation-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
background: rgba(34, 148, 242, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  animation: ev-pop-in 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.ev-confirmation-icon svg { width: 40px; height: 40px; fill: var(--primary); }

.ev-confirmation-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
}
.ev-confirmation-subtitle { font-size: 0.95rem; color: var(--text-secondary); }

.ev-order-number-display {
  display: inline-block;
  margin-top: 16px;
  padding: 10px 24px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 1px;
}

.ev-confirmation-details {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 16px;
}

.ev-conf-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--bg);
  font-size: 0.9rem;
}
.ev-conf-row:last-child { border-bottom: none; }
.ev-conf-row .label { color: var(--text-secondary); }
.ev-conf-row .value { font-weight: 600; color: var(--text); }

.ev-confirmation-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  background: var(--bg-card);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.ev-btn-whatsapp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px;
  background: #25d366;
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition);
  text-decoration: none;
}
.ev-btn-whatsapp:hover { background: #128c7e; }
.ev-btn-whatsapp svg { width: 22px; height: 22px; fill: currentColor; }

/* === TRACKING VIEW ======================================== */
.ev-tracking-wrap {
  max-width: 520px;
  margin: 0 auto;
  padding: 24px 16px;
}

.ev-tracking-form-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px 16px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.ev-tracking-form-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ev-tracking-form-title svg { width: 22px; height: 22px; fill: var(--primary); }
.ev-tracking-form-desc { font-size: 0.88rem; color: var(--text-secondary); margin-bottom: 16px; }

.ev-tracking-result {
  display: none;
}
.ev-tracking-result.visible { display: block; }

.ev-tracking-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.ev-tracking-header {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.ev-tracking-num { font-size: 1.05rem; font-weight: 800; color: var(--text); }
.ev-tracking-date { font-size: 0.8rem; color: var(--text-light); margin-top: 2px; }

.ev-estado-badge {
  flex-shrink: 0;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.ev-estado-PENDIENTE  { background: #fff3e0; color: #e65100; }
.ev-estado-REVISADO   { background: #e3f2fd; color: #1565c0; }
.ev-estado-ACEPTADO   { background: #e8f5e9; color: #2e7d32; }
.ev-estado-COMPLETADO { background: #1b5e20; color: #fff; }
.ev-estado-RECHAZADO  { background: #ffebee; color: #c62828; }
.ev-estado-CANCELADO  { background: #f5f5f5; color: #757575; }

.ev-tracking-items {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.ev-tracking-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  padding: 6px 0;
  border-bottom: 1px solid var(--bg);
}
.ev-tracking-item:last-child { border-bottom: none; }
.ev-tracking-item .iname { flex: 1; color: var(--text); }
.ev-tracking-item .iinfo { color: var(--text-secondary); font-size: 0.82rem; }
.ev-tracking-item .isubt { font-weight: 700; color: var(--primary-dark); }

.ev-tracking-total {
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 1rem;
  border-bottom: 1px solid var(--border);
}
.ev-tracking-total .tv { color: var(--primary-dark); font-size: 1.1rem; }

.ev-tracking-actions {
  padding: 12px 16px;
}

/* === SETUP VIEW =========================================== */
.ev-setup-wrap {
  min-height: calc(100vh - var(--header-h) - var(--bottom-nav-h));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  text-align: center;
}

.ev-setup-icon {
font-size: 48px;
  margin-bottom: 16px;
  animation: ev-pop-in 0.5s ease;
}

.ev-setup-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.ev-setup-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
  max-width: 340px;
  line-height: 1.5;
}

.ev-setup-form {
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* === STORE INFO CARD ====================================== */
.ev-store-info-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}

.ev-store-info-strip-img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  background: var(--bg);
  flex-shrink: 0;
}

.ev-store-contact { font-size: 0.82rem; color: var(--text-secondary); display: flex; flex-direction: column; gap: 2px; }
.ev-store-contact a { color: var(--primary); }

.ev-social-links {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}
.ev-social-link {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  color: var(--text-secondary);
  transition: background var(--transition), color var(--transition);
  border: none;
  cursor: pointer;
}
.ev-social-link:hover { background: var(--primary); color: #fff; }
.ev-social-link svg { width: 18px; height: 18px; fill: currentColor; }

/* === EMPTY / ERROR STATES ================================= */
.ev-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  text-align: center;
  gap: 12px;
}
.ev-empty-state svg {
    width: 48px;
    height: 48px;
    fill: var(--border);
}

.ev-empty-state i {
    font-size: 42px;
    color: var(--border);
}
.ev-empty-state h3 { font-size: 1.05rem; font-weight: 600; color: var(--text-secondary); }
.ev-empty-state p { font-size: 0.88rem; color: var(--text-light); max-width: 280px; line-height: 1.5; }

/* === LOADING OVERLAY ====================================== */
.ev-loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.75);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 14px;
  display: none;
}
.ev-loading-overlay.show { display: flex; }
.ev-loading-overlay p { font-size: 0.9rem; color: var(--text-secondary); font-weight: 500; }

.ev-spinner {
  width: 44px;
  height: 44px;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: ev-spin 0.8s linear infinite;
}

.ev-spinner-sm {
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: ev-spin 0.8s linear infinite;
}

/* === TOAST NOTIFICATIONS ================================== */
#ev-toast-container {
  position: fixed;
  bottom: calc(var(--bottom-nav-h) + 12px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 600;
  display: flex;
  flex-direction: column-reverse;
  gap: 8px;
  width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}

.ev-toast {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.4;
  color: #fff;
  box-shadow: var(--shadow-lg);
  animation: ev-slide-up 0.3s ease;
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.ev-toast svg { width: 18px; height: 18px; fill: currentColor; flex-shrink: 0; margin-top: 1px; }
.ev-toast.success { background: var(--success); }
.ev-toast.danger  { background: var(--danger); }
.ev-toast.warning { background: var(--warning); }
.ev-toast.info    { background: var(--info); }

/* === ANIMATIONS =========================================== */
@keyframes ev-shimmer {
  0%   { background-position: -468px 0; }
  100% { background-position: 468px 0; }
}
@keyframes ev-spin {
  to { transform: rotate(360deg); }
}
@keyframes ev-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes ev-slide-up {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
@keyframes ev-pop-in {
  from { transform: scale(0.5); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

/* === POWERED BADGE ======================================== */
.ev-powered-badge {
    position: fixed;
    bottom: calc(var(--bottom-nav-h) + 8px);
    right: 12px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 5px 11px 5px 9px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    z-index: 150;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    opacity: 0.7;
    transition: opacity 0.2s, box-shadow 0.2s;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    letter-spacing: 0.2px;
    pointer-events: auto;
}

.ev-powered-badge i {
    color: var(--accent);
    font-size: 0.65rem;
}

.ev-powered-badge:hover {
    opacity: 1;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

@media (min-width: 768px) {
    .ev-powered-badge {
        bottom: 16px;
    }
}
/* === UTILITIES ============================================ */
.hidden { display: none !important; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }
.text-center { text-align: center; }

/* Section divider */
.ev-divider {
  height: 8px;
  background: var(--bg);
}

/* Page title bar (catalog, checkout, etc.) */
.ev-page-title-bar {
  background: var(--surface);
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.ev-page-title-bar button {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ev-page-title-bar button svg { width: 22px; height: 22px; fill: currentColor; }
.ev-page-title-bar h1 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  flex: 1;
}

/* Format price */
.ev-moneda { font-size: 0.75em; font-weight: 500; opacity: 0.8; margin-right: 1px; }

/* === TABLET & DESKTOP ===================================== */
@media (min-width: 768px) {
  #ev-bottom-nav { display: none; }
  #ev-main { padding-bottom: 24px; }

  .ev-hero { min-height: 280px; }
  .ev-hero-title { font-size: 1.9rem; }
  .ev-hero-avatar { width: 92px; height: 92px; }

  .ev-products-scroll .ev-product-card { width: 200px; min-width: 200px; }

  .ev-detail-gallery { display: grid; grid-template-columns: auto 1fr; }
  .ev-gallery-thumbs { flex-direction: column; width: 80px; padding: 10px 8px; border-right: 1px solid var(--border); border-bottom: none; overflow-y: auto; overflow-x: hidden; }
  .ev-gallery-main { padding-top: 380px; }
}

@media (min-width: 1024px) {
  .ev-checkout-wrap { max-width: 700px; }
  .ev-confirmation-wrap { max-width: 560px; }
  .ev-tracking-wrap { max-width: 560px; }

  /* Catalog with sidebar */
  .ev-catalog-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 0;
    max-width: var(--max-w);
    margin: 0 auto;
  }
  .ev-catalog-sidebar {
    border-right: 1px solid var(--border);
    padding: 16px 0;
    position: sticky;
    top: var(--header-h);
    height: calc(100vh - var(--header-h));
    overflow-y: auto;
  }
  .ev-catalog-sidebar-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-light);
    padding: 0 16px 10px;
  }
  .ev-sidebar-cat-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
    color: var(--text-secondary);
    border-left: 3px solid transparent;
    background: none;
    border-top: none;
    border-right: none;
    border-bottom: none;
    width: 100%;
    text-align: left;
  }
  .ev-sidebar-cat-item:hover { background: var(--bg); color: var(--text); }
  .ev-sidebar-cat-item.active {
      color: var(--primary);
      border-left-color: var(--primary);
      background: rgba(34, 148, 242, 0.06);
      font-weight: 600;
  }
  .ev-sidebar-cat-count { font-size: 0.78rem; background: var(--bg); padding: 2px 7px; border-radius: 10px; color: var(--text-light); }
  .ev-catalog-sidebar-item.active .ev-sidebar-cat-count {
      background: rgba(34, 148, 242, 0.12);
      color: var(--primary);
  }

  .ev-catalog-main { min-width: 0; }
}

