:root {
  --primary: #7600ff; /* Morado Frávega */
  --primary-light: #ebd4ff;
  --discount-bg: #c1156c;
  --text-dark: #1a1a1a;
  --text-gray: #666;
  --text-blue: #3483fa;
  --text-green: #00a650;
  --bg-gray: #f5f5f5;
  --border-color: #eaeaea;
}

.site-logo {
  max-height: 40px; /* Ajuste conforme o seu layout */
  width: auto;
  display: block;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Work Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; word-break: break-word; overflow-wrap: break-word; }
html, body { max-width: 100vw; overflow-x: hidden; }
body { background: white; color: var(--text-dark); padding-bottom: 100px; /* Espacio para el boton fijo */ }

/* Header */
header { border-bottom: 1px solid var(--border-color); }
.header-top { display: flex; justify-content: space-between; align-items: center; padding: 16px; }
.logo { height: 30px; }
.icon { width: 24px; height: 24px; color: var(--primary); }
.header-location { display: flex; align-items: center; padding: 12px 16px; background: white; border-top: 1px solid var(--border-color); font-size: 0.85rem; color: var(--text-dark); }
.icon-small { width: 16px; height: 16px; margin-right: 8px; }
.chevron { margin-left: auto; margin-right: 0; color: #999; }
.text-blue { color: var(--text-blue); cursor: pointer; }

/* Main Content */
.loading { text-align: center; padding: 40px; color: var(--text-gray); }
.breadcrumb { padding: 16px; font-size: 0.85rem; color: var(--text-gray); }
.product-image-wrapper { position: relative; text-align: center; padding: 20px 16px; }
.badge-off { position: absolute; top: 10px; left: 16px; background: var(--primary); color: white; padding: 4px 8px; border-radius: 4px; font-size: 0.8rem; font-weight: bold; z-index: 1; }
.badge-hotsale { position: absolute; top: 42px; left: 16px; background: #e53e3e; color: white; padding: 4px 8px; border-radius: 4px; font-size: 0.8rem; font-weight: bold; z-index: 1; white-space: nowrap; }
.product-image { width: 100%; max-width: 400px; object-fit: contain; }

/* Carousel */
.carousel { width: 100%; }
.carousel-main { position: relative; display: flex; justify-content: center; align-items: center; min-height: 180px; }
.carousel-slide { display: none; width: 100%; max-width: 400px; object-fit: contain; }
.carousel-slide.active { display: block; }
.carousel-btn { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.92); border: 1px solid var(--border-color); border-radius: 50%; width: 38px; height: 38px; font-size: 1.6rem; line-height: 1; cursor: pointer; color: var(--text-dark); box-shadow: 0 2px 8px rgba(0,0,0,0.12); display: flex; align-items: center; justify-content: center; padding: 0; }
.carousel-btn:hover { background: white; box-shadow: 0 4px 12px rgba(0,0,0,0.18); }
.carousel-prev { left: 0; }
.carousel-next { right: 0; }
.carousel-thumbs { display: flex; gap: 8px; padding: 12px 0 4px; overflow-x: auto; justify-content: center; scrollbar-width: none; }
.carousel-thumbs::-webkit-scrollbar { display: none; }
.carousel-thumb { width: 58px; height: 58px; object-fit: cover; border: 2px solid var(--border-color); border-radius: 6px; cursor: pointer; flex-shrink: 0; transition: border-color 0.2s; }
.carousel-thumb.active { border-color: var(--primary); }
.carousel-thumb:hover { border-color: var(--primary); }

.product-info { padding: 0 16px; }
.brand { color: var(--primary); font-weight: 800; font-size: 1.2rem; text-transform: uppercase; margin-bottom: 8px; }
.title { font-size: 1.2rem; font-weight: 600; line-height: 1.3; margin-bottom: 8px; }
.seller { font-size: 0.85rem; color: var(--text-gray); margin-bottom: 16px; }

/* Precios */
.price-regular { font-size: 1rem; color: var(--text-gray); text-decoration: line-through; }
.badge-discount { background: var(--discount-bg); color: white; padding: 2px 6px; border-radius: 4px; font-size: 0.75rem; font-weight: bold; display: inline-block; margin-top: 4px; vertical-align: middle; }
.price-promo { font-size: 2.2rem; font-weight: 700; display: block; margin: 4px 0; }
.price-tax { font-size: 0.75rem; color: #999; display: block; margin-bottom: 16px; }
.link-medios { color: var(--text-blue); font-size: 0.9rem; text-decoration: none; display: block; margin-bottom: 24px; }

/* Envíos */
.shipping-box { border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); padding: 16px 0; margin-bottom: 24px; }
.shipping-item { display: flex; align-items: flex-start; margin-bottom: 16px; font-size: 0.9rem; }
.shipping-item:last-child { margin-bottom: 0; }
.shipping-item svg { width: 24px; height: 24px; margin-right: 12px; flex-shrink: 0; color: #333; }
.text-green { color: var(--text-green); font-weight: 600; }

/* Variaciones */
.variacoes-section { padding: 16px 0; border-bottom: 1px solid var(--border-color); margin-bottom: 20px; }
.variacoes-titulo { font-size: 0.9rem; font-weight: 600; margin-bottom: 10px; color: var(--text-dark); }
.variacao-obrigatorio { color: #e53e3e; }
.variacoes-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.variacao-chip { border: 2px solid var(--border-color); border-radius: 6px; padding: 8px 18px; font-size: 0.9rem; font-weight: 500; cursor: pointer; background: white; color: var(--text-dark); transition: border-color 0.2s, background 0.2s, color 0.2s; font-family: inherit; }
.variacao-chip:hover { border-color: var(--primary); color: var(--primary); }
.variacao-chip.selected { border-color: var(--primary); background: var(--primary-light); color: var(--primary); font-weight: 700; }
.variacao-aviso { font-size: 0.8rem; color: #e53e3e; margin-top: 8px; display: none; }
.variacoes-section.variacao-erro .variacao-aviso { display: block; }
.variacoes-section.variacao-erro .variacoes-chips { animation: shake 0.35s ease; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* Descripción */
.description-section { padding: 16px 0; }
.description-title { font-size: 1.3rem; margin-bottom: 16px; font-weight: 700; }
.description-content { font-size: 0.95rem; color: #333; line-height: 1.6; }
.description-content p { margin-bottom: 8px; }
.description-content ul, .description-content ol { padding-left: 20px; margin-bottom: 8px; }
.description-content li { margin-bottom: 4px; }
.description-content strong { font-weight: 700; }
.description-content em { font-style: italic; }
.description-content u { text-decoration: underline; }

/* Footer */
footer { background: white; padding: 24px 16px 100px; border-top: 1px solid var(--border-color); }
.logo-footer { height: 24px; margin-bottom: 24px; }
.contact-item { margin-bottom: 16px; font-size: 0.9rem; }
.horario { font-size: 0.8rem; color: var(--text-gray); }
.newsletter { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--border-color); }
.newsletter p { font-size: 0.9rem; margin-bottom: 8px; }
.news-form { display: flex; gap: 8px; }
.news-form input { flex: 1; padding: 10px; border: 1px solid #ccc; border-radius: 4px; font-size: 0.9rem; }
.news-form button { background: var(--primary); color: white; border: none; padding: 0 16px; border-radius: 4px; font-weight: bold; }
.copyright { margin-top: 24px; font-size: 0.75rem; color: var(--text-gray); }

/* Sticky Bottom Bar */
.bottom-bar { position: fixed; bottom: 0; left: 0; width: 100%; background: white; padding: 12px 16px; box-shadow: 0 -2px 10px rgba(0,0,0,0.1); display: flex; align-items: center; justify-content: space-between; gap: 12px; z-index: 100; }
.bottom-price { display: flex; flex-direction: column; flex: 1; }
.bottom-price .price-promo { font-size: 1.4rem; margin: 0; }
.bottom-price .price-regular { font-size: 0.8rem; display: inline-block; }
.btn-agregar { background: var(--primary-light); color: var(--primary); border: none; padding: 12px; border-radius: 6px; font-weight: 600; flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; }
.btn-comprar { background: var(--primary); color: white; border: none; padding: 12px; border-radius: 6px; font-weight: bold; flex: 1; font-size: 1rem; cursor: pointer; text-align: center; }

/* Catalog Page */
.catalog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; padding: 16px; }
.product-card { background: white; border: 1px solid var(--border-color); border-radius: 8px; overflow: hidden; text-decoration: none; display: flex; flex-direction: column; cursor: pointer; transition: transform 0.2s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.product-card .img-wrapper { position: relative; padding: 16px; text-align: center; background: #fff; border-bottom: 1px solid #f0f0f0; }
.product-card img { width: 100%; height: 140px; object-fit: contain; }
.product-card .info { padding: 12px; display: flex; flex-direction: column; flex: 1; justify-content: space-between; gap: 8px; }
.product-card .title { font-size: 0.95rem; margin-bottom: 0px; font-weight: 500; color: var(--text-dark); display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-card .price-regular { font-size: 0.8rem; color: var(--text-gray); text-decoration: line-through; }
.product-card .price-promo { font-size: 1.2rem; font-weight: 700; color: var(--text-dark); }

.pagination-controls { display: flex; justify-content: center; align-items: center; gap: 8px; padding: 24px 16px 40px; }
.pagination-controls button { background: white; border: 1px solid var(--border-color); color: var(--text-dark); padding: 8px 12px; border-radius: 6px; cursor: pointer; font-weight: 500; transition: all 0.2s; }
.pagination-controls button:disabled { opacity: 0.5; cursor: not-allowed; }
.pagination-controls button.active { background: var(--primary); color: white; border-color: var(--primary); }
.pagination-controls button:hover:not(:disabled) { background: var(--primary-light); color: var(--primary); border-color: var(--primary); }