* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #fafafa;
    color: #333;
    line-height: 1.6;
}

.container-fluid {
    width: 100%;
    max-width: 1410px;
    margin: 0 auto;
    padding: 40px 20px;
}

.brandWrappe {
    display: flex;
    flex-direction: row-reverse;
}

.brandWrappe:has(.brands-container.d-none) {
    max-width: unset;
    flex-direction: row;
}

/* Alphabet Navigation */
.alphabet-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 60px;
    flex-wrap: wrap;
    flex-direction: column;
    margin-left: 10px;
}

/* .alphabet-nav .letter {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    font-size: 20px;
    font-weight: 600;
    color: #666;
    background-color: transparent;
    border: 1px solid #E7E7E7;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    line-height: 100%;
    letter-spacing: 0%;

}

.alphabet-nav .letter:hover {
    background-color: #f0f0f0;
    color: #333;
}

.alphabet-nav .letter.active {
    background-color: #000;
    color: #fff;
} */


.alphabet-nav .letter {
    width: 17px;
    height: 17px;
    font-size: 18px;
    background-color: unset;
    border: unset;
    color: #00000080;
}

.alphabet-nav .letter.active {
    background-color: unset;
    color: #000;
}

.alphabet-nav {
    margin-bottom: 0;
}

.alphabet-nav {
    overflow-y: scroll;
    scrollbar-width: none;
    -ms-overflow-style: none;
    overflow-x: hidden;
    overscroll-behavior: contain;
}

.alphabet-nav::-webkit-scrollbar {
    display: none;
}

/* Brand Grid */
.brand-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
    width: 100%;
    text-align: center;
}

.brand-card {
    border-radius: 10px;
    /* padding: 60px 40px; */
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid #f0f0f0;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    background-color: #FFFAF4;
    max-height: 300px;
}

.brand-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #e0e0e0;
}

.brand-logo {

    height: 100%;
    object-fit: cover;
    object-position: center;
    position: relative;
}

.brand-card:hover .brand-logo {
    filter: grayscale(0%) opacity(1);
    transform: scale(1.05);
}

/* Placeholder for loading */
.brand-card.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.brand-card.error {
    background-color: #f8f8f8;
    color: #999;
    font-size: 14px;
    text-align: center;
}

/* Image loading states */
.brand-logo.loading {
    opacity: 0;
}

.brand-logo.loaded {
    opacity: 1;
    animation: fadeIn 0.3s ease-in-out;
}

.brand-logo.error {
    display: none;
}

/* Fallback text styling */
.brand-fallback {
    font-size: 18px;
    font-weight: 600;
    color: #666;
    text-align: center;
}


/* Animations */
.fade-in {
    animation: fadeIn 0.4s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.brand-fallback {
    display: none;
}

/* No results message */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 16px;
}

/* Brand count indicator */
.brand-count {
    text-align: center;
    margin-bottom: 30px;
    color: #666;
    font-size: 14px;
}


.alphabet-slider-container {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.alphabet-slider {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    gap: 8px;
}

.alphabet-slider::-webkit-scrollbar {
    display: none;
}

.letter {
    min-width: 40px;
    padding: 8px 12px;
    border: none;
    background: #f5f5f5;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
}

.letter.active {
    background-color: #000;
    color: #fff;
}

.slider-arrow {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 0 10px;
}

.alphabet-slider-container {
    display: none;
}

.hide-for-desktop {
    display: none;
}

.brands-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    align-items: flex-start;
}


.heart-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}


