/**
 * ARKACENTRO - Brand Detail CSS (Limpio y Optimizado)
 * Archivo: assets/css/brand-detail.css
 */

/* ============================================
   BREADCRUMB
   ============================================ */

.breadcrumb-section {
    background: var(--bg-light);
    padding: 15px 0;
    border-bottom: 1px solid #e0e0e0;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
}

.breadcrumb a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: var(--secondary-color);
}

.breadcrumb .separator {
    color: var(--text-light);
}

.breadcrumb .current {
    color: var(--secondary-color);
    font-weight: 600;
}

/* ============================================
   BRAND DETAIL SECTION
   ============================================ */

.brand-detail-section {
    padding: 40px 0;
    background: var(--white);
}

.brand-detail-grid {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 40px;
    max-width: 1100px;
    margin: 0 auto;
}

/* ============================================
   COLUMNA IZQUIERDA: LOGO Y MEDIA
   ============================================ */

.brand-media-column {
    display: flex;
    flex-direction: column;
    gap: 35px;
    align-items: center;
    width: 100%;
}

/* Logo Principal */
.brand-logo-main {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 280px;
    height: 280px;
    border: 3px solid var(--accent-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    flex-shrink: 0;
}

.brand-logo-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    pointer-events: none;
}

.logo-placeholder {
    text-align: center;
    color: var(--text-light);
}

.logo-placeholder i {
    font-size: 3rem;
    margin-bottom: 10px;
    display: block;
}

.logo-placeholder span {
    font-size: 1rem;
    font-weight: 600;
}

/* ============================================
   MEDIA ADICIONAL
   ============================================ */

.brand-additional-media {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    width: 280px;
    flex-shrink: 0;
}

/* Media containers - Base */
.media-container,
.video-container {
    position: relative;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Horizontal media (16:9) */
.media-horizontal,
.video-horizontal {
    aspect-ratio: 16 / 9;
}

/* Vertical media (9:16) */
.media-vertical,
.video-vertical {
    width: 280px;
    max-height: 500px;
    aspect-ratio: 9 / 16;
    margin: 0 auto;
}

/* Cuadrado media (1:1) */
.media-cuadrado,
.video-cuadrado {
    aspect-ratio: 1 / 1;
    width: 280px;
    margin: 0 auto;
}

/* Imágenes en media containers */
.media-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    pointer-events: none;
}

/* Videos locales */
.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* iframes (YouTube, Vimeo, etc.) */
.video-container iframe,
.video-container blockquote {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Ajustes específicos para embeds de redes sociales */
.video-container.video-vertical iframe,
.video-container.video-vertical blockquote {
    max-width: 100%;
}

/* Error state */
.media-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    background: #f8f9fa;
    color: #6c757d;
    padding: 20px;
    text-align: center;
}

.media-error i {
    font-size: 48px;
    margin-bottom: 10px;
    color: #dc3545;
}

.media-error p {
    margin: 0;
    font-weight: 500;
}

/* Animación pulse */
@keyframes pulse {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1); 
    }
    50% { 
        opacity: 0.6; 
        transform: scale(1.15); 
    }
}

/* ============================================
   COLUMNA DERECHA: INFORMACIÓN
   ============================================ */

.brand-info-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: left;
}

.brand-info-column * {
    text-align: left;
}

.brand-info-column .social-links,
.brand-info-column .contact-grid {
    text-align: initial;
}

/* Header con Título y Categoría */
.brand-header {
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 15px;
    margin-bottom: 5px;
    text-align: left;
}

.brand-title {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: 700;
    line-height: 1.2;
    text-align: left;
}

.brand-category-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--accent-color);
    color: var(--primary-color);
    padding: 6px 16px;
    border-radius: 15px;
    font-weight: 600;
    font-size: 0.85rem;
}

/* Ubicación - COLOR PLANO SÓLIDO */
.brand-location-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 12px;
    padding: 15px 20px;
}

.brand-location-card i {
    font-size: 1.5rem;
    opacity: 0.9;
    flex-shrink: 0;
}

.brand-location-card .location-info {
    flex-shrink: 0;
}

