/* ========================================
   KIRAM - HOJA DE ESTILOS PRINCIPAL
   Archivo: css/styles.css
======================================== */


/* ========================================
   1. FUENTE Y COLORES GENERALES
======================================== */

/* Fuente principal de Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&display=swap');

/* Colores principales de KIRAM */
/* Modificar aquí para cambiar la identidad visual */
:root {
    --wine: #820b2d;
    --wine-dark: #590a23;
    --gold: #e5a528;
    --cream: #fff9f3;
    --ink: #241b1d;
    --muted: #6b6264;
    --line: #f0e4dc;
}

/* ========================================
   2. ESTILOS GENERALES
======================================== */

/* Incluye padding y bordes en las dimensiones */
* {
    box-sizing: border-box;
}

/* Desplazamiento suave entre secciones */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 86px;
}

/* Estilos generales de la página */
body {
    margin: 0;
    background: #fff;
    color: var(--ink);
    font-family: 'DM Sans', Arial, sans-serif;
}

/* Enlaces sin subrayado */
a {
    text-decoration: none;
    color: inherit;
}

/* Botones con la fuente de la página */
button {
    font: inherit;
}

/* Contenedor principal */
/* Ancho máximo de 1140px */
.container {
    width: min(1140px, calc(100% - 40px));
    margin: auto;
}

/* Espaciado general de las secciones */
.section {
    padding: 90px 0;
}


/* ========================================
   3. ENCABEZADO Y NAVEGACIÓN
======================================== */

/* Encabezado fijo al desplazarse */
.header {
    height: 78px;
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid #f7eee9;
}

/* Distribución del menú */
.nav {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
}

/* Logo de KIRAM */
/* Temporalmente se utiliza texto */
.brand {
    font-size: 31px;
    font-weight: 800;
    font-style: italic;
    letter-spacing: -2px;
    color: var(--wine);
    position: relative;
    line-height: 1;
}

/* Línea dorada debajo del logo */
.gold-line {
    display: block;
    width: 68px;
    height: 5px;
    background: var(--gold);
    border-radius: 100%;
    transform: rotate(-7deg);
    margin-left: 28px;
}

/* Enlaces del menú */
.nav-links {
    display: flex;
    align-items: center;
    gap: 27px;
    font-size: 13px;
    font-weight: 700;
}

/* Efecto al pasar el cursor */
.nav-links a:hover,
.text-link:hover {
    color: var(--wine);
}

/* Botón del menú para celulares */
/* Se muestra mediante Media Queries */
.menu-toggle {
    display: none;
    border: 0;
    background: transparent;
    font-size: 28px;
    color: var(--wine);
}


/* ========================================
   4. BOTONES GENERALES
======================================== */

/* Estilo base de todos los botones */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 22px;
    border-radius: 100px;
    font-weight: 700;
    font-size: 14px;
    transition: transform .2s, box-shadow .2s;
}

/* Efecto al pasar el cursor */
.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px #600b2c22;
}

/* Botón principal color vino */
.btn-primary {
    color: white;
    background: linear-gradient(125deg, #ad0d3d, #630921);
}

/* Botón secundario con borde */
.btn-outline {
    border: 1.5px solid var(--wine);
    color: var(--wine);
    background: white;
}

/* Botón crema utilizado en el catálogo */
.btn-cream {
    background: #fff4e6;
    color: var(--wine);
}


/* ========================================
   5. SECCIÓN INICIO / HERO
======================================== */

/* Fondo y espacio del banner principal */
.hero {
    background: linear-gradient(
        135deg,
        #FDF5EF 0%,
        #FCF4EE 100%
    );
    padding: 95px 0;
}

/* Distribución del texto y la imagen */
.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    align-items: center;
    gap: 40px;
}

/* Texto pequeño superior */
.eyebrow {
    font-size: 12px;
    letter-spacing: 2.6px;
    font-weight: 800;
    color: var(--wine);
    margin: 0 0 16px;
}

/* Título principal */
.hero h1 {
    font-size: clamp(40px, 5vw, 68px);
    line-height: 1.08;
    letter-spacing: -2.5px;
    margin: 0 0 22px;
}

