body{
    font-family: "Poppins";
    font-weight: 600;
}

/* ===== NAVBAR MEJORADO ===== */
.navbar {
    background-color: white;
    min-height: 70px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    padding: 0.5rem 0;
}

#navbar-img {
    width: 14rem;
    height: auto;
    max-height: 50px;
    transition: opacity 0.2s ease;
}

#navbar-img:hover {
    opacity: 0.8;
}

.nav-link-custom {
    color: #333 !important;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 0.85rem !important;
    margin: 0 0.15rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.nav-link-custom:hover {
    color: #3993D6 !important;
    background-color: rgba(57, 147, 214, 0.1);
}

.nav-link-custom.active {
    color: #fff !important;
    background-color: rgba(57, 147, 214, 0.12);
    font-weight: 600;
}

.nav-link-custom i {
    font-size: 1rem;
}

/* Dropdown del navbar */
.navbar .dropdown-menu {
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-radius: 8px;
    padding: 0.5rem 0;
}

.navbar .dropdown-item {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.navbar .dropdown-item:hover {
    background-color: rgba(57, 147, 214, 0.1);
}

.navbar .dropdown-item.active {
    background-color: #3993D6;
    color: #fff;
}

.navbar .dropdown-item.active i {
    color: #fff !important;
}

/* Barra de búsqueda */
.search-container {
    min-width: 250px;
}

.search-input {
    border: 2px solid #e9ecef;
    border-right: none;
    border-radius: 25px 0 0 25px !important;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-input:focus {
    border-color: #3993D6;
    box-shadow: none;
}

.search-btn {
    border-radius: 0 25px 25px 0 !important;
    padding: 0.5rem 1rem;
    background-color: #3993D6;
    border-color: #3993D6;
}

.search-btn:hover {
    background-color: #2779a6;
    border-color: #2779a6;
}

/* Responsive navbar */
@media (max-width: 991px) {
    .navbar-nav {
        padding: 1rem 0;
        gap: 0.25rem;
    }

    .nav-link-custom {
        justify-content: center;
        padding: 0.75rem 1rem !important;
    }

    .search-container {
        margin-top: 1rem;
        width: 100%;
    }
}

.nounderline {
  text-decoration: none !important
}

.main-background-color{
    background-color: #3993D6!important;
}
.main-color{
    color: #3993D6!important;
}

h2{
    font-style: normal;
    font-weight: 600;
    font-size: 24px;
    line-height: 36px;
}

.product-title{
    font-size: 2rem;
    font-style: normal;
    font-weight: 600;
}

.btn-primary{
    background-color: #3993D6 !important;
    border-color: #3993D6 !important;
}
.btn-primary:hover{
    background-color: #2779a6 !important;
    border-color: #2779a6 !important;
}

/* Sobrescribir colores primary de Bootstrap con el color de preciosdelsuper */
.text-primary {
    color: #3993D6 !important;
}

.bg-primary {
    background-color: #3993D6 !important;
}

.bg-primary-subtle {
    background-color: rgba(57, 147, 214, 0.15) !important;
}

.border-primary {
    border-color: #3993D6 !important;
}

.page-link{
    background-color: #3993D6 !important;
    border-color: #2779a6 !important;
    color: white;
}
.page-link:hover{
    background-color: #2779a6 !important;
    border-color: #2779a6 !important;
    color: white;
}
.active>.page-link{
    background-color: #2779a6 !important;
    border-color: #2779a6 !important;
    color: white;
}

.rounded-pill-left {
  border-top-left-radius: 50rem!important;
  border-bottom-left-radius: 50rem!important;
}
.rounded-pill-right {
  border-top-right-radius: 50rem!important;
  border-bottom-right-radius: 50rem!important;
}

.search {
    background: #F1F3F4;
}

.nav-link.active{
    color: #2779a6 !important;
}

.banner{
    background-color: #E2EEF7;
    border-radius: 20px;
}

.btn-highlight{
    background-color: #800057;
}
.btn-highlight:hover{
    background-color: #a1006b !important;
}
.btn-highlight:active{
    background-color: #800057 !important;
}

.title{
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 700;
    font-size: 40px;
    line-height: 47px;
}

.h-90{
    height: 90%!important;
}
.h-84{
    height: 84%!important;
}

.w-60{
    width: 60%!important;
}
.w-70{
    width: 70%!important;
}
.w-54{
    width: 54%!important;
}

.d-time{
    position: absolute;
    left: 0rem;
    top: 1rem;
    width: fit-content;
    background: #FFFFFF;
    box-shadow: 0.947094px 0.947094px 1.89419px rgba(0, 0, 0, 0.15);
    border-radius: 0px 47.3547px 47.3547px 0px;
}

.d-link{
    position: absolute;
    width: fit-content;
    background-color: #3993D6;
    box-shadow: 0.947094px 0.947094px 1.89419px rgba(0, 0, 0, 0.15);
    border-radius: 47.3547px 0px 0px 47.3547px;
    right: 0rem;
    top: 1rem;
    flex-direction: row;
    text-decoration: none;
}

.d-link:hover{
    background-color: #2779a6;
}

.d-link-text{
    color: #fff;
}
.d-link-text:hover{
    color: #fff!important;
}

.custom-card{
    border: 0.947094px solid #EEEEEE;
    min-height: 320px;
}

.custom-card .card-body {
    min-height: 120px;
}

.product-name{
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 400;
    font-size: 13px;
    line-height: 16px;
    text-decoration: none;
    color: #000000;
}

.product-name:hover{
    color: #3993D6!important;
}

.entry-card{
    background: #F3F5FA;
    box-shadow: 0px 0.947981px 2.84394px rgba(0, 0, 0, 0.24);
    border-radius: 5.5px;
}

.new-title{
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 700;
    font-size: 16px;
    line-height: 17px;
    text-decoration: none;
    color: #000000;
}
.new-title:hover{
    color: #3993D6;
}

.new-content{
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 300;
    font-size: 14px;
    line-height: 22px;
}

.filtro-logos{
    max-width: 6em;
}

.grayscale{
    filter: grayscale(1);
}

.product-price{
    font-style: normal;
    font-weight: 600;
    font-size: 46.6019px;
    line-height: 61px;
}
.product-price-change{
    font-style: normal;
    font-weight: 500;
    font-size: 21px;
    line-height: 27px;
}

.similar-product-price{
    font-style: normal;
    font-weight: 600;
    font-size: 25px;
    line-height: 61px;
}
.similar-product-price-change{
    font-style: normal;
    font-weight: 500;
    font-size: 15px;
    line-height: 27px;
}

.similar-product-container{
    border-bottom: solid #3993D6 0.5px;
}

.info-container{
    position: relative;
}

.info-relative{
    position: absolute;
    left: 11%;
    top: 16%;
    overflow: scroll;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;
}

.info-relative::-webkit-scrollbar {
  display: none;
}

.wrapper-companies-filter{
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
}

.text-justify{
    text-align: justify;
}

.img-index{
    max-height: 12rem;
    object-fit: cover;
}

.product-img{
    max-height: 12em;
    margin-top: 1em;
}

.product-card{
    position: relative;
}

.product-news-sm-size{
    font-size: 0.7rem;
    vertical-align: middle;
}

.title-new{
    text-decoration: none!important;
    color: black!important;
}

.title-new:hover{
    color: #3993D6!important;
}

.ean-selected{
    background-color: #3993D6;
}

/* ===== BOTONES FLOTANTES REDES SOCIALES ===== */

/* Estilo común para todos los botones flotantes */
.btn-twitter,
.btn-inst,
#backToTop {
    position: fixed;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 999;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
}

/* Botón X (Twitter) */
.btn-twitter {
    bottom: 150px;
    background: #000000;
    color: #FFF;
    font-size: 24px;
}

.btn-twitter:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    color: #FFF;
    background: #333;
}

.btn-twitter:active {
    transform: scale(0.95);
}

/* Botón Instagram */
.btn-inst {
    bottom: 90px;
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: #FFF;
    font-size: 24px;
    box-shadow: 0 4px 12px rgba(188, 24, 136, 0.4);
}

.btn-inst:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(188, 24, 136, 0.5);
    color: #FFF;
}

