/* ============================================================
   ArteLapidas - Hoja de estilos principal
   Paleta inspirada en el logo: negro, rojo escarlata, cian
   ============================================================ */

:root {
  --color-bg: #0a0a0a;
  --color-bg-alt: #141414;
  --color-card: #1b1b1b;
  --color-red: #ff1a3c;
  --color-red-dark: #c40021;
  --color-cyan: #17e6d4;
  --color-cyan-dark: #0fb3a6;
  --color-white: #f5f5f5;
  --color-text-muted: #b7b7b7;
  --color-border: #2a2a2a;
  --radius: 12px;
  --shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
  --header-height: 76px;
  --bottom-nav-height: 64px;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  touch-action: manipulation;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-white);
  font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  padding-bottom: var(--bottom-nav-height);
  overflow-x: hidden;
  touch-action: manipulation;
}

img { max-width: 100%; display: block; }

.icon { width: 20px; height: 20px; flex-shrink: 0; }

a { color: inherit; text-decoration: none; }

ul { list-style: none; margin: 0; padding: 0; }

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

/* ---------------- Header ---------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--color-border);
  height: var(--header-height);
  display: flex;
  align-items: center;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

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

.brand img { height: 56px; width: auto; }

.brand-text {
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--color-white);
  letter-spacing: 0.5px;
}
.brand-text span { color: var(--color-cyan); }

.nav-desktop { display: none; }

@media (min-width: 861px) {
  .nav-desktop {
    display: flex;
    gap: 8px;
    align-items: center;
  }
  .nav-desktop a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--color-white);
    transition: background 0.2s, color 0.2s;
  }
  .nav-desktop a:hover,
  .nav-desktop a.active {
    background: var(--color-bg-alt);
    color: var(--color-cyan);
  }
  .nav-desktop svg { width: 20px; height: 20px; flex-shrink: 0; }
}

.mobile-bottom-nav { display: flex; }

@media (min-width: 861px) {
  .mobile-bottom-nav { display: none; }
  body { padding-bottom: 0; }
}

/* ---------------- Bottom nav (móvil, tipo app) ---------------- */

.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: #0d0d0d;
  border-top: 1px solid var(--color-border);
  height: var(--bottom-nav-height);
  justify-content: space-around;
  align-items: center;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.5);
}

.mobile-bottom-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--color-text-muted);
  height: 100%;
  position: relative;
}

.mobile-bottom-nav a svg { width: 22px; height: 22px; }

.mobile-bottom-nav a.active { color: var(--color-cyan); }

.mobile-bottom-nav .cart-count {
  position: absolute;
  top: 4px;
  right: 22%;
  background: var(--color-red);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
}

/* ---------------- Slider portada ---------------- */

.slider {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #000;
}

.slider-track {
  display: flex;
  align-items: flex-start;
  transition: transform 0.6s ease-in-out;
}

.slider-slide {
  flex-shrink: 0;
}

.slider-slide img {
  width: 100%;
  height: auto;
  display: block;
}

.slider-dots {
  position: absolute;
  bottom: 14px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.slider-dots button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.4);
  padding: 0;
  cursor: pointer;
}

.slider-dots button.active { background: var(--color-cyan); width: 22px; border-radius: 4px; }

/* ---------------- Secciones / títulos ---------------- */

.section { padding: 46px 0; }

.section-title {
  text-align: center;
  font-size: 1.7rem;
  font-weight: 800;
  margin: 0 0 8px;
  color: var(--color-white);
}

.section-title span { color: var(--color-red); }

.section-subtitle {
  text-align: center;
  color: var(--color-text-muted);
  margin: 0 0 30px;
  font-size: 0.95rem;
}

/* ---------------- Carrusel de categorías (pestañas) ---------------- */

.cat-tabs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 24px;
  scrollbar-width: none;
}
.cat-tabs::-webkit-scrollbar { display: none; }

.cat-tabs button,
.cat-tabs a {
  flex-shrink: 0;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  color: var(--color-white);
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-block;
}

.cat-tabs button.active,
.cat-tabs a.active {
  background: var(--color-red);
  border-color: var(--color-red);
  color: #fff;
}

/* ---------------- Carrusel de productos ---------------- */

.prod-carousel-wrap { position: relative; }

.prod-carousel {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 2px 14px;
  scrollbar-width: thin;
}

.prod-carousel .product-card {
  scroll-snap-align: start;
  flex: 0 0 220px;
}