.brand-location-card strong {
    display: block;
    font-size: 0.75rem;
    margin-bottom: 3px;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.brand-location-card p {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

/* Badge de estado INLINE */
.status-badge-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 0.9rem;
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: auto;
}

.status-badge-inline .status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
    flex-shrink: 0;
}

.status-badge-inline.status-open {
    background: #0fcf08;
    color: white;
    border: 2px solid #098d1f;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.4);
}

.status-badge-inline.status-open .status-dot {
    background: white;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
}

.status-badge-inline.status-closed {
    background: #e70319f1;
    color: white;
    border: 2px solid #a10010;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.4);
}

.status-badge-inline.status-closed .status-dot {
    background: white;
    box-shadow: 0 0 8px rgb(255, 255, 255);
}

.status-badge-inline.status-cerrado_temporal {
    background: #ffc107;
    color: #1a1a1a;
    border: 2px solid #e0a800;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.4);
}

.status-badge-inline.status-cerrado_temporal .status-dot {
    background: #1a1a1a;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
}

/* Descripción */
.brand-description-card {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 18px;
    text-align: left;
}

.brand-description-card h3 {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    text-align: left;
}

.brand-description-card h3 i {
    font-size: 1rem;
    color: var(--secondary-color);
}

.brand-description-card p {
    line-height: 1.6;
    color: var(--text-color);
    font-size: 16px;
    margin: 0;
    text-align: left;
}

/* Horarios */
.brand-schedule-card {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 18px;
    text-align: left;
}

.brand-schedule-card h3 {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    text-align: left;
}

.brand-schedule-card h3 i {
    font-size: 1rem;
    color: var(--secondary-color);
}

.always-open {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #d4edda;
    color: #155724;
    padding: 12px 15px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
}

.always-open i {
    font-size: 1.2rem;
}

.schedule-table {
    display: flex;
    flex-direction: column;
    gap: 5px;
    text-align: left;
}

.schedule-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: var(--white);
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.schedule-row:hover {
    background: #f8f9fa;
    transform: translateX(3px);
}

.schedule-row.today {
    background: var(--accent-color);
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(255, 192, 2, 0.3);
}

.schedule-day {
    font-weight: 600;
    color: var(--primary-color);
    min-width: 85px;
    text-align: left;
}

.schedule-hours {
    color: var(--text-color);
    text-align: right;
}

/* Contacto */
.brand-contact-card {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 18px;
    text-align: left;
}

.brand-contact-card h3 {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    text-align: left;
}

.brand-contact-card h3 i {
    font-size: 1rem;
    color: var(--secondary-color);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--white);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    font-size: 0.85rem;
    text-align: left;
}

.contact-item:hover {
    transform: translateY(-2px);
    border-color: var(--accent-color);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.contact-item i {
    font-size: 1.2rem;
    color: var(--secondary-color);
    flex-shrink: 0;
}

.contact-item.whatsapp i {
    color: #25D366;
}

.contact-item span {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
}

/* Redes Sociales */
.brand-social-card {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 18px;
    text-align: left;
}

.brand-social-card h3 {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    text-align: left;
}

.brand-social-card h3 i {
    font-size: 1rem;
    color: var(--secondary-color);
}

.social-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.social-link {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--white);
    font-size: 1.3rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.social-link.facebook {
    background: #1877f2;
}

.social-link.instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.social-link.twitter {
    background: #000000;
}

.social-link.tiktok {
    background: #000000;
}

/* ============================================
   MARCAS RELACIONADAS (TAMAÑO ORIGINAL CORREGIDO)
   ============================================ */

.related-brands-section {
    padding: 50px 0;
    background: var(--bg-light);
}

.related-section-title {
    font-size: 1.6rem;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 35px;
    font-weight: 700;
}

/* Wrapper del carousel con flechas */
.related-carousel-wrapper {
    position: relative;
    padding: 0 60px;
    margin: 0 auto;
    max-width: 1100px;
}

/* Container del carousel */
.related-brands-carousel {
    overflow: hidden;
    padding: 20px 0;
}

/* Track del carousel */
.related-carousel-track {
    display: flex;
    gap: 20px;
    transition: transform 0.5s ease;
    will-change: transform;
}

/* Items individuales del carousel - TAMAÑO FIJO */
.related-brand-item {
    min-width: calc(25% - 15px);
    max-width: calc(25% - 15px);
    flex-shrink: 0;
}

/* Card compacta - TAMAÑO ORIGINAL */
.related-brand-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    height: 240px;
    width: 100%;
}

