/* ============================================================
   Whistling Duck — Main Stylesheet
   ============================================================ */

/* --- Variables --- */
:root {
    --green-dark:   #2C4A2E;
    --green-mid:    #3D6B40;
    --green-light:  #8BAE6A;
    --green-pale:   #F0F5EC;
    --gold:         #C8A94A;
    --gold-light:   #E8D08A;
    --cream:        #FAF8F3;
    --text:         #1A2E1C;
    --text-muted:   #5A6B5C;
    --border:       #D8DDD4;
    --white:        #FFFFFF;
    --shadow:       0 2px 12px rgba(44,74,46,0.10);
    --radius:       8px;
    --radius-lg:    16px;
    --transition:   0.2s ease;
    --max-width:    1200px;
    --font-body:    'Georgia', 'Times New Roman', serif;
    --font-ui:      system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    color: var(--text);
    background: var(--cream);
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

img { max-width: 100%; height: auto; display: block; object-fit: scale-down; background-color: white}

a { color: var(--green-mid); text-decoration: none; }
a:hover { color: var(--green-dark); text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.25; font-family: var(--font-body); color: var(--green-dark); }

/* --- Layout --- */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.site-main { flex: 1; }

/* ============================================================
   Header
   ============================================================ */
.site-header {
    background: var(--green-dark);
    color: var(--white);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
    gap: 16px;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--white);
    flex-shrink: 0;
}

.logo-link:hover { color: var(--gold-light); text-decoration: none; }

.site-name {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    font-family: var(--font-body);
}

.site-nav { display: flex; align-items: center; }

.nav-links {
    list-style: none;
    display: flex;
    gap: 4px;
    align-items: center;
}

.nav-links a {
    display: block;
    padding: 8px 14px;
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-family: var(--font-ui);
    font-size: 0.92rem;
    border-radius: var(--radius);
    transition: background var(--transition), color var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    background: rgba(255,255,255,0.12);
    color: var(--white);
    text-decoration: none;
}

.nav-links a.active { color: var(--gold-light); }

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: var(--transition);
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
    background: var(--green-dark);
    color: rgba(255,255,255,0.75);
    padding: 40px 24px;
    margin-top: auto;
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.footer-brand { font-size: 1.25rem; font-weight: 700; color: var(--white); }
.footer-tagline { font-style: italic; color: var(--gold-light); }

.footer-nav {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-nav a {
    color: rgba(255,255,255,0.7);
    font-family: var(--font-ui);
    font-size: 0.875rem;
}

.footer-nav a:hover { color: var(--white); text-decoration: none; }
.footer-copy { font-size: 0.8rem; color: rgba(255,255,255,0.45); }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    border-radius: var(--radius);
    font-family: var(--font-ui);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid transparent;
    transition: background var(--transition), color var(--transition), border-color var(--transition), box-shadow var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn--primary {
    background: var(--green-mid);
    color: var(--white);
    border-color: var(--green-mid);
}

.btn--primary:hover {
    background: var(--green-dark);
    border-color: var(--green-dark);
    color: var(--white);
    text-decoration: none;
}

.btn--outline {
    background: transparent;
    color: var(--green-mid);
    border-color: var(--green-mid);
}

.btn--outline:hover {
    background: var(--green-pale);
    text-decoration: none;
}

.btn--sm { padding: 7px 16px; font-size: 0.875rem; }
.btn--lg { padding: 14px 36px; font-size: 1.05rem; }

/* ============================================================
   Hero
   ============================================================ */
.hero {
    background: linear-gradient(135deg, var(--green-dark) 0%, var(--green-mid) 60%, var(--green-light) 100%);
    color: var(--white);
    padding: 100px 24px;
    text-align: center;
}

.hero-inner { max-width: 700px; margin: 0 auto; }

.hero-headline {
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: var(--white);
    margin-bottom: 20px;
    font-style: italic;
}

.hero-sub {
    font-size: 1.15rem;
    color: rgba(255,255,255,0.88);
    margin-bottom: 36px;
    line-height: 1.8;
}

/* Features */
.features { padding: 72px 24px; background: var(--white); }
.features-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 32px;
}

