/* /assets/css/style.css */

/* --- ESTILOS GLOBALES --- */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    background-color: #ffffff;
}

.container {
    width: 95%; 
    max-width: 1800px; 
    margin-left: auto; 
    margin-right: auto;
    padding-left: 0; 
    padding-right: 0;
}

/* --- POSICIONAMIENTO DEL BANNER DE TEMPORADA --- */
.seasonal-banner.header-banner {
    position: absolute;
    top: 82px;
    left: 0;
    right: 0;
    z-index: 1002;
}


/* --- SECCIÓN HERO --- */
.hero-section {
    position: relative; 
    width: 100%; 
    height: 80vh; 
    max-height: 1020px;
    background-color: #000000; 
    margin-bottom: 120px; 
}
.banner-slider { height: 100%; }
.banner-slider .slider { width: 100%; height: 100%; }
.slide { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-size: cover; background-position: center; opacity: 0; visibility: hidden; transition: opacity 0.8s ease, visibility 0.8s ease; }
.slide.active { opacity: 1; visibility: visible; z-index: 1; }

.banner-slider .prev, .banner-slider .next { 
    cursor: pointer; 
    position: absolute; 
    top: 40%; 
    transform: translateY(-50%); 
    width: 50px; 
    height: 50px; 
    color: white; 
    font-weight: bold; 
    font-size: 24px; 
    background-color: rgba(0, 0, 0, 0.3); 
    border: none; 
    z-index: 1010;
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
}

.banner-slider .prev { left: 20px; }
.banner-slider .next { right: 20px; }
.banner-slider .prev:hover, .banner-slider .next:hover { background-color: rgba(0, 0, 0, 0.6); }

