:root {
    /* Earthy, Organic Backgrounds */
    --bg-color: #F7F5F0;
    --surface-color: #FFFFFF;

    /* ACCESSIBILITY UPDATE: Darkened text colors to pass WCAG AAA contrast requirements */
    --text-main: #2C2926;
    --text-muted: #5C5852;

    /* ACCESSIBILITY UPDATE: Deepened brand colors to pass WCAG AA contrast against white */
    --brand-primary: #4A5841; /* Deeper Sage Green */
    --brand-primary-hover: #374230;
    --brand-secondary: #9E5531; /* Deeper Fired Clay / Terracotta */
    --brand-secondary-hover: #7D4326;
    --brand-pastel: #EAECE7;

    --border-light: #E4E0D8;
    --focus-ring: #9E5531; /* Distinct color for keyboard navigation focus */

    --shadow-soft: 0 8px 20px rgba(44, 41, 38, 0.06);
    --shadow-hover: 0 15px 30px rgba(44, 41, 38, 0.1);

    --radius-lg: 20px;
    --radius-md: 12px;
    --radius-sm: 6px;
}

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

/* ACCESSIBILITY UPDATE: Global focus outline for keyboard users */
:focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 3px;
}

body {
    font-family: 'Nunito', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased; /* Better text rendering */
}

/* Header */
.navbar {
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 100;
}
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.brand-logo {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--brand-primary);
    text-decoration: none;
    letter-spacing: -0.5px;
    transition: transform 0.2s ease;
}
.brand-logo:hover {
    transform: scale(1.02);
}
.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}
.nav-btn {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 800;
    transition: color 0.2s;
    /* MOBILE UPDATE: Ensure links have adequate touch height */
    padding: 0.5rem;
}
.nav-btn:hover {
    color: var(--brand-primary);
}
.primary-nav-btn {
    background-color: var(--brand-pastel);
    color: var(--brand-primary);
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
}
.primary-nav-btn:hover {
    background-color: var(--brand-primary);
    color: #fff;
}

/* Hero Section */
.hero-banner {
    background: linear-gradient(135deg, #4A5841 0%, #5E7055 100%);
    color: #fff;
    padding: 5rem 1.5rem 0 1.5rem;
    text-align: center;
    position: relative;
}
.hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding-bottom: 4.5rem;
    position: relative;
    z-index: 10;
}
.hero-eyebrow {
    background: rgba(255,255,255,0.15);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-weight: 800;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-block;
    margin-bottom: 1.5rem;
}
.hero-content h1 {
    font-size: clamp(2.2rem, 5vw, 3.2rem); /* MOBILE UPDATE: Fluid typography scales perfectly on all devices */
    font-weight: 900;
    margin-bottom: 1.2rem;
    line-height: 1.15;
    text-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.hero-content p {
    font-size: clamp(1.1rem, 2vw, 1.2rem);
    margin-bottom: 2.5rem;
    font-weight: 600;
    opacity: 0.95;
}

.wave-container {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}
.wave-svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: clamp(50px, 8vw, 90px);
    fill: var(--bg-color);
}

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--brand-secondary);
    color: #fff;
    padding: 1rem 2.2rem;
    min-height: 48px; /* ACCESSIBILITY UPDATE: Minimum touch target size */
    border-radius: 50px;
    text-decoration: none;
    font-weight: 800;
    font-size: 1.1rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 6px 15px rgba(158, 85, 49, 0.3);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
}
.btn-primary:hover {
    background-color: var(--brand-secondary-hover);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 20px rgba(158, 85, 49, 0.4);
}
.btn-secondary {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 48px; /* ACCESSIBILITY UPDATE: Minimum touch target size */
    background-color: var(--brand-pastel);
    color: var(--brand-primary);
    border: 2px solid transparent;
    padding: 0.8rem;
    border-radius: var(--radius-sm);
    font-weight: 800;
    font-size: 1.05rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 1.5rem;
}
.btn-secondary:hover {
    background-color: var(--brand-primary);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(74, 88, 65, 0.2);
}
.btn-disabled {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 48px;
    background-color: #EAEAE5;
    color: var(--text-muted);
    border: none;
    padding: 0.8rem;
    border-radius: var(--radius-sm);
    font-weight: 800;
    margin-top: 1.5rem;
    cursor: not-allowed;
}

/* Delivery Bar */
.local-delivery-bar {
    padding: 1.5rem;
    text-align: center;
    position: relative;
    z-index: 20;
    margin-top: -1.5rem;
}
.delivery-badge {
    background-color: var(--brand-secondary);
    color: #fff;
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 800;
    box-shadow: 0 4px 10px rgba(158, 85, 49, 0.2);
    display: inline-block;
    margin-bottom: 1rem;
}
.local-delivery-bar h2 {
    font-size: clamp(1.4rem, 4vw, 1.8rem);
    color: var(--text-main);
    font-weight: 900;
    margin-bottom: 0.5rem;
}