.feature-card {
    text-align: center;
    padding: 32px 24px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--cream);
}

.feature-icon { font-size: 2.5rem; margin-bottom: 12px; }
.feature-card h3 { margin-bottom: 8px; font-size: 1.1rem; }
.feature-card p { color: var(--text-muted); font-size: 0.95rem; }

/* ============================================================
   Page Hero (inner pages)
   ============================================================ */
.page-hero {
    padding: 60px 24px;
    text-align: center;
}

.page-hero--green {
    background: linear-gradient(135deg, var(--green-dark), var(--green-mid));
    color: var(--white);
}

.page-hero--dark {
    background: var(--green-dark);
    color: var(--white);
}

.page-hero-inner h1 { color: var(--white); font-size: clamp(1.75rem, 4vw, 2.75rem); margin-bottom: 10px; }
.page-hero-inner p { color: rgba(255,255,255,0.8); font-size: 1.05rem; }

/* ============================================================
   Products
   ============================================================ */
.products-section { padding: 48px 0; }

.product-filters {
    margin-bottom: 24px;
}

.filter-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-search {
    flex: 1;
    min-width: 200px;
    padding: 9px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-family: var(--font-ui);
    background: var(--white);
}

.filter-select {
    padding: 9px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-family: var(--font-ui);
    background: var(--white);
    cursor: pointer;
}

.subcat-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

.pill {
    padding: 5px 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    font-family: var(--font-ui);
    font-size: 0.8rem;
    color: var(--text-muted);
    background: var(--white);
    transition: var(--transition);
    text-decoration: none;
}

.pill:hover, .pill--active {
    background: var(--green-mid);
    color: var(--white);
    border-color: var(--green-mid);
    text-decoration: none;
}

.category-section { margin-bottom: 48px; }
.category-heading {
    font-size: 1.6rem;
    border-bottom: 2px solid var(--green-light);
    padding-bottom: 8px;
    margin-bottom: 20px;
}

.subcategory-heading {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    margin-top: 24px;
    font-style: italic;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.product-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--white);
    text-decoration: none;
    color: var(--text);
    transition: box-shadow var(--transition), transform var(--transition);
    display: block;
}

.product-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-3px);
    text-decoration: none;
    color: var(--text);
}

.product-image-wrap {
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--green-pale);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image-wrap img { width: 100%; height: 100%;background-color: white; object-fit: scale-down; }

.product-image-placeholder {
    font-size: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.product-info { padding: 16px; }
.product-brand { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--green-mid); font-family: var(--font-ui); margin-bottom: 4px; }
.product-name { font-size: 1rem; font-weight: 600; margin-bottom: 4px; }
.product-origin { font-size: 0.82rem; color: var(--text-muted); font-family: var(--font-ui); }

/* Product Detail */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    padding: 48px 0;
    align-items: start;
}

.product-detail-image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--green-pale);
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-detail-image img { width: 100%; height: 100%; object-fit: scale-down; }

.product-image-placeholder--lg { font-size: 6rem; }

.product-detail-brand {
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    color: var(--green-mid);
    font-family: var(--font-ui);
    margin-bottom: 8px;
}

.product-detail-name { font-size: 2rem; margin-bottom: 16px; }

.product-detail-origin,
.product-detail-category {
    font-family: var(--font-ui);
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.label { font-weight: 600; color: var(--text); }

.product-detail-description {
    margin: 24px 0;
}

.product-detail-description h2 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.product-detail-supplier {
    margin: 24px 0;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--cream);
}

.product-detail-supplier h2 { font-size: 1rem; margin-bottom: 8px; }
.supplier-name { font-weight: 600; margin-bottom: 10px; }

.supplier-links { display: flex; gap: 10px; flex-wrap: wrap; }

.supplier-link {
    padding: 4px 12px;
    border: 1px solid var(--green-mid);
    border-radius: 999px;
    font-size: 0.8rem;
    font-family: var(--font-ui);
    color: var(--green-mid);
}