.btn-inst:active {
    transform: scale(0.95);
}

.btn-inst i {
    line-height: 1;
}

/* Botón Volver Arriba */
#backToTop {
    bottom: 20px;
    background-color: #3993D6;
    color: #FFF;
    font-size: 20px;
    z-index: 998;
    cursor: pointer;
}

#backToTop:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(57, 147, 214, 0.5);
    background-color: #2779a6;
}

/* ===== MEJORAS DE UX ===== */

/* 1. Lazy loading de imágenes */
img.lazy {
    opacity: 0;
    transition: opacity 0.3s ease-in;
}

img.lazy-loaded {
    opacity: 1;
}

/* Placeholder para imágenes cargando */
img[data-src] {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* 2. Mejoras de accesibilidad */
*:focus {
    outline: 2px solid #3993D6;
    outline-offset: 2px;
}

*:focus:not(:focus-visible) {
    outline: none;
}

*:focus-visible {
    outline: 2px solid #3993D6;
    outline-offset: 2px;
}

/* Skip to content para lectores de pantalla */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: #3993D6;
    color: white;
    padding: 8px 16px;
    z-index: 10000;
    text-decoration: none;
}

.skip-to-content:focus {
    top: 0;
}

/* 3. Estados de carga y feedback visual */
.searching {
    background-image: linear-gradient(90deg, #f0f0f0 0%, #e0e0e0 50%, #f0f0f0 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

form.submitting {
    opacity: 0.7;
    pointer-events: none;
}

/* 4. Animaciones suaves */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* 5. Mejoras hover con transiciones suaves */
a, button, .btn, .card, img {
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

img.hover {
    transform: scale(1.05);
}

/* 6. Mejoras en formularios */
input:not([type="checkbox"]):not([type="radio"]),
textarea,
select {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input:focus,
textarea:focus,
select:focus {
    border-color: #3993D6;
    box-shadow: 0 0 0 0.2rem rgba(57, 147, 214, 0.25);
}

input:invalid:not(:focus),
textarea:invalid:not(:focus) {
    border-color: #dc3545;
}

input:valid:not(:focus):not(:placeholder-shown),
textarea:valid:not(:focus):not(:placeholder-shown) {
    border-color: #28a745;
}

/* 8. Feedback visual para checkboxes/radios */
.filter-label.changed {
    animation: pulse 0.3s ease;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* 9. Mejoras en tooltips */
.tooltip {
    font-size: 0.875rem;
}

.tooltip-inner {
    max-width: 300px;
    padding: 0.5rem 0.75rem;
    background-color: #2c3e50;
}

/* 10. Loading spinner personalizado */
.spinner-custom {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(57, 147, 214, 0.1);
    border-top-color: #3993D6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 11. Mejoras en badges y etiquetas */
.badge {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.badge:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* 12. Estados de error amigables */
.error-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.error-message::before {
    content: "⚠";
    font-size: 1rem;
}

/* 13. Mejoras responsive */
@media (max-width: 768px) {
    .card:hover {
        transform: none;
    }

    /* Botones flotantes más pequeños y alineados en móvil */
    .btn-twitter,
    .btn-inst,
    #backToTop {
        width: 45px !important;
        height: 45px !important;
        right: 15px !important;
    }

    .btn-twitter {
        bottom: 125px !important;
        font-size: 20px !important;
    }

    .btn-inst {
        bottom: 70px !important;
        font-size: 20px !important;
    }

    #backToTop {
        bottom: 15px !important;
        font-size: 18px !important;
    }
}

/* 14. Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 15. Mejoras en contraste para accesibilidad */
.text-muted {
    color: #6c757d !important;
}

a:focus, button:focus {
    box-shadow: 0 0 0 0.2rem rgba(57, 147, 214, 0.5);
}

/* 16. Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* 17. Optimización de performance */
.will-change {
    will-change: transform, opacity;
}

/* 18. Mejoras en la barra de búsqueda */
.search-container {
    position: relative;
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 0.25rem 0.25rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
}

.search-suggestion-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.search-suggestion-item:hover,
.search-suggestion-item:focus {
    background-color: #f8f9fa;
}

/* 19. Empty states */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.empty-state-icon {
    font-size: 4rem;
    opacity: 0.3;
    margin-bottom: 1rem;
}

/* 20. Mejoras en paginación */
.page-item {
    margin: 0 0.25rem;
}

.page-link {
    border-radius: 0.25rem !important;
    transition: all 0.3s ease;
}

.page-link:hover {
    transform: translateY(-2px);
}

/* 21. Estilos para title-icon */
.title-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #3993D6, #2779a6);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(57, 147, 214, 0.3);
}

.title-icon i {
    font-size: 1.5rem;
    color: white;
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
}

/* Responsive para títulos */
@media (max-width: 768px) {
    .title-icon {
        width: 40px;
        height: 40px;
        border-radius: 10px;
    }

    .title-icon i {
        font-size: 1.25rem;
    }

    .page-title {
        font-size: 1.5rem;
    }
}

/* Banner de X (Twitter) actualizado */
.twitter-banner {
    background: linear-gradient(135deg, #000000 0%, #14171A 50%, #1C1C1C 100%);
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    position: relative;
}

.twitter-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
    border-radius: 50%;
}

.twitter-cta {
    background: white !important;
    color: #000000 !important;
    border: none !important;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.twitter-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    background: #f8f9fa !important;
}

@media (max-width: 768px) {
    .twitter-banner {
        padding: 1.5rem !important;
    }

    .twitter-cta {
        width: 100%;
    }
}


/* Banner de Google Play mejorado */
.google-play-banner {
    background: linear-gradient(135deg, #4CAF50 0%, #2196F3 50%, #1976D2 100%);
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    position: relative;
}

.google-play-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.google-play-link {
    transition: transform 0.3s ease;
}

.google-play-link:hover {
    transform: scale(1.05);
}

.google-play-badge {
    height: 80px;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.2));
    transition: filter 0.3s ease;
}

.google-play-link:hover .google-play-badge {
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

@media (max-width: 768px) {
    .google-play-banner {
        padding: 1.5rem !important;
    }

    .google-play-badge {
        height: 70px;
    }
}


/* Banner de Instagram mejorado */
.instagram-banner {
    background: linear-gradient(135deg, #833ab4 0%, #fd1d1d 50%, #fcb045 100%);
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(131, 58, 180, 0.3);
    position: relative;
}

.instagram-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.instagram-cta {
    background: white !important;
    color: #000000 !important;
    border: none !important;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.instagram-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    background: #f8f9fa !important;
}

@media (max-width: 768px) {
    .instagram-banner {
        padding: 1.5rem !important;
    }

    .instagram-cta {
        width: 100%;
    }
}

/* ===== HERO SECTION - INDEX ===== */
.hero-section {
    overflow: hidden;
    background: linear-gradient(135deg, #f0f7fc 0%, #e8f4f8 50%, #f5f9fc 100%);
    border-radius: 24px;
    padding: 3rem 2rem;
    margin-top: 1rem;
}

.hero-title {
    line-height: 1.2;
}

.hero-cards-container {
    min-height: 350px;
}

.hero-card-stack {
    position: relative;
    z-index: 2;
}

.hero-product-card {
    border: none;
    border-radius: 16px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: white;
    box-shadow: 0 4px 15px rgba(57, 147, 214, 0.1);
}

.hero-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
}

.hero-product-img img {
    max-width: 60px;
    max-height: 60px;
    object-fit: contain;
}

/* Animaciones flotantes para las tarjetas */
.animate-float-1 {
    animation: float1 4s ease-in-out infinite;
}

.animate-float-2 {
    animation: float2 5s ease-in-out infinite;
}

.animate-float-3 {
    animation: float3 6s ease-in-out infinite;
}

@keyframes float1 {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes float2 {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

@keyframes float3 {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

/* Círculos decorativos de fondo */
.hero-decoration {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    pointer-events: none;
}

.hero-circle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.15;
}

.hero-circle-1 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #3993D6, #2779a6);
    top: -50px;
    right: -50px;
}

.hero-circle-2 {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, #3993D6, #2779a6);
    bottom: -30px;
    left: -30px;
}

/* Responsive hero */
@media (max-width: 992px) {
    .hero-cards-container {
        min-height: auto;
        margin-top: 2rem;
    }

    .hero-circle-1,
    .hero-circle-2 {
        display: none;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 1.75rem !important;
    }

    .hero-subtitle {
        font-size: 1rem !important;
    }

    .hero-product-card .card-body {
        padding: 0.75rem !important;
    }
}

/* ===== NEWS CARDS ===== */
.news-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-height: 180px;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12) !important;
}

.news-card img {
    transition: transform 0.3s ease;
    min-height: 180px;
}

.news-card:hover img {
    transform: scale(1.05);
}

/* News article cards - página de noticias */
.news-article-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.news-article-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12) !important;
}

.news-article-card .stretched-link-title:hover {
    color: #3993D6 !important;
}

/* Imagen de noticia con tamaño controlado */
.news-article-card .col-md-4 {
    max-height: 280px;
    overflow: hidden;
}

.news-article-card .col-md-4 img {
    width: 100%;
    height: 100%;
    max-height: 280px;
    object-fit: cover;
    object-position: center;
}

/* Product mini cards */
.product-mini-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-mini-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

.product-mini-card img {
    max-height: 60px;
    object-fit: contain;
}

/* Logo de supermercado en tarjetas mini */
.supermarket-logo-mini {
    height: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.supermarket-logo-mini img {
    max-height: 25px !important;
    max-width: 60px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain;
}

/* Página de detalle de noticia */
.news-detail .news-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
}

.news-detail .news-content p {
    margin-bottom: 1rem;
}

.news-detail-image {
    max-height: 350px;
    object-fit: cover;
    object-position: center;
}

/* Breadcrumb con colores de preciosdelsuper */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
}

.breadcrumb-item a {
    color: #3993D6;
    transition: color 0.2s ease;
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: #2779a6;
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: #6c757d;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: #3993D6;
}

/* ===== SUPERMARKETS SECTION ===== */
.supermarkets-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 24px;
}

