/* =========================================
   DolceMora — Estilos base
   ========================================= */

@font-face {
    font-family: 'Cookies';
    src: url('../fonts/cookies/Cookies.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'MADE Tommy Soft';
    src: url('../fonts/made_tommy_soft/MadeTommySoft-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'MADE Tommy Soft';
    src: url('../fonts/made_tommy_soft/MadeTommySoft-Medium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'MADE Tommy Soft';
    src: url('../fonts/made_tommy_soft/MadeTommySoft-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'MADE Tommy Soft';
    src: url('../fonts/made_tommy_soft/MadeTommySoft-ExtraBold.otf') format('opentype');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

/* Usada en la vista previa de letras del configurador de correas/collares/kits */
@font-face {
    font-family: 'Super Bouncer';
    src: url('../fonts/super_bouncer/SuperBouncer.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    /* Paleta de marca DolceMora */
    --violeta-principal: #AB89C6;
    --lavanda-claro: #DCCBEA;
    --violeta-profundo: #76558F;
    --blanco-crema: #FFF9FC;
    --rosa-empolvado: #E8C7D5;
    --beige-calido: #E8DCCF;
    --ciruela-oscuro: #34283A;

    --font-marca: 'Cookies', cursive;
    --font-titulos: 'MADE Tommy Soft', sans-serif;
    --font-texto: 'MADE Tommy Soft', sans-serif;

    --radio-base: 18px;
    --sombra-suave: 0 8px 24px rgba(118, 85, 143, 0.15);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--font-texto);
    font-weight: 400;
    color: var(--ciruela-oscuro);
    background: var(--blanco-crema);
    line-height: 1.5;
}

h1, h2, h3, h4 {
    font-family: var(--font-titulos);
    font-weight: 800;
    color: var(--violeta-profundo);
    margin: 0 0 0.5em;
}

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

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

.contenedor {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Header --- */
.sitio-header {
    background: var(--violeta-principal);
    padding: 18px 0;
}

.barra-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.logo-marca {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.logo-marca img {
    height: 48px;
    width: auto;
}

.logo-marca .nombre-marca {
    font-family: var(--font-marca);
    font-size: 32px;
    color: var(--blanco-crema);
    line-height: 1;
}

/* --- Nav desktop --- */
.nav-principal {
    display: flex;
    align-items: center;
    gap: 24px;
    font-weight: 700;
}

.nav-principal > a {
    color: var(--blanco-crema);
    padding: 8px 4px;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s ease;
    white-space: nowrap;
}

.nav-principal > a:hover {
    border-color: var(--blanco-crema);
}

.nav-item-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    background: none;
    border: none;
    color: var(--blanco-crema);
    font-family: var(--font-texto);
    font-weight: 700;
    font-size: 16px;
    padding: 8px 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

.flecha-dropdown {
    font-size: 12px;
    transition: transform 0.2s ease;
}

.nav-dropdown-menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--sombra-suave);
    padding: 8px;
    min-width: 220px;
    z-index: 20;
}

.nav-dropdown-menu a {
    color: var(--ciruela-oscuro);
    padding: 10px 14px;
    border-radius: 8px;
    font-weight: 600;
    white-space: nowrap;
}

.nav-dropdown-menu a:hover {
    background: var(--lavanda-claro);
}

/* Desktop: se abre con hover */
@media (min-width: 901px) {
    .nav-item-dropdown:hover .nav-dropdown-menu,
    .nav-item-dropdown:focus-within .nav-dropdown-menu {
        display: flex;
    }
    .nav-item-dropdown:hover .flecha-dropdown {
        transform: rotate(180deg);
    }
}

.icono-carrito {
    color: var(--blanco-crema);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

/* --- Botón mobile: pata (cerrado) / cruz (abierto) --- */
.boton-hamburguesa {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: var(--blanco-crema);
}

.boton-hamburguesa .icono-pata { width: 30px; height: 30px; }
.boton-hamburguesa .icono-cerrar { width: 22px; height: 22px; display: none; }

.boton-hamburguesa.activo .icono-pata { display: none; }
.boton-hamburguesa.activo .icono-cerrar { display: block; }

.fondo-menu-mobile {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(52, 40, 58, 0.5);
    z-index: 30;
}

.fondo-menu-mobile.visible { display: block; }

/* --- Nav mobile: panel deslizable --- */
@media (max-width: 900px) {
    .boton-hamburguesa { display: flex; }

    .nav-principal {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: min(78vw, 320px);
        background: var(--violeta-profundo);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 90px 24px 24px;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        z-index: 31;
        overflow-y: auto;
    }

    .nav-principal.abierto {
        transform: translateX(0);
    }

    .nav-principal > a {
        padding: 16px 4px;
        border-bottom: 1px solid rgba(255,255,255,0.15);
        font-size: 18px;
    }

    .nav-item-dropdown {
        border-bottom: 1px solid rgba(255,255,255,0.15);
    }

    .nav-dropdown-toggle {
        width: 100%;
        justify-content: space-between;
        padding: 16px 4px;
        font-size: 18px;
    }

    .nav-item-dropdown.abierto .flecha-dropdown {
        transform: rotate(180deg);
    }

    .nav-dropdown-menu {
        position: static;
        display: none;
        box-shadow: none;
        background: rgba(255,255,255,0.08);
        border-radius: 8px;
        margin-bottom: 8px;
        padding: 4px;
    }

    .nav-item-dropdown.abierto .nav-dropdown-menu {
        display: flex;
    }

    .nav-dropdown-menu a {
        color: var(--blanco-crema);
        font-weight: 600;
    }

    .nav-dropdown-menu a:hover {
        background: rgba(255,255,255,0.12);
    }

    .texto-carrito { display: none; }
}

/* --- Botones --- */
.boton {
    display: inline-block;
    font-family: var(--font-titulos);
    font-weight: 700;
    font-size: 16px;
    padding: 14px 28px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    text-align: center;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.boton:hover { transform: translateY(-2px); }

.boton-primario {
    background: var(--violeta-profundo);
    color: var(--blanco-crema);
    box-shadow: var(--sombra-suave);
}

.boton-secundario {
    background: var(--rosa-empolvado);
    color: var(--ciruela-oscuro);
}

.boton-outline {
    background: transparent;
    border: 2px solid var(--violeta-profundo);
    color: var(--violeta-profundo);
}

/* --- Hero --- */
.hero {
    background: linear-gradient(180deg, var(--lavanda-claro), var(--blanco-crema));
    padding: 64px 0;
    text-align: center;
}

.hero h1 {
    font-size: 42px;
    margin-bottom: 16px;
}

.hero p {
    max-width: 560px;
    margin: 0 auto 28px;
    font-size: 18px;
}

/* --- Carrusel de banners --- */
.carrusel-contenedor {
    max-width: 1320px;
    margin: 24px auto 0;
    padding: 0 24px;
}

.carrusel-banners {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 6;
    max-height: 520px;
    overflow: hidden;
    background: var(--lavanda-claro);
    border-radius: 28px;
}

/* Difumina el borde inferior de la foto para que se mimetice con el
   fondo de la página en vez de cortar en seco. */
.carrusel-banners::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 22%;
    background: linear-gradient(to bottom, rgba(255,249,252,0) 0%, var(--blanco-crema) 100%);
    pointer-events: none;
    z-index: 1;
}

@media (max-width: 700px) {
    .carrusel-contenedor { padding: 0 16px; margin-top: 16px; }
    /* Los banners traen el texto/botón sobre el lado izquierdo de la foto:
       un recorte más ancho (en vez de cuadrado) deja ver todo ese texto
       sin cortarlo, aunque la imagen quede un poco más baja. */
    .carrusel-banners { aspect-ratio: 3 / 2; max-height: none; border-radius: 20px; }
}

.carrusel-pista {
    position: relative;
    width: 100%;
    height: 100%;
}

.carrusel-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease;
}

.carrusel-slide.activo {
    opacity: 1;
    visibility: visible;
}

.carrusel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 4% center;
}

.carrusel-link {
    display: block;
    width: 100%;
    height: 100%;
}

.carrusel-texto {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    background: linear-gradient(90deg, rgba(52,40,58,0.55) 0%, rgba(52,40,58,0.15) 55%, rgba(52,40,58,0) 75%);
}

.carrusel-texto h1,
.carrusel-texto p {
    color: var(--blanco-crema);
    max-width: 520px;
}

.carrusel-texto h1 { font-size: 38px; }
.carrusel-texto p { font-size: 17px; margin-bottom: 20px; }

@media (max-width: 700px) {
    .carrusel-texto { background: linear-gradient(180deg, rgba(52,40,58,0.15) 40%, rgba(52,40,58,0.75) 100%); align-items: flex-end; padding-bottom: 32px; }
    .carrusel-texto h1 { font-size: 26px; }
}

.carrusel-flecha {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.85);
    color: var(--violeta-profundo);
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.carrusel-flecha-izq { left: 16px; }
.carrusel-flecha-der { right: 16px; }
.carrusel-flecha:hover { background: #fff; }

.carrusel-dots {
    position: absolute;
    bottom: 18px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 2;
}

.carrusel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--blanco-crema);
    background: transparent;
    cursor: pointer;
    padding: 0;
}

.carrusel-dot.activo { background: var(--blanco-crema); }

/* --- Sección Mayoristas --- */
.mayoristas-hero {
    background: var(--violeta-profundo);
    color: var(--blanco-crema);
    padding: 56px 0;
    text-align: center;
}

.mayoristas-hero h1 { color: var(--blanco-crema); }

.grilla-kits {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 28px;
    padding: 48px 0 80px;
}

.tarjeta-kit {
    background: #fff;
    border-radius: var(--radio-base);
    box-shadow: var(--sombra-suave);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.tarjeta-kit .foto-kit {
    background: var(--lavanda-claro);
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.tarjeta-kit .foto-kit img { width: 100%; height: 100%; object-fit: cover; }

.tarjeta-kit .info-kit {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.etiqueta-mayorista {
    display: inline-block;
    background: var(--rosa-empolvado);
    color: var(--ciruela-oscuro);
    font-weight: 700;
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 999px;
    width: fit-content;
}

.precio-mayorista {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-top: auto;
}

.precio-mayorista .precio-nuevo {
    font-size: 26px;
    font-weight: 800;
    color: var(--violeta-profundo);
}

.precio-mayorista .precio-viejo {
    font-size: 16px;
    color: var(--ciruela-oscuro);
    opacity: 0.55;
    text-decoration: line-through;
}

/* --- Grilla de productos --- */
.grilla-productos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 28px;
    padding: 48px 0;
}

.tarjeta-producto {
    background: #fff;
    border-radius: var(--radio-base);
    overflow: hidden;
    box-shadow: var(--sombra-suave);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease;
}

.tarjeta-producto:hover { transform: translateY(-4px); }

.tarjeta-producto .foto-producto {
    background: var(--lavanda-claro);
    padding: 20px;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tarjeta-producto .info {
    padding: 16px 18px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tarjeta-producto .nombre {
    font-family: var(--font-titulos);
    font-weight: 700;
    font-size: 17px;
    color: var(--ciruela-oscuro);
}

.tarjeta-producto .precio {
    font-weight: 700;
    color: var(--violeta-profundo);
    font-size: 18px;
    margin-top: auto;
}

/* --- Sección producto --- */
.producto-detalle {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 48px;
    padding: 48px 0 80px;
    align-items: start;
}

@media (max-width: 860px) {
    .producto-detalle { grid-template-columns: 1fr; }
}

.galeria-producto {
    background: var(--lavanda-claro);
    border-radius: var(--radio-base);
    padding: 24px;
}

.selector-grupo { margin-bottom: 24px; }

.selector-grupo label.titulo-selector {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--violeta-profundo);
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.chip {
    padding: 10px 18px;
    border-radius: 999px;
    border: 2px solid var(--lavanda-claro);
    background: #fff;
    cursor: pointer;
    font-weight: 700;
    font-size: 14px;
}

.chip.activo,
.chip:hover {
    border-color: var(--violeta-profundo);
    background: var(--violeta-principal);
    color: #fff;
}

.chip-color {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px var(--lavanda-claro);
    cursor: pointer;
}

.chip-color.activo {
    box-shadow: 0 0 0 2px var(--violeta-profundo);
}

/* --- Footer --- */
.sitio-footer {
    background: var(--ciruela-oscuro);
    color: var(--blanco-crema);
    padding: 40px 0;
    margin-top: 40px;
    text-align: center;
}

.sitio-footer .nombre-marca {
    font-family: var(--font-marca);
    font-size: 28px;
}
