body {
    font-family: "Source Sans 3",'Segoe UI' ,sans-serif ,Tahoma, Geneva;
    font-optical-sizing: auto;
    font-style: normal;
    background: #fff;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Header Styles */
.custom-header {
    padding: 0.6rem 1.5rem;
    border-bottom: 1px solid #ddd;
    background-color: #fff;
    position: sticky;
    top: 0;
    z-index: 1030;
}

.custom-header .logo {
    font-weight: 700;
    font-size: 1.8rem;
    color: #ff5400;
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
}

.logo img {
    height: 30px;
}

.nav-dropdown-toggle::after {
    margin-left: 0.25rem;
    border-top: 0.3em solid;
    border-right: 0.3em solid transparent;
    border-left: 0.3em solid transparent;
    content: "";
    display: inline-block;
}

.nav-link-custom {
    font-weight: 500;
    color: #333;
    cursor: pointer;
    padding: 0.5rem 1rem;
}

.nav-link-custom:hover,
.nav-link-custom:focus {
    color: #111111;
    text-decoration: none;
}

.custom-megamenu {
    width: 800px;
    border: none !important;
    box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px !important;
    border-radius: 10px !important;
}

.dropdown-header {
    font-size: 1.4vw;
}

.btn-premium {
    background-color: #e1ddee;
    color: #3b19a9 !important;
    font-weight: 700 !important;
    border-radius: 50px !important;
    padding: 0.575rem 1.35rem !important;
    border: none;
    display: flex !important;
    align-items: center !important;
    gap: 0.4rem !important;
    transition: background-color 0.3s ease !important;
    font-size: 0.9rem !important;
    white-space: nowrap;
}

.btn-premium:hover,
.btn-premium:focus {
    background-color: #c9b8ff !important;
    color: #3b1ca3 !important;
    text-decoration: none !important;
}

/* Search input styles */
.search-container {
    position: relative !important;
    width: 250px !important;
    transition: all 0.3s ease !important;
}

.search-container.expanded {
    width: 100% !important;
}

.form-control-search {
    border-radius: 50px !important;
    padding-left: 2.5rem !important;
    padding-right: 1rem !important;
    width: 100% !important;
    transition: all 0.3s ease !important;
    outline: none !important;
}

.form-control[type="search"]:focus {
    border: 2px solid rgb(26, 172, 106) !important;
    outline: 0 !important;
    box-shadow: none !important;
}

.search-btn {
    position: absolute !important;
    left: 12px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    color: #666 !important;
    z-index: 2 !important;
}

.search-icon-btn {
    display: none;
    border: none;
    background: transparent;
    color: #333;
    font-size: 1.2rem;
    padding: 0.5rem;
}

/* Mobile menu styles */
.mobile-menu-container {
    display: none;
}

.mobile-menu {
    position: fixed;
    /* top: 60px; */
    left: 0;
    width: 100%;
    background: white;
    padding: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1020;
}

.mobile-menu .dropdown-item {
    padding: 0.5rem 1rem;
}

.dropdown-item:hover {
    font-weight: 600;
    background-color: transparent;
    transition: ease-in-out;
}
.dropdown-item:active{
    background-color: transparent !important;
    color: #000;
}

.mobile-menu .dropdown-toggle::after {
    display: none;
}
/* Dropdown positioning */
.write-dropdown-container {
    position: relative;
}

.write-dropdown-menu {
    position: absolute;
    left: 0;
}

.dropdown-menu{
    border: none !important;
    box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px !important;
    border-radius: 10px !important;

}
/* profile dropdown */

.pd{
    /* right: 1% !important; */
    inset: 2px -52px auto auto !important;
}
.profile-dropdown-container .profile-dropdown-menu {

    top: 0;
    margin-top: 5% !important;
     border: none !important;
    box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px !important;
    border-radius: 10px !important;
}
/* language dropdown */
.dropdown-submenu {
  position: relative;
}

.dropdown-submenu-menu {
  position: absolute;
  top: 10px;
  z-index: -3 !important;
  left: -52% !important;
  border: 0;
  display: none;
}

/* .dropdown-submenu:hover > .dropdown-submenu-menu {
  display: block;
} */

/* Prevent profile dropdown from closing when hovering language menu */
.profile-dropdown-menu:hover {
  display: block;
}
.profile-dropdown-menu .dropdown-item:hover {
    background-color: transparent !important;
}

/* Mobile menu language toggle */
.mobile-language-toggle {
  display: none;
}

@media (max-width: 991.98px) {
  .mobile-language-toggle {
    display: block;
  }

  .mobile-language-options {
    padding-left: 1.5rem;
  }

  .mobile-language-options a {
    display: block;
    padding: 0.5rem 0;
    text-decoration: none;
    color: #333;
  }
}



/* Carousel styles */
section.carousel-section {
    padding: 1.5rem 1rem 3rem;
    width: 95vw;
    margin: 0 auto;
    position: relative;
}

section.carousel-section h2 {
    font-weight: 700;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    color: #111;
}

.book-item {
    text-align: center;
    user-select: none;
    cursor: grab;
    padding: 0 6px;
}

.book-item img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 18px rgb(0 0 0 / 0.12);
    transition: transform 0.2s ease;
}

.book-item img:hover,
.book-item img:focus {
    transform: scale(1.05);
}

