/* Colors*/
:root {
    --body-font-family: 'Poppins', sans-serif;
    --theme-default: #8C593B;
    --secondary: #222;
    --theme-default-2: #267D92;
    --background-color: #f7f7f7;
}

/* Fonts */
body {
    font-family: 'Roboto', sans-serif;
}

.main-font {
    font-family: var(--body-font-family);
}

/* Navbar */
.navbar-brand img {
    height: 55px;
}

.navbar-nav .nav-link {
    padding: 0.75rem 1rem;
    font-weight: 500;
    color: #555;
}

.navbar-nav .nav-link:hover {
    color: #333;
}

/* Active Navbar Link */
.navbar .nav-link.active-link {
    color: var(--theme-default) !important;
    position: relative;
    font-weight: 600;
}

.navbar .nav-link.active-link::after {
    content: "";
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--theme-default) !important;
    border-radius: 2px;
}

/* Active state for navbar icons */
.navbar-icons a.active-icon {
    color: var(--theme-default) !important;
}

.navbar-icons a.active-icon i,
.navbar-icons a.active-icon .icon-label {
    color: var(--theme-default) !important;
    transform: scale(1.05);
    transition: 0.3s;
}

/* Dropdown hover for desktop */
@media (min-width: 992px) {
    .navbar-nav .dropdown:hover .dropdown-menu {
        display: block;
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        transition: all 0.3s ease-in-out;
    }

    .navbar-nav .dropdown .dropdown-toggle::after {
        transition: transform 0.3s ease;
    }

    .navbar-nav .dropdown:hover .dropdown-toggle::after {
        transform: rotate(-180deg);
    }
}

.navbar-search {
    position: relative;
    width: 250px;
}

.navbar-search input {
    width: 100%;
    padding-right: 2.5rem;
    color: #555;
}

.navbar-search input::placeholder {
    color: #888;
}

.navbar-search button {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    border: none;
    background: transparent;
    padding: 0 0.75rem;
    color: #555;
    cursor: pointer;
}

/* Dropdown نتائج البحث */
.search-results {
    position: absolute;
    top: 100%;
    /* تحت input مباشرة */
    left: 0;
    right: 0;
    background-color: #fff;
    border: 1px solid #ddd;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.search-results div {
    padding: 8px 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.search-results div:hover {
    background-color: #f1f1f1;
}

.navbar-icons {
    display: flex;
    gap: 1.5rem;
}

.navbar-icons a {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.85rem;
    color: #555;
    text-decoration: none;
    position: relative;
}

.navbar-icons a i {
    font-size: 1.5rem;
}

.navbar-icons a span.badge {
    font-size: 0.65rem;
    background-color: var(--theme-default);
}

.navbar-icons a span.icon-label {
    margin-top: 0.25rem;
}

@media (max-width: 991px) {
    .navbar-search {
        width: 100%;
        margin-bottom: 0.75rem;
    }

    .navbar-icons {
        margin-top: 0.5rem;
    }
}

/* Footer */
footer {
    background-color: #f8f9fa;
}

.footer-title {
    font-weight: 600;
    margin-bottom: 15px;
}

.footer-menu a {
    text-decoration: none;
    color: #555;
    display: block;
    margin-bottom: 8px;
    transition: 0.3s;
}

.footer-menu a:hover {
    color: #000;
    padding-left: 5px;
}

.footer-logo img {
    height: 50px;
}

.newsletter {
    background-color: var(--secondary);
    color: #fff;
    padding: 1.5rem 0;
}


/* banners section */
.btn-primary {
    color: #fff;
    background-color: var(--theme-default) !important;
    border-color: var(--theme-default) !important;
    font-weight: 600;
    transition: all 0.4s ease;
}

.carousel-caption .btn-primary {
    margin-left: 0.5rem;
}

.btn-primary:hover {
    background-color: var(--background-color) !important;
    border-color: var(--theme-default) !important;
    color: var(--theme-default) !important;
}

.carousel-control-next-icon2,
.carousel-control-prev-icon2 {
    background-color: white;
    border: 1px solid var(--secondary);
    color: var(--secondary);
    transition: all 0.3s;
    cursor: pointer;
}

.carousel-control-next-icon2:hover,
.carousel-control-prev-icon2:hover {
    background-color: var(--theme-default);
    color: white;
}


/* sales section */
.sales-card {
    background-color: #EBEBEB;
}

.img-fluid {
    transition: all 0.3s;
    width: 100%;
    height: auto;
}

.img-fluid:hover {
    transform: scale(1.05) rotate(2deg);
}

/* category section */
.card-img-top {
    border: 1px solid lightgrey;
    border-radius: 50%;
}

.bottom-border {
    border-bottom: 2px solid orange;
}

.category-card {
    cursor: pointer;
}

.img-wrapper {
    position: relative;
    width: 90px;
    height: 90px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.img-wrapper img {
    position: relative;
    z-index: 1;
    width: 100%;
    object-fit: contain;
}

.img-wrapper::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background-color: transparent;
    border-radius: 50%;
    z-index: 2;
    transform: translate(-80%, -80%) scale(0.3);
    transition: transform 1s;
}

.category-card:hover .img-wrapper::before {
    background-color: rgba(242, 242, 242, 0.7);
    transform: translate(-50%, -50%) scale(1);
}

/* product card */
.btn-secondary {
    color: #fff;
    background-color: var(--theme-default-2) !important;
    border-color: var(--theme-default-2) !important;
    font-weight: 600;
    transition: all 0.4s ease;
}

.btn-secondary:hover {
    background-color: var(--background-color) !important;
    border-color: var(--theme-default-2) !important;
    color: var(--theme-default-2) !important;
}

.product-card-img {
    position: relative;
}

.product-card-img>span {
    display: none;
    position: absolute;
    z-index: 2;
}

.product-card-img>span.bg-danger {
    top: 20px;
    left: 20px;
    border-radius: 5px;
}

.product-card-img>span.shadow {
    top: 20px;
    right: 20px;
    border-radius: 5px;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.5s;
}

.product-card-img>span.shadow:hover {
    background-color: var(--theme-default);
    color: white;
}

.checked {
    color: orange;
}

.product-card-img>img {
    width: 100%;
    height: auto;
    z-index: 1;
}

.product-card .card-title {
    cursor: pointer;
    transition: color 0.3s;
}

.product-card .card-title:hover {
    color: var(--theme-default);
}

.product-section-title {
    font-weight: bold;
    font-family: var(--body-font-family);
    font-size: 1.2rem;
    cursor: pointer;
}

.product-section-title:first-child {
    color: var(--theme-default);
}

.product-section-title:hover {
    color: var(--theme-default);
}

/* mobile styles */
@media (max-width: 767px) {
    .carousel-caption {
        height: auto !important;
        padding: 1rem;
        left: 0%;
        top: 4%;
    }

    .fs-6 {
        font-size: 0.5rem !important;
    }

    .fs-2 {
        font-size: 0.75rem !important;
    }

    .btn {
        padding: 0.50rem 0.75rem !important;
        font-size: 0.75rem;
    }

    .card-title {
        font-size: 0.75rem !important;
    }
}