@media (max-width: 500px) {
  .prod-carousel .product-card { flex: 0 0 68%; }
}

.carousel-btn {
  position: absolute;
  top: 40%;
  transform: translateY(-50%);
  background: var(--color-card);
  border: 1px solid var(--color-border);
  color: var(--color-white);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
}
.carousel-btn.prev { left: -10px; }
.carousel-btn.next { right: -10px; }
@media (max-width: 700px) { .carousel-btn { display: none; } }

/* ---------------- Tarjetas de producto ---------------- */

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 18px;
}

.product-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

.product-card .thumb {
  aspect-ratio: 1 / 1;
  background: #000;
  overflow: hidden;
}

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

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

.product-card .cat-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-cyan);
  font-weight: 700;
}

.product-card h3 { margin: 0; font-size: 1rem; font-weight: 700; color: var(--color-white); }

.product-card .price {
  margin-top: auto;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--color-red);
}
.product-card .price .old { color: var(--color-text-muted); text-decoration: line-through; font-weight: 500; font-size: 0.85rem; margin-right: 6px; }

.product-card .btn-ver {
  display: block;
  text-align: center;
  margin-top: 10px;
  padding: 9px;
  border-radius: 8px;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  font-weight: 700;
  font-size: 0.85rem;
  transition: background 0.2s, color 0.2s;
}
.product-card .btn-ver:hover { background: var(--color-cyan); color: #04201d; }

/* ---------------- Botones generales ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: filter 0.2s, transform 0.1s;
}
.btn:active { transform: scale(0.98); }
.btn svg { width: 20px; height: 20px; }

.btn-red { background: var(--color-red); color: #fff; }
.btn-red:hover { filter: brightness(1.1); }

.btn-cyan { background: var(--color-cyan); color: #06231f; }
.btn-cyan:hover { filter: brightness(1.1); }

.btn-outline {
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-white);
}
.btn-outline:hover { border-color: var(--color-cyan); color: var(--color-cyan); }

.btn-whatsapp { background: #21c55d; color: #06230f; }
.btn-whatsapp:hover { filter: brightness(1.08); }

.btn-block { width: 100%; }

/* ---------------- Hero / Nosotros / Contacto genérico ---------------- */

.page-hero {
  padding: 40px 0 20px;
  text-align: center;
  border-bottom: 1px solid var(--color-border);
  background: linear-gradient(180deg, var(--color-bg-alt), var(--color-bg));
}
.page-hero h1 { font-size: 2rem; margin: 0 0 6px; }
.page-hero h1 span { color: var(--color-red); }
.page-hero p { color: var(--color-text-muted); margin: 0; }

.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}
@media (min-width: 861px) {
  .about-grid { grid-template-columns: 1fr 1fr; align-items: center; }
}

.about-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px;
}
.about-card h3 { color: var(--color-cyan); margin-top: 0; }
.mv-icon { width: 26px; height: 26px; margin: 0 auto; display: block; }

/* ---------------- Contacto ---------------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 861px) {
  .contact-grid { grid-template-columns: 1fr 1fr; }
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: 14px;
}
.contact-item svg { width: 26px; height: 26px; color: var(--color-cyan); flex-shrink: 0; }
.contact-item h4 { margin: 0 0 4px; font-size: 0.95rem; }
.contact-item p, .contact-item a { margin: 0; color: var(--color-text-muted); font-size: 0.9rem; }

.map-frame {
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 300px;
}
.map-frame iframe { width: 100%; height: 100%; min-height: 300px; border: 0; }

/* ---------------- Producto - detalle ---------------- */

.product-detail {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}
@media (min-width: 861px) {
  .product-detail { grid-template-columns: 1fr 1fr; }
}

.pd-gallery-main {
  aspect-ratio: 1/1;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
  cursor: zoom-in;
}
.pd-gallery-main img { width: 100%; height: 100%; object-fit: cover; }

.pd-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  overflow-x: auto;
}
.pd-thumbs img {
  width: 68px;
  height: 68px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  flex-shrink: 0;
}
.pd-thumbs img.active { border-color: var(--color-cyan); }

.pd-info .cat-label { color: var(--color-cyan); font-weight: 700; text-transform: uppercase; font-size: 0.78rem; }
.pd-info h1 { margin: 6px 0 12px; font-size: 1.6rem; }
.pd-info .price { font-size: 1.7rem; font-weight: 800; color: var(--color-red); margin-bottom: 16px; }
.pd-info .price .old { color: var(--color-text-muted); text-decoration: line-through; font-weight: 500; font-size: 1rem; margin-right: 10px; }
.pd-info .desc { color: var(--color-text-muted); margin-bottom: 22px; white-space: pre-line; }

