/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Lora:wght@400;600;700&family=Open+Sans:wght@400;500;600&display=swap');

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* TrueCottage Color Palette */
    --text-primary: #333333;        /* Charcoal - main text */
    --text-headers: #4A3728;        /* Warm Espresso - headers */
    --color-primary: #7B8E7E;       /* Sage Green - buttons/links */
    --color-primary-hover: #5f6f62; /* Darker sage for hover */
    --color-accent: #C06C4D;        /* Terracotta - accents */
    --color-accent-hover: #a55a3d;  /* Darker terracotta */
    --bg-cream: #F9F7F2;            /* Cream/Linen - backgrounds */
    --bg-white: #FFFFFF;            /* Pure white for cards */
    --border-light: #e8e4dc;        /* Subtle borders */
}

body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.7;
    color: var(--text-primary);
    background-color: var(--bg-cream);
    font-size: 16px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Lora', Georgia, serif;
    color: var(--text-headers);
    font-weight: 600;
    line-height: 1.3;
}

/* Header and Navigation */
header {
    background-color: var(--bg-white);
    box-shadow: 0 2px 8px rgba(74, 55, 40, 0.08);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo h1 {
    color: var(--text-headers);
    font-size: 1.8rem;
    font-family: 'Lora', Georgia, serif;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: color 0.3s;
    font-size: 15px;
}

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

/* Main Content */
main {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 2rem;
    background-color: var(--bg-white);
    border-radius: 12px;
    margin-bottom: 3rem;
    box-shadow: 0 2px 12px rgba(74, 55, 40, 0.06);
}

.hero h2 {
    font-size: 2.8rem;
    color: var(--text-headers);
    margin-bottom: 1rem;
    font-family: 'Lora', Georgia, serif;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 3rem;
    opacity: 0.85;
}

/* Zip Code Search */
.search-container {
    max-width: 600px;
    margin: 0 auto 2rem;
}

.zip-search-form {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.zip-search-form input[type="text"] {
    flex: 1;
    min-width: 200px;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    transition: border-color 0.3s;
}

.zip-search-form input[type="text"]:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(123, 142, 126, 0.1);
}

.zip-search-form input[type="text"]::placeholder {
    color: #999;
}

.zip-search-form input[type="text"].error {
    border-color: #d32f2f;
}

.error-message {
    color: #d32f2f;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    margin-bottom: 0;
}

.zip-search-form .btn {
    white-space: nowrap;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.search-hint {
    font-size: 0.9rem;
    color: #888;
    font-style: italic;
}

.secondary-cta {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid #e0e0e0;
}

.secondary-cta p {
    font-size: 1rem;
    color: #666;
    margin-bottom: 0;
}

.secondary-cta a {
    color: var(--color-accent);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.secondary-cta a:hover {
    border-bottom-color: var(--color-accent);
    color: var(--color-accent-hover);
}

/* Buttons */
.btn {
    padding: 0.85rem 2.25rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Open Sans', sans-serif;
}

.btn-primary {
    background-color: var(--color-primary);
    color: white;
    box-shadow: 0 2px 8px rgba(123, 142, 126, 0.25);
}

.btn-primary:hover {
    background-color: var(--color-primary-hover);
    box-shadow: 0 4px 12px rgba(123, 142, 126, 0.35);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: var(--bg-white);
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

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

/* Features Section */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature {
    text-align: center;
    padding: 2.5rem 2rem;
    background-color: var(--bg-white);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(74, 55, 40, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(74, 55, 40, 0.1);
}

.feature h3 {
    color: var(--text-headers);
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.feature p {
    font-size: 1rem;
    line-height: 1.7;
}

/* Cart Badge */
.cart-link {
    position: relative;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #d32f2f;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    line-height: 1;
}

/* User Menu & Hamburger */
.nav-links li {
    display: flex;
    align-items: center;
}

.user-menu {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-greeting {
    color: #2d5016;
    font-weight: 600;
    font-size: 1rem;
}

.hamburger-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: transform 0.3s;
}

.hamburger-btn:hover {
    transform: scale(1.1);
}

.hamburger-btn span {
    display: block;
    width: 24px;
    height: 3px;
    background-color: #2d5016;
    border-radius: 2px;
    transition: all 0.3s;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
    z-index: 1000;
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1.25rem;
    color: #333;
    text-decoration: none;
    transition: background-color 0.2s;
    font-weight: 500;
}

.dropdown-menu a:hover {
    background-color: #f5f5f5;
    color: #2d5016;
}

.dropdown-menu hr {
    margin: 0.5rem 0;
    border: none;
    border-top: 1px solid #e0e0e0;
}

.dropdown-menu a:first-child {
    border-radius: 8px 8px 0 0;
}

.dropdown-menu a:last-child {
    border-radius: 0 0 8px 8px;
}

/* Footer */
footer {
    background-color: var(--bg-white);
    text-align: center;
    padding: 2.5rem 2rem;
    margin-top: 4rem;
    color: var(--text-primary);
    opacity: 0.75;
    border-top: 1px solid var(--border-light);
    font-size: 0.95rem;
}

/* Mobile Responsive Styles */
@media (max-width: 968px) {
    header {
        padding: 1rem;
    }

    nav {
        flex-direction: column;
        gap: 1rem;
    }

    .logo h1 {
        font-size: 1.5rem;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
        font-size: 14px;
    }

    .nav-links a {
        font-size: 14px;
    }

    main {
        padding: 1rem;
    }

    .hero {
        padding: 2.5rem 1.5rem;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .zip-search-form {
        flex-direction: column;
    }

    .zip-search-form input[type="text"] {
        min-width: 100%;
    }

    .features {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .feature {
        padding: 2rem 1.5rem;
    }

    .user-greeting {
        display: none;
    }
}

@media (max-width: 600px) {
    .logo h1 {
        font-size: 1.3rem;
    }

    .nav-links {
        gap: 0.75rem;
        font-size: 13px;
    }

    .nav-links a {
        font-size: 13px;
    }

    .hero h2 {
        font-size: 1.6rem;
    }

    .hero p {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
    }

    .zip-search-form .btn {
        width: 100%;
    }

    footer {
        padding: 2rem 1rem;
        font-size: 0.85rem;
    }
}