.supermarket-logo {
    background: white;
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.supermarket-logo:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.supermarket-logo img {
    max-height: 50px;
    width: auto;
    filter: grayscale(20%);
    transition: filter 0.3s ease;
}

.supermarket-logo:hover img {
    filter: grayscale(0%);
}

/* ===== ESTILOS PARA ANUNCIOS ===== */

/* Contenedor de anuncios - evita CLS reservando espacio */
.ad-container {
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 1rem 0;
    overflow: hidden;
}

.ad-container-horizontal {
    min-height: 90px;
    width: 100%;
}

.ad-container-rectangle {
    min-height: 280px;
    min-width: 300px;
    width: 100%;
}

.ad-container-leaderboard {
    min-height: 90px;
    min-width: 728px;
    max-width: 100%;
    width: 100%;
}

/* AdSense específico para evitar CLS */
.adsbygoogle {
    display: block;
    background: #f8f9fa;
}

.adsbygoogle[data-ad-format="auto"] {
    min-height: 100px;
}

.adsbygoogle[data-ad-format="rectangle"] {
    min-height: 280px;
}

/* Responsive ads */
@media (max-width: 768px) {
    .ad-container-leaderboard {
        min-width: 100%;
        min-height: 100px;
    }

    .ad-container-rectangle {
        min-width: 100%;
    }
}

/* Etiqueta de anuncio para transparencia */
.ad-label {
    font-size: 0.7rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
    text-align: center;
}

/* Ocultar anuncios vacíos */
.adsbygoogle:empty {
    display: none;
}

/* Anuncios dentro de tarjetas */
.card .adsbygoogle {
    margin: 0;
}

/* ===== MOBILE-FRIENDLY PRODUCT CARDS ===== */

/* Contenedor de imagen del producto */
.product-img-container {
    height: 180px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #ffffff;
    overflow: hidden;
    border-radius: 0.375rem 0.375rem 0 0;
    text-align: center;
}

.product-card-img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    padding: 0.5rem;
    margin: 0 auto;
    display: block;
    aspect-ratio: 1 / 1;
}

