/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    height: 80px;
    flex-wrap: wrap;
}

.logo {
    font-size: 1rem;
    font-weight: 800;
    color: #2c3e50;
    text-decoration: none;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    font-family: 'Montserrat', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    text-transform: none;
    margin-right: auto; /* push nav links/icons to the right, keep logo flush left */
}

@media (max-width: 480px) {
    .logo {
        font-size: 0.85rem;
    }
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex: 1 1 auto;
    justify-content: flex-start; /* left-align nav items so logo sits fully left */
    margin: 0;
    padding: 0 1rem;
}

.nav-icons {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-left: auto;
}

.nav-icon {
    color: #50575e;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: color 0.2s;
}

.nav-icon:hover {
    color: #7DA27E;
}

.nav-icon svg {
    width: 24px;
    height: 24px;
}

.nav-links a {
    color: #50575e;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s;
    position: relative;
    font-family: 'Montserrat', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    letter-spacing: 0.2px;
    text-transform: none;
}

.nav-links a:hover, .nav-links a.active {
    color: #7DA27E;
}

.admin-link {
    /* Hidden globally by default; script will also ensure it's hidden inside footers even if inline styles were used */
    display: none !important;
    background: #f1f5f1;
    color: #7DA27E !important;
    border-radius: 20px;
    padding: 0.5rem 1rem !important;
    font-weight: 600;
}

/* Extra safety: ensure admin link inside the secure payment icon area is hidden */
.footer .payment-icons .admin-link,
.footer a.admin-link {
    display: none !important;
}

/* Allow a single admin icon to show only on the contact page footer.
   It overrides the global hide but only when body has .contact-page and the link uses .footer-admin-icon. */
body.contact-page .footer .footer-admin-icon {
    display: inline-flex !important;
    visibility: visible !important;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #ffffff;
    color: #5fa35f;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    text-decoration: none;
    font-size: 1.2rem;
    border: 2px solid #eaeaea;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

body.contact-page .footer .footer-admin-icon:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

.admin-link:hover {
    background: #e2ebe2;
}

#cart-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background: #e74c3c;
    color: #fff;
    font-size: 0.7rem;
    padding: 0.15rem 0.4rem;
    border-radius: 10px;
    font-weight: bold;
    display: none;
}

#cart-count.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Buttons */
.cta-button {
    display: inline-block;
    padding: 1rem 2rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cta-button.primary {
    background: #7DA27E;
    color: #ffffff;
}

.cta-button.primary:hover {
    background: #6a8f6b;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(125, 162, 126, 0.3);
}

.cta-button.secondary {
    background: transparent;
    border: 2px solid #7DA27E;
    color: #7DA27E;
}

.cta-button.secondary:hover {
    background: #7DA27E;
    color: #ffffff;
}

.details-btn,
.add-to-cart-btn,
.submit-btn,
.login-btn,
.delete-btn {
    padding: 0.75rem 1.5rem;
    background: #7DA27E;
    color: #fff;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.3s ease;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
}

.details-btn:hover,
.add-to-cart-btn:hover,
.submit-btn:hover {
    background: #6a8f6b;
}

.delete-btn {
    background: #e74c3c;
}

.delete-btn:hover {
    background: #c0392b;
}

/* Cards */
.category-card {
    background: #ffffff;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
    position: relative;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    border-color: #7DA27E;
}

.category-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #7DA27E;
}

/* Footer */
.footer {
    background: #2c3e50;
    color: #ffffff;
    margin-top: 4rem;
    padding: 2.5rem 0 1.5rem;
    /* ensure footer sits after page content and allows enough breathing room */
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr; /* three balanced columns on desktop */
    gap: 2rem;
    align-items: start;
    margin-bottom: 1.5rem;
}

/* Make layout responsive and stack cleanly on small screens */
@media (max-width: 900px) {
    .footer-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .footer-container {
        grid-template-columns: 1fr;
        padding: 0 1rem;
        gap: 1rem;
    }
}

.footer-section h4 {
    color: #7bc87b;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

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

.footer-section ul li {
    margin-bottom: 0.6rem;
}

.footer-section a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.25s;
    font-size: 0.95rem;
    display: inline-block;
}

.footer-section a:hover {
    color: #7bc87b;
}

/* Right-align contact/payment column content on wide screens for visual balance */
.footer-section.right {
    text-align: right;
}

@media (max-width: 900px) {
    .footer-section.right {
        text-align: left;
    }
}

/* Payment icons area: keep icons grouped and aligned consistently */
.payment-icons {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.payment-icons img {
    height: 34px;
    background: #ffffff;
    padding: 4px;
    border-radius: 6px;
    object-fit: contain;
}

/* Footer bottom bar: center content and add subtle padding */
.footer-bottom {
    text-align: center;
    padding: 1rem;
    background: #1a252f;
    border-top: 1px solid #34495e;
    color: #dfe7de;
    font-size: 0.95rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-content {
    background: #fff;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10;
    color: #7bc87b;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    transition: background 0.2s;
}

.modal-close:hover {
    background: #f0faf0;
}

.modal-body {
    display: flex;
    gap: 2rem;
    padding: 2rem;
}

.modal-gallery {
    flex: 1;
}

.modal-info {
    flex: 1;
}

.modal-category {
    color: #50575e;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.modal-price {
    font-size: 2rem;
    font-weight: 600;
    margin: 1rem 0;
    color: #5fa35f;
}

.modal-description {
    margin-bottom: 2rem;
    line-height: 1.8;
    color: #50575e;
}

/* Chatbot */
.chatbot-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9999;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

@media (max-width: 480px) {
    .chatbot-container {
        right: 1rem;
        bottom: 1rem;
    }
    .chatbot-window {
        width: calc(100vw - 2rem) !important;
        height: 400px !important;
    }
}

.chatbot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #7DA27E;
    color: white;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: transform 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
}

.chatbot-window {
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chatbot-header {
    background: #7DA27E;
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: white;
}

.chatbot-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.chatbot-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: #f9f9f9;
}

.message {
    max-width: 80%;
    padding: 0.8rem 1rem;
    border-radius: 15px;
    font-size: 0.95rem;
    line-height: 1.4;
}

.message.assistant {
    background: #E8EBE1;
    color: #2c3e50;
    align-self: flex-start;
    border-bottom-left-radius: 5px;
}

.message.user {
    background: #7DA27E;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 5px;
}

.chatbot-input-area {
    display: flex;
    padding: 1rem;
    background: white;
    border-top: 1px solid #eaeaea;
}

#chatbot-input {
    flex: 1;
    border: 1px solid #ccc;
    border-radius: 20px;
    padding: 0.5rem 1rem;
    margin-right: 0.5rem;
    margin-bottom: 0;
}

