/* static/css/style.css - Main Stylesheet for Naquamz Musical Store */

/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #B8860B;
    --secondary-color: #000000;
    --accent-color: #CD853F;
    --text-dark: #1a1a1a;
    --text-light: #666666;
    --background-light: #f8f8f8;
    --white: #ffffff;
    --border-color: #e0e0e0;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(184, 134, 11, 0.3);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--white);
}

.btn-secondary:hover {
    background-color: #333;
}

.btn-small {
    padding: 8px 20px;
    font-size: 14px;
}

.btn-large {
    padding: 16px 40px;
    font-size: 18px;
}

.btn-cart {
    width: 100%;
    background-color: var(--primary-color);
    color: var(--white);
    margin-top: 10px;
}

.btn-cart:hover {
    background-color: var(--accent-color);
}

/* ===== HEADER ===== */
.header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.top-bar {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 10px 0;
    font-size: 14px;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-left span {
    margin-right: 20px;
}

.top-bar i {
    margin-right: 5px;
}

.top-bar a {
    color: var(--white);
}

.top-bar a:hover {
    color: var(--primary-color);
}

.main-header {
    padding: 20px 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: 2px;
}

.logo .tagline {
    font-size: 12px;
    color: var(--text-light);
    letter-spacing: 1px;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

.main-nav a {
    font-weight: 600;
    color: var(--text-dark);
}

.main-nav a:hover {
    color: var(--primary-color);
}

/* ===== NAVIGATION DROPDOWN - FIXED ===== */
.dropdown {
    position: relative;
}

.dropdown > a {
    display: flex;
    align-items: center;
    gap: 5px;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--white);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    min-width: 220px;
    padding: 10px 0;
    border-radius: 5px;
    margin-top: 10px;
    z-index: 1000;
    
    /* CRITICAL: Hide by default */
    display: none !important;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}

/* Show dropdown only when active class is added */
.dropdown.active .dropdown-menu {
    display: block !important;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Desktop: Show on hover */
@media (min-width: 993px) {
    .dropdown:hover .dropdown-menu {
        display: block !important;
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
}

.dropdown-menu li {
    padding: 0;
    list-style: none;
}

.dropdown-menu a {
    display: block;
    padding: 12px 20px;
    color: var(--text-dark);
    transition: var(--transition);
    white-space: nowrap;
}

.dropdown-menu a:hover {
    background-color: var(--background-light);
    color: var(--primary-color);
    padding-left: 25px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-icon, .cart-icon {
    font-size: 20px;
    cursor: pointer;
    position: relative;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

/* ===== SEARCH BAR ===== */
.search-bar {
    background-color: var(--background-light);
    padding: 15px 0;
    border-top: 1px solid var(--border-color);
}

.search-bar form {
    display: flex;
    gap: 10px;
}

.search-bar input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 16px;
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-bar button {
    padding: 12px 30px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition);
}

.search-bar button:hover {
    background-color: var(--accent-color);
}

/* ===== HERO SECTION ===== */
.hero-section {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: var(--white);
    padding: 80px 0;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-badge {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
}

.hero-text h1 {
    font-size: 52px;
    font-weight: 800;
    margin-bottom: 10px;
    line-height: 1.2;
}

.hero-text h2 {
    font-size: 42px;
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 20px;
}

.hero-date {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
}

.hero-location {
    font-size: 18px;
    line-height: 1.8;
    margin-bottom: 30px;
    color: #ccc;
}

.hero-buttons {
    display: flex;
    gap: 20px;
}

.hero-image img {
    width: 100%;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* ===== PROMO BANNER ===== */
.promo-banner {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: var(--white);
    padding: 40px 0;
    text-align: center;
}

.promo-content h2 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 10px;
}

.promo-content p {
    font-size: 18px;
    margin-bottom: 5px;
}

.promo-highlight {
    font-size: 24px;
    font-weight: 700;
}

/* ===== SECTIONS ===== */
.products-section {
    padding: 80px 0;
}

.bg-light {
    background-color: var(--background-light);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.section-header.centered {
    flex-direction: column;
    text-align: center;
}

.section-header h2 {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-dark);
}

.section-header p {
    color: var(--text-light);
    font-size: 18px;
    max-width: 600px;
    margin-top: 10px;
}

.view-all {
    color: var(--primary-color);
    font-weight: 600;
}

.view-all:hover {
    text-decoration: underline;
}

/* ===== PRODUCT GRID ===== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.product-card {
    background-color: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: var(--transition);
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.product-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: var(--danger-color);
    color: var(--white);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    z-index: 10;
}

.product-image {
    position: relative;
    overflow: hidden;
    height: 250px;
    background-color: var(--background-light);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.product-info {
    padding: 20px;
}

.product-categories {
    margin-bottom: 10px;
}

.product-categories a {
    font-size: 12px;
    color: var(--primary-color);
    font-weight: 600;
    text-transform: uppercase;
}

.product-info h3 {
    font-size: 18px;
    margin-bottom: 15px;
    min-height: 48px;
}

.product-info h3 a:hover {
    color: var(--primary-color);
}

.product-price {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.original-price {
    text-decoration: line-through;
    color: var(--text-light);
    font-size: 16px;
}

.current-price {
    color: var(--primary-color);
    font-size: 22px;
    font-weight: 700;
}

/* ===== FEATURES ===== */
.features-section {
    padding: 80px 0;
    background-color: var(--background-light);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature-card {
    background-color: var(--white);
    padding: 40px 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.feature-icon i {
    font-size: 32px;
    color: var(--white);
}

.feature-card h3 {
    font-size: 20px;
    margin-bottom: 15px;
}

.feature-card p {
    color: var(--text-light);
    line-height: 1.8;
}

/* ===== TESTIMONIALS ===== */
.testimonials-section {
    padding: 80px 0;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.testimonial-card {
    background-color: var(--background-light);
    padding: 30px;
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
}

.testimonial-rating {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 18px;
}

.testimonial-text {
    font-style: italic;
    line-height: 1.8;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.testimonial-author {
    color: var(--text-dark);
    font-weight: 600;
}

/* ===== BRANDS ===== */
.brands-section {
    padding: 80px 0;
    background-color: var(--background-light);
}

.brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.brand-logo {
    background-color: var(--white);
    padding: 30px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 120px;
    transition: var(--transition);
}

.brand-logo:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.brand-logo img {
    max-height: 60px;
    filter: grayscale(100%);
    transition: var(--transition);
}

.brand-logo:hover img {
    filter: grayscale(0%);
}

/* ===== CTA SECTION ===== */
.cta-section {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #333 100%);
    color: var(--white);
    padding: 80px 0;
    text-align: center;
}

.cta-content h2 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 20px;
}

.cta-content p {
    font-size: 18px;
    margin-bottom: 10px;
}

.cta-highlight {
    font-size: 22px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 30px;
}

/* ===== FOOTER ===== */
.footer {
    background-color: var(--secondary-color);
    color: var(--white);
}

.footer-top {
    padding: 60px 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer-col h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.footer-col p {
    line-height: 1.8;
    margin-bottom: 20px;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background-color: #333;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.social-links a:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

.contact-info li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.contact-info i {
    color: var(--primary-color);
    margin-top: 3px;
}

.footer-bottom {
    padding: 20px 0;
    border-top: 1px solid #333;
    text-align: center;
}

.footer-bottom p {
    font-size: 14px;
}

.footer-bottom a {
    color: var(--primary-color);
}

.footer-bottom a:hover {
    text-decoration: underline;
}

/* ===== MESSAGES ===== */
.messages-container {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
}

.alert {
    padding: 15px 20px;
    margin-bottom: 15px;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { transform: translateX(400px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.alert-success {
    background-color: var(--success-color);
    color: var(--white);
}

.alert-error {
    background-color: var(--danger-color);
    color: var(--white);
}

.close-alert {
    background: none;
    border: none;
    color: var(--white);
    font-size: 20px;
    cursor: pointer;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-buttons {
        justify-content: center;
        flex-direction: column;
    }
    
    .main-nav {
        position: fixed;
        top: 130px;
        left: -100%;
        width: 280px;
        height: calc(100vh - 130px);
        background-color: var(--white);
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
        transition: left 0.3s ease;
        overflow-y: auto;
        z-index: 999;
    }
    
    .main-nav.active {
        left: 0;
    }
    
    .main-nav ul {
        flex-direction: column;
        gap: 0;
        padding: 20px 0;
    }
    
    .main-nav > ul > li {
        border-bottom: 1px solid var(--border-color);
    }
    
    .main-nav > ul > li > a {
        display: block;
        padding: 15px 20px;
    }
    
    .dropdown-menu {
        position: static !important;
        box-shadow: none;
        background-color: var(--background-light);
        margin: 0;
        padding: 0;
        border-radius: 0;
        transform: none !important;
    }
    
    .dropdown.active .dropdown-menu {
        display: block !important;
        opacity: 1;
        visibility: visible;
    }
    
    .dropdown-menu li {
        padding: 0;
    }
    
    .dropdown-menu a {
        padding: 12px 30px;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
}

@media (max-width: 768px) {
    .hero-text h1 {
        font-size: 36px;
    }
    
    .hero-text h2 {
        font-size: 28px;
    }
    
    .section-header h2 {
        font-size: 28px;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 20px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
}