/* Color Palette */
:root {
    --primary-light-blue: #ADD8E6;
    --primary-gold: #FFD700;
    --primary-green: #32CD32;
    --primary-black: #000000;
}
/* Basic reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.alert {
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid transparent;
    border-radius: 4px;
}
.alert-success {
    color: #3c763d;
    background-color: #dff0d8;
    border-color: #d6e9c6;
}
.alert-danger {
    color: #a94442;
    background-color: #f2dede;
    border-color: #ebccd1;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    color: #333;
    height: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
}

/* Dark Mode */
body.dark-mode {
    background-color: #121212;
    color: #ffffff;
}
body.dark-mode .book-card {
    background-color: #1e1e1e;
    color: white;
}
body.dark-mode .book-card:hover{
    transform: scale(1.03);
    margin-bottom: 55px;
    margin-top: 30Px;
}
/* Toggle Switch Styling */
.dark-mode-toggle-section {
    text-align: center; /* Center it horizontally in the section */
    margin: 20px 0; /* Add some margin for spacing */
}
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.switch input {
    display: none;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #2196F3;
    
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.switch-dark {
    position: relative;
    display: inline-block;
    
    padding-top: 0Px;
    padding-bottom: 0px;
    width: 60%;
    top: 25%;
    font-size: small;
}

/* Main content container */
main {
    flex: 1; /* Take up available space */
    padding: 0px; /* Optional: To give some padding to the content */
    margin-bottom: 100%;
}
/* Header Styles */
header {
    background-color: var(--primary-black);
    color: var(--primary-light-blue);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
}

header .logo h1 {
    font-size: 24px;
    color: var(--primary-gold);
}


header nav ul {
    display: flex;
    list-style: none;
    
}

header nav ul li {
    margin-right: 20px;
    
}

header nav ul li a {
    color: var(--primary-gold);
    text-decoration: none;
}
header nav ul li a:hover {
    color: var(--primary-light-blue);
    text-decoration: none;
}
header nav ul h4 a {
    color: var(--primary-light-blue);
    text-decoration: none;
}
header nav ul h4 a:hover {
    color: var(--primary-gold);
    text-decoration: underline;
}
.highlight-store {
    color: var(--primary-light-blue); /* Apply light blue color to 'store' */
}
.highlight-store2 {
    color: var(--primary-green); /* Apply light blue color to 'store' */
}
.highlight-store3 {
    color: var(--primary-gold); /* Apply light blue color to 'store' */
}
.highlight-store22 {
    color: var(--primary-green); /* Apply light blue color to 'store' */
}
.highlight-store33 {
    color: var(--primary-gold); /* Apply light blue color to 'store' */
}

/* User Profile Icon */
.profile-container {
    position: relative;
    display: inline-block;
    cursor: pointer;
    
}

.profile-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    object-fit: cover;
    border: 2px solid #ddd;
}

/* Dropdown Menu */
.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    background: white;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    width: 200px;
    padding: 10px;
    z-index: 1000;
}

.dropdown-menu p {
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--primary-gold);
}

.dropdown-menu a {
    display: block;
    text-decoration: none;
    padding: 8px 10px;
    color: var(--primary-black);
    border-radius: 5px;
    transition: background 0.3s ease-in-out;
}

.dropdown-menu a:hover {
    background: var(--primary-gold);
}

/* Show dropdown when clicked */
.show-dropdown {
    display: block;
}


.search-bar input {
    padding: 5px;
    border: 2px solid var(--primary-gold); /* Adding a subtle border for distinction */
    border-radius: 5px; /* Rounded corners */
    width: 70%;
    margin-left: 70px;
    margin-right: 15px;
    margin-top: 15px;
    margin-bottom: 5px;
}