.pd-actions { display: flex; flex-direction: column; gap: 10px; max-width: 340px; }

.qty-row { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.qty-row button {
  width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--color-border);
  background: var(--color-card); color: #fff; font-size: 1.1rem; cursor: pointer;
}
.qty-row input {
  width: 50px; text-align: center; background: var(--color-card); border: 1px solid var(--color-border);
  color: #fff; border-radius: 8px; height: 36px;
}

.payment-note {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--color-card);
  border: 1px dashed var(--color-cyan);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: 8px;
}
.payment-note svg { width: 22px; height: 22px; color: var(--color-cyan); flex-shrink: 0; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; background: rgba(0,0,0,0.92); z-index: 999;
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 90vh; object-fit: contain; border-radius: 8px; }
.lightbox .close-btn {
  position: absolute; top: 18px; right: 18px; background: var(--color-card);
  border: 1px solid var(--color-border); color: #fff; width: 40px; height: 40px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer;
}

/* ---------------- Carrito ---------------- */

.cart-item {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 14px;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: 12px;
}
.cart-item img { width: 70px; height: 70px; object-fit: cover; border-radius: 8px; }
.cart-item .cart-item-info { flex: 1; min-width: 0; }
.cart-item h4 { margin: 0 0 4px; font-size: 0.95rem; }
.cart-item .price { color: var(--color-red); font-weight: 700; }
.cart-item .remove-btn { background: none; border: none; color: var(--color-text-muted); cursor: pointer; }
.cart-item .remove-btn:hover { color: var(--color-red); }

.cart-empty { text-align: center; padding: 60px 20px; color: var(--color-text-muted); }
.cart-empty svg.empty-icon { width: 70px; height: 70px; color: var(--color-border); margin-bottom: 14px; }

.cart-summary {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 20px;
}
.cart-summary .total-row { display: flex; justify-content: space-between; font-size: 1.2rem; font-weight: 800; margin-bottom: 16px; }
.cart-summary .total-row span:last-child { color: var(--color-red); }

/* ---------------- Formularios ---------------- */

.form-field { margin-bottom: 16px; }
.form-field label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 0.88rem; color: var(--color-text-muted); }
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  color: var(--color-white);
  padding: 11px 14px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus { outline: none; border-color: var(--color-cyan); }
.form-row { display: grid; grid-template-columns: 1fr; gap: 0 16px; }
@media (min-width: 700px) { .form-row.cols-2 { grid-template-columns: 1fr 1fr; } }

.form-card {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 26px;
  max-width: 720px;
  margin: 0 auto;
}

.alert {
  padding: 14px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 0.9rem;
  font-weight: 600;
}
.alert-success { background: rgba(23, 230, 212, 0.12); border: 1px solid var(--color-cyan); color: var(--color-cyan); }
.alert-error { background: rgba(255, 26, 60, 0.12); border: 1px solid var(--color-red); color: var(--color-red); }

/* ---------------- Footer ---------------- */

.site-footer {
  background: #060606;
  border-top: 1px solid var(--color-border);
  padding: 40px 0 20px;
  margin-top: 30px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 26px;
  margin-bottom: 20px;
}
@media (min-width: 700px) {
  .footer-grid { grid-template-columns: 1.2fr 1fr 1fr; }
}
.footer-grid h4 { color: var(--color-cyan); margin: 0 0 12px; font-size: 0.95rem; }
.footer-grid p, .footer-grid a { color: var(--color-text-muted); font-size: 0.88rem; display: block; margin-bottom: 8px; }
.footer-grid a:hover { color: var(--color-white); }
.footer-social { display: flex; gap: 10px; margin-top: 8px; }
.footer-social a {
  width: 36px; height: 36px; border-radius: 50%; background: var(--color-card);
  display: flex; align-items: center; justify-content: center; border: 1px solid var(--color-border);
}
.footer-social svg { width: 18px; height: 18px; }
.footer-bottom {
  text-align: center;
  border-top: 1px solid var(--color-border);
  padding-top: 16px;
  color: var(--color-text-muted);
  font-size: 0.8rem;
}

/* ---------------- Utilidades ---------------- */

.empty-state { text-align: center; padding: 50px 20px; color: var(--color-text-muted); }
.text-center { text-align: center; }
.mt-30 { margin-top: 30px; }
