/* Global Styles for NPCB Coloring Books */
:root {
    /* Playful color palette */
    --primary-color: #6a4c93;
    --secondary-color: #ff6b6b;
    --accent-color: #4ecdc4;
    --light-color: #f7fff7;
    --dark-color: #292f36;
    --special-offer-color: #ff9f1c;
    
    /* Additional colors for categories */
    --nature-color: #4CAF50;
    --mandala-color: #9C27B0;
    --fantasy-color: #3F51B5;
    --kids-color: #FF5722;
    
    /* Font settings */
    --main-font: 'Nunito', sans-serif;
    --accent-font: 'Indie Flower', cursive;
}

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

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

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

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 30px;
    font-family: var(--main-font);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

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

.btn-primary:hover {
    background-color: #5a3d83;
    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: #e55b5b;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

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

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
}

.logo img {
    height: 60px;
}

nav ul {
    display: flex;
}

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

nav ul li a {
    font-weight: 700;
    position: relative;
}

nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: -5px;
    left: 0;
    background-color: var(--secondary-color);
    transition: width 0.3s ease;
}

nav ul li a:hover::after,
nav ul li a.active::after {
    width: 100%;
}

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

.cart-toggle {
    font-size: 1.5rem;
    cursor: pointer;
    position: relative;
    color: var(--primary-color);
}

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

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

.cart-dropdown.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

.cart-dropdown h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
    font-family: var(--accent-font);
    font-size: 1.5rem;
}

#empty-cart-message {
    text-align: center;
    padding: 20px 0;
    color: #888;
}

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

.cart-item-cover-container {
    width: 60px;
    height: 80px;
    margin-right: 15px;
}

.cart-item-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 5px;
}

.cart-item-info {
    flex: 1;
}

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

.cart-item-author {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 5px;
}

.cart-item-details {
    font-size: 0.8rem;
    color: #888;
}

.cart-item-price {
    text-align: right;
    margin: 0 15px;
}

.cart-item-single-price {
    font-size: 0.9rem;
}

.cart-item-quantity {
    font-size: 0.8rem;
    color: #888;
}

.cart-item-total-price {
    font-weight: 700;
}

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

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

.cart-total-container {
    display: flex;
    justify-content: space-between;
    margin: 15px 0;
    padding-top: 15px;
    border-top: 2px dashed #eee;
    font-weight: 700;
}

.cart-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

/* Footer Styles */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 50px 0 20px;
    margin-top: 50px;
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

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

.footer-section h3 {
    margin-bottom: 20px;
    font-family: var(--accent-font);
    font-size: 1.5rem;
    color: var(--accent-color);
}

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

.footer-section ul li a {
    color: #ccc;
}

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

.social-icons {
    display: flex;
    margin-top: 20px;
}

.social-icons a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    margin-right: 10px;
    color: white;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background-color: var(--accent-color);
    transform: translateY(-3px);
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 30px;
    font-size: 0.9rem;
    color: #999;
}

/* Section Styles */
.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-family: var(--accent-font);
}

.section-header p {
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* Loading Spinner */
.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px;
    font-size: 2rem;
    color: var(--primary-color);
}

/* Notification */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #4CAF50;
    color: white;
    padding: 15px 25px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    animation: slideIn 0.3s ease, fadeOut 0.3s ease 2.7s forwards;
}

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

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

/* Custom Select */
.custom-select {
    appearance: none;
    background-color: white;
    border: 2px solid #ddd;
    border-radius: 25px;
    padding: 10px 35px 10px 15px;
    font-family: var(--main-font);
    font-size: 1rem;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    transition: border-color 0.3s ease;
}

.custom-select:hover, .custom-select:focus {
    border-color: var(--primary-color);
    outline: none;
}

/* Breadcrumb */
.breadcrumb {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
    font-size: 0.9rem;
    color: #666;
}

.breadcrumb a {
    color: #666;
}

.breadcrumb a:hover {
    color: var(--primary-color);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* Responsive Styles */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        padding: 10px;
    }
    
    .logo {
        margin-bottom: 15px;
    }
    
    nav ul {
        margin-bottom: 15px;
    }
    
    nav ul li {
        margin: 0 10px;
    }
    
    .cart-container {
        position: absolute;
        top: 20px;
        right: 20px;
    }
    
    .cart-dropdown {
        width: 300px;
        right: -20px;
    }
    
    .footer-section {
        flex: 100%;
    }
}

@media (max-width: 480px) {
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .cart-dropdown {
        width: 280px;
        right: -50px;
    }
}
