/* ============================
   HOME MODERN — Armonía Online
============================ */

.home-modern {
    max-width: 1250px;
    margin: auto;
    padding: 20px;
    font-family: 'Inter', sans-serif;
}

/* ============================
   HERO MODERN
============================ */

.hero-modern {
    display: flex;
    gap: 40px;
    padding: var(--space-section);
    background: var(--color-bg);
    border-radius: var(--radius-card);
    margin-bottom: var(--space-section);
}

.hero-left {
    flex: 1;
}

.hero-left h1 {
    font-size: 52px;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 10px;
}

.hero-left p {
    font-size: 20px;
    color: var(--color-text-secondary);
    margin-bottom: 25px;
}

.btn-modern {
    background: var(--color-primary);
    color: white;
    padding: 14px 32px;
    border-radius: var(--radius-button);
    font-weight: 600;
    text-decoration: none;
    transition: 0.3s;
}

.btn-modern:hover {
    background: var(--color-primary-variant);
}

.hero-right {
    flex: 1;
    display: grid;
    gap: 20px;
}

.hero-card {
    background: var(--color-surface);
    padding: var(--space-card);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-2);
    transition: 0.3s;
}

.hero-card:hover {
    transform: translateY(-4px);
}

/* ============================
   CATEGORÍAS MODERNAS
============================ */

.categorias-modern {
    text-align: center;
    margin-bottom: var(--space-section);
}

.categorias-modern h2 {
    font-size: 36px;
    margin-bottom: 30px;
    font-weight: 700;
    color: var(--color-text);
}

.cat-modern-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 30px;
}

.cat-modern-card {
    background: var(--color-surface);
    padding: 40px 20px;
    border-radius: var(--radius-card);
    text-decoration: none;
    color: var(--color-text);
    box-shadow: var(--shadow-2);
    transition: 0.3s;
    text-align: center;
}

.cat-modern-card:hover {
    background: var(--color-primary);
    color: white;
    transform: translateY(-6px);
}

.cat-modern-card span {
    font-size: 48px;
    display: block;
    margin-bottom: 10px;
}

/* ============================
   INSTITUCIONAL MODERNO
============================ */

.institucional-modern {
    background: var(--color-bg);
    padding: var(--space-section);
    border-radius: var(--radius-card);
    text-align: center;
}

.institucional-modern h2 {
    font-size: 34px;
    margin-bottom: 20px;
    font-weight: 700;
    color: var(--color-text);
}

.institucional-modern p {
    font-size: 18px;
    line-height: 1.6;
    color: var(--color-text-secondary);
}



/* ============================
   MODAL LOGIN
============================ */

#modal-login-requerido {
    position: fixed;
    inset: 0;
    z-index: 99999 !important;
}

#modal-login-requerido.modal {
    background-color: rgba(0, 0, 0, 0.5);
}

#modal-login-requerido .contenido {
    position: relative;
    z-index: 100000 !important;
}
.producto-card .variant-link.variant-selected {
    background-color: #009E73 !important; /* verde Material */
    color: #fff !important;
    font-weight: 600;
    border: 1px solid #2e7d32 !important;
}
/* ===============================
   MOBILE — OPTIMIZACIÓN HOME
   =============================== */