.search-bar button {
    padding: 5px;
    background-color: var(--primary-green);
    color: var(--primary-black);
    width: fit-content;
    border-radius: 8px; /* Rounded corners */
}
.search-bar button:hover {
   
    background-color: var(--primary-light-blue);
    color: var(--primary-black);
    
}
#search-results {
    margin-top: 8px;
    margin-left: 75px
}

.search-result-link {
    color: #007bff;
    text-decoration: none;
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
    margin-top: 2px;
}

.search-result-link:hover {
    text-decoration: underline;
    cursor: pointer;
    
}
.error-message {
    color: red;   
}


/* Ensure the book details are collapsed by default */
.book-details {
    display: none;
    transition: max-height 0.3s ease-out;
}

/* To handle smooth opening and closing */
.collapse {
    max-height: 0;
    overflow: hidden;
    display: none;
    
}

.show {
    display: block;
   
}
.hide {
    display: none;
    
}
.expand {
    display: block;
}
.categorybooks {
   
    background-image: url('/static/images/bs1.PNG'); /* Set your image URL here */ 
    font-weight: bold;
    font-size: 1.5rem;
    background-size: 100% 100%; /* Ensures the image covers the entire section */
    background-repeat: no-repeat; /* Prevents the image from repeating */
    background-position: center; /* Centers the background image */
    margin-bottom: auto;
    margin-top: 10px;
    color: var(--primary-gold);
    width: 100%;
    margin-top: 25px;
    padding: 10px; /* Optional: Adds padding for better readability */
    
}
.categorybooks h1{
    font-weight: bold;
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 15px;
    color: var(--primary-green);
    width: fit-content;
    margin-top: 10px;
    padding: 10px; /* Optional: Adds padding for better readability */
    background-color: var(--primary-black);
    margin-left: 40%;
    border-radius: 20px;
    border: 2px solid var(--primary-green) ;
    
}

.categoryfashion {
    font-weight: bold;
    font-size: 1.5rem;
    background-image: url('/static/images/fashion_bg.jpg'); /* Set your image URL here */
    background-size: 100% 100%; /* Ensures the image covers the entire section */
    background-repeat: no-repeat; /* Prevents the image from repeating */
    background-position: center; /* Centers the background image */
    margin-bottom: auto;
    margin-top: 10px;
    color: var(--primary-gold);
    width: 100%;
    margin-top: 25px;
    padding: 10px; /* Optional: Adds padding for better readability */
}

.categoryfashion h1 {
    font-weight: bold;
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 15px;
    color: var(--primary-light-blue);
    width: fit-content;
    margin-top: 10px;
    padding: 10px; /* Optional: Adds padding for better readability */
    background-color: var(--primary-black);
    margin-left: 40%;
    border-radius: 20px;
    border: 2px solid var(--primary-light-blue);
}

.categorywareset {
    font-weight: bold;
    font-size: 1.5rem;
    background-image: url('/static/images/wareset_bg.PNG'); /* Set your image URL here */
    background-size: 100% 100%; /* Ensures the image covers the entire section */
    background-repeat: no-repeat; /* Prevents the image from repeating */
    background-position: center; /* Centers the background image */
    margin-bottom: auto;
    margin-top: 10px;
    color: var(--primary-gold);
    width: 100%;
    margin-top: 25px;
    padding: 10px; /* Optional: Adds padding for better readability */
}

.categorywareset h1 {
    font-weight: bold;
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 15px;
    color: var(--primary-gold);
    width: fit-content;
    margin-top: 10px;
    padding: 10px; /* Optional: Adds padding for better readability */
    background-color: var(--primary-black);
    margin-left: 38%;
    border-radius: 20px;
    border: 2px solid var(--primary-gold);
}

.category-section {
    margin-bottom: 20px;
}

.category-title {
    font-weight: bold;
    font-size: 1.2rem;
    cursor: pointer;
    margin-bottom: 20px;
    color: var(--primary-black);
    padding: 20px;
    text-align: center;
    border-radius: 10px;
    background-color: #f4b41a; /* Gold color */
}

