/* Brand Spotlight — Frontend Styles */

.bs-banner-wrap {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-sizing: border-box;
    font-family: inherit;
    transition: box-shadow 0.2s ease;
}

.bs-banner-wrap:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
}

/* Banner interior: logo + info + botones */
.bs-banner-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 28px 28px 24px;
    flex-wrap: wrap;
}

/* Caja del logo */
.bs-logo-box {
    width: 168px;
    height: 168px;
    min-width: 168px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.bs-logo-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.bs-logo-initials {
    font-size: 46px;
    font-weight: 600;
    letter-spacing: -2px;
    opacity: 0.85;
    text-align: justify !important;
    color: #ffffff;
}

/* Información de la marca */
.bs-brand-info {
    flex: 1;
    min-width: 180px;
}

.bs-label {
    display: block;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 4px;
    color: #ffffff !important;
    opacity: 0.55;
}

.bs-brand-name {
    margin: 0 0 8px !important;
    padding: 0 !important;
    font-size: 28px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    border: none !important;
    color: #ffffff !important;
}

.bs-brand-desc {
    margin: 0 !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
    padding: 0 !important;
    color: #ffffff !important;
    opacity: 0.85;
    text-align: justify !important;
}

.bs-rotation-info,
.bs-counter {
    color: #ffffff !important;
}

.bs-link-brands {
    color: #ffffff !important;
}

/* Botones y links */
.bs-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-shrink: 0;
    align-items: stretch;
    min-width: 150px;
}

.bs-btn-primary {
    display: block;
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    text-decoration: none !important;
    cursor: pointer;
    transition: opacity 0.15s ease, transform 0.12s ease;
    border: none;
    white-space: nowrap;
}

.bs-btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    text-decoration: none !important;
}

.bs-link-brands {
    display: block;
    font-size: 12px;
    text-align: center;
    text-decoration: none !important;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    transition: background 0.15s ease;
    white-space: nowrap;
}

.bs-link-brands:hover {
    background: rgba(255, 255, 255, 0.1);
    text-decoration: none !important;
}

/* Footer del banner */
.bs-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.bs-rotation-info,
.bs-counter {
    font-size: 11px;
    color: #ffffff !important;
    opacity: 0.5;
}

/* Sin marcas */
.bs-no-brands {
    padding: 12px 16px;
    background: #f8f8f8;
    border-radius: 6px;
    font-size: 14px;
    color: #666;
}

/* Responsive */
@media (max-width: 600px) {
    .bs-banner-inner {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
        gap: 14px;
    }

    .bs-actions {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .bs-btn-primary,
    .bs-link-brands {
        flex: 1;
        min-width: 120px;
    }

    .bs-brand-name {
        font-size: 18px !important;
    }

    .bs-footer {
        padding: 8px 20px;
    }
}

/* -------------------------------------------------------
   GRILLA DE MARCAS — [brand_grid]
------------------------------------------------------- */

.bs-grid-wrap {
    width: 100%;
    box-sizing: border-box;
}

.bs-grid-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 20px;
}

.bs-grid {
    display: grid;
    grid-template-columns: repeat(var(--bs-cols, 4), 1fr);
    gap: 16px;
}

/* Tarjeta de la grilla */
.bs-grid-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px 12px 16px;
    border-radius: 10px;
    text-decoration: none !important;
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    cursor: pointer;
    min-height: 120px;
}

a.bs-grid-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    text-decoration: none !important;
}

/* Logo dentro de la tarjeta */
.bs-grid-logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    flex: 1;
}

.bs-grid-logo {
    max-width: 100%;
    max-height: 80px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.bs-grid-initials {
    font-size: 28px;
    font-weight: 700;
    color: #555;
    letter-spacing: -1px;
}

/* Nombre de la marca */
.bs-grid-name {
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    color: #333;
    line-height: 1.3;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Overlay al hover */
.bs-grid-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.18s ease;
    border-radius: 10px;
    pointer-events: none;
}

a.bs-grid-card:hover .bs-grid-overlay {
    background: rgba(0,0,0,0.06);
}

.bs-grid-overlay-icon {
    font-size: 20px;
    color: rgba(0,0,0,0.5);
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

a.bs-grid-card:hover .bs-grid-overlay-icon {
    opacity: 1;
    transform: scale(1);
}

/* Responsive */
@media (max-width: 768px) {
    .bs-grid {
        grid-template-columns: repeat(min(var(--bs-cols, 4), 3), 1fr);
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .bs-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .bs-grid-card {
        min-height: 90px;
        padding: 14px 8px 12px;
    }
    .bs-grid-logo {
        max-height: 56px;
    }
}

/* -------------------------------------------------------
   SKELETON — placeholder mientras carga el banner AJAX
------------------------------------------------------- */

.bs-banner-placeholder {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    min-height: 160px;
    display: flex;
    align-items: stretch;
}

.bs-skeleton {
    flex: 1;
    background: linear-gradient(
        90deg,
        #e0e0e0 25%,
        #ebebeb 50%,
        #e0e0e0 75%
    );
    background-size: 200% 100%;
    animation: bs-shimmer 1.4s infinite;
    border-radius: 8px;
    min-height: 160px;
}

@keyframes bs-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
