/* CHAPTER 13: CSS IS COMPLETE. YOUR MAIN TASK IS THE JAVASCRIPT. */
:root {
    --ink: #162237;
    --muted: #627088;
    --navy: #101e34;
    --navy-light: #233955;
    --accent: #c8f1ab;
    --paper: #f4f6f9;
    --white: #fff;
    --border: #dce3eb;
    --shadow: 0 14px 35px rgba(23, 39, 59, .06);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.55; }
button, input, select { font: inherit; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
.container { width: min(1160px, calc(100% - 40px)); margin-inline: auto; }
.site-header { background: #0e1a2c; color: #fff; border-bottom: 1px solid rgba(255,255,255,.12); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 78px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 650; font-size: .95rem; letter-spacing: .12em; }
.brand strong { color: var(--accent); font-weight: 800; }
.brand-mark { display: grid; place-items: center; width: 41px; height: 41px; background: var(--accent); color: var(--navy); border-radius: 13px; font-size: 1.7rem; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 28px; color: #d8e0eb; font-size: .91rem; }
.site-header nav a:hover, .site-header nav a:focus-visible { color: var(--accent); }
.hero { overflow: hidden; background: radial-gradient(ellipse at 88% 8%, #315372 0%, transparent 42%), linear-gradient(135deg, #101d31, #1c3450); color: white; }
.hero-content { position: relative; min-height: 344px; padding-block: 65px 72px; isolation: isolate; }
.eyebrow { display: inline-block; color: var(--accent); font-size: .72rem; font-weight: 800; letter-spacing: .18em; }
.hero h1 { font-size: clamp(2.5rem, 5vw, 4.6rem); line-height: 1.08; letter-spacing: -.055em; margin: 18px 0; max-width: 760px; }
.hero h1 span { color: var(--accent); }
.hero p { max-width: 515px; margin: 0 0 29px; color: #c7d5e2; }
.hero-decor { position: absolute; z-index: -1; inset: 0 -5% auto auto; width: 390px; height: 390px; border: 1px solid rgba(200,241,171,.15); border-radius: 50%; display: grid; place-items: center; box-shadow: 0 0 0 45px rgba(200,241,171,.025), 0 0 0 95px rgba(200,241,171,.02); }
.hero-decor span { font-size: 190px; color: rgba(200,241,171,.14); }
.button { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 20px; border-radius: 10px; padding: 10px 19px; font-weight: 750; font-size: .89rem; transition: transform .2s, background .2s, border-color .2s; }
.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--accent); color: var(--navy); border: 1px solid var(--accent); }
.button-outline { background: #fff; color: var(--navy); border: 1px solid #cbd5e1; align-self: end; white-space: nowrap; }
.button-outline:hover { background: #eff5eb; border-color: #9fb98f; }
.catalog-section { padding-block: 65px 85px; }
.section-title { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 27px; }
.dark-eyebrow { color: #42665c; }
.section-title h2 { margin: 6px 0; font-size: clamp(1.7rem, 3vw, 2.35rem); letter-spacing: -.035em; }
.section-title p { margin: 0; color: var(--muted); }
.collection-label, .results-note { font-size: .67rem; font-weight: 800; color: #8492a3; letter-spacing: .14em; white-space: nowrap; }
.panel-frame { padding: 5px; border-radius: 18px; background: #d9e0e8; box-shadow: var(--shadow); }
.panel-content { background: white; border-radius: 14px; padding: 25px; }
.toolbar { display: grid; grid-template-columns: minmax(220px, 1.8fr) minmax(150px, 1fr) minmax(180px, 1fr) auto; gap: 15px; align-items: end; }
.field { display: grid; gap: 7px; min-width: 0; }
.field label { font-size: .8rem; font-weight: 800; }
.field select, .field input { outline: 0; color: var(--ink); background: #f7f9fb; height: 46px; width: 100%; border: 1px solid #d9e1e9; border-radius: 10px; padding: 0 13px; }
.field select:focus-visible, .field input:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid #82b6a1; outline-offset: 2px; }
.input-shell { position: relative; }
.search-field input { padding-left: 40px; }
.field-icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: #798a9b; font-size: 1.5rem; line-height: 1; pointer-events: none; }
.results-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 27px 2px 18px; border-bottom: 1px solid var(--border); margin-bottom: 23px; }
.results-bar p { margin: 0; font-size: .9rem; color: var(--muted); }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
/* Apply the .product-card class to each card generated by your JavaScript. */
.product-card { min-width: 0; overflow: hidden; background: var(--white); padding: 6px; border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; }
.product-card:hover { transform: translateY(-4px); box-shadow: 0 18px 38px rgba(23,39,59,.11); }
.product-image-wrap { aspect-ratio: 4 / 3; overflow: hidden; display: grid; place-items: center; background: linear-gradient(145deg, #ecf1f6, #dfe9ee); border-radius: 13px; }
.product-image { width: 100%; height: 100%; object-fit: contain; display: block; background: #fff; }
.product-image-placeholder { font-size: 3rem; color: #9aaabd; }
.product-content { padding: 16px 13px 18px; }
.product-category { color: #537567; text-transform: uppercase; letter-spacing: .12em; font-size: .69rem; font-weight: 800; }
.product-name { margin: 6px 0; font-size: 1.2rem; line-height: 1.3; }
.product-description { color: var(--muted); font-size: .85rem; margin: 0 0 16px; }
.product-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.product-price { font-size: 1.3rem; font-weight: 850; letter-spacing: -.03em; }
.product-rating { font-size: .8rem; color: #6d7a8d; }
.empty-state { max-width: 700px; margin: 12px auto 0; border: 2px dashed #cbd5e1; border-radius: 19px; padding: 48px 22px; text-align: center; }
.empty-icon { margin: auto; width: 64px; height: 64px; display: grid; place-items: center; border-radius: 18px; font-size: 2.3rem; background: #e2eddc; color: #526e4a; }
.empty-state h3 { margin: 14px 0 6px; }
.empty-state p { color: var(--muted); max-width: 475px; margin: auto; }
.about-section { background: #1a3049; color: white; padding: 55px 0; }
.about-content { max-width: 1160px; }
.about-section h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); margin: 10px 0; }
.about-section p { max-width: 700px; color: #cbd8e5; margin: 0; }
.site-footer { background: #0e1a2c; color: #b9c6d5; padding: 26px 0; }
.footer-content { display: flex; justify-content: space-between; align-items: center; gap: 15px; font-size: .78rem; letter-spacing: .05em; }
@media (max-width: 960px) {
    .toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .button-outline { width: 100%; }
    .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
    .container { width: min(100% - 28px, 1160px); }
    .header-inner { min-height: 75px; flex-wrap: wrap; padding-block: 13px; }
    .brand { font-size: .78rem; }
    .site-header nav { gap: 18px; font-size: .82rem; }
    .hero-content { min-height: 0; padding-block: 55px 65px; }
    .hero-decor { opacity: .4; transform: translateX(45%); }
    .section-title { align-items: start; }
    .collection-label, .results-note { display: none; }
    .catalog-section { padding-block: 42px 60px; }
    .panel-content { padding: 15px; }
    .toolbar { grid-template-columns: 1fr; gap: 13px; }
    .product-grid { grid-template-columns: 1fr; }
    .footer-content { flex-direction: column; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .button, .product-card { transition: none; }
}
