/* Basic Resets & Global Styles */
:root {
    --primary-color: #4ECDC4;
    --secondary-color: #FF6F61;
    --accent-color: #F7DC6F;
    --dark-text: #2C3E50;
    --light-text: #ECF0F1;
    --background-light: #F4F6F7;
    --background-dark: #34495E;
    --border-color: #BDC3C7;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Montserrat', sans-serif;
    --transition-speed: 0.3s ease-in-out;
}

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

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--dark-text);
    background-color: var(--background-light);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

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

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-speed);
}

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

h1, h2, h3 {
    font-family: var(--font-heading);
    color: var(--dark-text);
    margin-bottom: 20px;
}

p {
    margin-bottom: 15px;
}

.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 12px 25px;
    border-radius: 5px;
    transition: background-color var(--transition-speed);
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 700;
}

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

/* Header */
header {
    background-color: var(--background-dark);
    color: var(--light-text);
    padding: 15px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

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

.logo .svg-logo {
    width: 150px;
    height: 40px;
    fill: currentColor; /* Inherit color from parent */
    transition: transform 0.5s ease;
}

.logo .svg-logo text {
    fill: var(--light-text);
}

.logo .logo-circle {
    fill: var(--primary-color);
    transition: transform 0.5s ease-in-out;
}
.logo .logo-triangle {
    fill: var(--accent-color);
    transition: transform 0.5s ease-in-out;
}

.logo:hover .logo-circle {
    transform: scale(1.2);
}
.logo:hover .logo-triangle {
    transform: rotate(360deg);
}


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

header nav ul li {
    margin-left: 25px;
}

header nav ul li a {
    color: var(--light-text);
    font-weight: 400;
    font-size: 1.1em;
    position: relative;
    padding-bottom: 5px;
}

header nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    bottom: 0;
    left: 0;
    transition: width var(--transition-speed);
}

header nav ul li a:hover::after {
    width: 100%;
}

/* Main Content */
main {
    flex: 1; /* Allows main content to grow and push footer down */
    padding-top: 40px;
    padding-bottom: 40px;
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(45deg, var(--background-light), #E0F2F7);
    border-radius: 10px;
    margin-bottom: 40px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.hero-section h1 {
    font-size: 3em;
    color: var(--primary-color);
    margin-bottom: 15px;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.05);
}

.hero-section p {
    font-size: 1.2em;
    color: var(--dark-text);
    max-width: 700px;
    margin: 0 auto;
}

/* Product Grid (Homepage) */
.product-grid h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2.5em;
    color: var(--secondary-color);
}

.constellation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    padding: 20px 0;
}

.product-card {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    text-align: center;
    padding: 25px;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.product-svg-wrapper {
    width: 100%;
    max-width: 200px;
    height: 200px;
    margin-bottom: 20px;
    position: relative;
}

.product-card .product-hero {
    width: 100%;
    height: 100%;
    display: block;
    transition: transform 0.6s ease-in-out, filter 0.6s ease-in-out;
}

/* Specific product SVG animations for homepage */
.product-card[data-product-id="xylophone"] .xylophone-bar {
    transition: transform 0.3s ease-out, fill 0.3s ease-out;
}
.product-card[data-product-id="xylophone"]:hover .xylophone-bar {
    transform: translateY(-5px);
    fill: var(--primary-color);
}

.product-card[data-product-id="drum"] .drum-base {
    transition: transform 0.5s ease-out;
    transform-origin: center;
}
.product-card[data-product-id="drum"]:hover .drum-base {
    transform: scale(1.05);
}

.product-card[data-product-id="guitar"] .guitar-string {
    transition: stroke-width 0.3s ease-out, stroke 0.3s ease-out;
}
.product-card[data-product-id="guitar"]:hover .guitar-string {
    stroke-width: 4;
    stroke: var(--primary-color);
}

.product-card[data-product-id="piano"] .piano-key {
    transition: fill 0.3s ease-out, transform 0.3s ease-out;
}
.product-card[data-product-id="piano"]:hover .piano-key {
    fill: var(--accent-color);
    transform: translateY(2px);
}


.product-card h3 {
    font-size: 1.5em;
    color: var(--dark-text);
    margin-bottom: 10px;
}

.product-card .price {
    font-size: 1.3em;
    color: var(--primary-color);
    font-weight: 700;
}

/* Product Detail Page */
.product-detail {
    padding: 40px 0;
}

.product-detail h1 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 3.5em;
    color: var(--secondary-color);
}

.product-content {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: flex-start;
}

