body {
    background: var(--white-color);
    font-family: var(--body-font-family);
}

.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5 s, visibility 0.5s;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--primary-color, #007bff);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.custom-container {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    padding-left: 24px;
    padding-right: 24px;
}

.sticky-header {
    position: sticky;
    top: 0;
    z-index: 800;
    background: var(--white-color);
}

.brand-slider-section {
    overflow: hidden;
    width: 100%;
    position: relative;
    padding: 40px 0;
}

.product-section .card-img-top {
    max-width: 150px;
    max-height: 150px;
    margin: 0 auto;
    display: block;
    object-fit: contain;
}

@media (min-width: 577px) {
    .product-row {
        justify-content: center;
    }
}

.brand-slider .slick-slide {
    width: 100%;
    display: inline-block !important;
    float: none !important;
    margin: 0 auto !important;
    padding: 0px 20px !important;
}

.card-title.text-capitalize {
    text-transform: capitalize !important;
    color: #000000 !important;
    margin-bottom: 0.5rem;
    font-weight: 100 !important;
    font-size: 1.1rem;
    min-height: 48px;
    display: flex;
    gap: 40px;
    overflow-x: auto;
    scroll-behavior: auto;
    white-space: nowrap;
    width: 100%;
    cursor: grab;
    user-select: none;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
}

.brand-slider.dragging {
    cursor: grabbing;
}

.brand-slider::-webkit-scrollbar {
    display: none;
}

.brand-slider:before {
    content: "";
    display: none;
}

.desc-text {
    font-size: 1rem;
    color: #444;
    margin-top: 0.5rem;
}

.brand-slider img {
    max-height: 80px;
    width: auto;
    filter: grayscale(0.2) contrast(1.1);
    transition: filter 0.3s, transform 0.3s;
    flex-shrink: 0;
    user-select: none;
}


@media (max-width: 992px) {
    .brand-slider .slick-slide {
        padding: 0 20px !important;
    }
}


.search-bar-section {
    padding: 24px 0;
}

.custom-search-input {
    border: 2px solid lightgrey;
    border-radius: var(--border-radius-large);
    padding: 12px 18px 12px 45px;
    font-size: 1.2em;
    color: var(--primary-color);
    background: #f3f3f3;
    transition: border-color 0.2s;
    width: 100%;
    box-sizing: border-box;
}

.custom-search-input:focus,
.custom-search-input:hover {
    border-color: var(--primary-color);
    outline: none;
}

.custom-search-btn {
    background: var(--primary-color);
    color: #fff;
    border-radius: var(--border-radius-large);
    font-weight: var(--font-weight-bold);
    padding: 12px 24px;
    border: none;
    transition: background 0.2s;
    white-space: nowrap;
    margin-left: 12px;
    flex-shrink: 0;
}

.custom-search-btn:hover {
    background: var(--tertiary-color);
}

/* Search bar responsive */
@media (max-width: 992px) {
    .search-bar-section {
        padding: 20px 0;
    }

    .custom-search-input {
        font-size: 1.1em;
        padding: 11px 16px 11px 40px;
    }

    .custom-search-btn {
        padding: 11px 20px;
        font-size: 0.98em;
    }

        .product-section .card-title,
    .product-card-text,
    .product-section .card-body strong {
        font-size: 0.85rem !important;
    }
    .product-section .card {
        padding: 0.3rem;
    }
}

@media (max-width: 768px) {
    .search-bar-section {
        padding: 16px 0;
    }

    .search-bar-section form {
        flex-direction: column;
        gap: 12px;
    }

    .position-absolute i {
        margin-right: 8px;
    }

    .custom-search-input {
        font-size: 1em;
        padding: 10px 14px 10px 48px;
        margin-bottom: 0;
        width: 100%;
    }

    .custom-search-btn {
        margin-left: 0;
        padding: 12px 16px;
        font-size: 0.95em;
        width: 100%;
    }

    .position-absolute {
        left: 12px !important;
    }
}

@media (max-width: 576px) {
    .product-row {
        flex-direction: column;
        gap: 16px;
        align-items: center;
    }
    .product-row>div {
        flex: 0 0 100%;
        max-width: 98vw;
        margin: 0 auto;
        display: flex;
        justify-content: center;
    }
    .product-section .card {
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
        padding: 0.25rem 0.8rem;
        border-radius: 16px;
        box-shadow: 0 2px 8px #0001;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .product-section .card-title {
        font-size: 1.18rem !important;
        text-align: center;
        font-weight: bold;
        margin-bottom: 0.4rem;
        color: var(--primary-color);
        width: 100%;
        display: block;
        white-space: normal;
        word-break: break-word;
    }
    .product-card-text,
    .product-section .card-body strong {
        font-size: 0.85rem !important;
        text-align: left;
        word-break: break-word;
        display: block;
        white-space: normal;
    }
    .product-section .card-img-top {
        max-width: 100px;
        max-height: 100px;
        margin: 10px auto 6px auto;
        display: block;
    }
    .product-section .card-body {
        padding: 0.2rem 0.1rem;
        width: 100%;
    }
    .product-section .btn-primary {
        font-size: 0.8rem;
        padding: 0.35rem 0.7rem;
        width: 90px;
        margin: 0 auto 8px auto;
        display: block;
    }
}

