@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

/* Reset y Base */
html, body {
    font-family: 'Poppins', sans-serif !important;
    background-color: #FAF7F2 !important;
    color: #333333 !important;
    margin: 0;
    padding: 0;
}

/* Top Bar y Elementos Azules */
.top-bar, .bg-azul {
    background-color: #0C355D !important;
    color: #ffffff !important;
}

/* Títulos Corporativos */
h1, h2, h3, h4, h5, h6, .text-azul {
    color: #0C355D !important;
}

.texto-dorado {
    color: #C6A35A !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.15);
}

.linea {
    width: 100% !important;
    max-width: 100% !important;
    height: 4px !important;
    background-color: #C6A35A !important;
    display: block !important;
    margin: 12px 0 !important;
}

.linea-azul {
    height: 2px;
    background-color: #0C355D !important;
}

/* Footer */
footer.footer-pignic {
    background-color: #0C355D !important;
    color: #FFFFFF !important;
    font-family: inherit;
}

footer.footer-pignic a {
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
}

footer.footer-pignic a:hover {
    color: #B3A269;
}

footer.footer-pignic .footer-title {
    color: #B3A269;
    letter-spacing: 0.14em;
    font-size: 0.85rem;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

footer.footer-pignic .footer-text {
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.8;
    font-size: 0.95rem;
}

footer.footer-pignic .footer-strong {
    color: #FFFFFF;
}

footer.footer-pignic .footer-separator {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    margin: 1.5rem 0;
}

footer.footer-pignic .footer-icon {
    width: 2.35rem;
    height: 2.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 50%;
    transition: border-color 0.2s ease, color 0.2s ease;
}

footer.footer-pignic .footer-icon:hover {
    color: #B3A269;
    border-color: rgba(179, 162, 105, 0.5);
}

footer.footer-pignic .footer-link-list li {
    margin-bottom: 0.7rem;
}

footer.footer-pignic .footer-contact-item,
footer.footer-pignic .footer-visit-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

footer.footer-pignic .footer-contact-item i,
footer.footer-pignic .footer-visit-item i {
    color: #B3A269;
    min-width: 1.4rem;
    font-size: 1rem;
}

footer.footer-pignic .footer-map-card {
    width: 260px;
    max-width: 100%;
    height: 105px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 10px 24px rgba(0,0,0,0.16);
}

footer.footer-pignic .footer-map-content {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 6px;
    background-color: #e8edf1;
    overflow: hidden;
}

footer.footer-pignic .footer-map-content iframe {
    width: 100%;
    height: 100%;
    border: 0;
    pointer-events: none;
}

/* Navbar */
.navbar-brand img, img.logo {
    height: 40px !important;
    max-height: 40px !important;
    width: auto !important;
    object-fit: contain !important;
    display: block !important;
}

.nav-link, .navbar-nav .nav-link {
    color: #0C355D !important;
    font-weight: 600 !important;
}

.nav-link:hover, .nav-link.active {
    color: #C6A35A !important;
}

.desktop-cart {
    padding-right: 1.2rem !important;
    gap: 0.45rem !important;
    align-items: center !important;
}

.desktop-cart-icon-wrap {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.desktop-cart .badge {
    top: -6px !important;
    right: -8px !important;
    left: auto !important;
    transform: none !important;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.top-bar {
    position: sticky;
    top: 0;
    z-index: 1035;
}

.navbar.sticky-top {
    top: 0;
    z-index: 1034;
}

/* Toast de carrito */
#pignic-toast-container {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
}

.pignic-toast {
    width: min(360px, calc(100vw - 2rem));
    background: #ffffff;
    border: 1px solid rgba(12, 53, 93, 0.12);
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(12, 53, 93, 0.18);
    padding: 0.95rem 1rem 0.8rem;
    overflow: hidden;
    pointer-events: auto;
    animation: pignicToastIn 0.25s ease-out;
}

.pignic-toast.fadeOut {
    animation: pignicToastOut 0.25s ease-in forwards;
}

.pignic-toast .toast-progress-bar {
    height: 3px;
    margin-top: 0.8rem;
    border-radius: 999px;
    background: #2E7D32;
    transition: width 0.08s linear;
}

@keyframes pignicToastIn {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes pignicToastOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(8px) scale(0.98);
    }
}

/* Iconos del menú desplegable del Navbar controlados globalmente */
.dropdown-menu .cat-icon {
    width: 28px !important;
    height: 28px !important;
    object-fit: contain !important;
}

.dropdown-menu .dropdown-item {
    white-space: nowrap !important;
}

/* Hero Section */
.hero-card {
    width: 100%;
    aspect-ratio: 1920 / 600;
    height: auto;
    border-radius: 25px;
    background-image: url("../assets/img/carne-principal1.png") !important;
    background-size: cover !important;
    background-position: center right !important;
    background-repeat: no-repeat !important;
    display: flex;
    align-items: center;
    padding: 2% 4%;
    overflow: hidden;
}

.hero-content {
    width: 45%;
    max-width: 480px;
}

.hero-content h1 {
    font-size: clamp(1.8rem, 3.5vw, 3.2rem);
    font-weight: 900;
    color: #0C355D !important;
    line-height: 1.05;
    margin-bottom: 8px;
}

.hero-content h4 {
    font-size: clamp(0.75rem, 1.2vw, 1rem);
    color: #0C355D !important;
    font-weight: 700;
    margin-bottom: 12px;
}

.hero-content p {
    font-size: clamp(0.7rem, 1.1vw, 0.95rem);
    color: #5d5d5d;
    line-height: 1.3;
    margin-bottom: 16px;
}

.hero-buttons {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-hero {
    background: #0C355D !important;
    color: white !important;
    padding: 8px 18px;
    border-radius: 8px;
    font-weight: 700;
    font-size: clamp(0.7rem, 1vw, 0.85rem);
    text-decoration: none;
    white-space: nowrap;
}

.btn-hero:hover {
    background: #C6A35A !important;
}

.hero-buttons span {
    color: #555;
    font-size: clamp(0.65rem, 0.9vw, 0.8rem);
    font-weight: 500;
}

/* Categorías y Productos */
.cat-card, .card-producto {
    background-color: #ffffff !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 12px !important;
}

.cat-card {
    transition: transform 0.3s ease;
}

.cat-card:hover,
.cat-card.active {
    transform: translateY(-8px);
    background-color: #0C355D;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.cat-card.active {
    background-color: #FFFFFF !important;
    box-shadow: 0 10px 20px rgba(198, 163, 90, 0.20) !important;
}

/* Textos de las categorías en negro por defecto */
.cat-card p, .categoria-compra p {
    color: #333333 !important;
}

.btn-azul, .btn-principal, .btn-carrito, button.btn-azul {
    background-color: #0C355D !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    border: none !important;
}

.btn-azul:hover, .btn-principal:hover, .btn-carrito:hover {
    background-color: #C6A35A !important;
    color: #ffffff !important;
}

.card-producto {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}

.card-producto .position-relative,
.card-producto .card-img-top {
    height: 180px !important;
    min-height: 180px !important;
    max-height: 180px !important;
    object-fit: cover !important;
}

.card-producto .card-body {
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    flex-grow: 1 !important;
}

.categoria-compra {
    background-color: #FFFFFF !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 12px !important;
    transition: all 0.25s ease;
    cursor: pointer;
}

.categoria-compra:hover {
    transform: translateY(-5px);
    background-color: #FFFFFF !important;
    border-color: #C6A35A !important;
    box-shadow: 0 8px 20px rgba(198, 163, 90, 0.20) !important;
}

.categoria-compra.active {
    background-color: #FFFFFF !important;
    color: #0C355D !important;
    transform: translateY(-10px);
    border: 2px solid #C6A35A !important;
    box-shadow: 0 12px 25px rgba(198, 163, 90, 0.35) !important;
}

/* Dropdown */
.nav-item.dropdown:hover .dropdown-menu {
    display: block;
    margin-top: 0;
}

.dropdown-menu {
    width: 215px;
    background-color: #FFFFFF !important;
    border: none !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 25px rgba(12, 53, 93, 0.12) !important;
    padding: 10px !important;
}

.dropdown-menu .dropdown-item {
    color: #0C355D !important;
    background-color: transparent !important;
    border: none !important;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 8px 12px !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.dropdown-menu .dropdown-item:hover {
    background-color: #F4EBDD !important;
    color: #0C355D !important;
}

#productos {
    scroll-margin-top: 120px;
}

/* Global Responsive */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    width: 100%;
    min-width: 0;
    overflow-x: hidden;
}

img, svg, picture, video, iframe {
    max-width: 100%;
    height: auto;
}

@media (max-width: 991.98px) {
    .top-bar {
        position: static !important;
        top: auto;
        left: auto;
        right: auto;
        width: auto;
        z-index: auto;
    }

    .navbar.sticky-top {
        position: fixed !important;
        top: 0 !important;
        left: 0;
        right: 0;
        width: 100%;
        z-index: 1044 !important;
    }

    body {
        padding-top: var(--pignic-mobile-navbar-height, 72px);
    }

    .buscador-input {
        order: 3 !important;
        width: 100% !important;
        flex-basis: 100% !important;
        margin: 0 !important;
    }

    .iconos-navbar {
        flex-shrink: 0;
        gap: 0.75rem;
    }

    .navbar-nav {
        width: 100%;
        justify-content: center;
    }

    /* Tarjeta fluida con min-height expandido para que se vea el botón completo */
    .hero-card {
        flex-direction: column !important;
        align-items: stretch !important;
        background-image: none !important;
        background-color: #FFFFFF !important;
        padding: 1.8rem 1.4rem !important;
        height: auto !important;
        min-height: 240px !important;
        border-radius: 20px !important;
        box-shadow: 0 4px 15px rgba(0,0,0,0.06);
    }

    .hero-content {
        width: 100% !important;
        max-width: 100% !important;
        background: transparent !important;
        padding: 0 !important;
        box-shadow: none !important;
        height: auto !important;
    }

    .hero-buttons {
        flex-direction: row !important;
        align-items: center !important;
        flex-wrap: wrap !important;
        gap: 12px !important;
        width: 100%;
        margin-top: 14px !important;
    }

    .btn-hero {
        width: auto !important;
        text-align: center;
    }

    .buscador-input {
        display: none !important;
        order: 4 !important;
        width: 100% !important;
    }

    .buscador-input.show-mobile-search {
        display: flex !important;
        width: 100% !important;
        margin: 0.75rem 0 !important;
    }

    .buscador-input input {
        width: 100%;
    }

    .mobile-search-trigger {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        width: 42px;
        height: 42px;
        border: 1px solid rgba(12, 53, 93, 0.12);
        border-radius: 50%;
        background: #ffffff;
        color: #0C355D;
    }

    .mobile-cart {
        width: 46px;
        height: 46px;
        min-width: 46px;
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: #ffffff;
        color: #0C355D;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
        position: relative;
    }

    .mobile-cart .badge {
        position: absolute;
        top: -6px;
        right: -6px;
        min-width: 18px;
        height: 18px;
        padding: 0 4px;
        font-size: 0.65rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

@media (max-width: 767.98px) {
    .top-bar .container .row {
        gap: 0.5rem;
    }

    .top-bar .col-md-4,
    .top-bar .col-md-4.text-md-center,
    .top-bar .col-md-4.text-md-end {
        text-align: center !important;
        width: 100%;
    }

    .categorias .row, 
    section .row.g-3, 
    section .row.g-4 {
        justify-content: center !important;
    }

    .producto-item {
        min-width: 100%;
    }

    .card-producto .position-relative {
        min-height: 220px;
    }

    .card-producto .card-body {
        padding-bottom: 1rem;
    }

    .linea {
        height: 4px !important;
        margin: 10px 0 !important;
        max-width: 100% !important;
    }

    .hero-content h4 {
        margin-bottom: 6px;
    }

    .hero-content p {
        margin-top: 0;
    }
}