.product-svg-container {
    flex: 1 1 400px;
    min-width: 300px;
    height: 400px;
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

.product-detail .product-hero {
    width: 90%;
    height: 90%;
    transition: transform 0.6s ease-in-out, filter 0.6s ease-in-out;
    transform-origin: center;
}

/* Shape Morpher for Product Page SVGs */
/* Xylophone */
.product-svg-geometric_xylophone .xylophone-bar {
    transition: transform 0.4s ease, fill 0.4s ease;
    transform-origin: center;
}
.product-svg-container[data-animation-type="scale"]:hover .xylophone-bar {
    transform: scaleY(1.1) translateY(-5px); /* Slightly stretch and lift */
    fill: #FFD700; /* Change color on hover */
}

/* Drum - Morph like a ripple */
.product-svg-abstract_drum .drum-base {
    transition: r 0.5s ease-in-out, fill 0.5s ease-in-out;
}
.product-svg-container[data-animation-type="morph"]:hover .drum-base {
    r: 75px; /* Expand radius */
    fill: #28B463; /* New color */
}
.product-svg-abstract_drum .drum-inner {
    transition: r 0.5s ease-in-out, fill 0.5s ease-in-out;
}
.product-svg-container[data-animation-type="morph"]:hover .drum-inner {
    r: 55px; /* Expand radius */
    fill: #27AE60; /* New color */
}

/* Guitar - Rotate body and stretch strings */
.product-svg-geometric_guitar .guitar-body {
    transition: transform 0.6s ease-in-out;
    transform-origin: center;
}
.product-svg-container[data-animation-type="rotate"]:hover .guitar-body {
    transform: rotate(5deg);
}
.product-svg-geometric_guitar .guitar-string {
    transition: stroke-width 0.3s ease-out, stroke 0.3s ease-out;
}
.product-svg-container[data-animation-type="rotate"]:hover .guitar-string {
    stroke-width: 3;
    stroke: var(--secondary-color);
}

/* Piano - Keys "press" down and change color */
.product-svg-abstract_piano .piano-key {
    transition: transform 0.3s ease-out, fill 0.3s ease-out;
    transform-origin: bottom;
}
.product-svg-container[data-animation-type="fade"]:hover .piano-key {
    transform: translateY(5px);
    fill: #99A1AA;
}

.product-info {
    flex: 1 1 400px;
    min-width: 300px;
    padding: 20px;
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.product-description {
    font-size: 1.1em;
    margin-bottom: 25px;
}

.product-price {
    font-size: 2em;
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 30px;
}

.add-to-cart-btn {
    width: 100%;
    padding: 15px;
    font-size: 1.2em;
    border-radius: 8px;
}

/* Static Pages (Privacy, Terms, Contact, About) */
.static-page {
    padding: 40px 0;
}

.static-page h1 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--dark-text);
    font-size: 3em;
}

.static-page p, .static-page ul {
    max-width: 800px;
    margin: 0 auto 20px auto;
    font-size: 1.1em;
    line-height: 1.8;
}

.static-page ul {
    list-style: disc;
    padding-left: 40px;
}

.static-page ul li {
    margin-bottom: 10px;
}

/* Privacy Page SVG */
.privacy-visual {
    text-align: center;
    margin-bottom: 30px;
}
.svg-privacy {
    width: 100%;
    max-width: 400px;
    height: auto;
}
.privacy-lock {
    animation: lock-pulse 2s infinite ease-in-out alternate;
}
.privacy-lines {
    animation: lines-draw 2s infinite ease-in-out alternate;
}
.privacy-eye {
    animation: eye-blink 4s infinite step-end;
}
.privacy-pupil {
    transition: transform 0.5s ease;
}
.svg-privacy:hover .privacy-pupil {
    transform: translateX(5px);
}

@keyframes lock-pulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.1); }
}
@keyframes lines-draw {
    0% { stroke-dasharray: 0 100; }
    100% { stroke-dashoffset: 0; } /* Corrected to go to 0 for full draw */
}
@keyframes eye-blink {
    0%, 50%, 100% { opacity: 1; }
    51%, 99% { opacity: 0; }
}


/* Terms Page SVG */
.terms-visual {
    text-align: center;
    margin-bottom: 30px;
}
.svg-terms {
    width: 100%;
    max-width: 500px;
    height: auto;
}
.terms-line {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: draw-line 3s infinite alternate forwards;
}
.terms-line-1 { animation-delay: 0s; }
.terms-line-2 { animation-delay: 0.5s; }
.terms-line-3 { animation-delay: 1s; }
.terms-line-4 { animation-delay: 1.5s; }

.terms-dot {
    transform-origin: center;
    animation: dot-bounce 1.5s infinite ease-out alternate;
}
.terms-dot-1 { animation-delay: 0.2s; }
.terms-dot-2 { animation-delay: 0.4s; }
.terms-dot-3 { animation-delay: 0.6s; }
.terms-dot-4 { animation-delay: 0.8s; }

@keyframes draw-line {
    to { stroke-dashoffset: 0; }
}
@keyframes dot-bounce {
    0% { transform: translateY(0); }
    50% { transform: translateY(-5px) scale(1.1); }
    100% { transform: translateY(0); }
}