.chatbot-send {
    background: #7DA27E;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-weight: bold;
}

/* Stats Section */
.stats-section {
    background: #f1f5f1;
    padding: 5rem 0;
    margin: 0;
}

.stats-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.stat-box {
    text-align: center;
    padding: 2rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #7DA27E;
}

.stat-label {
    font-size: 1rem;
    color: #50575e;
    font-weight: 500;
}

/* Gallery Section */
.gallery-section {
    max-width: 1400px;
    margin: 6rem auto;
    padding: 0 2rem;
}

.instrument-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
}

.gallery-item {
    position: relative;
    height: 400px;
    border-radius: 30px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.25);
    transition: all 0.4s ease;
}

.gallery-item:hover {
    transform: translateY(-15px);
    box-shadow: 0 20px 50px rgba(102, 126, 234, 0.4);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.15);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(102, 126, 234, 0.95), transparent);
    padding: 2.5rem 1.5rem;
    color: #fff;
    transition: all 0.4s ease;
}

.gallery-item:hover .gallery-overlay {
    padding: 3.5rem 1.5rem;
    background: linear-gradient(to top, rgba(118, 75, 162, 0.95), transparent);
}

.gallery-overlay h3 {
    color: #fff;
    font-size: 1.4rem;
    margin: 0 0 0.5rem 0;
    font-weight: 700;
}

.gallery-overlay p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    margin: 0;
}

/* Welcome Modal */
.welcome-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(123, 200, 123, 0.15);
    backdrop-filter: blur(5px);
    z-index: 3000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    animation: fadeIn 0.3s;
}

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

.welcome-modal-content {
    background: #fff;
    max-width: 900px;
    width: 100%;
    border-radius: 25px;
    padding: 3rem;
    position: relative;
    animation: slideUp 0.4s;
    box-shadow: 0 8px 24px rgba(123, 200, 123, 0.3);
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.welcome-modal-content h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #5fa35f;
}

.welcome-text {
    text-align: center;
    font-size: 1.2rem;
    color: #50575e;
    margin-bottom: 2rem;
}

.promo-products {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.promo-product-card {
    border: 2px solid #d4f1d4;
    border-radius: 20px;
    padding: 1.5rem;
    text-align: center;
    position: relative;
    box-shadow: 0 4px 12px rgba(139, 195, 139, 0.2);
}

.promo-product-card .promo-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, #ff9999, #ff6b6b);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 15px;
    font-weight: 700;
    font-size: 1.1rem;
}

.promo-product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 15px;
    margin-bottom: 1rem;
}

.promo-product-card h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.promo-prices {
    display: flex;
    justify-content: center;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
}

.old-price {
    text-decoration: line-through;
    color: #8c8f94;
    font-size: 1.1rem;
}

.new-price {
    color: #ff6b6b;
    font-size: 1.5rem;
    font-weight: 700;
}

.view-promo-btn {
    background: linear-gradient(135deg, #7bc87b, #5fa35f);
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 20px;
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(123, 200, 123, 0.3);
}

.view-promo-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(123, 200, 123, 0.4);
}

.shop-now-btn {
    width: 100%;
    background: linear-gradient(135deg, #7bc87b, #5fa35f);
    color: #fff;
    border: none;
    padding: 1rem;
    border-radius: 25px;
    cursor: pointer;
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 12px rgba(123, 200, 123, 0.3);
}

.shop-now-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(123, 200, 123, 0.4);
}

/* Discount Code Section */
.discount-code-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #d4f1d4;
}

.discount-code-section input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #d4f1d4;
    border-radius: 15px;
    margin-bottom: 0.75rem;
    font-family: inherit;
}

.apply-code-btn {
    width: 100%;
    padding: 0.75rem;
    background: linear-gradient(135deg, #7bc87b, #5fa35f);
    color: #fff;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-family: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(123, 200, 123, 0.3);
}

.apply-code-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(123, 200, 123, 0.4);
}

.discount-message {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.discount-line {
    color: #5fa35f;
}

.discount-line span:last-child {
    color: #5fa35f;
    font-weight: 600;
}

@media (max-width: 768px) {
    .nav-container {
        height: auto;
        padding: 1rem;
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.75rem;
        margin-left: 0;
        margin-right: 0;
    }

    .nav-icons {
        margin-top: 0.5rem;
        justify-content: center;
    }
    
    .nav-links a {
        font-size: 0.85rem;
    }

    .promo-products {
        grid-template-columns: 1fr;
    }
    
    .welcome-modal-content {
        padding: 2rem 1rem;
    }
    
    .instrument-gallery {
        grid-template-columns: 1fr;
    }
}