.related-brand-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

/* Logo pequeño - TAMAÑO ORIGINAL */
.related-brand-logo {
    width: 100%;
    height: 130px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 2px solid var(--accent-color);
    overflow: hidden;
    flex-shrink: 0;
}

.related-brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    -webkit-user-drag: none;
    user-select: none;
}

.related-logo-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    height: 100%;
    width: 100%;
}

.related-logo-placeholder i {
    font-size: 2rem;
    margin-bottom: 5px;
}

/* Info compacta con WRAP como el index */
.related-brand-info {
    padding: 12px 10px;
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    overflow: hidden;
    width: 100%;
}

/* Título con WRAP y line-clamp como el index */
.related-brand-info h4 {
    font-size: 0.95rem;
    color: var(--primary-color);
    margin: 0;
    font-weight: 700;
    line-height: 1.2;
    width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Badge pequeño sin expansión */
.related-category-badge {
    display: inline-block;
    background: var(--accent-color);
    color: var(--primary-color);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* Flechas del carousel - IGUAL AL INDEX */
.related-carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    z-index: 100;
}

.related-carousel-arrow:hover {
    background: var(--accent-color);
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.related-carousel-arrow:active {
    transform: translateY(-50%) scale(0.95);
}

.related-carousel-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background: rgba(200, 200, 200, 0.5);
}

.related-carousel-arrow:disabled:hover {
    transform: translateY(-50%);
    background: rgba(200, 200, 200, 0.5);
    color: var(--primary-color);
}

.related-carousel-arrow.prev {
    left: 10px;
}

.related-carousel-arrow.next {
    right: 10px;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1200px) {
    .related-brand-item {
        min-width: calc(33.333% - 13.33px);
        max-width: calc(33.333% - 13.33px);
    }
    
    .related-carousel-wrapper {
        padding: 0 50px;
    }
}

@media (max-width: 968px) {
    .related-brand-item {
        min-width: calc(50% - 10px);
        max-width: calc(50% - 10px);
    }
    
    .related-carousel-wrapper {
        padding: 0 40px;
    }
    
    .related-carousel-arrow {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .brand-detail-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .brand-media-column {
        align-items: center;
    }
    
    .brand-logo-main {
        width: 250px;
        height: 250px;
    }
    
    .brand-additional-media {
        width: 100%;
        max-width: 400px;
    }
    
    .media-vertical,
    .video-vertical,
    .media-cuadrado,
    .video-cuadrado {
        width: 100%;
        max-width: 400px;
    }
    
    .brand-title {
        font-size: 1.8rem;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .related-section-title {
        font-size: 1.4rem;
        margin-bottom: 25px;
    }
    
    .related-brand-card {
        height: 220px;
    }
    
    .related-brand-logo {
        height: 120px;
    }
    
    .related-brand-info h4 {
        font-size: 0.9rem;
    }
    
    .related-category-badge {
        font-size: 0.65rem;
        padding: 3px 8px;
    }
    
    .related-carousel-wrapper {
        padding: 0 20px;
    }
    
    .related-carousel-arrow.prev {
        left: 5px;
    }

    .related-carousel-arrow.next {
        right: 5px;
    }
}

@media (max-width: 600px) {
    .related-brand-item {
        min-width: 100%;
        max-width: 100%;
    }
    
    .related-carousel-arrow {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .brand-logo-main {
        width: 200px;
        height: 200px;
    }
    
    .brand-title {
        font-size: 1.5rem;
    }
    
    .brand-location-card {
        flex-direction: column;
        text-align: center;
    }
    
    .status-badge-inline {
        margin-left: 0;
        margin-top: 10px;
    }
}