/* Contact Page SVG */
.contact-visual {
    text-align: center;
    margin-bottom: 30px;
}
.svg-contact {
    width: 100%;
    max-width: 400px;
    height: auto;
}
.contact-email {
    animation: email-circle-pulse 2s infinite ease-in-out alternate;
}
.email-envelope {
    animation: envelope-reveal 3s infinite alternate forwards;
    stroke-dasharray: 50;
    stroke-dashoffset: 50;
}
.contact-form {
    animation: form-morph 2s infinite ease-in-out alternate;
}

@keyframes email-circle-pulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.05); fill: #FF4F4F; }
}
@keyframes envelope-reveal {
    to { stroke-dashoffset: 0; }
}
@keyframes form-morph {
    0% { transform: scale(1); }
    50% { transform: scale(1.05) rotate(5deg); }
    100% { transform: scale(1); }
}


/* About Page SVG */
.about-visual {
    text-align: center;
    margin-bottom: 30px;
}
.svg-about {
    width: 100%;
    max-width: 500px;
    height: auto;
}
.about-journey-path {
    stroke-dasharray: 300;
    stroke-dashoffset: 300;
    animation: draw-path 5s forwards linear;
}
.about-point {
    transform-origin: center;
    animation: point-float 3s infinite ease-in-out alternate;
}
.about-point-start { animation-delay: 0s; }
.about-point-middle { animation-delay: 0.8s; }
.about-point-end { animation-delay: 1.6s; }

@keyframes draw-path {
    to { stroke-dashoffset: 0; }
}
@keyframes point-float {
    0% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(-5px); opacity: 0.8; }
    100% { transform: translateY(0); opacity: 1; }
}


/* Contact Form Styling */
.contact-form-elements {
    max-width: 600px;
    margin: 0 auto;
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: var(--dark-text);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-family: var(--font-body);
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.2);
}

textarea {
    resize: vertical;
}

.contact-submit-btn {
    width: 100%;
}

.success-message {
    color: green;
    background-color: #e6ffe6;
    border: 1px solid green;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
}

.error-message {
    color: red;
    background-color: #ffe6e6;
    border: 1px solid red;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
}

/* Thank You Page */
.thank-you-section {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #E0F7FA, #BBDEFB);
    border-radius: 15px;
    margin-bottom: 40px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.thank-you-section h1 {
    font-size: 3.5em;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.thank-you-section p {
    font-size: 1.2em;
    margin-bottom: 25px;
}

.confetti-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.svg-confetti {
    width: 100%;
    height: 100%;
}

.confetti-shape {
    transform-origin: center;
    animation: confetti-fall 8s infinite linear;
    opacity: 0;
}

.confetti-shape:nth-child(1) { animation-delay: 0s; left: 10%; }
.confetti-shape:nth-child(2) { animation-delay: 1s; left: 20%; }
.confetti-shape:nth-child(3) { animation-delay: 2s; left: 30%; }
.confetti-shape:nth-child(4) { animation-delay: 3s; left: 40%; }
.confetti-shape:nth-child(5) { animation-delay: 4s; left: 50%; }
.confetti-shape:nth-child(6) { animation-delay: 5s; left: 60%; }
.confetti-shape:nth-child(7) { animation-delay: 6s; left: 70%; }
.confetti-shape:nth-child(8) { animation-delay: 7s; left: 80%; }


@keyframes confetti-fall {
    0% {
        transform: translateY(-10%) rotate(0deg) scale(0.5);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    100% {
        transform: translateY(110%) rotate(720deg) scale(1.2);
        opacity: 0;
    }
}

/* Footer */
footer {
    background-color: var(--background-dark);
    color: var(--light-text);
    padding: 20px 0;
    text-align: center;
    margin-top: auto; /* Pushes footer to the bottom */
}

footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-links a {
    color: var(--light-text);
    margin: 0 10px;
    font-size: 0.9em;
}

.footer-links a:hover {
    color: var(--accent-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
    }

    header nav ul {
        margin-top: 15px;
    }

    header nav ul li {
        margin: 0 10px;
    }

    .hero-section h1 {
        font-size: 2.2em;
    }

    .product-grid h2 {
        font-size: 2em;
    }

    .product-content {
        flex-direction: column;
        align-items: center;
    }

    .product-svg-container, .product-info {
        flex: 1 1 100%;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .hero-section {
        padding: 40px 15px;
    }

    .hero-section h1 {
        font-size: 1.8em;
    }

    .product-card {
        padding: 15px;
    }

    .product-card h3 {
        font-size: 1.2em;
    }

    .product-card .price {
        font-size: 1em;
    }

    header nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    header nav ul li {
        margin: 5px 8px;
    }
}