/* Storefront */
.storefront {
    max-width: 1200px;
    margin: 3rem auto 4rem auto;
    padding: 0 1.5rem;
}
.section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}
.section-header h2 {
    font-size: clamp(1.8rem, 5vw, 2.3rem);
    font-weight: 900;
    color: var(--brand-primary);
}
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* MOBILE UPDATE: Slightly smaller min-width to prevent overflow on very small phones */
    gap: 2rem;
}
.product-card {
    background-color: var(--surface-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-light);
}
@media (hover: hover) { /* Ensure hover effects only apply to devices with mice */
    .product-card:hover {
        transform: translateY(-6px);
        box-shadow: var(--shadow-hover);
        border-color: var(--brand-primary);
    }
    .product-card:hover .emoji-icon {
        transform: scale(1.1) rotate(5deg);
    }
}
.product-image {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-bottom: 1px solid var(--border-light);
}
.emoji-icon {
    font-size: 3.5rem;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.08));
    transition: transform 0.3s ease;
}

.placeholder-soap { background: linear-gradient(135deg, #E6E2D6 0%, #D4CEBC 100%); }
.placeholder-butter { background: linear-gradient(135deg, #F0EADB 0%, #E3D9C1 100%); }
.placeholder-scrub { background: linear-gradient(135deg, #E8D3C5 0%, #D9BBAC 100%); }

.product-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.product-info h3 {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}
.product-desc {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}
.status-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: var(--text-main);
    color: #fff;
    padding: 0.3rem 0.9rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 800;
}

/* Forms */
.form-control {
    margin-bottom: 1.2rem;
    text-align: left;
}
.form-control label {
    display: block;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}
.form-control select,
.form-control input,
.form-control textarea {
    width: 100%;
    min-height: 48px; /* ACCESSIBILITY UPDATE: Minimum touch target size */
    padding: 0.8rem 1rem;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 16px; /* MOBILE UPDATE: Must be 16px to prevent iOS Safari auto-zoom bug */
    font-weight: 600;
    background-color: #FCFBF9;
    color: var(--text-main);
    transition: all 0.2s ease;
}
.form-control select:focus,
.form-control input:focus,
.form-control textarea:focus {
    outline: none;
    border-color: var(--brand-primary);
    background-color: #fff;
    box-shadow: 0 0 0 4px var(--brand-pastel);
}

/* Checkout Section */
.checkout-section {
    background-color: #3B4236;
    color: #fff;
    padding: 5rem 1.5rem 3rem 1.5rem;
    border-top-left-radius: 30px;
    border-top-right-radius: 30px;
}
.checkout-container {
    max-width: 800px;
    margin: 0 auto;
}
.checkout-header {
    text-align: center;
    margin-bottom: 2.5rem;
}
.checkout-header h2 {
    font-size: clamp(1.8rem, 5vw, 2.3rem);
    font-weight: 900;
}
.checkout-header p {
    color: #D1D6CE;
    font-weight: 600;
    font-size: 1.05rem;
    margin-top: 0.5rem;
}
.styled-form {
    background-color: var(--surface-color);
    padding: clamp(1.5rem, 5vw, 3rem); /* MOBILE UPDATE: Fluid padding for smaller screens */
    border-radius: var(--radius-lg);
    color: var(--text-main);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}
.input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.2rem;
}
.security-note {
    font-size: 0.9rem;
    color: #AB3737;
    font-weight: 800;
    margin-bottom: 0.8rem;
    background: #FFF5F5;
    padding: 0.8rem;
    border-radius: var(--radius-sm);
    line-height: 1.4;
}
.btn-submit {
    width: 100%;
    margin-top: 1rem;
}
.footer-bottom {
    text-align: center;
    margin-top: 3rem;
    color: #A3ACA4;
    font-weight: 600;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 2rem;
    font-size: 0.9rem;
}

/* Toast Notification */
.toast {
    visibility: hidden;
    min-width: 250px;
    background-color: var(--text-main);
    color: #fff;
    text-align: center;
    border-radius: 50px;
    padding: 1rem 1.5rem;
    position: fixed;
    z-index: 1000;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    font-size: 1.05rem;
    font-weight: 800;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: opacity 0.3s, bottom 0.3s ease;
}
.toast.show {
    visibility: visible;
    opacity: 1;
    bottom: 50px;
}

/* MOBILE SPECIFIC BREAKPOINT */
@media (max-width: 768px) {
    .nav-links {
        display: none; /* Can be replaced with a hamburger menu later if you add more pages */
    }
    .checkout-section {
        border-top-left-radius: 20px;
        border-top-right-radius: 20px;
    }
    .hero-banner {
        padding-top: 4rem;
    }
    .toast.show {
        width: 90%;
        bottom: 20px;
    }
}
