/* --- v2.2 Design System --- */
:root {
    --color-background: #FFFFFF;
    --color-surface: #F7F7F7;
    --color-text: #1a1a1a;
    --color-text-secondary: #555555;
    --color-accent: #A89B8F; /* A soft, warm greyish-brown */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Noto Sans KR', sans-serif;
    --header-height-desktop: 131px;
    --header-height-mobile: 70px;
    --max-content-width: 1200px; /* Adjusted for better overall centering */
}

/* --- Base & Reset --- */
html {
    font-size: 16px; /* Base for rem units */
    scroll-behavior: smooth;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background-color: var(--color-background);
    line-height: 1.7;
}

h1, h2, h3, .logo {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-text);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul { list-style: none; }
img, video { max-width: 100%; display: block; height: auto; } /* Ensure responsive video/image */

/* --- v2.2 Header --- */
.v2-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid #EAEAEA;
}
.top-bar {
    border-bottom: 1px solid #EAEAEA;
    font-size: 0.8rem;
    color: var(--color-text-secondary);
}
.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: var(--max-content-width);
    margin: 0 auto;
    padding: 8px 30px;
}
.utility-nav a:hover { color: var(--color-text); }
.utility-nav a { margin-left: 20px; }

.main-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: var(--max-content-width);
    margin: 0 auto;
    padding: 15px 30px;
}
.logo { font-size: 2.5rem; letter-spacing: 2px; }
.header-icons { display: flex; gap: 25px; align-items: center; font-size: 1.3rem; }
.cart-icon { position: relative; }
.cart-counter {
    position: absolute;
    top: -8px;
    right: -12px;
    background: var(--color-accent);
    color: white;
    font-size: 0.7rem;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.2s ease;
}
.cart-counter.updated { transform: scale(1.3); }

.primary-nav { display: flex; justify-content: center; border-top: 1px solid #EAEAEA; }
.nav-links { display: flex; gap: 50px; padding: 15px 0; }
.nav-links a { font-weight: 500; font-size: 1rem; letter-spacing: 0.5px; }
.nav-links a:hover { color: var(--color-accent); }
.hamburger-menu { display: none; }

/* Search Bar */
.search-bar-container {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;
    padding: 20px 30px;
    display: flex;
    gap: 15px;
    align-items: center;
    transform: translateY(-200%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.4s ease, opacity 0.4s ease;
    z-index: -1;
}
.search-bar-container.search-bar-open { transform: translateY(0); opacity: 1; visibility: visible; z-index: 999; }
.search-bar-container input { flex-grow: 1; font-size: 1.1rem; padding: 10px; border: none; border-bottom: 2px solid #ccc; outline: none; }
.search-close-btn { font-size: 1.5rem; font-weight: 300; background: none; border: none; cursor: pointer; color: var(--color-text-secondary); }

/* --- v2.2 Main Content --- */
main { padding-top: var(--header-height-desktop); }

section {
    padding: 100px 30px;
    max-width: var(--max-content-width);
    margin: 0 auto;
}

section h2 {
    text-align: center;
    font-size: clamp(2rem, 4vw, 2.8rem); /* Fluid scaling for H2 */
    margin-bottom: 60px;
}

.v2-hero {
    height: 70vh;
    max-height: 700px;
    min-height: 450px;
    background-image: url('./assets/images/large.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    position: relative;
}
.v2-hero::before { content: ''; position: absolute; inset: 0; background: rgba(0,0,0,0.25); }
.v2-hero-content { position: relative; z-index: 1; padding: 20px; }
.v2-hero h1 { font-size: clamp(2.5rem, 5vw, 4rem); color: white; text-shadow: 0 2px 15px rgba(0,0,0,0.4); }
.v2-hero p { max-width: 550px; margin: 15px auto 30px; text-shadow: 0 1px 8px rgba(0,0,0,0.4); font-size: 1.1rem; }

/* Flower Language of the Day */
.flower-language-of-day {
    padding: 60px 30px;
    background-color: var(--color-surface);
    text-align: center;
    border-bottom: 1px solid #EAEAEA;
}
.flower-language-of-day h3 {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    margin-bottom: 20px;
    color: var(--color-text);
}
#flower-language-message {
    font-size: clamp(1.2rem, 2.5vw, 1.6rem);
    color: var(--color-text-secondary);
    line-height: 1.8;
}
#flower-language-message b {
    color: var(--color-text);
    font-weight: 700;
}

/* Buttons */
.v2-button, .add-to-cart-btn, .v2-button-sub {
    background: var(--color-text);
    color: white;
    padding: 14px 35px;
    border: 1px solid var(--color-text);
    border-radius: 3px; /* Added border-radius */
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 0.9rem;
    box-shadow: 0 3px 8px rgba(0,0,0,0.1); /* Subtle shadow */
}
.v2-button:hover, .add-to-cart-btn:hover, .v2-button-sub:hover {
    background: var(--color-accent); /* Changed hover color */
    border-color: var(--color-accent);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15); /* More pronounced shadow */
    transform: translateY(-2px); /* Slight lift */
}

/* Products */
.v2-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}
.v2-product-card {
    text-align: center;
    border: 1px solid #f0f0f0; /* Subtle border for cards */
    transition: box-shadow 0.3s ease;
}
.v2-product-card:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.08); /* Shadow on card hover */
}
.v2-product-card .img-wrapper {
    position: relative;
    overflow: hidden;
    margin-bottom: 15px;
    cursor: pointer;
}
.v2-product-card .img-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.1);
    opacity: 0;
    transition: opacity 0.4s ease;
}
.add-to-cart-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    z-index: 2;
    opacity: 0;
    transition: all 0.4s ease;
}
.v2-product-card:hover .img-wrapper::after,
.v2-product-card:hover .add-to-cart-btn {
    opacity: 1;
}
.v2-product-card:hover .add-to-cart-btn { transform: translate(-50%, -50%) scale(1); }
.v2-product-card img { width: 100%; height: 400px; object-fit: cover; transition: transform 0.5s ease; }
.v2-product-card:hover img { transform: scale(1.05); }
.v2-product-card .product-info { padding: 10px; text-align: center; }
.v2-product-card h3 { font-size: 1.1rem; font-family: var(--font-body); font-weight: 500; }
.v2-product-card .price { color: var(--color-text-secondary); margin-top: 5px; }

