/* ==========================================================================
   Buispakken.nl — Stylesheet
   A warm, Dutch workshop aesthetic: orange sun, green fields, honest work.
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
    /* Core palette — pulled from the brand */
    --c-orange:      #F26B1F;
    --c-orange-deep: #D14A0A;
    --c-orange-soft: #FFE4D1;
    --c-green:       #1F8B4C;
    --c-green-deep:  #14633A;
    --c-green-soft:  #E3F3E8;
    --c-cream:       #FBF8F1;
    --c-ink:         #1A1A1A;
    --c-ink-soft:    #4A4A4A;
    --c-line:        #E6E2D6;
    --c-white:       #FFFFFF;
    --c-yellow:      #FFD233;
    --c-red:         #D83434;

    /* Semantic */
    --bg:        var(--c-cream);
    --fg:        var(--c-ink);
    --fg-soft:   var(--c-ink-soft);
    --accent:    var(--c-orange);
    --primary:   var(--c-green);
    --line:      var(--c-line);
    --card:      var(--c-white);

    /* Type */
    --font-display: "Fraunces", "Playfair Display", Georgia, serif;
    --font-body:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-mono:    "JetBrains Mono", ui-monospace, monospace;

    /* Spacing rhythm */
    --s1: .25rem; --s2: .5rem; --s3: .75rem; --s4: 1rem;
    --s5: 1.5rem; --s6: 2rem; --s7: 3rem; --s8: 4rem; --s9: 6rem;

    /* Layout */
    --container: 1200px;
    --radius:    6px;
    --radius-lg: 14px;

    /* Elevation */
    --shadow-sm: 0 1px 2px rgba(20, 30, 10, 0.04), 0 2px 6px rgba(20, 30, 10, 0.04);
    --shadow:    0 2px 4px rgba(20, 30, 10, 0.06), 0 8px 24px rgba(20, 30, 10, 0.06);
    --shadow-lg: 0 10px 40px rgba(20, 30, 10, 0.12);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--fg);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: transparent; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4, h5 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em; margin: 0 0 var(--s4); line-height: 1.15; }
p { margin: 0 0 var(--s4); }

/* ---------- Layout primitives ---------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--s5); }
.stack > * + * { margin-top: var(--s4); }
.section { padding: var(--s9) 0; }
.section-tight { padding: var(--s7) 0; }

/* ---------- Header ---------- */
.topbar {
    background: var(--c-ink);
    color: var(--c-cream);
    font-size: .8rem;
    padding: var(--s2) 0;
    letter-spacing: .02em;
}
.topbar .container { display: flex; justify-content: space-between; align-items: center; }
.topbar a { opacity: .85; transition: opacity .15s; }
.topbar a:hover { opacity: 1; }

.header {
    background: var(--c-cream);
    border-bottom: 1px solid var(--line);
    position: sticky; top: 0; z-index: 50;
    backdrop-filter: blur(6px);
}
.header .container {
    display: flex; align-items: center; justify-content: space-between;
    padding-top: var(--s4); padding-bottom: var(--s4);
    gap: var(--s5);
}
.brand {
    display: flex; flex-direction: column; line-height: 1;
    font-family: var(--font-display);
    color: var(--c-ink);
}
.brand-name { font-size: 1.75rem; font-weight: 600; letter-spacing: -0.02em; }
.brand-tag  { font-size: .75rem; font-style: italic; color: var(--fg-soft); margin-top: 2px; }

.nav { display: flex; align-items: center; gap: var(--s5); flex-wrap: wrap; }
.nav a {
    font-size: .85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: var(--s2) 0;
    position: relative;
}
.nav a:hover { color: var(--c-orange); }
.nav a.active::after {
    content: ''; position: absolute; bottom: -4px; left: 0; right: 0;
    height: 2px; background: var(--c-orange);
}