@media (max-width: 1024px) {

    /* Ocultar título largo del producto */
    .producto-card h3 {
        font-size: 1.4rem !important;
        line-height: 1.3 !important;
        max-height: 2.6rem; /* 2 líneas */
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Botones de variantes: más grandes y táctiles */
    .producto-card .variant-link {
        font-size: 2.2rem !important; /* antes 1.8rem */
        padding: 1.2rem 1.6rem !important; /* más aire */
        min-width: 120px !important; /* más ancho */
        text-align: center !important;
        border-radius: 1.2rem !important;
        font-weight: 700 !important;
    }

    /* Variante seleccionada (verde institucional) */
     .producto-card .variant-link.variant-selected {
        background-color: #009E73 !important;
        color: #fff !important;
        font-weight: 700 !important;
        border: 1px solid #009E73 !important;
    }

    /* Controles de cantidad */
    .producto-card .qty-input {
        width: 60px !important;
        font-size: 1.4rem !important;
        padding: 0.6rem 0 !important;
    }

    .producto-card .qty-minus,
    .producto-card .qty-plus {
        font-size: 1.4rem !important;
        padding: 0.6rem 1rem !important;
    }

    /* Botón AGREGAR / EN CARRITO */
    .producto-card .btn-add {
        width: 100% !important;
        justify-content: center !important;
        font-size: 1.5rem !important;
        padding: 1rem 0 !important;
        border-radius: 1rem !important;
        margin-top: 1rem !important;
    }

    .producto-card .btn-add .material-symbols-rounded {
        font-size: 2rem !important;
        margin-right: 0.4rem !important;
    }

    /* Separación entre cards */
    .productos-grid {
        gap: 1.2rem !important;
    }
}




/* ============================================================
   HOME — Ajustes reales según home.php
============================================================ */

/* ============================
   MOBILE ≤1024px
============================ */

@media (max-width: 1024px) {

  /* ============================
     GRILLA
  ============================ */
  .productos-grid.grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 1.8rem !important; /* un poco más de aire entre cards */
  }

  /* ============================
     CARD
  ============================ */
  .productos-grid .producto-card {
    padding: 1.6rem !important; /* más aire interno */
    border-radius: 1.6rem !important;
    box-shadow: var(--shadow-2);
  }

  /* ============================
     IMAGEN
  ============================ */
  .home-product-img {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 5 / 5 !important; /* más cuadrada */
    object-fit: contain !important;
    background: #fff !important;
    display: block !important;
  }

  /* ============================
     TÍTULO
  ============================ */
  .producto-card h3 {
    font-size: 1.9rem !important;
    line-height: 1.4 !important;
    font-weight: 600 !important;
    text-align: center !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: normal !important;
    min-height: calc(1.9rem * 1.4 * 3) !important;
    margin-bottom: 1rem !important;
  }

  /* ============================
     VARIANTES
  ============================ */
  .variant-link {
    font-size: 2.2rem !important;
    padding: 1.2rem 1.6rem !important;
    min-width: 120px !important;
    text-align: center !important;
    border-radius: 1.2rem !important;
    font-weight: 700 !important;
  }

  .variant-link.variant-selected {
    background-color: #009E73 !important;
    color: #fff !important;
    border: 1px solid #009E73 !important;
  }

  /* ============================
     PRECIO
  ============================ */
  .productos-grid .producto-card .home-product-price {
    font-size: 2.8rem !important;
    font-weight: 800 !important;
    color: #d32f2f !important;
    text-align: center !important;
    margin-top: 1.4rem !important;
    margin-bottom: 1.2rem !important;
    line-height: 1.3 !important;
  }
  .precio-wrapper {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0.8rem !important;
        margin-top: 1.2rem !important;
        margin-bottom: 1.6rem !important;
    }

    .precio-tachado {
        font-size: 2.3rem !important;
        color: #777 !important;
        text-decoration: line-through !important;
    }
  /* ============================
       CANTIDADES — TÁCTIL
    ============================ */
    .qty-wrapper {
        width: 100% !important;
        max-width: 320px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 1rem !important;
        margin: 0 auto !important;
    }

    .productos-grid .producto-card .qty-input {
        -webkit-appearance: none !important;
        appearance: none !important;

        width: 90px !important;
        height: 90px !important;
        font-size: 2.8rem !important;
        font-weight: 700 !important;

        padding: 0 !important;
        margin: 0 !important;

        border: 1px solid #ccc !important;
        border-radius: 0.8rem !important;

        text-align: center !important;

        display: flex !important;
        align-items: center !important;
        justify-content: center !important;

        background: #fff !important;
    }

    .productos-grid .producto-card .qty-plus,
    .productos-grid .producto-card .qty-minus {
        width: 90px !important;
        height: 90px !important;
        font-size: 3rem !important;
        font-weight: 800 !important;

        padding: 0 !important;
        margin: 0 !important;

        border-radius: 0.8rem !important;
        background-color: #f3f3f3 !important;
        color: #333 !important;
        border: 1px solid #ddd !important;

        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .productos-grid .producto-card .qty-minus {
        border-top-right-radius: 0 !important;
        border-bottom-right-radius: 0 !important;
    }

    .productos-grid .producto-card .qty-plus {
        border-top-left-radius: 0 !important;
        border-bottom-left-radius: 0 !important;
    }

  /* ============================
     BOTÓN AGREGAR
  ============================ */
  .productos-grid .producto-card .btn-add  {
        width: 100% !important;
        max-width: 320px !important;
        font-size: 2.6rem !important;
        font-weight: 700 !important;
        padding: 1.8rem 2.6rem !important;
        border-radius: 2.4rem !important;
        min-height: 80px !important;

        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 1.2rem !important;

        margin-left: auto !important;
        margin-right: auto !important;

        box-shadow: 0 3px 8px rgba(0,0,0,0.18);
        transition: transform 0.15s ease, box-shadow 0.15s ease;
  }


  .productos-grid .producto-card .btn-add :hover {
    transform: translateY(-3px);
        box-shadow: 0 5px 12px rgba(0,0,0,0.25);
  }

  .productos-grid .producto-card .btn-add  .material-symbols-rounded {
    font-size: 3.2rem !important;
  }
	
  .productos-grid .producto-card .btn-opciones  {
        width: 100% !important;
        max-width: 320px !important;
        font-size: 2.6rem !important;
        font-weight: 700 !important;
        padding: 1.8rem 2.6rem !important;
        border-radius: 2.4rem !important;
        min-height: 80px !important;

        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 1.2rem !important;

        margin-left: auto !important;
        margin-right: auto !important;

        box-shadow: 0 3px 8px rgba(0,0,0,0.18);
        transition: transform 0.15s ease, box-shadow 0.15s ease;
  }


  .productos-grid .producto-card .btn-opciones :hover {
    transform: translateY(-3px);
        box-shadow: 0 5px 12px rgba(0,0,0,0.25);
  }

  .productos-grid .producto-card .btn-opciones  .material-symbols-rounded {
    font-size: 3.2rem !important;
  }	
	
  /* BADGE ML — estilo MercadoLibre */
    .badge-descuento-ml {
        position: absolute !important;
        top: 0.8rem !important;
        right: 0.8rem !important;

        background: #ffca28 !important; /* amarillo ML */
        color: #000 !important;

        font-size: 1.8rem !important;   /* más grande */
        font-weight: 700 !important;

        padding: 0.6rem 1rem !important; /* más aire */
        border-radius: 0.8rem !important;

        box-shadow: 0 3px 8px rgba(0,0,0,0.20) !important;

        z-index: 10 !important;
    }	
	/* Encabezados de secciones (Descubrí / Lo más vendido / Novedades / Promociones) */
    .productos-grid + div span.text-primary,
    section span.text-primary {
        font-size: 2rem !important;       /* antes ~1.4rem */
        letter-spacing: 0.08em !important;
        font-weight: 700 !important;
    }

    .productos-grid + div h2,
    section h2 {
        font-size: 3rem !important;        /* antes 2rem */
        line-height: 1.2 !important;
        font-weight: 600 !important;
        margin-bottom: 1.2rem !important;
    }

    /* Ajuste del contenedor del título */
    .flex.items-end.mb-4 {
        margin-bottom: 2rem !important;    /* más aire */
    }
	
	
	
	
	
	
}

/* ============================================================
   DESKTOP ≥1025px — VERSIÓN FINAL
============================================================ */

@media (min-width: 1025px) {

    /* TARJETA */
    .productos-grid .producto-card {
        padding: 0.8rem !important;
        border-radius: 1.2rem !important;
        box-shadow: 0 1px 4px rgba(0,0,0,0.08);
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }

    .productos-grid .producto-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 3px 8px rgba(0,0,0,0.15);
    }

    /* IMAGEN */
    .productos-grid .home-product-img {
        height: 180px !important;
        object-fit: contain !important;
        display: block !important;
        margin: 0 auto !important;
    }

    /* NOMBRE */
    .productos-grid .producto-card h3 {
        font-size: 0.95rem !important;
        line-height: 1.25 !important;
        font-weight: 600 !important;
        text-align: center !important;
        margin-bottom: 0.3rem !important;
    }

    /* PRECIO */
    .productos-grid .home-product-price {
        font-size: 1.5rem !important;
        font-weight: 800 !important;
        color: #d32f2f !important;
        text-align: center !important;
        margin-top: 0.4rem !important;
        margin-bottom: 0.4rem !important;
        display: block !important;
    }

    .precio-tachado {
        font-size: 1rem !important;
        color: #777 !important;
        text-decoration: line-through !important;
    }

    .precio-wrapper {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 0.3rem !important;
        margin-bottom: 0.8rem !important;
    }

    /* BADGE ML */
    .badge-descuento-ml {
        position: absolute !important;
        top: 0.6rem !important;
        right: 0.6rem !important;
        background: #ffca28 !important;
        color: #000 !important;
        font-size: 0.85rem !important;
        font-weight: 700 !important;
        padding: 0.25rem 0.5rem !important;
        border-radius: 0.4rem !important;
        box-shadow: 0 2px 4px rgba(0,0,0,0.15);
        z-index: 10 !important;
    }

    /* CONTROLES DE CANTIDAD */
    .qty-wrapper {
        max-width: 250px !important;
        margin: 0 auto !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0.5rem !important;
    }

    .qty-input {
        height: 40px !important;
        width: 70px !important;
        font-size: 1.3rem !important;
        line-height: 40px !important;
        text-align: center !important;
        border-radius: 0.6rem !important;
        border: 1px solid #ccc !important;
        font-weight: 600 !important;
        background-color: #fff !important;
        box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
        display: block !important;
    }

    .qty-plus,
    .qty-minus {
        height: 40px !important;
        width: 40px !important;
        font-size: 1.5rem !important;
        background-color: #f3f3f3 !important;
        border: 1px solid #ddd !important;
        border-radius: 0.6rem !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-weight: 700 !important;
        cursor: pointer !important;
    }
   /* Ocultar flechas del input tipo number en desktop */
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

.qty-input[type=number] {
    -moz-appearance: textfield !important; /* Firefox */
}
.qty-minus {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.qty-input {
    border-radius: 0 !important;
}

.qty-plus {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

    /* BOTÓN AGREGAR */
    .btn-add {
        max-width: 240px !important;
        font-size: 1.2rem !important;
        padding: 0.8rem 1.4rem !important;
        border-radius: 1.2rem !important;
        margin-left: auto !important;
        margin-right: auto !important;
        gap: 0.4rem !important;
        min-height: 44px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        line-height: 1.2 !important;
        box-shadow: 0 2px 6px rgba(0,0,0,0.15);
        transition: transform 0.15s ease, box-shadow 0.15s ease;
    }

    .btn-add:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    }

    .btn-add .material-symbols-rounded {
        font-size: 1.6rem !important;
        line-height: 1 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
	
	.btn-opciones {
        max-width: 240px !important;
        font-size: 1.2rem !important;
        padding: 0.8rem 1.4rem !important;
        border-radius: 1.2rem !important;
        margin-left: auto !important;
        margin-right: auto !important;
        gap: 0.4rem !important;
        min-height: 44px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        line-height: 1.2 !important;
        box-shadow: 0 2px 6px rgba(0,0,0,0.15);
        transition: transform 0.15s ease, box-shadow 0.15s ease;
    }

    .btn-opciones:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    }

    .btn-opciones .material-symbols-rounded {
        font-size: 1.6rem !important;
        line-height: 1 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
}