.category-title:hover {
    text-decoration: underline;
    background-color: var(--primary-gold);
    transform: translateY(-10px); /* Move up slightly */
}

.item-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.card {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    width: 250px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.custom-carousel {
    position: relative;
    width: 100%;
    max-width: 300px;
    margin: auto;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
}

.prev-btn { left: 10px; }
.next-btn { right: 10px; }


.card-content {
    padding: 15px;
    text-align: center;
}

.card-content h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--primary-black);
}

.card-content p {
    font-size: 1rem;
    color: #555;
    margin-bottom: 10px;
}

.item-price {
    font-weight: bold;
    color: #4f19bc; /* Blue color for price */
    font-size: 1.1rem;
}

.item-quantity {
    font-weight: bold;
    color: #dc3545; /* Red color for quantity */
    font-size: 1.1rem;
}

.btn {
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

.btn-success {
    background-color: #28a745;
    color: white;
}

.btn-success:hover {
    background-color: #218838;
}

.btn-warning {
    background-color: #ffc107;
    color: black;
}

.btn-warning:hover {
    background-color: #e0a800;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.mens-fashion-bg {
    background-image: url('/static/images/tie-clip.jpg'); /* Set your image URL here */
    background-size: 100% 100%; /* Ensures the image covers the entire section */
    background-repeat: no-repeat; /* Prevents the image from repeating */
    background-position: center; /* Centers the background image */
    padding: 0px; /* Add padding for better readability */
    border-radius: 10px; /* Optional: Adds rounded corners */
}

.womens-fashion-bg {
    background-image: url('/static/images/womens-fashion-bg.png'); /* Set your image URL here */
    background-size: 100% 100%; /* Ensures the image covers the entire section */
    background-repeat: no-repeat; /* Prevents the image from repeating */
    background-position: center; /* Centers the background image */
    padding: 0px;
    border-radius: 10px;
}

.accessories-bg {
    background-image: url('/static/images/accesories.jpg'); /* Set your image URL here */
    background-size: 100% 100%; /* Ensures the image covers the entire section */
    background-repeat: no-repeat; /* Prevents the image from repeating */
    background-position: center; /* Centers the background image */
    padding: 0px;
    border-radius: 10px;
}



/* Adjust different category banners with different colors */
#financial-section .category-title {
    background-color: #33a1fd; /* Light blue for Financial Literacy */
    color: hsl(252, 71%, 99%); 
    border: 2px solid hsl(252, 71%, 99%); 
    margin-left: 10px;
    margin-right: 10px;
    margin-bottom: 20px;
}

#data-science-section .category-title {
    background-color: #28a745; /* Green for Data Science */
    border: 2px solid  #000;
    margin-left: 10px;
    margin-right: 10px;
    color: #000;
}

#forex-section .category-title {
    background-color: #333; /* Black for Forex Trading */
    color: #f4b41a; /* Light contrast */
    border: 2px solid var(--primary-light-blue);
    margin-left: 10px;
    margin-right: 10px;
    
    margin-bottom: auto;
}

#telecom-section .category-title {
    background-color: #980957; /* */
    color: #dde412; /* Light contrast */
    border: 2px solid #dde412;
    margin-left: 10px;
    margin-right: 10px;
   
}

#mens-fashion-section .category-title {
    background-color: #0d99df4e; /* */
    color: hsl(252, 71%, 99%); 
    border: 2px solid hsl(252, 71%, 99%); 
    margin-left: 10px;
    margin-right: 10px;
   
}

#womens-fashion-section .category-title {
    background-color: #f52bd047; /* */
    color: hsl(252, 71%, 99%);
    border: 2px solid hsl(252, 71%, 99%);
    margin-left: 10px;
    margin-right: 10px;
   
}
#accessories-section .category-title {
    background-color: #edf10a76; /* */
    color: var(--primary-black);
    border: 2px solid  var(--primary-black); 
    margin-left: 10px;
    margin-right: 10px;
   
}