.cart-btn {
    display: inline-flex; align-items: center; gap: var(--s2);
    background: var(--c-orange); color: white;
    padding: var(--s3) var(--s4);
    border-radius: var(--radius);
    font-weight: 600; font-size: .85rem;
    transition: transform .15s, background .15s;
}
.cart-btn:hover { background: var(--c-orange-deep); transform: translateY(-1px); }
.cart-count {
    background: white; color: var(--c-orange);
    border-radius: 999px;
    min-width: 1.4rem; height: 1.4rem;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: .7rem; font-weight: 700;
}

/* ---------- Hero ---------- */
.hero {
    background: linear-gradient(180deg, var(--c-orange) 0%, var(--c-orange-deep) 100%);
    color: white;
    position: relative;
    overflow: hidden;
    padding: var(--s9) 0 0;
}
.hero::after {
    content: '';
    position: absolute; left: 0; right: 0; bottom: -1px; height: 80px;
    background: var(--c-green);
    clip-path: ellipse(70% 100% at 50% 100%);
}
.hero .container { position: relative; z-index: 2; display: grid; grid-template-columns: 1.2fr 1fr; gap: var(--s7); align-items: center; padding-bottom: var(--s9); }
.hero-kicker {
    font-size: .8rem; text-transform: uppercase; letter-spacing: .18em;
    opacity: .85; margin-bottom: var(--s3);
}
.hero h1 {
    font-size: clamp(2.4rem, 5vw, 4rem);
    margin-bottom: var(--s5);
}
.hero p { font-size: 1.05rem; max-width: 48ch; opacity: .95; }
.hero-cta { display: flex; gap: var(--s3); margin-top: var(--s5); flex-wrap: wrap; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: var(--s2);
    padding: var(--s3) var(--s5);
    border-radius: var(--radius);
    font-weight: 600; font-size: .9rem;
    letter-spacing: .02em;
    transition: transform .15s, background .15s, color .15s, box-shadow .15s;
    border: 2px solid transparent;
}
.btn-primary { background: var(--c-green); color: white; }
.btn-primary:hover { background: var(--c-green-deep); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-accent { background: var(--c-yellow); color: var(--c-ink); }
.btn-accent:hover { background: #FFDC5C; transform: translateY(-1px); }
.btn-outline { border-color: currentColor; }
.btn-outline:hover { background: currentColor; color: var(--c-orange); }
.btn-ghost { color: var(--c-ink); background: white; border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--c-ink); }
.btn-lg { padding: var(--s4) var(--s6); font-size: 1rem; }

/* ---------- Section: green band (mimics current site) ---------- */
.band-green {
    background: var(--c-green);
    color: white;
    position: relative;
}
.band-green h2, .band-green h3 { color: white; }
.band-green::before, .band-green::after {
    content: ''; display: block; height: 40px;
    background: var(--c-green);
}
.band-green::before { clip-path: ellipse(70% 100% at 50% 0%); margin-top: -40px; background: var(--c-green); }
.band-green::after  { clip-path: ellipse(70% 100% at 50% 100%); margin-bottom: -40px; }

/* ---------- Section heading ---------- */
.section-head { text-align: center; margin-bottom: var(--s7); }
.section-head h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); }
.section-head .eyebrow {
    display: inline-block;
    font-size: .75rem; text-transform: uppercase; letter-spacing: .2em;
    color: var(--c-orange);
    margin-bottom: var(--s3);
}
.section-head p { max-width: 60ch; margin: 0 auto; color: var(--fg-soft); }