/* Palabra destacada en el título */
.hero h1 em {
    font-style: normal;
    color: var(--wine);
}

/* Descripción del banner */
.hero p:not(.eyebrow) {
    font-size: 17px;
    line-height: 1.7;
    color: var(--muted);
    max-width: 470px;
}

/* Contenedor de botones del inicio */
.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

/* Contenedor de la imagen principal */
.hero-visual {
    border-radius: 0;
    overflow: hidden;
    background: #fff6eb;
    box-shadow: none;
    border: 0;
    border-radius: 0;
}

/* Imagen del banner */
/* Archivo: img/banner-productos.webp */
.hero-visual img {
    display: block;
    width: 100%;
    height: auto;
}


/* ========================================
   6. SECCIÓN QUIÉNES SOMOS
======================================== */

/* Distribución de información y características */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 85px;
    align-items: center;
}

/* Títulos de las secciones */
.about h2,
.section-heading h2,
.catalog-panel h2 {
    font-size: clamp(30px, 3.2vw, 43px);
    line-height: 1.2;
    letter-spacing: -1.1px;
    margin: 0 0 18px;
}

/* Descripción de la empresa */
.about p:not(.eyebrow) {
    color: var(--muted);
    line-height: 1.8;
}

/* Contenedor de características */
.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

/* Tarjetas de características */
.features > div {
    padding: 25px 15px;
    border: 1px solid var(--line);
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ========================================
   ICONOS SVG DE KIRAM
======================================== */

/* Iconos generales de botones */
.btn svg {
    width: 18px;
    height: 18px;
    stroke-width: 2;
    flex-shrink: 0;
}

/* Iconos de características */
.features svg {
    width: 30px;
    height: 30px;
    color: var(--wine);
    stroke-width: 1.8;
}

/* Iconos de contacto */
.contact-details > div > svg {
    width: 28px;
    height: 28px;
    color: var(--wine);
    flex-shrink: 0;
    stroke-width: 1.8;
}

/* Icono flotante de WhatsApp */
.float-whatsapp svg {
    width: 23px;
    height: 23px;
    stroke-width: 2;
}

/* Icono del menú móvil */
.menu-toggle svg {
    width: 27px;
    height: 27px;
}


/* ========================================
   7. SECCIÓN NUESTROS PRODUCTOS
======================================== */

/* Fondo de la sección */
.products {
    background: #fffaf6;
}

/* Encabezado de cada sección */
.section-heading {
    text-align: center;
    margin-bottom: 42px;
}

/* Descripción debajo del título */
.section-heading p:last-child {
    color: var(--muted);
}

/* Contenedor de filtros por marca */
/* Los botones pasan a otra fila cuando falta espacio */
.product-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
}

/* Botón individual de marca */
.product-filter {
    padding: 10px 22px;
    border: 1px solid var(--line);
    border-radius: 30px;
    background: white;
    color: var(--wine);
    font-weight: 700;
    cursor: pointer;
    transition: background .2s, color .2s, border-color .2s;
}

/* Marca seleccionada y efecto al pasar el cursor */
.product-filter:hover,
.product-filter[aria-pressed="true"] {
    background: var(--wine);
    border-color: var(--wine);
    color: white;
}

/* Indicador de navegación con teclado */
.product-filter:focus-visible {
    outline: 2px solid var(--wine);
    outline-offset: 3px;
}

/* Cuadrícula de productos */
/* Computadoras: 3 columnas y 2 filas */
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* Tarjeta individual de producto */
.product-card {
    background: white;
    border: 1px solid var(--line);
    border-radius: 22px;
    overflow: hidden;
    transition: transform .2s, box-shadow .2s;
}

/* Animación al pasar el cursor */
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px #4b222010;
}

/* Imagen del producto */
/* Las rutas se configuran desde main.js */
.product-card img {
    display: block;
    width: 100%;
    height: 260px;
    object-fit: contain;
    background: #fff7ef;
}

/* Contenido de cada tarjeta */
.product-card .card-body {
    padding: 22px;
}

/* Nombre del producto */
.product-card h3 {
    font-size: 19px;
    margin: 0 0 7px;
}

/* Descripción del producto */
.product-card p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}