.supplier-link:hover {
    background: var(--green-mid);
    color: var(--white);
    text-decoration: none;
}

.product-detail-actions {
    display: flex;
    gap: 12px;
    margin-top: 28px;
    flex-wrap: wrap;
}

/* Breadcrumb */
.breadcrumb {
    font-family: var(--font-ui);
    font-size: 0.875rem;
    color: var(--text-muted);
    padding: 20px 0 8px;
}

.breadcrumb a { color: var(--green-mid); }
.breadcrumb span[aria-hidden] { margin: 0 6px; }

/* ============================================================
   About
   ============================================================ */
.about-content { padding: 56px 0; }

.about-content .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: start;
}

.about-text h2 { font-size: 1.75rem; margin-bottom: 16px; }
.about-text p { margin-bottom: 16px; color: var(--text); line-height: 1.8; }

/* Slideshow */
.slideshow {
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    background: var(--green-pale);
    box-shadow: var(--shadow);
}

.slideshow-track { position: relative; }

.slide {
    display: none;
    position: relative;
}

.slide--active { display: block; }

.slide img {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
}

.slide-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.6));
    color: var(--white);
    padding: 24px 16px 12px;
    font-size: 0.9rem;
    font-family: var(--font-ui);
}

.slideshow-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px;
    background: var(--green-dark);
}

.slide-btn {
    background: none;
    border: 1px solid rgba(255,255,255,0.4);
    color: var(--white);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.slide-btn:hover { background: rgba(255,255,255,0.15); }

.slide-dots { display: flex; gap: 6px; }

.slide-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.35);
    cursor: pointer;
    transition: var(--transition);
}

.slide-dot--active, .slide-dot:hover { background: var(--white); }

.slideshow--placeholder {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slideshow-empty { color: var(--text-muted); font-style: italic; font-family: var(--font-ui); }

/* ============================================================
   Team
   ============================================================ */
.team-section { padding: 56px 0; }

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 32px;
}

.team-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.team-photo {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.team-photo-placeholder {
    width: 100%;
    aspect-ratio: 1;
    background: var(--green-mid);
    color: var(--white);
    font-size: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-body);
}

.team-info { padding: 24px; }
.team-name { font-size: 1.2rem; margin-bottom: 4px; }
.team-title { color: var(--green-mid); font-family: var(--font-ui); font-size: 0.9rem; margin-bottom: 12px; font-style: italic; }
.team-bio { color: var(--text-muted); font-size: 0.92rem; line-height: 1.7; }

/* ============================================================
   Order Form
   ============================================================ */
.order-layout { padding: 40px 0 24px; }

.order-section {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 24px;
}