/* ---------- Category tiles ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s4); }
.cat-tile {
    position: relative; border-radius: var(--radius-lg); overflow: hidden;
    aspect-ratio: 1 / 1;
    box-shadow: var(--shadow-sm);
    transition: transform .2s, box-shadow .2s;
    background: var(--c-green-soft);
}
.cat-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.cat-tile img { width: 100%; height: 100%; object-fit: cover; }
.cat-tile-label {
    position: absolute; left: 0; right: 0; bottom: 0;
    background: linear-gradient(180deg, transparent, rgba(0,0,0,.7));
    color: white;
    padding: var(--s7) var(--s4) var(--s4);
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* ---------- Product grid ---------- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: var(--s5);
}
.product-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform .2s, box-shadow .2s, border-color .2s;
    display: flex; flex-direction: column;
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: var(--c-orange);
}
.product-card-img {
    aspect-ratio: 4 / 5;
    background: var(--c-cream);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.product-card-img img { width: 100%; height: 100%; object-fit: contain; padding: var(--s4); transition: transform .3s; }
.product-card:hover .product-card-img img { transform: scale(1.03); }
.product-card-body { padding: var(--s4); display: flex; flex-direction: column; gap: var(--s2); flex: 1; }
.product-card-name {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.25;
    margin: 0;
}
.product-card-color { font-size: .8rem; color: var(--fg-soft); text-transform: uppercase; letter-spacing: .06em; }
.product-card-price { font-size: 1.1rem; font-weight: 600; color: var(--c-green-deep); margin-top: auto; }

/* ---------- Product detail ---------- */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s7); align-items: start; }
.product-gallery {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    aspect-ratio: 1 / 1;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.product-gallery img { width: 100%; height: 100%; object-fit: contain; padding: var(--s6); }

.product-info h1 { font-size: clamp(1.8rem, 3vw, 2.4rem); margin-bottom: var(--s3); }
.product-category-link {
    font-size: .75rem; text-transform: uppercase; letter-spacing: .15em;
    color: var(--c-orange); text-decoration: none;
    margin-bottom: var(--s3); display: inline-block;
}
.product-price {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--c-green-deep);
    margin: var(--s4) 0 var(--s5);
}
.product-description {
    color: var(--fg-soft);
    padding: var(--s4) 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    margin: var(--s5) 0;
}
.size-label {
    display: block;
    font-size: .75rem; text-transform: uppercase; letter-spacing: .15em;
    color: var(--fg-soft);
    margin-bottom: var(--s3);
}
.size-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
    gap: var(--s2);
    margin-bottom: var(--s5);
}
.size-btn {
    padding: var(--s3) 0;
    border: 2px solid var(--line);
    border-radius: var(--radius);
    background: white;
    font-weight: 600;
    font-size: .9rem;
    transition: all .15s;
}
.size-btn:hover { border-color: var(--c-ink); }
.size-btn.selected { border-color: var(--c-orange); background: var(--c-orange-soft); color: var(--c-orange-deep); }

.qty-add { display: flex; gap: var(--s3); align-items: center; }
.qty-stepper {
    display: inline-flex; align-items: center;
    border: 2px solid var(--line); border-radius: var(--radius);
    background: white; overflow: hidden;
}
.qty-stepper button { padding: var(--s3) var(--s4); font-size: 1.2rem; font-weight: 600; }
.qty-stepper button:hover { background: var(--c-cream); }
.qty-stepper input {
    width: 50px; text-align: center; border: 0; padding: var(--s3) 0;
    font-weight: 600;
    -moz-appearance: textfield;
}
.qty-stepper input::-webkit-outer-spin-button,
.qty-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ---------- Category header ---------- */
.cat-header { padding: var(--s8) 0 var(--s7); background: var(--c-green-soft); }
.cat-header h1 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: var(--s4); }
.cat-header .lead { max-width: 60ch; font-size: 1.05rem; color: var(--fg-soft); }

/* ---------- Cart ---------- */
.cart-table {
    width: 100%; border-collapse: collapse;
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.cart-table th, .cart-table td {
    padding: var(--s4);
    text-align: left;
    border-bottom: 1px solid var(--line);
}
.cart-table th { background: var(--c-cream); font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--fg-soft); }
.cart-table tr:last-child td { border-bottom: 0; }
.cart-table img { width: 60px; }
.cart-totals {
    margin-top: var(--s5);
    padding: var(--s5);
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}
.cart-totals-row {
    display: flex; justify-content: space-between;
    padding: var(--s3) 0;
    border-bottom: 1px solid var(--line);
}
.cart-totals-row:last-of-type { border-bottom: 0; font-size: 1.2rem; font-weight: 600; color: var(--c-green-deep); }

/* ---------- Notice / empty state ---------- */
.notice {
    padding: var(--s6);
    text-align: center;
    background: var(--c-cream);
    border-radius: var(--radius-lg);
    border: 1px dashed var(--line);
}