#tableware-section .category-title {
    background-color: #322ad49d; /* */
    color: hsl(220, 60%, 99%); 
    border: 2px solid hsl(252, 71%, 99%); 
    margin-left: 10px;
    margin-right: 10px;
   
}


#dinnerware-section .category-title {
    background-color: #ece10ec7; /* */
    color: var(--primary-black);
    border: 2px solid var(--primary-black); 
    margin-left: 10px;
    margin-right: 10px;
   
}
#drinkware-section .category-title {
    background-color: hsla(250, 13%, 91%, 0.778); 
    color: hsl(240, 85%, 3%); 
    border: 2px solid hsl(240, 85%, 3%); 
    margin-left: 10px;
    margin-right: 10px;
   
}
#kitchenware-section .category-title {
    background-color: #638a09b7; /* */
    color: hsl(252, 71%, 99%); 
    border: 2px solid hsl(252, 71%, 99%); 
    margin-left: 10px;
    margin-right: 10px;
   
}

.book-details{
    margin-top: 10px;
    margin-bottom: 10px;
}
.book-details h3 {
    font-size: 20px;
}

/* Spacing for book information (Price, Downloads, Access UI) */
.book-info {
    margin: 5px 0;
    font-size: 1rem;
    color:#007bff;
    margin-top: 10px;
    font-weight: bold;
    
}

.words {
    margin-top: 10px;
    margin-bottom: 10px;
}
.words p {
    margin-top: 10px;
    margin-bottom: 10px;
}

/* Featured book for special effect */
.featured-book {
    background-color: #ffe484; /* Soft gold for featured books */
    border: 2px solid #ffba08; /* Stronger border color */
    transform: scale(1.02); /* Slightly larger by default */
}

.featured-book:hover {
    transform: scale(1.04) translateY(-10px); /* Grow a bit more on hover */
    background-color: #fff4e1; /* Soft background shift on hover */
    
}
/* Container holding all the book cards */
.book-container {
    display: flex;
    flex-wrap: wrap; /* Ensures books wrap to the next row if they overflow */
    justify-content: center; /* Centers the books in the available space */
    gap: 20px; /* Add some spacing between the book cards */
    margin: 0 auto; /* Center the container itself */
    max-width: 1000px; /* Adjust this width based on your layout */
    
}

.book-card {
    position: relative;
    width: 250px;
    margin: 20px;
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 8px;
    overflow: visible;
    padding: 10px;
    color: var(--primary-black);
    background-color: #f9f9f9;
    transition: background-color 0.5s, color 0.5s;
    transition: transform 0.3s;
    font-size: medium;
    font-weight:500;
    height: fit-content;
}

.book-card:hover {
    transform: scale(1.03);
    margin-bottom: 55px;
    margin-top: 30Px;
}

.book-card img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Container holding all the book cards */
.item-container {
    display: flex;
    flex-wrap: wrap; /* Ensures books wrap to the next row if they overflow */
    justify-content: center; /* Centers the books in the available space */
    gap: 20px; /* Add some spacing between the book cards */
    margin: 0 auto; /* Center the container itself */
    max-width: 1000px; /* Adjust this width based on your layout */
    
}


/* Adjusted Tooltip Styling */
.tooltip {
    display: none; /* Initially hidden */
    position: absolute;
    top: 200%; /* Position the tooltip below the book-card */
    left: 50%; /* Center horizontally */
    transform: translateX(-50%); /* Ensure it's centered horizontally */
    background-color: rgba(0, 0, 0, 0.9); /* Dark background for better readability */
    color: white;
    padding: 0px;
    border-radius: 5px;
    z-index: 10;
    width: max-content;
    max-width: 250px; /* Adjust to ensure tooltip fits */
    white-space: normal; /* Allow text wrapping */
    font-size: 0.8rem; /* Adjust for readability */
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1); /* Add a shadow for better visibility */
}

