/* =====================================================
   1. VARIABLES GLOBALES (TOKENS DE DISEÑO)
===================================================== */

/* cargar tipografia personalizada */
/* cargar tipografia TT Ramillas */

/* extra light */
/* extra light */
@font-face {
    font-family: "TT-Ramillas";
    src: url("../fonts/tt-ramillas/TT-Ramillas-Trial-ExtraLight.ttf") format("truetype");
    font-weight: 200;
    font-style: normal;
    font-display: swap;
}

/* light */
@font-face {
    font-family: "TT-Ramillas";
    src: url("../fonts/tt-ramillas/TT-Ramillas-Trial-Light.ttf") format("truetype");
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

/* regular */
@font-face {
    font-family: "TT-Ramillas";
    src: url("../fonts/tt-ramillas/TT-Ramillas-Trial-Regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "TT-Ramillas";
    src: url("../fonts/tt-ramillas/TT-Ramillas-Trial-Variable-Roman.ttf") format("truetype");
    font-weight: 200 800;
    font-style: normal;
    font-display: swap;
}

/* medium */
@font-face {
    font-family: "TT-Ramillas";
    src: url("../fonts/tt-ramillas/TT-Ramillas-Trial-Medium.ttf") format("truetype");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

/* bold */
@font-face {
    font-family: "TT-Ramillas";
    src: url("../fonts/tt-ramillas/TT-Ramillas-Trial-Bold.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {

    /* -------- COLORES -------- */
    --color-primary: #6F073C;
    --color-primary-hover: #59022E;
    --color-secondary: #FFFBF8;
    --color-body: #292929;
    --header-bg: var(--color-secondary);
    --muted: var(--color-body);
    --border: rgba(0, 0, 0, 0.08);

    /* -------- TIPOGRAFÍAS -------- */
    --font-primary: "TT-Ramillas", serif;
    --font-secondary: "Montserrat", sans-serif;

    /* -------- TAMAÑOS BASE TEXTO -------- */
    --font-size-p: 23px;
    --line-height-p: 34px;

    --font-size-ul: 23px;
    --line-height-ul: 34px;

    --btn-font-size: 17px;

    /* -------- HEADINGS -------- */
    --h1: 62px;
    --h2: 48px;
    --h3: 43px;
    --h4: 34px;
    --h5: 28px;
    --h6: 20px;

    /* -------- LINE HEIGHT HEADINGS -------- */
    --lh-h1: 1.15;
    --lh-h2: 1.15;
    --lh-h3: 1.2;
    --lh-h4: 1.25;
    --lh-h5: 1.25;
    --lh-h6: 1.3;
}



/* =====================================================
   2. RESPONSIVE (SOLO VARIABLES)
===================================================== */
@media (max-width: 991.98px) {
    :root {
        --h1: 48px;
        --h2: 38px;
        --h3: 34px;
        --h4: 28px;
        --h5: 24px;
        --h6: 18px;

        --font-size-p: 20px;
        --line-height-p: 30px;

        --font-size-ul: 20px;
        --line-height-ul: 30px;
    }
}

@media (max-width: 575.98px) {
    :root {
        --h1: 38px;
        --h2: 30px;
        --h3: 28px;
        --h4: 24px;
        --h5: 22px;
        --h6: 18px;

        --font-size-p: 18px;
        --line-height-p: 29px;

        --font-size-ul: 18px;
        --line-height-ul: 29px;
    }
}



/* =====================================================
   3. BASE GLOBAL
===================================================== */
body {
    font-weight: 300;
    background: #fff;
    color: var(--color-body);
    font-family: var(--font-secondary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Links base */
a { color: inherit; }
a:hover { color: inherit; }



/* =====================================================
   4. TIPOGRAFÍA (HEADINGS + TEXTO)
===================================================== */
h1 {
    font-family: var(--font-primary);
    font-size: var(--h1);
    line-height: var(--lh-h1);
    color: var(--color-heading);
    margin: 0 0 18px;
    font-weight: 300;
}

h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    margin: 0 0 14px;
    font-weight: 300;
}

h2 { color: var(--color-primary); }

h2 { font-size: var(--h2); line-height: var(--lh-h2); }
h3 { font-size: var(--h3); line-height: var(--lh-h3); }
h4 { font-size: var(--h4); line-height: var(--lh-h4); }
h5 { font-size: var(--h5); line-height: var(--lh-h5); }
h6 { font-size: var(--h6); line-height: var(--lh-h6); }

/* Párrafos */
p {
    font-family: var(--font-secondary);
    font-size: var(--font-size-p);
    line-height: var(--line-height-p);
    color: var(--color-body);
    margin: 0 0 20px;
}

/* Listas */
ul, ol {
    margin: 0 0 20px;
    padding-left: 1.25rem;
}

li {
    font-family: var(--font-secondary);
    font-size: var(--font-size-ul);
    line-height: var(--line-height-ul);
    color: var(--color-body);
}



/* =====================================================
   5. TOPBAR
===================================================== */
.topbar {
    background: var(--header-bg);
    border-bottom: 1px solid var(--border);
    font-size: 16px;
}

.topbar-link {
    color: var(--color-primary);
    text-decoration: none;
}

.topbar-link i {
    text-decoration: none !important;
}

/* quitar subrayado SOLO en el dropdown de topbar */
.topbar .dropdown > .topbar-link:hover span {
    text-decoration: none !important;
}

/* Dropdown topbar */
.topbar-dropdown {
    width: 340px;
    border-radius: 0;
    border: 1px solid var(--border);
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);

    opacity: 0;
    transform: translateY(15px);
    transition: all 0.25s ease;
}

.topbar-dropdown.show {
    opacity: 1;
    transform: translateY(0);
}

.topbar-contact p {
    font-size: 14px;
    margin-bottom: 6px;
}

.topbar-contact strong {
    font-weight: 500;
}

/* Flecha animación */
.chevron-icon {
    transition: transform 0.25s ease;
}

.dropdown-toggle[aria-expanded="true"] .chevron-icon {
    transform: rotate(180deg);
}

/* Ocultar flecha automática bootstrap */
.topbar .dropdown-toggle::after {
    display: none !important;
}

.header-actions .fa-heart {
    font-size: 20px;
}

/* quitar cualquier linea pseudo-elemento en topbar dropdown */
.topbar .dropdown > .topbar-link::after {
    display: none !important;
}

/* topbar sin subrayado nunca */
.topbar .topbar-link::after {
    display: none !important;
}

.topbar .topbar-link:hover {
    text-decoration: none !important;
}

/* solo en escritorio */
@media (min-width: 992px) {

    .topbar .dropdown:hover .dropdown-menu {
        display: block;
        margin-top: 0;
        opacity: 1;
        transform: translateY(0);
        visibility: visible;
    }

    .topbar .dropdown .dropdown-menu {
        display: block;
        opacity: 0;
        transform: translateY(15px);
        visibility: hidden;
        transition: opacity 0.25s ease, transform 0.25s ease;
    }

    .topbar .dropdown:hover .chevron-icon {
        transform: rotate(180deg);
    }
}


/* =====================================================
   6. HEADER PRINCIPAL
===================================================== */
.header {
    background: var(--header-bg);
    border-bottom: 1px solid var(--border);
}

header,
header * {
    font-size: 17px;
    font-weight: 400;
}

.header-main {
    background: var(--header-bg);
    border-bottom: 1px solid var(--border);
}

.header-logo {
    height: 100px;
    width: auto;
}

.header-main .dropdown-toggle::after {
    display: none !important;
}

.nav-chevron {
    transition: transform 0.25s ease;
    font-size: 12px;
}


.header-main .nav-link {
    position: relative;
    transition: color 0.2s ease;
}

.header-main .nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 1px;
    background: var(--color-primary);
    transition: width 0.25s ease;
}

/* hover subrayado solo para links normales (no dropdown) */
.header-main .nav-item:not(.dropdown) > .nav-link:hover::after {
    width: 100%;
}

/* no subrayado en el link que abre dropdown */
.header-main .nav-item.dropdown > .nav-link::after {
    display: none !important;
}

/* =====================================================
   DROPDOWN NAV (PRODUCTOS)
===================================================== */

.nav-dropdown {
    border-radius: 0;
    border: 1px solid var(--border);
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);

    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

/* cuando bootstrap añade .show */
.nav-dropdown.show {
    opacity: 1;
    transform: translateY(0);
}


/* =====================================================
   7. MARCA (LOGO TEXTO)
===================================================== */
.brand-mark {
    color: var(--color-primary);
    text-decoration: none;
    line-height: 1.1;
}

.brand-title {
    font-family: var(--font-secondary);
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    color: var(--color-primary);
}

.brand-subtitle {
    font-family: var(--font-secondary);
    font-size: 0.95rem;
    color: var(--color-primary);
    opacity: 0.9;
    font-style: italic;
}



/* =====================================================
   8. HEADER DESKTOP AJUSTES
===================================================== */
@media (min-width: 992px) {

    .header-main .col-4 {
        padding-left: 0;
        padding-right: 0;
    }

    .header-main .nav-link {
        padding-left: 0;
        padding-right: 0;
    }

    .header-main .nav {
        gap: 40px;
    }

    .topbar > .container {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .header-main .nav > .nav-item {
        margin-right: 65px;
    }

    .header-main .nav > .nav-item:last-child {
        margin-right: 0;
    }
}

/* subrayado activo permanente */
.header-main .nav-link.active::after {
    width: 100%;
}

/* categoria activa en dropdown */
.nav-dropdown .dropdown-item.active {
    color: var(--color-primary);
    font-weight: 600;
    background: transparent;
}

.mobile-link.active {
    color: var(--color-primary);
    font-weight: 600;
}

.mobile-sublink.active {
    color: var(--color-primary);
    font-weight: 600;
}

.mobile-toggle.active {
    color: var(--color-primary);
}

@media (min-width: 992px) {
    .header-main .nav-link {
        padding-top: 0;
        padding-bottom: 0;
    }
}
/* =====================================================
   MOBILE NAV
===================================================== */

.offcanvas {
    font-family: var(--font-secondary);
    font-size: 17px;
    font-weight: 400;
}


.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mobile-link {
    font-family: var(--font-secondary);
    font-size: 17px;
    color: var(--color-primary);
    text-decoration: none;
    padding: 6px 0;
}

.mobile-link:hover {
    color: var(--color-primary-hover);
}

.mobile-toggle {
    background: none;
    border: none;
    text-align: left;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-sublink {
    display: block;
    padding: 6px 0 6px 15px;
    font-size: 16px;
    color: var(--color-body);
    text-decoration: none;
}

.mobile-sublink:hover {
    color: var(--color-primary-hover);
}

.mobile-chevron {
    transition: transform 0.25s ease;
    font-size: 12px;
}

.mobile-toggle[aria-expanded="true"] .mobile-chevron {
    transform: rotate(180deg);
}


/* =====================================================
   9. NAVEGACIÓN
===================================================== */
.nav-link {
    color: var(--color-primary);
    font-family: var(--font-secondary);
}

.nav-link:hover,
.nav-link:focus {
    color: var(--color-primary-hover);
    opacity: 0.92;
}



/* =====================================================
   10. BOTONES
===================================================== */
.btn-brand {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
    border-radius: 0;
    font-size: var(--btn-font-size);
    font-family: var(--font-secondary);
}

.btn-brand:hover,
.btn-brand:focus {
    background: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
    color: #fff;
}

.btn-outline-brand {
    border-color: var(--color-primary);
    color: var(--color-primary);
    border-radius: 0;
    font-size: var(--btn-font-size);
    font-family: var(--font-secondary);
}

.btn-outline-brand:hover,
.btn-outline-brand:focus {
    border-color: var(--color-primary-hover);
    color: var(--color-primary-hover);
    background: rgba(111, 7, 60, 0.06);
}

/* boton menu mobile sin borde */
.btn-menu-mobile {
    border: none !important;
    background: transparent;
}

.btn-menu-mobile:hover,
.btn-menu-mobile:focus {
    border: none !important;
    background: transparent;
}

/* =====================================================
   11. SEARCH BOX
===================================================== */

.searchbox {
    width: 240px; 
}

.searchbox .input-group {
    background: var(--color-secondary);
    border: 1px solid var(--color-primary);
}

.searchbox .form-control {
    background: var(--color-secondary);
    border: none;
    box-shadow: none;
    border-radius: 0;
}

.searchbox .form-control:focus {
    box-shadow: none;
}

.searchbox .input-group-text {
    background: var(--color-secondary);
    border: none;
    color: var(--color-primary);
    border-radius: 0;
}



/* =====================================================
   12. BREADCRUMB
===================================================== */
.breadcrumb-wrap {
    padding: 1.25rem 0;
    background: transparent;
}

.breadcrumb-wrap li {
    font-size: 16px !important;
    font-weight: 450;
}


.breadcrumb .breadcrumb-item a {
    color: #7B7973;
    text-decoration: none;
}

.breadcrumb .breadcrumb-item a:hover {
    color: var(--color-primary-hover);
}

.breadcrumb .breadcrumb-item.active {
    color: var(--color-primary);
}



/* =====================================================
   13. FOOTER
===================================================== */
.footer-main,
.footer-main p,
.footer-main a,
.footer-main i {
    color: #fff;
}

.footer-main {
    background: var(--color-primary);
}
  

.footer-main p {
    margin-bottom: 10px;
    font-size: 17px;
    line-height: 1.6;
    font-weight: 400;
}

.footer-contact p:not(.footer-title),
.footer-hours p:not(.footer-title) {
    line-height: 1;
}

/* Texto principal intro */
.footer-intro {
    font-size: 19px;
}

/* Títulos Contacto y Horario */
.footer-title {
    font-size: 19px !important;
    font-weight: 500;
    margin-bottom: 15px;
}


.footer-bottom p {
    font-size: 15px;
}

.footer-main .col-lg-4:not(:first-child) {
    padding-top: 60px;
}

.footer-hours p {
    font-size: 15px;
}

@media (min-width: 992px) {
   .footer-main .col-lg-4:not(:first-child) {
       padding-top: 180px;
   }
}

@media (max-width: 991.98px) {

    .footer-main p,
    .footer-link {
        font-size: 15px;
    }

    .footer-intro,
    .footer-title {
        font-size: 17px;
    }

    .footer-main .col-lg-4 {
        padding-top: 0 !important;
    }

    .footer-bottom-inner {
        flex-direction: column;
        text-align: center;
    }
}


.footer-divider {
    border: 0;
    height: 1px;
    background-color: #fff;
    opacity: 1; 
    max-width: 1300px;
    margin: 0 auto;
}

.footer-social a {
    margin-right: 15px;
    text-decoration: none;
    font-size: 16px;
    transition: opacity .2s ease;
}

.footer-social a:hover {
    opacity: 0.7;
}

.footer-bottom-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.footer-copy {
    margin: 0;
}

.footer-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #fff;
    text-decoration: none;
    position: relative;
}

.footer-links a:hover {
    opacity: 0.7;
}

/* separador automático */
.footer-links a:not(:last-child)::after {
    content: " ·";
    margin-left: 10px;
}

/* =====================================================
   Nav Dropdown
===================================================== */
.nav-dropdown {
    --bs-dropdown-link-active-bg: var(--color-primary);
    --bs-dropdown-link-active-color: #fff; 
    --bs-dropdown-link-hover-bg: var(--color-primary);
    --bs-dropdown-link-hover-color: #fff;
}

/* solo en escritorio */
@media (min-width: 992px) {

    .nav-item.dropdown:hover .dropdown-menu {
        display: block;
        margin-top: 0;
    }

    /* animacion suave opcional */
    .nav-dropdown {
        transition: opacity 0.2s ease, transform 0.2s ease;
    }

    .nav-item.dropdown .dropdown-menu {
        opacity: 0;
        transform: translateY(10px);
        display: block;
        visibility: hidden;
    }

    .nav-item.dropdown:hover .dropdown-menu {
        opacity: 1;
        transform: translateY(0);
        visibility: visible;
    }

    /* rotar flecha productos al hacer hover */
    .header-main .nav-item.dropdown:hover .nav-chevron {
        transform: rotate(180deg);
    }
}

/* mobile logo centrado */
@media (max-width: 991.98px) {

    .header-logo {
        height: 70px; /* mas pequeño */
    }

    .brand-mark {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }

    .btn-menu-mobile {
        margin-left: auto;
        padding: 5% 0;
    }
}