/* News, Classes, About, Contact */
#news, #classes, #about, #contact { text-align: center; }
#classes { background-color: var(--color-surface); }
.news-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 30px; }
.news-card { background: #fff; text-align: center; border: 1px solid #f0f0f0; transition: box-shadow 0.3s ease; }
.news-card:hover { box-shadow: 0 8px 25px rgba(0,0,0,0.08); }
.news-video { width: 100%; height: auto; display: block; }
.news-content { padding: 25px 15px; }
.news-content h3 { font-size: 1.2rem; font-family: var(--font-body); font-weight: 500; }
.news-content p { color: var(--color-text-secondary); }
.about-content, .contact-info { max-width: 800px; margin: 0 auto; text-align: center; font-size: 1.1rem; line-height: 1.8; }
.about-content p, .contact-info p { margin-bottom: 20px; text-align: center; line-height: 2.2; } /* Increased line-height */

/* Footer */
.v2-footer { background: var(--color-surface); color: var(--color-text-secondary); padding: 80px 30px 30px; font-size: 0.9rem; }
.v2-footer-content { max-width: var(--max-content-width); margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 40px; border-bottom: 1px solid #ddd; padding-bottom: 60px; margin-bottom: 30px; }
.footer-column h3 { font-family: var(--font-body); font-size: 1rem; font-weight: 500; color: var(--color-text); margin-bottom: 20px; }
.footer-column ul li { margin-bottom: 10px; }
.footer-column ul a:hover { color: var(--color-text); }
.footer-column.newsletter input { width: 100%; padding: 12px; border: 1px solid #ccc; margin-bottom: 10px; }
.v2-button-sub { width: 100%; padding: 12px; background: var(--color-text); color: white; border: 1px solid var(--color-text); cursor: pointer; font-weight: 500; }
.footer-bottom { text-align: center; }
.social-links a { margin-right: 20px; }

/* --- Responsive for v2.2 --- */
@media (max-width: 992px) {
    .nav-links { gap: 30px; }
    .nav-links a { font-size: 0.9rem; }
    .logo { font-size: 2.2rem; }
    .v2-footer-content { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
}

@media (max-width: 768px) {
    main { padding-top: var(--header-height-mobile); }
    .top-bar { display: none; } /* Hide top bar on mobile */
    .main-header-content { height: var(--header-height-mobile); padding: 0 20px;}
    .hamburger-menu { display: flex; z-index: 1010; }
    .logo { position: absolute; left: 50%; transform: translateX(-50%); font-size: 2rem; }
    
    .primary-nav { display: block; position: fixed; top: 0; left: -100%; width: 100%; max-width: 320px; height: 100vh; background: #fff; transition: left 0.4s ease-in-out; z-index: 1005; padding-top: 100px; box-shadow: 5px 0 20px rgba(0,0,0,0.1); }
    .primary-nav.nav-open { left: 0; }
    .nav-links { flex-direction: column; align-items: flex-start; gap: 0; padding: 0 30px; }
    .nav-links li { width: 100%; text-align: left; border-bottom: 1px solid #eee; }
    .nav-links a { padding: 15px 0; display: block; font-size: 1.3rem; }

    section { padding: 80px 20px; }
    .v2-hero h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); } /* Adjusted clamp values for mobile hero h1 */
    .v2-hero p { font-size: 0.9rem; } /* Smaller font for mobile hero p */

    .v2-products h2, section h2 { font-size: clamp(1.5rem, 4vw, 2rem); margin-bottom: 40px;} /* Adjusted clamp values for mobile section h2 */
    
    .v2-product-grid { gap: 20px; } /* Smaller gap on mobile */
    .v2-product-card img { height: 300px; } /* Smaller image height on mobile */

    .about-content, .contact-info { max-width: 100%; padding: 0 10px; } /* Full width for content on mobile */
    .about-content p, .contact-info p { font-size: 1rem; line-height: 1.6; } /* Smaller font and line-height for mobile paragraphs */

    .v2-footer { padding: 50px 20px 20px; }
    .v2-footer-content { grid-template-columns: 1fr; border-bottom: none; padding-bottom: 0; margin-bottom: 20px; }
    .footer-column { text-align: center; margin-bottom: 30px; }
    .footer-column.newsletter input, .v2-button-sub { max-width: 300px; margin-left: auto; margin-right: auto; }
}
