/* =================================================================
   BRAND ENHANCED LANDING - CSS STYLES - NUEVO
   ================================================================= */

/* Container Brand Híbrido - 1400px max */
.container-brand {
    width: 100%;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
}

.brand-enhanced-layout{
    width: 100%;
}

/* Hero section que "escapa" del container */
.brand-hero-section {
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    width: 100vw;
    /* margin-top: -15px; /* Elimina gap superior sin breadcrumbs */
    margin-bottom: 3rem;
}

/* FASE 1: Hero Section Mejorado */
.brand-hero-section {
    /* border-radius: 12px; */
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.brand-hero-wrapper {
    position: relative;
    min-height: 400px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    padding: 3rem;
}

.brand-hero-image {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.brand-banner-full {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.brand-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.4) 100%);
    z-index: 2;
}

.brand-hero-content {
    position: relative;
    z-index: 3;
    color: white;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.brand-logo-section {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.brand-logo {
    max-height: 80px;
    max-width: 150px;
    margin-right: 1.5rem;
    background: rgba(255,255,255,0.9);
    padding: 0.5rem;
    border-radius: 8px;
}

.brand-name {
    font-size: 3rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    line-height: 1.2;
    color: white;
}

.brand-description {
    margin: 1.5rem 0 2rem 0;
}

.brand-tagline {
    font-size: 1.2rem;
    line-height: 1.6;
    opacity: 0.95;
    margin: 0;
    max-width: 600px;
}

.brand-cta {
    text-align: left;
    margin-top: 1rem;
}

.brand-cta-btn {
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-bottom: 2px solid rgba(255,255,255,0.8);
    padding-bottom: 2px;
    transition: all 0.3s ease;
    display: inline-block;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
}

.brand-cta-btn:hover {
    color: #ffd700;
    border-bottom-color: #ffd700;
    text-decoration: none;
    transform: none;
    box-shadow: none;
}

/* FASE 1.5: Highlight Banners Section */
.brand-highlights-section {
    margin: 2rem 0 3rem 0;
    padding: 0 15px;
}

.brand-highlights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.brand-highlight-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    background: white;
}

.brand-highlight-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.brand-highlight-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.brand-highlight-link:hover {
    color: inherit;
    text-decoration: none;
}

.brand-highlight-image {
    position: relative;
    height: 370px;
    overflow: hidden;
    background: #f8fafc;
}

.brand-highlight-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.brand-highlight-card:hover .brand-highlight-image img {
    transform: scale(1.05);
}

.brand-highlight-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #cbd5e0;
    font-size: 3rem;
}

.brand-highlight-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    padding: 2.5rem 1.5rem 1.5rem;
    color: white;
    opacity: 1;
    transform: translateY(0);
    transition: all 0.3s ease;
}

.brand-highlight-content h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}

.brand-highlight-content p {
    font-size: 0.9rem;
    margin: 0 0 1rem 0;
    opacity: 0.9;
    line-height: 1.4;
}

.brand-highlight-cta {
    display: inline-flex;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.brand-highlight-cta i {
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.brand-highlight-card:hover .brand-highlight-cta i {
    transform: translateX(3px);
}

/* Responsive adjustments for highlights */
@media (max-width: 768px) {
    .brand-highlights-section {
        margin: 1.5rem 0 2rem 0;
    }
    
    .brand-highlights-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .brand-highlight-image {
        height: 160px;
    }
    
    .brand-highlight-overlay {
        padding: 2rem 1rem 1rem;
    }
    
    .brand-highlight-content h3 {
        font-size: 1.1rem;
    }
    
    .brand-highlight-content p {
        font-size: 0.85rem;
    }
}

@media (max-width: 576px) {
    .brand-highlights-grid {
        grid-template-columns: 1fr;
    }
    
    .brand-highlight-image {
        height: 140px;
    }
}

/* FASE 2: Categories Grid Visual */
.brand-categories-section {
    margin-bottom: 3rem;
    padding: 2rem 0;
}

/* Estilos para categorías ocultas */
.brand-category-card.category-hidden {
    display: none;
}

.brand-category-card.category-visible {
    display: block;
}

.brand-section-title {
    font-size: 2rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 2.5rem;
    color: #333;
    position: relative;
}

.brand-section-title:after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    margin: 1rem auto;
    border-radius: 2px;
}

.brand-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.brand-category-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    position: relative;
}

.brand-category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.brand-category-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.brand-category-link:hover {
    text-decoration: none;
    color: inherit;
}

.brand-category-image {
    position: relative;
    /* height: 370px; */
    overflow: hidden;
}

.brand-category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