/* Nombre del producto */
.product-name {
    min-height: 2.5rem;
    font-size: 0.85rem;
    line-height: 1.3;
    color: #000;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Precio del producto en tarjetas */
.product-price-tag {
    font-size: 1.2rem;
}

/* Logo del supermercado en tarjetas */
.supermarket-logo-card {
    max-width: 80px;
    max-height: 35px;
}

.supermarket-logo-card img {
    max-width: 100% !important;
    max-height: 35px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain;
}

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 576px) {
    /* Tarjetas de producto más compactas */
    .product-img-container {
        height: 140px;
    }

    .product-name {
        min-height: 2.2rem;
        font-size: 0.8rem;
        -webkit-line-clamp: 2;
    }

    .product-price-tag {
        font-size: 1.4rem;
    }

    /* Badges más pequeños */
    .badge {
        font-size: 1rem;
        padding: 0.25em 0.5em;
    }

    /* Logo más pequeño en móvil */
    .supermarket-logo-card {
        max-width: 100px;
        max-height: 60px;
    }

    .supermarket-logo-card img {
        max-height: 60px !important;
    }

    /* Timestamp más pequeño */
    .d-time, .position-absolute .countDateTime {
        font-size: 0.75rem !important;
    }

    /* Botón comparar más pequeño pero bien centrado */
    .btn-sm.rounded-pill {
        font-size: 0.75rem !important;
        padding: 0.35rem 0.65rem !important;
        min-height: 28px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        line-height: 1 !important;
    }

    .btn-sm.rounded-pill i {
        font-size: 0.85rem !important;
    }

    /* Hero section más compacto */
    .hero-section {
        padding: 1.5rem 1rem !important;
    }

    .hero-title {
        font-size: 1.5rem !important;
    }

    .hero-subtitle {
        font-size: 0.9rem !important;
    }

    /* Títulos de página */
    .page-title {
        font-size: 1.25rem !important;
    }

    .title-icon {
        width: 36px !important;
        height: 36px !important;
    }

    .title-icon i {
        font-size: 1rem !important;
    }

    /* Filtros de supermercados */
    .filter-chip-label {
        padding: 0.35rem 0.5rem;
        min-width: 55px;
    }

    .filter-logo {
        width: 40px;
        height: 28px;
    }

    /* Cards más compactas */
    .card-body {
        padding: 0.75rem !important;
    }

    /* Footer más compacto */
    footer .container {
        padding: 1rem !important;
    }

    /* Navbar logo más pequeño */
    #navbar-img {
        width: 280px !important;
    }
}