/* Contenedor del enlace al catálogo */
.center {
    text-align: center;
    margin-top: 32px;
}

/* Enlace debajo de los productos */
.text-link {
    font-weight: 800;
    color: var(--wine);
}

/* ========================================
   BOTÓN VER MÁS PRODUCTOS
======================================== */

/* Contenedor del botón y contador */
.products-pagination {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-top: 35px;
}

/* Contador de productos */
#products-counter {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

/* Botón para mostrar más productos */
#load-more-products {
    cursor: pointer;
    padding: 14px 28px;
    transition: all .2s ease;
}

/* Ocultar el botón cuando no sea necesario */
#load-more-products[hidden] {
    display: none;
}

/* Efecto al pasar el cursor */
#load-more-products:hover {
    background: var(--wine);
    color: white;
}

/* Animación del icono */
#load-more-products svg {
    transition: transform .25s ease;
}

/* Girar el icono cuando se muestran todos */
#load-more-products.is-expanded svg {
    transform: rotate(180deg);
}

/* Adaptación para celulares */
@media (max-width: 600px) {
    #load-more-products {
        width: 100%;
        max-width: 280px;
    }
}

/* ========================================
   8. SECCIÓN CATÁLOGO
======================================== */

/* Espaciado de la sección */
.catalog-section {
    padding: 85px 0;
}

