/* ===================================
   Brands Section & Pages
   =================================== */

.brand-section {
    position: relative;
    background: linear-gradient(165deg, #f4f6fb 0%, #ffffff 45%, #f8faf5 100%);
    overflow: hidden;
}

.brand-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #000072 0%, #b9d331 50%, #000072 100%);
}

.brand-section::after {
    content: '';
    position: absolute;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(185, 211, 49, 0.12) 0%, transparent 70%);
    top: -80px;
    right: -60px;
    pointer-events: none;
}

.brand-section .header img {
    max-width: 48px;
}

.brand-section .container {
    position: relative;
    z-index: 1;
}

/* ---- Brand card ---- */
.brand-card {
    --brand-accent: #000072;
    --brand-lime: #b9d331;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1.25rem 1rem 1rem;
    background: #fff;
    border-radius: 20px;
    border: 1px solid rgba(0, 0, 72, 0.08);
    box-shadow: 0 8px 24px rgba(0, 0, 72, 0.05);
    text-decoration: none;
    color: inherit;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.35s ease,
        border-color 0.35s ease;
    overflow: hidden;
}

.brand-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--brand-lime);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s ease;
}

.brand-card {
    position: relative;
}

.brand-card:hover {
    transform: translateY(-8px);
    border-color: rgba(185, 211, 49, 0.55);
    box-shadow: 0 20px 40px rgba(0, 0, 72, 0.1);
    color: inherit;
    text-decoration: none;
}

.brand-card:hover::before {
    transform: scaleX(1);
}

.brand-card__visual {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    padding: 0.5rem;
}

.brand-card__logo {
    width: 100%;
    max-width: 120px;
    aspect-ratio: 1;
    border-radius: 18px;
    background: linear-gradient(145deg, #ffffff 0%, #f5f7fc 100%);
    border: 1px solid rgba(0, 0, 72, 0.07);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    overflow: hidden;
}

.brand-card:hover .brand-card__logo {
    transform: scale(1.04);
    box-shadow: 0 10px 24px rgba(0, 0, 72, 0.08);
}

.brand-card__logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.brand-card__initial {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--brand-accent);
    font-family: var(--primery-font, inherit);
    line-height: 1;
}

.brand-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    text-align: center;
}

.brand-card__name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--brand-accent);
    margin: 0 0 0.75rem;
    line-height: 1.35;
    min-height: 2.7em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.25s ease;
}

.brand-card:hover .brand-card__name {
    color: #0a0a9e;
}

.brand-card__meta {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.brand-card__count {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(0, 0, 72, 0.65);
    background: #eef1f8;
    padding: 0.35rem 0.85rem;
    border-radius: 50px;
    white-space: nowrap;
}

.brand-card__count i {
    font-size: 0.7rem;
    opacity: 0.75;
}

.brand-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--brand-lime);
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.25s ease;
}

.brand-card:hover .brand-card__cta {
    opacity: 1;
    transform: translateY(0);
    color: var(--brand-accent);
}

.brand-card__cta i {
    font-size: 0.7rem;
    transition: transform 0.25s ease;
}

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

/* Compact (homepage) */
.brand-card--compact {
    padding: 1rem 0.85rem 0.85rem;
    border-radius: 16px;
}

.brand-card--compact .brand-card__logo {
    max-width: 88px;
    padding: 10px;
    border-radius: 14px;
}

.brand-card--compact .brand-card__name {
    font-size: 0.85rem;
    min-height: 2.5em;
}

.brand-card--compact .brand-card__count {
    font-size: 0.7rem;
    padding: 0.28rem 0.65rem;
}

/* Home brands carousel */
.brands-track {
    display: flex;
    gap: 0.85rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 0.25rem 0.25rem 1rem;
    margin: 0 -0.25rem;
    scrollbar-width: none;
}

.brands-track::-webkit-scrollbar {
    display: none;
}

.brands-track .brand-card {
    flex: 0 0 148px;
    scroll-snap-align: start;
}

@media (min-width: 768px) {
    .brands-track .brand-card {
        flex: 0 0 168px;
    }
}

.brand-view-all {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.1rem;
    color: #000072;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    background: #fff;
    border: 2px solid rgba(0, 0, 72, 0.12);
    border-radius: 50px;
    transition: color 0.3s ease, border-color 0.3s ease, background 0.3s ease, gap 0.3s ease;
}

.brand-view-all:hover {
    color: #000072;
    background: #b9d331;
    border-color: #b9d331;
    gap: 0.7rem;
}

/* Brand detail page */
.brand-hero {
    padding-bottom: 2rem !important;
}

.brand-hero__title {
    color: var(--main-color, #000072);
    font-family: var(--primery-font, inherit);
    font-size: clamp(1.5rem, 2.5vw, 2.25rem);
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 0.5rem;
}

.brand-hero__subtitle {
    color: rgba(0, 0, 72, 0.72);
    font-size: clamp(0.95rem, 1.5vw, 1.1rem);
    font-weight: 500;
    line-height: 1.45;
    margin-bottom: 0.75rem;
    max-width: 640px;
}

.brand-hero__desc {
    color: rgba(0, 0, 72, 0.75);
    font-size: 0.95rem;
    line-height: 1.65;
    max-width: 640px;
    margin-bottom: 0;
}

.brand-hero__desc-wrap {
    max-width: 640px;
}

.brand-hero__read-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.5rem;
    padding: 0;
    border: 0;
    background: none;
    color: #000072;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: color 0.25s ease;
}

.brand-hero__read-toggle:hover {
    color: #b9d331;
}

.brand-hero__read-toggle i {
    font-size: 0.75rem;
    transition: transform 0.25s ease;
}

.breadcrumb-nav {
    font-size: 0.875rem;
    line-height: 1.5;
    word-break: break-word;
}

.breadcrumb-nav span[title] {
    display: inline-block;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: bottom;
}

.brand-hero__badge {
    display: inline-flex;
    align-items: center;
    background: #b9d331;
    color: #000072;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.4rem 1rem;
    border-radius: 50px;
}

.brand-hero__logo {
    width: 160px;
    height: 160px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid rgba(0, 0, 72, 0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 72, 0.1);
    margin: 0 auto;
}

@media (min-width: 992px) {
    .brand-hero__logo {
        margin: 0 0 0 auto;
    }
}

.brand-hero__logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.brand-page-subtitle {
    color: rgba(0, 0, 72, 0.7);
    margin-bottom: 0;
    font-size: 1.05rem;
}

.breadcrumb-nav span:last-child {
    color: #b9d331;
    font-weight: 600;
}

@media (max-width: 767px) {
    .brand-hero__logo {
        width: 100px;
        height: 100px;
        padding: 14px;
    }

    .brand-card__cta {
        display: none;
    }
}