/* --- PRODUCTOS FAVORITOS --- */
.popular-products-overlay { 
    position: absolute; 
    bottom: -115px;
    width: 100%; 
    z-index: 20; 
}
.popular-products-overlay h2 { 
    text-align: center; 
    color: var(--color-popular-title, #ffffff);
    font-size: 2em; 
    text-shadow: 0 2px 5px rgba(0,0,0,0.6); 
    margin-bottom: 1rem; 
}
.popular-products-slider-wrapper { width: 100%; overflow-x: auto; padding: 20px 0; cursor: grab; }
.popular-products-slider-wrapper:active { cursor: grabbing; }

.popular-product-grid {
    display: flex; 
    gap: 45px;
    padding-left: 30px;
}

.popular-product-grid .product-card {
    background-color: var(--color-popular-card-bg, rgba(0, 0, 0, 0.771));
    border-radius: 22px; 
    box-shadow: 0 10px 15px rgba(255, 247, 247, 0);
    padding: 1rem; 
    text-align: center;
    position: relative; 
    cursor: pointer; 
    transition: transform 0.3s, box-shadow 0.3s;
    width: 280px;
    flex-shrink: 0; 
    pointer-events: auto;
}
.popular-product-grid .product-card:hover {
    box-shadow: 0 15px 25px var(--color-popular-card-shadow-hover, rgba(2, 2, 2, 0.6));
    transform: translateY(-8px); /* opcional, da efecto de elevación */
}
.popular-product-grid .card-img-container { 
    height: 160px;
    margin-bottom: 1rem; 
}
.popular-product-grid .card-img-container img { max-height: 100%; max-width: 100%; object-fit: contain; pointer-events: none; }

.popular-product-grid h3 { 
    font-size: 1.1em; 
    color: var(--color-popular-card-text, #ffffff); 
    height: 45px; 
    overflow: hidden; 
    margin: 1rem 0 0.5rem 0; 
}

.likes-count {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px; /* Reduje el 'gap' para un mejor aspecto */
    font-size: 1.1em;
    font-weight: 600;
    margin-top: 1rem;
    color: #ff0000; /* ¡CORRECCIÓN APLICADA AQUÍ! */
}

.likes-count .likes-icon {
    display: inline-flex; /* Mejora la alineación del SVG */
    align-items: center;
    justify-content: center;
}

.likes-count .likes-icon svg {
    width: 24px;
    height: 24px;
    fill: currentColor; /* El SVG hereda el color de su contenedor span (.likes-icon) */
}

.likes-count svg {
    width: 24px;
    height: 24px;
    fill: currentColor; /* Hace que el SVG tome el color del texto del div padre */
}

.likes-count span {
    color: #ff0000;
}


.rank-medal {
    position: absolute;
    top: -10px;
    left: -10px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgb(255, 255, 255);
    border: 3px solid rgba(246, 255, 0, 0.014);
    z-index: 10;
    background-color: #000000;
}

.rank-medal .rank-medal-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.rank-number {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    font-size: 1.2rem;
    font-weight: bold;
    color: #000000;
    text-shadow: 0px 0px 3px rgba(255, 255, 255, 0.8), 0px 0px 3px rgba(255, 255, 255, 0.8);
}

/* --- CONTENIDO PRINCIPAL --- */
main { 
    padding-top: 20px; 
}

/* --- ESTILOS DEL MODAL DE DETALLES --- */
.product-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.product-modal-backdrop.visible {
    opacity: 1;
    visibility: visible;
}

.product-modal-content {
    background-color: #ffffff;
    border-radius: 20px;
    max-width: 400px;
    width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    overflow: hidden;
}

.product-modal-backdrop.visible .product-modal-content {
    transform: scale(1);
}

.modal-header-actions {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    gap: 10px;
    z-index: 15;
}
.modal-header-actions .favorite-button,
.modal-header-actions .share-button {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid #eee;
    backdrop-filter: blur(5px);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: transform 0.2s ease;
}

.modal-header-actions .favorite-button:hover,
.modal-header-actions .share-button:hover {
    transform: scale(1.1);
}

.modal-header-actions .favorite-button svg {
    width: 24px;
    height: 24px;
    color: #ccc;
    transition: color 0.2s ease;
}

.modal-header-actions .favorite-button.active svg {
    color: var(--favorite-color, #FF0000);
}

.share-button-container {
    position: relative;
}

.share-button svg {
    width: 20px;
    height: 20px;
    color: #333;
}

.share-options {
    position: absolute;
    top: 110%;
    right: 0;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    display: flex;
    gap: 8px;
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease;
}

.share-button-container:hover .share-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.share-options a {
    color: #fff;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    text-decoration: none;
}
.share-options .whatsapp { background-color: #25D366; }
.share-options .facebook { background-color: #1877F2; }
.share-options .instagram { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.share-options .tiktok { background-color: #000000; }
.share-options .twitter { background-color: #000000; }

.modal-close-button {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(0, 0, 0, 0.3);
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    z-index: 10;
}

.modal-image-container {
    width: 100%;
    height: 300px;
    background-color: #f0f0f0;
}

.modal-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-details {
    padding: 1.5rem;
    overflow-y: auto;
}

.modal-details h2 {
    margin-top: 0;
    font-size: 1.8em;
    color: #212529;
}

.modal-details .modal-description {
    color: #6c757d;
    line-height: 1.6;
    font-size: 0.9em;
    margin-bottom: 1.5rem;
}

.modal-price-stock {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-price {
    font-size: 1.8em;
    font-weight: bold;
    color: #28a745;
}

.modal-stock {
    font-size: 0.9em;
    font-weight: 500;
    color: #fff;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
}
.modal-stock.available { background-color: #17a2b8; }
.modal-stock.out-of-stock { background-color: #6c757d; }

.combinations-container {
    margin-top: 1rem;
}

.combinations-container h4 {
    font-size: 1em;
    color: #343a40;
    margin-bottom: 0.75rem;
    border-top: 1px solid #eee;
    padding-top: 1rem;
}

.combination-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.combo-option {
    padding: 0.5rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 500;
    transition: all 0.2s ease;
}

.combo-option:hover {
    background-color: #f0f0f0;
}

.combo-option.selected {
    border-color: #007bff;
    background-color: #007bff;
    color: white;
}

.combo-option.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #f8f9fa;
    text-decoration: line-through;
}

.product-modal-content.disabled-modal {
    filter: grayscale(1);
    pointer-events: none;
}

/* ====================================================== */
/* --- ESTILOS COMPLETOS PARA EL PIE DE PÁGINA --- */
/* ====================================================== */

footer { 
    background-color: var(--color-footer-bg, #101010);
    color: var(--color-footer-text-primary, #ffffff);
    padding: 0;
    margin-top: 3rem; 
    position: relative;
    overflow: hidden;
}

.seasonal-banner.footer-banner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 1;
}

.seasonal-banner.footer-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


.footer-main-content, .footer-bottom {
    position: relative;
    z-index: 2;
}

.footer-main-content { 
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    align-items: center;
    gap: 2rem;
    padding: 3rem 120px 2rem 4rem; 
    border-bottom: 1px solid #444;
}

.footer-left, .footer-middle, .footer-right {
    display: flex;
    flex-direction: column;
}

.footer-left {
    align-items: center;
}

.footer-logo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #f0f0f0;
}

.footer-middle {
    align-items: center;
    text-align: center;
}

.footer-business-name {
    font-size: 1.8rem;
    font-weight: bold;
    margin: 0 0 0.5rem;
}

.footer-address {
    font-size: 1rem;
    color: var(--color-footer-text-secondary, #aaa);
    margin: 0 0 0.5rem;
}

.footer-description {
    font-size: 0.9rem;
    color: var(--color-footer-text-secondary, #999);
    margin: 0 0 1rem;
    max-width: 450px;
}

.footer-status {
    font-weight: 700;
    padding: .5rem .8rem;
    border-radius: 20px;
    font-size: .8rem;
    margin-bottom: 0.5rem;
}
.footer-status.open { background-color: #d4edda; color: #155724; }
.footer-status.closed { background-color: #f8d7da; color: #721c24; }


.footer-social-media {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.footer-social-media a {
    color: #f0f0f0;
    font-size: 1.5rem;
    transition: color 0.2s;
}
.footer-social-media a:hover {
    color: #fff;
}

.footer-right {
    align-items: flex-end;
    text-align: right;
}

.footer-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin: 0 0 1rem;
    color: var(--color-footer-text-primary, #fff);
}

.footer-category-list a {
    color: var(--color-footer-text-links, #aaa);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-category-list li {
    margin-bottom: 0.5rem;
}

.footer-category-list a {
    color: #aaa; /* Personalizar Admin */ /* Colores Solidos */
    text-decoration: none;
    transition: color 0.2s;
}

.footer-category-list a:hover {
    color: #fff;
}

.footer-bottom {
    text-align: center;
    padding: 1.5rem 0;
    font-size: 0.9rem;
    color: #888;
}

/* --- Responsive para el Footer --- */
@media (max-width: 992px) {
    .footer-main-content {
        grid-template-columns: 1fr;
        text-align: center;
        padding-left: 2rem;
        padding-right: 2rem;
    }
    .footer-left, .footer-middle, .footer-right {
        align-items: center;
        text-align: center;
    }
}


/* --- RESPONSIVE GENERAL --- */
@media (max-width: 768px) {
    /* INICIO: ESPACIO PARA LA BARRA DE NAVEGACIÓN INFERIOR */
    body {
        padding-bottom: 70px; /* Ajusta este valor a la altura de tu barra inferior + un poco de margen */
    }
    /* FIN: ESPACIO PARA LA BARRA DE NAVEGACIÓN INFERIOR */
    
    .hero-section {
        height: 50vh;
        margin-bottom: 80px;
    }
    .popular-products-overlay {
        position: absolute;
        bottom: -220px;
        background-color: transparent;
        padding: 0;
        border-bottom: none;
    }
    .popular-products-overlay h2 {
        color: #ffffff;
        text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    }
    .popular-product-grid {
        gap: 20px;
    }
    .popular-product-grid .product-card {
        width: 180px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }
    .popular-product-grid .card-img-container {
        height: 120px;
    }
    main {
        padding-top: 80px;
    }
    
    .seasonal-banner.header-banner {
        top: 140px;
    }
}