/* Tablets pequeñas */
@media (max-width: 768px) and (min-width: 577px) {
    .product-img-container {
        height: 160px;
    }

    .product-name {
        font-size: 0.85rem;
    }

    .supermarket-logo-card {
        max-width: 70px;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    /* Botones más grandes para dedos */
    .btn {
        min-height: 44px;
        min-width: 44px;
    }

    .btn-sm {
        min-height: 36px;
    }

    /* Links con más espacio */
    .nav-link-custom {
        padding: 0.75rem 1rem !important;
    }

    /* Checkboxes/radios más grandes */
    input[type="checkbox"],
    input[type="radio"] {
        min-width: 20px;
        min-height: 20px;
    }

    /* Eliminar hover effects en touch */
    .card:hover {
        transform: none;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }

    .btn:hover {
        transform: none;
    }
}

/* Prevenir zoom en inputs en iOS */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    input[type="text"],
    input[type="email"],
    input[type="search"],
    input[type="password"],
    textarea,
    select {
        font-size: 16px !important;
    }
}

/* Safe area para notch en iPhones */
@supports (padding: env(safe-area-inset-bottom)) {
    .btn-inst {
        bottom: calc(90px + env(safe-area-inset-bottom));
    }

    .btn-twitter {
        bottom: calc(150px + env(safe-area-inset-bottom));
    }

    #backToTop {
        bottom: calc(20px + env(safe-area-inset-bottom));
    }

    footer {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* Landscape móvil */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        padding: 1rem !important;
    }

    .hero-cards-container {
        display: none;
    }

    .navbar {
        min-height: 50px;
    }
}