@media screen and (max-width: 768px) {
    .main-content {
        display: flex;
        flex-direction: row-reverse;
        gap: 5px;
    }

    .hide-for-desktop {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .alphabet-slider-container {
        display: none;
    }


    .brand-card {
        padding: 30px 20px;
        min-height: 140px;
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .container-fluid {
        padding: 20px 15px;
    }

    .brand-grid {
        width: 100%;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        max-width: 100%;
        max-height: calc(100vh - 180px);
        overflow-y: auto;
    }

    .brand-card {
        padding: 10px 10px;
        min-height: unset;
        width: 100%;
        aspect-ratio: 1/1;
    }

    .alphabet-nav {
        gap: 4px;
        /* margin-bottom: 40px; */
        flex-direction: column;
        max-height: calc(100dvh - 195px);
        overflow: auto;
        flex-wrap: nowrap;
        justify-content: unset;
        background: #fafafa;
        right: 0px;
    }

    .alphabet-nav .letter {
        width: 17px;
        height: 17px;
        font-size: 13px;
        background-color: unset;
        border: unset;
        color: #00000080;
    }

    .alphabet-nav .letter.active {
        background-color: unset;
        color: #000;
    }

    .alphabet-nav {
        margin-bottom: 0;
    }

    .alphabet-nav {
        overflow-y: scroll;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .alphabet-nav::-webkit-scrollbar {
        display: none;
    }

    .brand-fallback {
        display: block;
        font-size: 14px;
        line-height: 14px;
        text-overflow: ellipsis;
        overflow: hidden;
        white-space: nowrap;
        width: 100%;
    }

    .back-to-top-btn svg {
        transform: rotate(90deg);
        width: 20px;
        height: 20px;
    }

    .back-to-top-btn {
        display: none;
        width: fit-content;
        padding: 4px 20px;
        border-radius: 6px;
        border: unset;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
        background-color: black;
        color: #fff;
        position: fixed;
        top: 25%;
        z-index: 5;
    }


    .brand-card {
        width: 100%;
        max-width: 140px;
        background: #fff;
        border-radius: 12px;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
        text-align: center;
        padding: 12px;
        transition: transform 0.2s ease, box-shadow 0.2s ease;
        cursor: pointer;
        margin: 0px;
        padding: 0;
        ;
    }

    .brand-card:hover {
        transform: scale(1.03);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    }

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

    .brand-fallback {
        width: 70px;
        height: 70px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 12px;
        font-weight: 600;
        color: #444;
        background: #f2f2f2;
        border-radius: 50%;
        margin: 0 auto;
    }

    .brand-name {
        font-size: 14px;
        margin-top: 6px;
        font-weight: 600;
        color: #222;
    }


    @media (min-width: 768px) {
        .brand-card {
            display: none;
        }
    }

}

[lang="ar"] {
    .main-content {
        direction: ltr !important;
    }
}

.tab-button {
    display: flex;
    justify-content: center;
    gap: 0;
    margin: 20px 0;
}

/* Shared button styling */
.tab-btn {
    background: #fff;
    color: #000;
    border: 2px solid #000;
    padding: 10px 58px;
    cursor: pointer;
    font-size: 16px;
    /* border-radius: 10px 0 0 10px; */
    transition: background 0.2s ease, color 0.2s ease;
}

.tab-btn:first-of-type {
    border-radius: 10px 0px 0px 10px;
}

.tab-btn:last-of-type {
    border-radius: 0px 10px 10px 0px;
}

[lang="ar"] {
    .tab-btn:first-of-type {
        border-radius: 0px 10px 10px 0px;
    }

    .tab-btn:last-of-type {
        border-radius: 10px 0px 0px 10px;
    }

}

.tab-btn.active {
    background: #000;
    color: #fff;
}

.tab-btn:hover {
    filter: brightness(1.2);
}

@media (max-width: 600px) {
    .tab-button {
        align-items: center;
        justify-content: center;
    }

    .tab-btn {
        margin-bottom: 10px;
        padding: 5px 38px;
    }
}


.container-for-prodcut-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}


.container-for-page-title-and-tab-buttons {
    padding-top: 24px;
    padding-bottom: 24px;
}

.products-page-title {
    font-weight: 500;
    font-size: 20px;
    line-height: 100%;
    color: #000000;
    white-space: nowrap;
}

.sort-by-filter {
    float: inline-end;
}


/* The following is the style for card */

.card {
    display: flex;
    justify-content: space-between;
    width: 336px !important;
    height: 520px;
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    border: none;
    cursor: pointer;
    background-color: transparent;
    border: none;
    cursor: pointer;
}

.card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;

    position: absolute;
    top: 0;
    left: 0;
}

.card .image-overlay {
    position: relative;
    height: 441px;
    width: 336px;
}

.card .icon-buttons {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 3;
}

.card .icon-buttons button {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: #000000;
    border: none;
    /* padding: 8px; */
    /* border-radius: 50%; */
    /* color: white; */
    cursor: pointer;
}

.card .icon-buttons button svg {
    width: 19px;
    height: 19px;
}

.card .icon-buttons button:hover svg path {
    fill: white;
}

.card .details {
    padding: 10px;
}

.selling-carousel-card-title {
    font-weight: 700;
    font-size: 19px;
    /* line-height: 80%; */
    color: #282828;
    padding-bottom: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;

}

.selling-carousel-card-subtitle {
    font-weight: 600;
    font-size: 16px;
    font-size: 13px;
    color: #4C4C4C;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
}

.card .colors {
    display: flex;
    gap: 6px;
    /* margin: 8px 0; */
    justify-content: space-between;
    align-items: center;
}

.parent-container-for-color-dot {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    border: 3px solid transparent;
    display: flex;
    justify-content: center;
    align-items: center;

}

.color-dot {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    cursor: pointer;
}

.parent-container-for-color-dot.selected {
    border: 3px solid black;
}

.color-box {
    display: flex;
    gap: 5px;
    overflow-x: auto;
    width: 50%;
}

.price {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 130px;
    display: inline-block;
}

.rating-price {
    font-weight: 700;
    font-size: 19px;
    line-height: 80%;
    color: #000000;

}

.rating {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.rating span {
    font-weight: 700;
    font-size: 16px;
    line-height: 80%;
    color: #000000;

}

.mobile-products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding-inline: 35px;
    justify-content: center;
    width: 100%;
}



.products-grid::-webkit-scrollbar {
    display: none;
}

.mobile-product-card {
    /* max-width: 130px; */
    background: #FFFAF4;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    max-height: 250px;
    height: 100%;
    margin-inline: auto;
}

.mobile-product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.mobile-product-image {
    width: 100%;
    max-width: 130px;
    height: 180px;
    background: linear-gradient(135deg, #d4c4a8 0%, #b8a082 100%);
    border-radius: 8px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-product-image>img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}




.mobile-product-model {
    width: 60px;
    height: 140px;
    background: #8b7355;
    border-radius: 30px;
    opacity: 0.9;
}

.mobile-heart-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}



.mobile-product-info {
    padding: 4px 15px;
    text-align: center;

    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

.mobile-product-info>div {
    margin-bottom: 0px;
}

.mobile-product-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 5px;
    line-height: 16px;

    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.mobile-product-price {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 16px;
}

.mobile-rating {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-size: 12px;
    line-height: 14px;
}

/* @media (max-width:768px) {
    .mobile-products-grid  {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr);
    }

    .container-for-prodcut-cards {
        display: none !important;
    }

} */

/* @media (max-width:768px) {
    .container-for-prodcut-cards{
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        width: 100%;
    }
    .card{
        height: 250px;
        width: 100% !important;
        background: #FFFAF4;
        border-radius: 8px;
        overflow: hidden;
        cursor: pointer;
        transition: transform 0.2s, box-shadow 0.2s;
    }
    .details{
        padding: 4px 15px;
        text-align: center;
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 4px;
        align-items: center;
    }
    .rating{
        display: none;
    }
} */