/* Global Styles for NSCB Single Book Website */

:root {
    /* Color Palette */
    --primary-color: #6a8d73;
    --secondary-color: #f4a259;
    --accent-color: #bc4b51;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    
    /* Book-specific colors */
    --book-color: #6a8d73;
    
    /* Fonts */
    --main-font: 'Poppins', sans-serif;
    --accent-font: 'Quicksand', sans-serif;
}

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

body {
    font-family: var(--main-font);
    line-height: 1.6;
    color: var(--dark-color);
    background-color: #f9f9f9;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--accent-font);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
}

h2 {
    font-size: 2rem;
    color: var(--primary-color);
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 30px;
    font-family: var(--accent-font);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #5a7b63;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: #e39249;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Header */
header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo img {
    height: 50px;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    color: var(--dark-color);
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

nav ul li a:hover {
    background-color: var(--light-color);
    color: var(--primary-color);
}

/* Currency Selector */
.currency-selector {
    margin-left: 20px;
}

.currency-selector select {
    padding: 5px 10px;
    border-radius: 20px;
    border: 1px solid #ddd;
    background-color: white;
    font-family: var(--main-font);
    cursor: pointer;
}

/* Cart */
.cart-container {
    position: relative;
}

.cart-toggle {
    background-color: var(--light-color);
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.cart-toggle:hover {
    background-color: #e9ecef;
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--accent-color);
    color: white;
    font-size: 0.7rem;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.cart-dropdown {
    position: absolute;
    top: 45px;
    right: 0;
    width: 300px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 15px;
    display: none;
    z-index: 1000;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.close-cart {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #aaa;
}

.close-cart:hover {
    color: var(--dark-color);
}

.cart-items {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 15px;
}

.cart-item {
    display: flex;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.cart-item-image {
    width: 60px;
    height: 60px;
    border-radius: 5px;
    overflow: hidden;
    margin-right: 10px;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-details {
    flex-grow: 1;
}

.cart-item-title {
    font-weight: 600;
    margin-bottom: 5px;
}

.cart-item-format,
.cart-item-language {
    font-size: 0.8rem;
    color: #666;
}

.cart-item-price {
    font-weight: 600;
    color: var(--primary-color);
}

.cart-item-remove {
    background: none;
    border: none;
    color: #ccc;
    cursor: pointer;
    transition: color 0.3s ease;
}

.cart-item-remove:hover {
    color: var(--accent-color);
}

.cart-footer {
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    margin-bottom: 15px;
}

.cart-actions {
    display: flex;
    justify-content: space-between;
}

/* Notification */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1100;
}

.notification {
    padding: 15px 20px;
    margin-bottom: 10px;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    animation: slideIn 0.3s ease forwards;
    max-width: 300px;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification.success {
    background-color: #d4edda;
    color: #155724;
}

.notification.error {
    background-color: #f8d7da;
    color: #721c24;
}

.notification.info {
    background-color: #d1ecf1;
    color: #0c5460;
}

.notification-icon {
    margin-right: 10px;
    font-size: 1.2rem;
}

.notification-message {
    flex-grow: 1;
}

.notification-close {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.notification-close:hover {
    opacity: 1;
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 60px 0 30px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.footer-section {
    flex: 1;
    min-width: 200px;
    margin-bottom: 30px;
}

.footer-section h3 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #adb5bd;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: white;
}

/* Special Offer Banner */
.special-offer-banner {
    position: absolute;
    top: 20px;
    right: -30px;
    background-color: var(--accent-color);
    color: white;
    padding: 5px 30px;
    transform: rotate(45deg);
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

/* Section Titles */
.section-title {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--secondary-color);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 20px;
    border-radius: 10px;
    width: 80%;
    max-width: 800px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
}

.close-modal:hover {
    color: var(--dark-color);
}

.modal-body {
    margin-top: 20px;
}

.modal-body h3 {
    margin-top: 20px;
    color: var(--primary-color);
}

/* Responsive Styles */
@media (max-width: 992px) {
    .footer-content {
        flex-direction: column;
    }
    
    .footer-section {
        margin-bottom: 30px;
    }
}

@media (max-width: 768px) {
    header .container {
        flex-wrap: wrap;
    }
    
    nav {
        order: 3;
        width: 100%;
        margin-top: 15px;
    }
    
    nav ul {
        justify-content: center;
    }
    
    nav ul li {
        margin: 0 10px;
    }
    
    .cart-container {
        order: 2;
    }
    
    .currency-selector {
        order: 1;
        margin-left: 0;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
}

@media (max-width: 576px) {
    nav ul {
        flex-wrap: wrap;
    }
    
    nav ul li {
        margin: 5px;
    }
    
    .btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
}
