@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@600;700&family=Playfair+Display:ital,wght@0,500;1,500;1,600&family=Poppins:wght@300;400;500;600&display=swap');

:root {
    --sage: #97a575;
    --sage-dark: #5c6b44;
    --sage-light: #eef0e6;
    --cream: #f7f6f1;
    --text-dark: #33362b;
    --text-muted: #6b6f5f;
    --white: #ffffff;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    color: var(--text-dark);
    background: var(--white);
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

h1, h2, h3 {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-weight: 500;
    margin: 0 0 16px;
}

.logo {
    font-family: 'Dancing Script', cursive;
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.1;
}

.logo small {
    display: block;
    font-family: 'Poppins', sans-serif;
    font-style: normal;
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    color: var(--text-muted);
}

/* Header */
.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.site-nav {
    display: flex;
    gap: 24px;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.site-nav a.active {
    color: var(--sage-dark);
    font-weight: 600;
}

.header-icons {
    display: flex;
    align-items: center;
    gap: 16px;
}

.lang-switch {
    display: flex;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.lang-switch a {
    color: var(--text-muted);
    padding: 2px 4px;
}

.lang-switch a.active {
    color: var(--sage-dark);
    border-bottom: 2px solid var(--sage-dark);
}

.cart-link {
    position: relative;
    font-size: 1.3rem;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -10px;
    background: var(--sage-dark);
    color: var(--white);
    font-size: 0.7rem;
    padding: 1px 6px;
    border-radius: 999px;
}

/* Decorative leaf/branch motif - each sage section gets its own placement/size/
   density (not a single repeated pattern) so adjacent sections don't visually
   blend into one another. Contact section uses a real cropped-from-the-mockup
   background image instead (see .contact-section below), not a synthetic SVG. */
.hero,
.category-teaser {
    position: relative;
    overflow: hidden;
}

.hero > *,
.category-teaser > * {
    position: relative;
    z-index: 1;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: -15px;
    width: 260px;
    height: 190px;
    background: url('/images/leaf-branch.svg') no-repeat center / contain;
    opacity: 0.7;
    pointer-events: none;
}

.category-teaser::before,
.category-teaser::after {
    content: '';
    position: absolute;
    width: 175px;
    height: 130px;
    background: url('/images/leaf-branch-small.svg') no-repeat center / contain;
    opacity: 0.55;
    pointer-events: none;
}

.category-teaser::before {
    top: 0;
    left: -12px;
}

.category-teaser::after {
    bottom: 0;
    right: -12px;
    transform: rotate(180deg);
}

/* Hero */
.hero {
    background: var(--sage);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 32px;
    padding: 48px 24px;
    color: var(--white);
}

.hero-image {
    flex: 1 1 320px;
    max-width: 380px;
    border: 8px solid var(--white);
}

.hero-text {
    flex: 1 1 380px;
}

.hero-text h1 {
    color: var(--white);
    font-size: 2.4rem;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.btn-primary {
    background: var(--white);
    color: var(--sage-dark);
}

.btn-dark {
    background: var(--sage-dark);
    color: var(--white);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--sage-dark);
    color: var(--sage-dark);
}

/* Section */
.section {
    padding: 64px 24px;
}

.section-alt {
    background: var(--sage-light);
}

.about-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 48px;
    align-items: center;
}

.about-grid img {
    flex: 1 1 380px;
    max-width: 420px;
}

.about-grid .about-text {
    flex: 1 1 380px;
}

/* Category teaser */
.category-teaser {
    background: var(--sage);
    color: var(--white);
    text-align: center;
    padding: 64px 24px;
}

.category-teaser h2 {
    color: var(--white);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 32px;
    margin-top: 32px;
}

.category-card img,
.category-card-placeholder {
    width: 100%;
    height: 240px;
    object-fit: cover;
    border: 6px solid var(--white);
}

.category-card-placeholder {
    background: var(--sage-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    box-sizing: border-box;
}

.category-card h3 {
    color: var(--white);
    margin: 16px 0 8px;
}

/* Contact - background is a real crop from the mockup (leaves + the circular
   illustration baked in, own text painted out), not something recreated with
   CSS - see CategoryDataInitializer-style note in style docs / session notes
   for how contact-bg.jpg was produced. Our own text sits in the left area
   that was painted over in the source image. */
.contact-section {
    background: var(--sage) url('/images/contact-bg.jpg') no-repeat center center / cover;
    color: var(--white);
    padding: 64px 24px;
    min-height: 420px;
    display: flex;
    align-items: center;
}

.contact-content {
    max-width: 480px;
}

.contact-section h2 {
    color: var(--white);
}

.contact-info a {
    display: block;
    margin-top: 8px;
}

/* Footer */
.site-footer {
    padding: 24px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-top: 1px solid #eee;
}

.site-footer ul {
    display: flex;
    gap: 20px;
    list-style: none;
    padding: 0;
}

/* Products page */
.products-layout {
    display: flex;
    gap: 32px;
    align-items: flex-start;
    padding: 32px 24px;
}

.category-sidebar {
    flex: 0 0 220px;
    background: var(--sage);
    color: var(--white);
    border-radius: 8px;
    overflow: hidden;
}

.category-sidebar .group-title {
    padding: 16px 20px 8px;
    font-weight: 600;
    font-size: 0.95rem;
}

.category-sidebar a {
    display: block;
    padding: 10px 20px;
    font-size: 0.9rem;
}

.category-sidebar a:hover,
.category-sidebar a.active {
    background: rgba(255, 255, 255, 0.2);
}

.product-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 28px;
}

.product-card {
    text-align: center;
}

.product-card .image-wrap {
    background: var(--sage-light);
    aspect-ratio: 1;
    overflow: hidden;
}

.product-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card h4 {
    margin: 12px 0 4px;
    font-size: 1rem;
}

.product-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.product-price {
    font-weight: 600;
    margin-bottom: 10px;
}

.product-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.unavailable-badge {
    display: inline-block;
    background: #c0644a;
    color: var(--white);
    font-size: 0.7rem;
    padding: 2px 10px;
    border-radius: 999px;
    margin-bottom: 8px;
}

/* Product detail */
.product-detail {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    padding: 40px 24px;
}

.product-detail-images {
    flex: 1 1 380px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.product-detail-info {
    flex: 1 1 380px;
}

/* Cart page */
.cart-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 32px;
}

.cart-table th,
.cart-table td {
    text-align: left;
    padding: 12px 8px;
    border-bottom: 1px solid #eee;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.form-grid label {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 6px;
    color: var(--text-muted);
}

.form-grid input,
.form-grid textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.9rem;
}

.form-grid textarea {
    grid-column: 1 / -1;
    min-height: 100px;
}

.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.alert-success {
    background: #e4efe0;
    color: var(--sage-dark);
}

.alert-error {
    background: #fbe6e2;
    color: #a13d2a;
}

.empty-state {
    text-align: center;
    padding: 48px 0;
    color: var(--text-muted);
}

@media (max-width: 720px) {
    .products-layout {
        flex-direction: column;
    }
    .category-sidebar {
        flex: none;
        width: 100%;
    }
}