/* Panel principal color vino */
.catalog-panel {
    min-height: 340px;
    background: linear-gradient(115deg, #a60d3c, #5b0923);
    border-radius: 32px;
    color: white;
    padding: 60px 8%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 35px;
    overflow: hidden;
}

/* Área de información del catálogo */
.catalog-panel > div:first-child {
    max-width: 520px;
}

/* Descripción */
.catalog-panel p:not(.eyebrow) {
    line-height: 1.7;
    color: #ffe8ef;
}

/* Espacio superior del botón */
.catalog-panel .btn {
    margin-top: 15px;
}

/* Subtítulo dorado */
.eyebrow.light {
    color: #f7c76e;
}

/* Diseño decorativo de un catálogo */
/* No es una imagen, está creado con CSS */
.catalog-art {
    flex: 0 0 260px;
    min-height: 250px;
    background: linear-gradient(145deg, #bd1b4c, #720c2e);
    border: 2px solid #f2c477;
    border-radius: 12px;
    box-shadow: 20px 20px 0 #4d051e66;
    transform: rotate(8deg);
    padding: 34px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: center;
}

/* Nombre de KIRAM en el catálogo */
.catalog-art span {
    font-size: 34px;
    font-weight: 800;
    font-style: italic;
}

/* Título del catálogo */
.catalog-art strong {
    font-size: 23px;
}

/* Texto inferior */
.catalog-art small {
    color: #ffdfa5;
}

/* ========================================
   9. SECCIÓN CONTACTO
======================================== */

/* Distribución de contactos y mapa */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 65px;
    align-items: start;
}

/* Lista de información de contacto */
.contact-details {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Cada elemento de contacto */
.contact-details > div {
    display: flex;
    align-items: flex-start;
    gap: 17px;
}

/* Contenedor de los iconos */
.contact-details > div > span {
    color: var(--wine);
    width: 35px;
    min-width: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Iconos SVG de Lucide */
.contact-details > div > span svg {
    width: 27px;
    height: 27px;
    stroke-width: 1.8;
}

/* Información del contacto */
.contact-details p {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}

/* Títulos de contacto */
.contact-details strong {
    font-weight: 600;
}

/* Enlaces de WhatsApp y correo electrónico */
.contact-details a {
    color: var(--wine);
    text-decoration: none;
    overflow-wrap: anywhere;
}

/* Efecto al pasar el cursor */
.contact-details a:hover {
    text-decoration: underline;
}

/* Propietario, teléfono y direcciones */
.contact-details p span {
    color: var(--muted);
    overflow-wrap: anywhere;
}

/* Icono del enlace de Google Maps */
.map-link svg {
    width: 16px;
    height: 16px;
    vertical-align: middle;
}

/* ========================================
   10. GOOGLE MAPS
======================================== */

/* Contenedor del mapa */
.map-wrap {
    position: relative;
    background: #f7eee8;
    border-radius: 22px;
    overflow: hidden;
    min-height: 360px;
    width: 100%;
    height: 100%;
}

/* Mapa integrado */
.map-wrap iframe {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 360px;
    border: 0;
}

/* Botón para abrir Google Maps */
.map-link {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: white;
    padding: 12px 16px;
    border-radius: 30px;
    color: var(--wine);
    font-weight: 800;
    font-size: 13px;
    box-shadow: 0 4px 15px #0002;
}


/* ========================================
   11. PIE DE PÁGINA / FOOTER
======================================== */

/* Fondo del footer */
.footer {
    background: var(--wine-dark);
    color: white;
    padding: 36px 0;
}

/* Distribución del contenido */
.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

/* Logo blanco del footer */
.brand-light {
    color: white;
}

/* Descripción de la empresa */
.footer p {
    max-width: 290px;
    font-size: 13px;
}

/* Derechos reservados */
.footer small {
    color: #f0cbd6;
}


/* ========================================
   12. BOTÓN FLOTANTE DE WHATSAPP
======================================== */

/* Botón visible en la esquina inferior */
.float-whatsapp {
    position: fixed;
    bottom: 22px;
    right: 22px;
    background: #138c50;
    color: white;
    padding: 14px 18px;
    border-radius: 50px;
    box-shadow: 0 8px 22px #0003;
    font-weight: 800;
    z-index: 30;
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Efecto al pasar el cursor */
.float-whatsapp:hover {
    background: #0b7540;
}


/* ========================================
   ICONO DE WHATSAPP
======================================== */

.whatsapp-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    display: inline-block;
    vertical-align: middle;
}

/* Icono de WhatsApp en contactos */
.contact-details .whatsapp-icon {
    width: 27px;
    height: 27px;
}

/* Icono del botón flotante */
.float-whatsapp .whatsapp-icon {
    width: 25px;
    height: 25px;
}


/* ========================================
   SELECTOR INTERNACIONAL DE WHATSAPP
======================================== */

/* Ventana flotante de países */
.whatsapp-panel {
    position: fixed;
    bottom: 90px;
    right: 22px;
    width: 330px;
    max-width: calc(100vw - 32px);
    max-height: calc(100dvh - 115px);
    overflow-y: auto;
    background: white;
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: 0 15px 50px #241b1d26;
    z-index: 100;
    animation: whatsappPanelIn .25s ease;
}

/* Ocultar el selector */
.whatsapp-panel[hidden] {
    display: none;
}

/* Encabezado color vino */
.whatsapp-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 22px;
    background: linear-gradient(
        125deg,
        #ad0d3d,
        #630921
    );
    color: white;
}

/* Título del selector */
.whatsapp-panel-header strong {
    font-size: 18px;
    font-weight: 700;
}

/* Descripción del encabezado */
.whatsapp-panel-header p {
    margin: 7px 0 0;
    font-size: 13px;
    line-height: 1.5;
    color: #ffe8ef;
}

/* Botón de cierre */
.whatsapp-panel-close {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff18;
    border: 0;
    border-radius: 50%;
    color: white;
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    cursor: pointer;
}

/* Icono de cierre */
.whatsapp-panel-close svg {
    width: 18px;
    height: 18px;
}

/* Contenedor de países */
.whatsapp-countries {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 15px;
}

/* Tarjeta de cada país */
.whatsapp-country {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 15px;
    background: var(--cream);
    border: 1px solid var(--line);
    border-radius: 13px;
    cursor: pointer;
    transition: background .2s,
                border-color .2s,
                transform .2s;
}

/* Efecto al pasar el cursor */
.whatsapp-country:hover {
    background: #f9edf0;
    border-color: var(--wine);
    transform: translateY(-2px);
}

/* Banderas de los países */
.country-flag {
    display: block;
    width: 42px;
    height: 28px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
    box-shadow: 0 2px 5px #00000015;
}

/* Información del país */
.country-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

/* Nombre del país */
.country-info strong {
    font-size: 15px;
    color: var(--ink);
}

/* Ciudad */
.country-info small {
    font-size: 12px;
    color: var(--muted);
}

/* Flecha de cada opción */
.whatsapp-country svg {
    width: 18px;
    height: 18px;
    color: var(--wine);
    flex-shrink: 0;
}

/* Texto inferior */
.whatsapp-panel-note {
    margin: 5px 8px;
    text-align: center;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.6;
}

/* Botones que abren el selector */
.whatsapp-trigger {
    cursor: pointer;
}

/* Navegación mediante teclado */
.whatsapp-country:focus-visible,
.whatsapp-trigger:focus-visible,
.whatsapp-panel-close:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
}

/* Animación de apertura */
@keyframes whatsappPanelIn {

    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }

}