/* ---------- Footer ---------- */
.footer {
    background: var(--c-ink);
    color: var(--c-cream);
    padding: var(--s8) 0 var(--s5);
    margin-top: var(--s9);
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--s6); margin-bottom: var(--s6); }
.footer h4 { font-family: var(--font-body); font-size: .8rem; text-transform: uppercase; letter-spacing: .15em; margin-bottom: var(--s4); color: var(--c-orange); }
.footer a { opacity: .8; font-size: .9rem; display: block; padding: 2px 0; }
.footer a:hover { opacity: 1; color: var(--c-orange); }
.footer-brand { font-family: var(--font-display); font-size: 1.5rem; margin-bottom: var(--s3); }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.1);
    padding-top: var(--s4);
    font-size: .75rem; opacity: .6;
    display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--s3);
}

/* ---------- Koningsdag landing page ---------- */
.kd-hero {
    background: linear-gradient(180deg, var(--c-orange) 0%, #FF8A3D 100%);
    color: white;
    text-align: center;
    padding: var(--s9) 0;
    position: relative;
    overflow: hidden;
}
.kd-hero::before {
    content: '';
    position: absolute; inset: 0;
    background-image:
        repeating-linear-gradient(45deg, transparent, transparent 30px, rgba(255,255,255,.04) 30px, rgba(255,255,255,.04) 60px);
    pointer-events: none;
}
.kd-crown { font-size: 4rem; margin-bottom: var(--s4); }
.kd-hero h1 {
    font-size: clamp(2.5rem, 6vw, 5rem);
    letter-spacing: -0.03em;
    text-shadow: 0 4px 20px rgba(0,0,0,.15);
}
.kd-hero .subtitle { font-size: 1.2rem; opacity: .95; margin-bottom: var(--s6); }
.kd-date-pill {
    display: inline-block;
    background: rgba(0,0,0,.2);
    padding: var(--s3) var(--s5);
    border-radius: 999px;
    font-size: .9rem;
    letter-spacing: .05em;
    margin-bottom: var(--s5);
    backdrop-filter: blur(10px);
}

/* ---------- Why buy / features ---------- */
.features { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--s4); }
.feature {
    background: white;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: var(--s5);
    text-align: center;
}
.feature-icon { font-size: 2rem; margin-bottom: var(--s3); display: block; }
.feature h4 { font-size: .9rem; margin-bottom: var(--s2); }
.feature p { font-size: .8rem; color: var(--fg-soft); margin: 0; }

/* ---------- Forms ---------- */
.form-row { margin-bottom: var(--s4); }
.form-row label { display: block; font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--fg-soft); margin-bottom: var(--s2); }
.form-row input, .form-row select, .form-row textarea {
    width: 100%;
    padding: var(--s3) var(--s4);
    border: 2px solid var(--line);
    border-radius: var(--radius);
    background: white;
    transition: border-color .15s;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
    outline: 0; border-color: var(--c-orange);
}
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .hero .container { grid-template-columns: 1fr; padding-bottom: var(--s7); }
    .hero-img { order: -1; max-width: 300px; margin: 0 auto; }
    .cat-grid { grid-template-columns: repeat(2, 1fr); }
    .product-detail { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--s5); }
    .features { grid-template-columns: repeat(2, 1fr); }
    .form-grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .nav { display: none; }
    .section { padding: var(--s7) 0; }
    .cat-grid { grid-template-columns: 1fr 1fr; gap: var(--s3); }
    .footer-grid { grid-template-columns: 1fr; }
    .features { grid-template-columns: 1fr 1fr; }
}

/* ---------- Mobile nav toggle ---------- */
.nav-toggle { display: none; }
@media (max-width: 600px) {
    .nav-toggle { display: inline-flex; }
    .nav.open { display: flex; position: fixed; top: 0; left: 0; right: 0; background: white; padding: var(--s6); flex-direction: column; gap: var(--s4); z-index: 100; box-shadow: var(--shadow-lg); }
}