.tag-label {
    margin-top: 0.5rem;
    display: inline-block;
    padding: 0.2rem 0.8rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #444;
    background-color: #f7f7f7;
    border-radius: 12px;
    text-transform: lowercase;
    user-select: none;
}

/* Splide carousel navigation */
.splide__arrows {
    position: absolute;
    top: 40%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 1 !important;
}

.splide__arrow {
    pointer-events: auto;
    background: white !important;
    border-radius: 50% !important;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    color: black !important;
    border: none;
    font-size: 1vw;
    transition: all 0.3s ease;
    opacity: 1 !important;
}

.splide__arrow:hover {
    background: #ff00ff !important;
    color: white !important;
}

.splide__arrow--prev {
    left: -20px !important;
}

.splide__arrow--next {
    right: -20px !important;
}

/* Promo Slider Styles */
.promo-splide-slider {
    width: 100vw;
    overflow: hidden;
    position: relative;
    margin: 2rem 0;
}

.promo-splide-slider .splide__track {
    width: 100% !important;
}

.promo-splide-slider .splide__list {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}


.promo-splide-slider .splide__slide {
    display: flex;
    align-items: center;
    height: 400px !important;
    width: 100vw !important;
    justify-content: center;
    box-sizing: border-box;
}

.promo-splide-slider .splide__slide a {
    display: block;
    width: 100%;
    height: 100%;
    text-align: center;
}

.promo-splide-slider .splide__slide img {
    width: 100% !important;
    height: 100%;
    object-fit: cover;
    /* Changed from contain to cover */
    object-position: center;
    max-width: 90%;
}

/* Promo Slider Arrows */
.promo-splide-slider .splide__arrows {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: center;
    z-index: 1;
}

.promo-splide-slider .splide__arrow--prev {
    left: 3vw !important;
}

.promo-splide-slider .splide__arrow--next {
    right: 3vw !important;
}


.genre-carousel-container {
    max-width: 93vw;
    margin: 0 auto;
    height: 150px;
}

.genre-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.genre-title {
    font-weight: 700;
    font-size: 1.3rem;
    color: #111;
    margin: 0;
}

.view-all {
    color: #030303;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Target only the genre carousel */
.genre-splide .splide__list {
    display: flex;
    gap: 8px;
    padding: 4px 0;
}

.genre-splide .splide__slide {
    margin: 0 !important;
    width: auto !important;
}

.genre-splide .genre-link {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    text-decoration: none;
    color: #121212;
    background-color: #F6F6F6;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
    white-space: nowrap;
    gap: 6px;
    margin: 0;
}

.genre-link:hover {
    background-color: #f5f5f5;
}

.genre-img {
    width: 32px;
    height: 32px;
    vertical-align: bottom;
    border-radius: 50%;
    object-fit: contain;
    flex-shrink: 0;
}

/* Footer style */
.footer {
    background-color: white;
    padding: 20px;
    text-align: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 7px;
    margin-bottom: 15px;
}

.footer-link {
    color: #333;
    font-size: 13px;
    text-decoration: none;
    padding: 5px 8px;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.footer-link:hover {
    text-decoration: underline;
}

.bold {
    font-weight: 700;
}

.divider {
    color: #ddd;
    margin: 0 5px;
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.footer-copyright {
    color: #777;
    font-size: 13px;
    margin-left: 10px;
}

/* Responsive tweaks */
@media (max-width: 1199.98px) {
    .custom-header .container {
        max-width: 100%;
    }
}

@media (max-width: 991.98px) {
    .desktop-nav {
        display: none !important;
    }

    .mobile-menu-container {
        display: block;
        order: 3;
    }

    .search-container {
        order: 2;
        margin-left: auto;
        margin-right: 10px;
        width: auto;
    }

    .form-control-search {
        display: block;
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 250px;
        /* z-index: 10; */

    }

    .search-container.expanded .form-control-search {
        display: block;
    }

    .search-icon-btn {
        display: none;
    }

    .search-btn {
        display: block;
    }

    .header-content {
        flex-wrap: wrap;
    }

    .btn-premium {
        display: flex !important;
        order: 2;
        margin-left: auto;
        margin-right: 10px;
    }

    .profile-dropdown-container {
        display: none !important;
    }


}

@media (max-width: 768px) {
    .custom-header {
        padding: 0.6rem 1rem;
    }

    .promo-splide-slider .splide__slide img {
        height: 300px !important;
        max-width: 100% !important;
    }

    .splide__arrow {
        display: none !important;
    }

    .footer-links,
    .footer-bottom {
        gap: 8px;
    }

    .footer-link {
        font-size: 13px;
        padding: 5px 8px;
    }

    .divider {
        display: none;
    }
}

@media (max-width: 575.98px) {
    .search-container {
        /* order: 1;
        margin-left: auto;
        margin-right: 0; */
        display: none;
    }

    .btn-premium {
        order: 2;
        margin-right: 10px;
    }

    .mobile-menu-container {
        order: 3;
    }

    .form-control-search {
        width: 200px;
        right: -10px;
    }

    .promo-splide-slider .splide__slide img {
        max-height: 350px;
        width: 100% !important;
        max-width: 100% !important;
        /* object-fit:  !important; */
    }

    /* footer style */
    .footer {
        padding: 15px 10px;
    }

    .footer-links,
    .footer-bottom {
        gap: 6px;
    }

    .footer-link {
        font-size: 12px;
        padding: 3px 6px;
    }

    .footer-copyright {
        margin-left: 6px;
        font-size: 12px;
    }
}