.book-card:hover .tooltip {
    display: block; /* Show on hover */
    margin-top: 30px;
    
}

.tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: var(--primary-black) transparent transparent transparent;
}

/* Fashions section */
/* Fashion Card */
.fashion-card {
    width: 200px;
    background: var(--primary-white);
    padding: 10px;
    border-radius: 5px;
    text-align: center;
    position: relative;
}

.fashion-card img {
    width: 100%;
    height: auto;
    border-radius: 5px;
}

/* Edit and Delete Buttons */
.action-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}

.edit-btn, .delete-btn {
    padding: 5px 10px;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    font-size: 0.9em;
}

.edit-btn { background-color: #007bff; color: white; }
.delete-btn { background-color: #dc3545; color: white; }

/* Modal Styling */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 20px;
    border-radius: 5px;
    width: 300px;
    text-align: center;
}

.close {
    float: right;
    font-size: 20px;
    cursor: pointer;
}


/* Footer */
footer {
    background-color: var(--primary-black);
    color: var(--primary-light-blue);
    text-align: center;
    padding: 10px 0;
    width: 100%;
    position: relative;
  
  
}

footer .social-links a {
    margin: 0 10px;
    color: #fff;
    text-decoration: none;
}

/* Mobile View */
@media (max-width: 768px) {
    header nav ul {
        flex-direction: column;
        align-items: center;
    }
    header nav ul li {
        margin-right: 0px;       
    }
    .highlight-store {
        color: var(--primary-light-blue); /* Apply light blue color to 'store' */
    }
    .highlight-store2 {
        color: var(--primary-gold); /* Apply light blue color to 'store' */
    }
    .highlight-store3 {
        color: var(--primary-green); /* Apply light blue color to 'store' */
    }
    .switch {
        
        width: 40px;
        height: 20px;
        margin-right: 10px;
        margin-left: 10px;
    }   
    .slider:before {  
        height: 16px;
        width: 16px;
        left: 2px;
        bottom: 2px;  
    }
    .switch-dark {  
        padding-top: 0Px;
        padding-bottom: 0px;
        width: 40px;
        top: 25%;
        font-size: smaller;
        margin-left: -4px;
    }
    /* Main content container */
    main {
       flex: 1; /* Take up available space */
       padding: 0px; /* Optional: To give some padding to the content */
    }

  
   .search-bar input {      
         width: 75%;
         margin-left: 15px;
         margin-right: 2px;
    }
    .search-bar button {
        width: auto;
    }
    #search-results {
        margin-top: 8px;
        margin-left: 20px
    }
    .categorybooks h1{     
        margin-left: 20%;     
    }
    .categoryfashion h1{     
        margin-left: 20%;     
    }
    .categorywareset h1{     
        margin-left: 15%;     
    }
    .category-title {
        font-size: 1.2rem;
    }
    
   
    .book-card {
        position: relative;
        width: 100%;
        margin: auto;
        padding: 10px;
        margin-top: 5px;
        margin-bottom: 20px;
        font-size: medium;
        font-weight:500;
    }
    .book-card:hover {
        margin-bottom: 30px;
    }
    .book-card:hover .tooltip {
        margin-top: 30px;
    }
    body.dark-mode .book-card {
        position: relative;
        width: 100%;
        margin: auto;
        padding: 10px;
        margin-top: 5px;
        margin-bottom: 20px;
        font-size: medium;
        font-weight:500;
    }
    /* Adjust different category banners with different colors */
#financial-section .category-title {
    margin-left: auto;
    margin-right: auto;
}

#data-science-section .category-title {
    margin-left: auto;
    margin-right: auto;
}

#forex-section .category-title {
   margin-left: auto;
   margin-right: auto;
}

#telecom-section .category-title {
    
    margin-left: auto;
    margin-right: auto;
}

}
