/* Las variables de color viven en css/tema.css, que se carga antes.
   Acá quedaba duplicado y el modo oscuro solo existía en este archivo. */
  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
  html { scroll-behavior: smooth; }
  body {
    font-family: 'Lato', sans-serif;
    background: var(--bg);
    color: var(--text);
    transition: background var(--transition), color var(--transition);
    overflow-x: hidden;
  }

  /* ===== HEADER ===== */
  header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 2.5rem;
    height: 120px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    transition: background var(--transition), border-color var(--transition);
  }
  .logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.35em;
    color: var(--gold);
    text-decoration: none;
    text-transform: uppercase;
  }
  .logo-img-link { display: flex; align-items: center; text-decoration: none; }
  .logo-img { height: 110px; width: 110px; border-radius: 50%; object-fit: cover; }
  .footer-logo { margin-bottom: 1.5rem; }
  .footer-logo-img { height: 150px; width: 150px; border-radius: 50%; object-fit: cover; }
  .header-nav {
    display: flex; gap: 2rem;
  }
  .header-nav a {
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text2);
    text-decoration: none;
    transition: color 0.25s;
  }
  .header-nav a:hover { color: var(--gold); }
  /* .toggle-btn y .header-acoes: css/tema.css (los usan todas las páginas) */

  /* ===== CAROUSEL ===== */
  .carousel { position: relative; width: 100%; height: 100vh; overflow: hidden; margin-top: 70px; }
  .slides { display: flex; height: 100%; transition: transform 0.85s cubic-bezier(0.77,0,0.18,1); }
  .slide {
    min-width: 100%; height: 100%; position: relative;
    background-size: cover; background-position: center 40%;
  }
  .slide-overlay {
    position: absolute; inset: 0;
    background: var(--overlay);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; padding: 2rem;
    transition: background var(--transition);
  }
  .slide-tag {
    font-family: 'Lato', sans-serif;
    font-size: 0.72rem; letter-spacing: 0.28em; text-transform: uppercase;
    color: var(--gold-light); margin-bottom: 1.2rem;
  }
  .slide-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.4rem, 6vw, 5rem);
    font-weight: 700; color: #fff;
    line-height: 1.1; margin-bottom: 1rem;
    text-shadow: 0 2px 30px rgba(0,0,0,0.35);
  }
  .slide-sub {
    font-size: 1rem; color: rgba(255,255,255,0.78);
    font-weight: 300; letter-spacing: 0.06em;
    max-width: 420px; margin-bottom: 2.2rem; line-height: 1.6;
  }
  .btn-gold {
    display: inline-block;
    background: var(--gold);
    color: #fff;
    padding: 0.85rem 2.4rem;
    font-size: 0.78rem; letter-spacing: 0.2em; text-transform: uppercase;
    text-decoration: none; border: none; cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    font-family: 'Lato', sans-serif;
  }
  .btn-gold:hover { background: var(--gold-dark); transform: translateY(-1px); }
  .carousel-dots {
    position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
    display: flex; gap: 10px;
  }
  .dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: rgba(255,255,255,0.4); cursor: pointer; transition: all 0.3s;
    border: none;
  }
  .dot.active { background: var(--gold); width: 28px; border-radius: 4px; }
  .carousel-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.25);
    color: #fff; width: 50px; height: 50px; cursor: pointer;
    font-size: 1.2rem; transition: all 0.3s; border-radius: 0;
    display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(4px);
  }
  .carousel-arrow:hover { background: var(--gold); border-color: var(--gold); }
  .arr-left { left: 1.5rem; }
  .arr-right { right: 1.5rem; }

  /* ===== SECTIONS ===== */
  section { padding: 6rem 2rem; }
  .section-label {
    font-size: 0.7rem; letter-spacing: 0.3em; text-transform: uppercase;
    color: var(--gold); margin-bottom: 0.8rem;
  }
  .section-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 600; color: var(--text); line-height: 1.2;
    margin-bottom: 1.5rem;
  }

  /* ===== HISTORIA ===== */
  .historia { background: var(--bg2); transition: background var(--transition); }
  .historia-inner {
    max-width: 1100px; margin: 0 auto;
    display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center;
  }
  .historia-img {
    width: 100%; aspect-ratio: 3/4; object-fit: cover;
    filter: grayscale(15%);
  }
  .historia-text p {
    font-size: 1.05rem; color: var(--text2); line-height: 1.85;
    margin-bottom: 1.2rem; font-weight: 300;
    transition: color var(--transition);
  }
  .gold-line {
    width: 50px; height: 2px; background: var(--gold); margin-bottom: 2rem;
  }

  /* ===== CATALOG ===== */
  .catalogo { background: var(--bg); }
  .catalogo-header { text-align: center; max-width: 600px; margin: 0 auto 3.5rem; }
  .products-grid {
    max-width: 1300px; margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 2rem;
  }
  /* Columna flex para que el bloque de precio + botones quede pegado abajo en
     todas las tarjetas. Sin esto, un nombre o una descripción de dos líneas
     empujaba los botones más abajo y la fila quedaba despareja. */
  .product-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    transition: all var(--transition);
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }
  .product-card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px var(--shadow); }
  .product-img-wrap { position: relative; overflow: hidden; aspect-ratio: 3/4; display: block; }
  .product-img-wrap img {
    width: 100%; height: 100%; object-fit: cover;
    /* estado base: vuelve rápido a tamaño normal al sacar el mouse */
    transition: transform 0.4s ease;
    transform: scale(1);
    will-change: transform;
  }
  /* Zoom +75% recién luego de mantener el mouse 1.5s sobre el artículo (responsive, funciona en cualquier tamaño de pantalla) */
  .product-card:hover .product-img-wrap img {
    transform: scale(1.75);
    transition: transform 0.6s ease 1.5s;
  }
  .product-badge {
    position: absolute; top: 1rem; left: 1rem;
    background: var(--gold); color: #fff;
    font-size: 0.6rem; letter-spacing: 0.18em; text-transform: uppercase;
    padding: 0.3rem 0.7rem;
    z-index: 2;
  }
  .product-info {
    padding: 1.2rem 1.3rem 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;                      /* ocupa lo que sobra de la tarjeta */
  }
  .product-name-link { text-decoration: none; }
  /* Nombre y descripción con alto fijo (2 líneas): así el precio arranca a la
     misma altura en toda la fila, aunque un nombre sea más largo. Lo que no
     entra se corta con puntos suspensivos — el texto completo está en la
     landing de la pieza. */
  .product-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.05rem; font-weight: 600; line-height: 1.3;
    color: var(--text); margin-bottom: 0.3rem;
    transition: color var(--transition);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: calc(2 * 1.3em);
  }
  .product-desc {
    font-size: 0.8rem; color: var(--text2); letter-spacing: 0.04em;
    line-height: 1.45;
    margin-bottom: 0.4rem; font-weight: 300;
    transition: color var(--transition);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: calc(2 * 1.45em);
  }
  .product-code {
    font-size: 0.68rem; color: var(--text2); letter-spacing: 0.08em;
    margin-bottom: 0.8rem; opacity: 0.7;
  }
  .product-price {
    font-size: 1.15rem; font-weight: 700; color: var(--gold);
    margin-bottom: 1rem; letter-spacing: 0.04em;
  }
  /* ===== PRECIO + BOTÓN DE CARRITO =====
     `margin-top: auto` empuja este bloque al pie de la tarjeta: con
     .product-info en flex column, el precio y los botones quedan a la misma
     altura en toda la fila, sin importar el largo del nombre. */
  .product-preco-linha {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    margin-top: auto;
    padding-top: 0.5rem;
    margin-bottom: 0.7rem;
  }
  .product-preco-linha .product-price { margin: 0; }

  .btn-add-cart {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.6rem 0.95rem;
    border: 1px solid var(--gold);
    background: var(--gold);       /* relleno, no contorno: es la acción principal */
    color: #fff;
    font-family: 'Lato', sans-serif;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    white-space: nowrap;
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition);
  }
  .btn-add-cart:hover { background: var(--gold-dark); border-color: var(--gold-dark); }
  /* El ícono es un SVG y no un emoji: 🛍 no existe en muchas fuentes de
     Windows y salía como un cuadrado negro. currentColor lo tiñe solo. */
  .btn-add-cart svg { width: 15px; height: 15px; flex-shrink: 0; }

  /* En tarjetas angostas queda solo el ícono, para que el precio no se corte */
  @media (max-width: 520px) {
    .btn-add-cart span { display: none; }
    .btn-add-cart { padding: 0.6rem 0.75rem; }
  }

  .product-btns { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 0; }
  .btn-detail {
    flex: 1; min-width: 110px;
    display: flex; align-items: center; justify-content: center; gap: 0.45rem;
    padding: 0.6rem 0.8rem;
    background: transparent; color: var(--gold); border: 1px solid var(--gold);
    font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase;
    text-decoration: none; font-family: 'Lato', sans-serif;
    transition: background 0.25s, color 0.25s;
  }
  .btn-detail:hover { background: var(--gold); color: #fff; }
  .btn-wa {
    flex: 1; min-width: 110px;
    display: flex; align-items: center; justify-content: center; gap: 0.45rem;
    padding: 0.65rem 0.8rem;
    background: #1a6b3a; color: #fff;
    font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase;
    text-decoration: none; font-family: 'Lato', sans-serif;
    transition: background 0.25s, transform 0.15s;
    border: none; cursor: pointer;
  }
  .btn-wa:hover { background: #145530; transform: translateY(-1px); }
  .btn-mp {
    flex: 1; min-width: 110px;
    display: flex; align-items: center; justify-content: center; gap: 0.45rem;
    padding: 0.65rem 0.8rem;
    background: #3d3df5; color: #fff;
    font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase;
    text-decoration: none; font-family: 'Lato', sans-serif;
    transition: background 0.25s, transform 0.15s;
    border: none; cursor: pointer;
  }
  .btn-mp:hover { background: #2a2ad4; transform: translateY(-1px); }
  .btn-icon { font-size: 1rem; }

  /* ===== PROCESO ===== */
  .proceso { background: var(--bg2); text-align: center; transition: background var(--transition); }
  .proceso-header { max-width: 560px; margin: 0 auto 3.5rem; }
  .proceso-grid {
    max-width: 1000px; margin: 0 auto;
    display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 2rem;
  }
  .proceso-item { padding: 2rem 1rem; }
  .proceso-icon {
    font-size: 2.2rem; color: var(--gold); margin-bottom: 1rem; display: block;
  }
  .proceso-title {
    font-family: 'Playfair Display', serif;
    font-size: 1rem; color: var(--text); margin-bottom: 0.5rem;
    transition: color var(--transition);
  }
  .proceso-desc {
    font-size: 0.85rem; color: var(--text2); line-height: 1.65; font-weight: 300;
    transition: color var(--transition);
  }

  /* ===== DIVIDER ===== */
  .divider {
    height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent);
    max-width: 600px; margin: 0 auto;
  }

  /* ===== FOOTER ===== */
  footer {
    background: #0A0A0A; color: #888; text-align: center; padding: 3rem 2rem;
  }
  .footer-logo {
    margin-bottom: 1.5rem;
  }
  .footer-links {
    display: flex; justify-content: center; gap: 2rem; margin-bottom: 1.5rem; flex-wrap: wrap;
  }
  .footer-links a {
    font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase;
    color: #666; text-decoration: none; transition: color 0.25s;
  }
  .footer-links a:hover { color: var(--gold); }
  .footer-copy { font-size: 0.75rem; color: #444; letter-spacing: 0.08em; }

  /* ===== BACK TO TOP ===== */
  .back-top {
    position: fixed; bottom: 2rem; right: 2rem; z-index: 99;
    width: 44px; height: 44px;
    background: var(--gold); color: #fff;
    border: none; cursor: pointer; font-size: 1.1rem;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s, transform 0.2s;
  }
  .back-top.visible { opacity: 1; pointer-events: auto; }
  .back-top:hover { transform: translateY(-3px); background: var(--gold-dark); }

  /* ===== FADE IN ===== */
  .fade-in { opacity: 0; transform: translateY(20px); transition: opacity 0.7s, transform 0.7s; }
  .fade-in.visible { opacity: 1; transform: none; }

  /* ===== RESPONSIVE ===== */
  @media (max-width: 768px) {
    .header-nav { display: none; }
    header { padding: 0 1.2rem; }
    .historia-inner { grid-template-columns: 1fr; gap: 2rem; }
    .historia-img { aspect-ratio: 16/9; }
    section { padding: 4rem 1.2rem; }
  }
  @media (max-width: 480px) {
    .products-grid { grid-template-columns: 1fr 1fr; gap: 1rem; }
    .product-btns { flex-direction: column; }
    .btn-wa, .btn-mp { min-width: unset; }
  }