/* Iniciales para categorías sin imagen */
.brand-category-initials {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: 700;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

.brand-category-initials span {
    text-transform: uppercase;
}

.brand-category-card:hover .brand-category-initials {
    transform: scale(1.05);
}

.brand-category-card:hover .brand-category-image img {
    transform: scale(1.05);
}

.brand-category-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.brand-category-card:hover .brand-category-overlay {
    opacity: 1;
}

.brand-category-overlay i {
    color: white;
    font-size: 2rem;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

.brand-category-card:hover .brand-category-overlay i {
    transform: translateX(0);
}

.brand-category-info {
    padding: 1.5rem;
    text-align: center;
}

.brand-category-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
}

.brand-category-count {
    color: #666;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Controles de Ver más categorías */
.brand-categories-controls {
    margin-top: 2rem;
}

.brand-categories-controls .btn {
    padding: 0.8rem 2rem;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    margin: 0 0.5rem;
}

.brand-categories-controls .btn-outline-primary {
    border-color: #007bff;
    color: #007bff;
}

.brand-categories-controls .btn-outline-primary:hover {
    background-color: #007bff;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.brand-categories-controls .btn-outline-secondary {
    border-color: #6c757d;
    color: #6c757d;
}

.brand-categories-controls .btn-outline-secondary:hover {
    background-color: #6c757d;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.brand-products-header {
    text-align: center;
    margin: 3rem 0 2rem 0;
}

.brand-products-subtitle {
    color: #666;
    font-size: 1.1rem;
    margin-top: 0.5rem;
    margin-bottom: 0;
}

/* Layout ajustes para container brand */
.brand-enhanced-layout .page-products-grid {
    margin-top: 1rem;
}

.brand-enhanced-layout .page-products-grid .grid-item {
    margin-bottom: 2rem;
}

/* Mejorar títulos de productos */
.brand-enhanced-layout .item-description h2 {
    font-size: 1.1rem;
    font-weight: 500;
    line-height: 1.4;
    margin: 0.8rem 0 0.5rem 0;
}

.brand-enhanced-layout .item-description h2 a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.brand-enhanced-layout .item-description h2 a:hover {
    color: #007bff;
    text-decoration: none;
}

.brand-enhanced-layout .item-description {
    padding: 1rem 0.8rem;
}

/* Sección SEO */
.brand-seo-section {
    margin-top: 4rem;
    margin-bottom: 3rem;
    background: #f8f9fa;
    border-radius: 12px;
    overflow: hidden;
}

.brand-seo-content {
    padding: 3rem 2.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.brand-seo-content h3 {
    font-size: 2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 2rem;
    text-align: center;
}

.brand-seo-content h4 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #333;
    margin: 2rem 0 1rem 0;
}

.brand-seo-text p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #555;
    margin-bottom: 1.5rem;
}

.brand-advantages {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.brand-advantages li {
    padding: 0.8rem 0;
    border-bottom: 1px solid #e9ecef;
    font-size: 1.1rem;
    line-height: 1.6;
    color: #555;
}

.brand-advantages li:last-child {
    border-bottom: none;
}

.brand-advantages li strong {
    color: #007bff;
}

/* Mejores breakpoints para productos en container-brand */
@media (min-width: 1200px) {
    .container-brand .brand-enhanced-layout .page-products-grid .grid-item-fixed {
        flex: 0 0 25%;
        max-width: 25%;
    }
}

@media (min-width: 1400px) {
    .container-brand .brand-enhanced-layout .page-products-grid .grid-item-fixed {
        flex: 0 0 20%;
        max-width: 20%;
    }
}

/* Mobile specific adjustments */
@media (max-width: 576px) {
    .brand-enhanced-layout {
        padding: 0;
    }
    
    .brand-hero-section {
        margin-left: 0;
        margin-right: 0;
        left: 0;
        right: 0;
        width: 100%;
        border-radius: 0;
    }
    
    /* Grid de productos: 2 por fila en mobile */
    .brand-enhanced-layout .page-products-grid .grid-item-fixed {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container-brand {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .brand-hero-section {
        border-radius: 0px;
    }
    
    .brand-hero-wrapper {
        min-height: 280px;
        padding: 1.5rem;
        text-align: center;
    }
    
    .brand-hero-content {
        padding: 0 10px;
    }
    
    .brand-logo-section {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .brand-logo {
        margin-right: 0;
        margin-bottom: 1rem;
        max-height: 60px;
    }
    
    .brand-name {
        font-size: 2rem;
    }
    
    .brand-categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1rem;
        padding: 0;
    }
    
    .brand-category-image {
        height: 150px;
    }
    
    .brand-seo-content {
        padding: 2rem 1.5rem;
    }
    
    .brand-seo-content h3 {
        font-size: 1.6rem;
    }
    
    .brand-seo-content h4 {
        font-size: 1.2rem;
    }
    
    .brand-seo-text p {
        font-size: 1rem;
    }
    
    .brand-advantages li {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .brand-hero-wrapper {
        min-height: 250px;
        padding: 1rem;
    }

    .brand-name {
        font-size: 1.8rem;
    }

    .brand-categories-grid {
        grid-template-columns: 1fr 1fr;
    }

    .brand-cta-btn {
        padding: 0.8rem 2rem;
        font-size: 1rem;
    }

    .brand-seo-content {
        padding: 1.5rem 1rem;
    }

    .brand-seo-content h3 {
        font-size: 1.4rem;
    }
}

/* ========================================
   ESTILOS ESPECÍFICOS PARA PÁGINAS DE GRUPO
   (para distinguir de páginas de marca)
   ======================================== */

/* Ajustes específicos para imágenes de marcas en páginas de grupo */
.brand-enhanced-layout .brand-category-image img {
    object-fit: contain;
    object-position: center;
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
}

/* Para logos de marcas que necesitan más padding */
.brand-enhanced-layout .brand-category-image {
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e9ecef;
}

/* Mejor presentación para iniciales en páginas de grupo */
.brand-enhanced-layout .brand-category-initials {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 3px solid rgba(255,255,255,0.2);
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
}

/* Hover effects específicos para marcas en grupo */
.brand-enhanced-layout .brand-category-card:hover .brand-category-image img {
    transform: scale(1.02);
    filter: brightness(1.05);
}

/* Asegurar que las imágenes de marcas se vean bien en diferentes tamaños */
.brand-enhanced-layout .brand-category-image img[src*="marcas/thumb_"] {
    object-fit: contain;
    max-width: 80%;
    max-height: 80%;
    background: transparent;
}

.brand-enhanced-layout .brand-category-image img[src*="marcas/banner_"] {
    object-fit: cover;
    padding: 0.5rem;
}

.brand-enhanced-layout .brand-category-image img[src*="marcas/"] {
    object-fit: contain;
    padding: 0.8rem;
}