.order-section-title {
    font-size: 1.3rem;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group--full { grid-column: 1 / -1; }

label {
    font-family: var(--font-ui);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
}

.required { color: #c0392b; }

input[type=text],
input[type=email],
input[type=tel],
input[type=number],
select,
textarea {
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-family: var(--font-ui);
    color: var(--text);
    background: var(--white);
    transition: border-color var(--transition), box-shadow var(--transition);
    width: 100%;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--green-mid);
    box-shadow: 0 0 0 3px rgba(61,107,64,0.12);
}

input:disabled, select:disabled { background: #F5F5F5; color: var(--text-muted); cursor: not-allowed; }

.field-error { color: #c0392b; font-size: 0.8rem; font-family: var(--font-ui); }

/* Order Items */
.order-items { margin-bottom: 16px; }

.item-row {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    padding: 16px;
    background: var(--cream);
    border-radius: var(--radius);
    margin-bottom: 12px;
    border: 1px solid var(--border);
}

.item-row-fields {
    flex: 1;
    display: grid;
    grid-template-columns: 2.5fr 1fr 0.7fr 1fr 1fr;
    gap: 12px;
    align-items: end;
}

.item-product-group { position: relative; }

.item-search-wrap { position: relative; }

.item-search {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-family: var(--font-ui);
}

.item-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
    max-height: 240px;
    overflow-y: auto;
    z-index: 50;
    display: none;
    box-shadow: var(--shadow);
}

.item-dropdown.open { display: block; }

.dropdown-item {
    padding: 10px 14px;
    cursor: pointer;
    font-family: var(--font-ui);
    font-size: 0.88rem;
    border-bottom: 1px solid var(--border);
}

.dropdown-item:last-child { border-bottom: none; }
.dropdown-item:hover { background: var(--green-pale); }

.dropdown-group-label {
    padding: 6px 14px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    background: #F5F5F0;
    border-bottom: 1px solid var(--border);
}

.item-price-display,
.item-total-display {
    font-family: var(--font-ui);
    font-size: 0.95rem;
    padding: 10px 0;
    font-weight: 600;
}

.item-remove {
    background: none;
    border: 1px solid #e74c3c;
    color: #e74c3c;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-bottom: 4px;
    transition: var(--transition);
}

.item-remove:hover { background: #e74c3c; color: var(--white); }

.order-total {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    font-family: var(--font-ui);
    font-size: 1.1rem;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.order-total strong { font-size: 1.3rem; color: var(--green-dark); }

.order-submit-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 24px 0 40px;
    text-align: center;
}

.order-note { font-family: var(--font-ui); font-size: 0.875rem; color: var(--text-muted); }

.order-error {
    background: #fdf2f2;
    border: 1px solid #f5c6c6;
    color: #c0392b;
    border-radius: var(--radius);
    padding: 14px 18px;
    font-family: var(--font-ui);
    font-size: 0.9rem;
    margin-top: 16px;
}

/* ============================================================
   Contact
   ============================================================ */
.contact-section { padding: 56px 0; }

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 56px;
    align-items: start;
}

.contact-info h2 { margin-bottom: 12px; }
.contact-info > p { color: var(--text-muted); margin-bottom: 28px; font-family: var(--font-ui); }

.contact-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 20px;
}

.contact-icon { font-size: 1.4rem; flex-shrink: 0; margin-top: 2px; }
.contact-item strong { display: block; margin-bottom: 2px; font-family: var(--font-ui); }
.contact-item p { font-family: var(--font-ui); font-size: 0.9rem; color: var(--text-muted); margin: 0; }
.contact-item a { color: var(--green-mid); }

.contact-form-wrap h2 { margin-bottom: 20px; }

.contact-form { display: flex; flex-direction: column; gap: 16px; }
.contact-form-note { font-family: var(--font-ui); font-size: 0.875rem; color: var(--text-muted); margin-top: 4px; }

/* ============================================================
   Empty state
   ============================================================ */
.empty-state {
    text-align: center;
    padding: 60px 24px;
    color: var(--text-muted);
    font-family: var(--font-ui);
}

/* ============================================================
   Messages
   ============================================================ */
.messages {
    max-width: var(--max-width);
    margin: 16px auto 0;
    padding: 0 24px;
}

.message {
    padding: 12px 16px;
    border-radius: var(--radius);
    font-family: var(--font-ui);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.message--success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.message--error   { background: #f8d7da; color: #721c24; border: 1px solid #f5c6c6; }
.message--warning { background: #fff3cd; color: #856404; border: 1px solid #ffeeba; }
.message--info    { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
    .about-content .container { grid-template-columns: 1fr; }
    .product-detail { grid-template-columns: 1fr; }
    .contact-layout { grid-template-columns: 1fr; }
    .item-row-fields { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 700px) {
    .nav-toggle { display: flex; }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 68px;
        left: 0;
        right: 0;
        background: var(--green-dark);
        padding: 12px;
        box-shadow: 0 8px 16px rgba(0,0,0,0.3);
        z-index: 99;
    }

    .nav-links.open { display: flex; }
    .nav-links li { width: 100%; }
    .nav-links a { padding: 12px 16px; width: 100%; }

    .site-nav { position: static; }

    .form-grid { grid-template-columns: 1fr; }
    .form-group--full { grid-column: 1; }

    .item-row { flex-direction: column; }
    .item-row-fields { grid-template-columns: 1fr; }
}
