/* ===================================
   Brands — aligned with Super Pet theme
   Matches .healthy-product & .hero-shop
   =================================== */

/* ---- Homepage section ---- */
.brand-section {
    background-color: var(--mainBackground);
}

.brand-section .header {
    padding-bottom: 0;
}

.brand-section .header .boder-bar {
    margin-bottom: 0;
    margin-top: 8px;
}

.brand-view-all {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.15rem;
    color: var(--main-color);
    font-family: var(--main-font);
    font-weight: 700;
    font-size: 0.85rem;
    text-decoration: none;
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 114, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.brand-view-all:hover {
    color: var(--main-color);
    background: #b9d331;
    border-color: #b9d331;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(185, 211, 49, 0.35);
}

.brand-view-all:focus-visible {
    outline: 3px solid #b9d331;
    outline-offset: 2px;
}

/* ---- Brand card (mirrors .healthy-product) ---- */
.brand-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 1rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: inherit;
}

.brand-card:hover,
.brand-card:focus-visible {
    transform: translateY(-6px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    border-color: var(--main-color);
    color: inherit;
    text-decoration: none;
}

.brand-card:focus-visible {
    outline: none;
}

.brand-card__featured {
    position: absolute;
    top: 10px;
    inset-inline-end: 10px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 50px;
    background: #b9d331;
    color: var(--main-color);
    font-size: 0.6rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 8px rgba(185, 211, 49, 0.45);
}

.brand-card__visual {
    height: 140px;
    position: relative;
    margin-bottom: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    padding: 1rem;
    overflow: hidden;
}

.brand-card__logo {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-card__logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.4s ease;
}

.brand-card:hover .brand-card__logo img,
.brand-card:focus-visible .brand-card__logo img {
    transform: scale(1.08);
}

.brand-card__initial {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--main-color);
    font-family: var(--primery-font);
    line-height: 1;
    opacity: 0.75;
}

/* Product-count pill — same as .healthy-product > span */
.brand-card__count {
    display: inline-block;
    color: #b9d331;
    background: rgba(251, 191, 36, 0.05);
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    width: fit-content;
}

.brand-card__count i {
    font-size: 0.65rem;
    margin-inline-end: 0.2rem;
}

/* Brand name — same as .healthy-product > a */
.brand-card__name {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
    color: #1e293b;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
    min-height: 2.8em;
    font-family: var(--main-font);
}

.brand-card:hover .brand-card__name,
.brand-card:focus-visible .brand-card__name {
    color: var(--main-color);
}

/* Browse CTA — same as .add-to-cart-bottom-btn */
.brand-card__action {
    margin-top: auto;
    width: 100%;
}

.brand-card__btn {
    background: linear-gradient(135deg, #000072 0%, #6366f1 100%);
    color: #fff;
    padding: 0.65rem 0.75rem;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    width: 100%;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    box-shadow: 0 4px 14px 0 rgba(79, 70, 229, 0.39);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: var(--main-font);
}

.brand-card:hover .brand-card__btn,
.brand-card:focus-visible .brand-card__btn {
    background: linear-gradient(135deg, #4338ca 0%, #000072 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(79, 70, 229, 0.5);
}

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

.brand-card:hover .brand-card__btn i,
.brand-card:focus-visible .brand-card__btn i {
    transform: translateX(3px);
}

[dir="rtl"] .brand-card:hover .brand-card__btn i,
[dir="rtl"] .brand-card:focus-visible .brand-card__btn i {
    transform: translateX(-3px);
}

/* Compact variant (homepage) */
.brand-card--compact {
    padding: 0.85rem;
}

.brand-card--compact .brand-card__visual {
    height: 110px;
    margin-bottom: 0.65rem;
    padding: 0.75rem;
}

.brand-card--compact .brand-card__name {
    font-size: 0.85rem;
    min-height: 2.4em;
    margin-bottom: 0.6rem;
}

.brand-card--compact .brand-card__btn {
    padding: 0.55rem 0.65rem;
    font-size: 0.65rem;
}

/* Mobile horizontal scroll */
.brands-track-wrap {
    position: relative;
}

.brands-track-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    margin-bottom: 0.65rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: #64748b;
}

.brands-track-hint i {
    color: #b9d331;
}

.brands-track {
    display: flex;
    gap: 0.75rem;
    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 160px;
    scroll-snap-align: start;
}

/* ---- Brands listing page ---- */
.brand-page-subtitle {
    color: rgba(0, 0, 114, 0.72);
    font-size: 1rem;
    line-height: 1.55;
    margin: 0.5rem 0 0;
    max-width: 560px;
    font-family: var(--main-font);
}

.brands-page-stat {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-top: 1rem;
    padding: 0.45rem 0.9rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--main-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.brands-page-stat i {
    color: #b9d331;
}

.brands-page-stat strong {
    color: var(--main-color);
}

.brands-grid-section {
    padding: 1.5rem 0 3rem;
    background-color: var(--mainBackground);
}

.brands-empty {
    text-align: center;
    padding: 3.5rem 1.5rem;
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.brands-empty__icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    color: var(--main-color);
    font-size: 1.5rem;
    border: 1px solid #e2e8f0;
}

.brands-empty p {
    color: #64748b;
    font-size: 1rem;
    margin: 0;
}

/* ---- Brand detail page ---- */
.brand-hero .brand-hero__title {
    color: var(--main-color);
    font-family: var(--primery-font);
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.75rem;
}

.brand-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.brand-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.9rem;
    background: #b9d331;
    color: var(--main-color);
    font-weight: 700;
    font-size: 0.8rem;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(185, 211, 49, 0.3);
}

.brand-hero__logo {
    width: clamp(100px, 16vw, 150px);
    height: clamp(100px, 16vw, 150px);
    border-radius: 16px;
    background: #fff;
    border: 1px solid #e2e8f0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    box-shadow: 0 4px 14px rgba(0, 0, 114, 0.08);
}

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

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

.brand-hero__logo--initial {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    color: var(--main-color);
    font-family: var(--primery-font);
    line-height: 1;
    opacity: 0.7;
}

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

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

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

.brand-products-section {
    padding: 1.5rem 0 3rem;
    background-color: var(--mainBackground);
}

@media (max-width: 767px) {
    .brands-track .brand-card {
        flex: 0 0 148px;
    }

    .brand-card__visual {
        height: 120px;
    }
}

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

@media (prefers-reduced-motion: reduce) {
    .brand-card,
    .brand-card__logo img,
    .brand-card__btn,
    .brand-view-all {
        transition: none;
    }
}