/* Adaptación para celulares */
@media (max-width: 650px) {

    .whatsapp-panel {
        right: 16px;
        bottom: 85px;
        width: 330px;
        max-width: calc(100vw - 32px);
    }

    .whatsapp-panel-header {
        padding: 18px;
    }

    .whatsapp-country {
        padding: 12px;
    }

}

/* Respetar preferencias de accesibilidad */
@media (prefers-reduced-motion: reduce) {

    .whatsapp-panel {
        animation: none;
    }

    .whatsapp-country {
        transition: none;
    }

}

/* ========================================
   13. RESPONSIVE PARA TABLETS
   Pantallas de hasta 900px
======================================== */

@media (max-width: 900px) {

    /* Ocultar botón WhatsApp del menú */
    .nav-order {
        display: none;
    }

    /* Secciones organizadas en una columna */
    .hero-grid,
    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 35px;
    }

    /* Reducir espacio del banner */
    .hero {
        padding: 65px 0;
    }

    /* Limitar tamaño de imagen principal */
    .hero-visual {
        max-width: 620px;
    }

    /* Productos en 2 columnas */
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Características de la empresa */
    .features {
        max-width: 650px;
    }

    /* Permitir que el footer se adapte */
    .footer-inner {
        flex-wrap: wrap;
    }

}


/* ========================================
   14. RESPONSIVE PARA CELULARES
   Pantallas de hasta 650px
======================================== */

@media (max-width: 650px) {
    /* Reducir espacios generales */
    .section {
        padding: 65px 0;
    }

    /* Altura del encabezado */
    .header {
        height: 70px;
    }

    /* Mostrar botón del menú móvil */
    .menu-toggle {
        display: block;
    }

    /* Menú oculto inicialmente */
    .nav-links {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: white;
        padding: 20px;
        box-shadow: 0 12px 25px #0001;
        flex-direction: column;
        align-items: flex-start;
    }

    /* Mostrar menú al presionar el botón */
    /* JavaScript agrega la clase .open */
    .nav-links.open {
        display: flex;
    }

    /* Título principal más pequeño */
    .hero h1 {
        font-size: 42px;
    }

    /* Espacio entre texto e imagen */
    .hero-grid {
        gap: 28px;
    }

    /* Características en una columna */
    .features {
        grid-template-columns: 1fr;
    }

    /* Productos en una columna */
    .product-grid {
        grid-template-columns: 1fr;
    }

    /* Altura de imágenes de productos */
    .product-card img {
        height: 290px;
    }

    /* Catálogo adaptado a celulares */
    .catalog-panel {
        padding: 42px 28px;
        flex-direction: column;
        align-items: flex-start;
    }

    /* Diseño del catálogo */
    .catalog-art {
        min-height: 190px;
        width: 220px;
        flex: auto;
        align-self: center;
    }

    /* Footer en una columna */
    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    /* Ocultar texto del botón flotante */
    .float-whatsapp span {
        display: none;
    }

    /* Botón flotante circular */
    .float-whatsapp {
        border-radius: 50%;
        width: 55px;
        height: 55px;
        justify-content: center;
        font-size: 22px;
    }
}

/* Contacto en tablets */
@media (max-width: 900px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 35px;
    }
}

/* Contacto en celulares */
@media (max-width: 650px) {
    .contact-details {
        gap: 22px;
    }

    .contact-details > div {
        gap: 12px;
    }

    .contact-details > div > span {
        width: 30px;
        min-width: 30px;
    }

    .contact-details > div > span svg {
        width: 24px;
        height: 24px;
    }
}