@media (max-width: 480px) {
    .custom-search-input {
        font-size: 0.95em;
        padding: 8px 12px 8px 40px;
    }

    .custom-search-input {
        padding-left: 40px;
    }

    .position-absolute {
        left: 12px !important;
        transform: translateY(-50%);
    }

    .position-absolute i {
        margin-right: 8px;
    }

    .custom-search-btn {
        font-size: 0.9em;
        padding: 10px 14px;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .custom-search-input {
        padding-left: 44px;
    }

    .position-absolute {
        left: 12px !important;
        width: 20px;
        display: flex;
        justify-content: center;
    }

    .custom-search-input::placeholder {
        padding-left: 0;
    }
}

@media (max-width: 360px) {
    .custom-search-input {
        font-size: 0.9em;
        padding: 8px 10px 8px 38px;
    }

    .custom-search-btn {
        font-size: 0.85em;
        padding: 8px 12px;
    }

    .position-absolute {
        left: 10px !important;
        transform: translateY(-50%) scale(0.9);
    }
}

/*---------------------------------------
PRODUCT
-----------------------------------------*/

.product-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-left: 0;
    margin-right: 0;
}

.product-section .card {
    border-radius: 20px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: auto;
    padding: 0.5rem;
}

.product-section .card-body {
    padding: 0.5rem;
}

.product-section .card-title {
    color: var(--primary-color);
    font-weight: var(--font-weight-bold);
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
}

.product-card-text {
    font-size: 0.65rem;
    line-height: 1.2;
    color: var(--text-secondary-color);
    margin-bottom: 0.3rem;
}

.product-section .btn-primary {
    background: var(--primary-color);
    border-radius: var(--border-radius-large);
    border: none;
    font-weight: var(--font-weight-bold);
    font-size: 0.75rem;
    padding: 0.4rem 0.6rem;
}

.product-section .btn-primary:hover {
    background: var(--tertiary-color);
}

.product-section .card-img-top {
    width: 100%;
    height: 160px;
    object-fit: contain;
    border-top-left-radius: var(--border-radius-medium);
    border-top-right-radius: var(--border-radius-medium);
    background-color: #fff;
}

.product-row {
    display: flex;
    flex-wrap: wrap;
    gap: 24px 0;
    justify-content: flex-start;
}

.product-row>.col-md-3 {
    flex: 0 0 25%;
    max-width: 25%;
    padding-left: 12px;
    padding-right: 12px;
    box-sizing: border-box;
}

/*---------------------------------------
PRODUCT DETAILS
-----------------------------------------*/

.drawer {
    position: fixed;
    top: 0;
    right: -600px;
    width: 600px;
    height: 100%;
    background: #fff;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.2);
    transition: right 0.3s ease;
    padding: 20px;
    z-index: 1000;
    overflow-y: auto;
}

.drawer.open {
    right: 0;
}

#drawerContent {
    font-family: 'Inter', sans-serif;
    color: #333;
}

#drawerContent h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--primary-color);

}

#drawerContent img {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 1rem;
}

#drawerContent p {
    margin-bottom: 0.75rem;
    line-height: 1.5;
    font-size: 0.95rem;
}

#drawerContent p strong {
    color: #555;
    font-weight: 600;
}

#drawerContent p:last-child {
    margin-bottom: 0;
}

#closeDrawer {
    float: right;
    font-size: 0.9rem;
    padding: 6px 12px;
    border-radius: 6px;
}

.close-button {
    position: absolute;
    top: 16px;
    right: 16px;
    background-color: #ff4d4f;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    color: white;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-button:hover {
    background-color: #d9363e;
    transform: scale(1.1);
}

#page-loader {
    display: none;
    text-align: center;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
}

.brand-slider-section {
    overflow: hidden;
    width: 100%;
    position: relative;
    padding: 40px 0;
}

.brand-slider {
    display: flex;
    gap: 40px;
    overflow-x: auto;
    scroll-behavior: auto;
    white-space: nowrap;
    width: 100%;
    cursor: grab;
    user-select: none;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
}

.brand-slider.dragging {
    cursor: grabbing;
}

.brand-slider::-webkit-scrollbar {
    display: none;
}

.brand-slider:before {
    content: "";
    display: none;
}

.brand-slider:hover {
    animation-play-state: paused;
}

.brand-slider img {
    max-height: 80px;
    width: auto;
    filter: grayscale(0.2) contrast(1.1);
    transition: filter 0.3s, transform 0.3s;
    flex-shrink: 0;
    user-select: none;
}

.brand-slider img:hover {
    filter: grayscale(0);
    transform: scale(1.15);
}

.drawer-product-img {
    max-width: 220px;
    max-height: 220px;
    width: auto;
    height: auto;
    display: block;
    margin: 0 auto 16px auto;
}

@media (max-width: 576px) {
    .product-section .card {
        max-width: 98vw;
        min-width: 280px;
        padding: 0.6rem 1.2rem;
    }
    .product-section .card-title {
        font-size: 1.22rem !important;
    }
    .product-section .card-img-top {
        max-width: 120px;
        max-height: 120px;
    }
}

/*---------------------------------------
PRODUCT
-----------------------------------------*/
@media (max-width: 768px) {
    .drawer {
        width: 100%;
        max-width: 100%;
        right: -100%;
        padding: 12px;
        border-radius: 0;
    }
    .drawer.open {
        right: 0;
    }
    #drawerContent img {
        max-width: 90vw;
        max-height: 50vh;
        object-fit: contain;
        width: auto;
        height: auto;
        display: block;
        margin: 0 auto 1rem auto;
    }
}

@media (max-width: 480px) {
    .drawer {
        width: 100%;
        max-width: 100%;
        right: -100%;
        padding: 8px;
    }
    #drawerContent h2 {
        font-size: 1.1rem;
    }
    #drawerContent img {
        max-width: 98vw;
        max-height: 40vh;
        object-fit: contain;
        width: auto;
        height: auto;
        display: block;
        margin: 0 auto 1rem auto;
    }
}