:root {
    --bg: #f4f1eb;
    --surface: #fffdf8;
    --surface-strong: #ffffff;
    --text: #1b1b1b;
    --muted: #656565;
    --line: #ddd2c3;
    --primary: #d71920;
    --primary-dark: #9f1117;
    --accent: #101820;
    --success: #d8f1dc;
    --error: #f8dbdb;
    --shadow: 0 18px 45px rgba(16, 24, 32, 0.08);
}

* { box-sizing: border-box; }
body { margin: 0; font-family: "Segoe UI", sans-serif; color: var(--text); background: radial-gradient(circle at top left, #fff2d8, transparent 25%), var(--bg); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { width: min(1160px, calc(100% - 2rem)); margin: 0 auto; }
.section { padding: 4rem 0; }
.section-muted { background: rgba(255,255,255,0.5); }
.narrow .container, .section.narrow .container { width: min(760px, calc(100% - 2rem)); }
.site-header { position: sticky; top: 0; z-index: 20; backdrop-filter: blur(16px); background: rgba(244,241,235,0.92); border-bottom: 1px solid var(--line); }
.header-wrap { display: flex; justify-content: space-between; align-items: center; min-height: 80px; gap: 2rem; }
.brand { display: grid; gap: .15rem; font-size: 1.35rem; letter-spacing: .03em; }
.brand-kicker { font-size: .7rem; letter-spacing: .28em; color: var(--primary); }
.main-nav { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.main-nav a { color: var(--muted); font-weight: 600; }
.disclaimer { font-size: .78rem; background: var(--accent); color: #f2f2f2; padding: .55rem 1rem; text-align: center; }
.hero { padding: 5rem 0 4rem; }
.hero-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 2rem; align-items: center; }
.eyebrow { color: var(--primary); font-weight: 700; letter-spacing: .2em; font-size: .78rem; }
h1, h2, h3, h4 { margin: 0 0 1rem; line-height: 1.1; }
h1 { font-size: clamp(2.4rem, 5vw, 4.4rem); max-width: 12ch; }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
p { color: var(--muted); line-height: 1.7; }
.hero-card, .panel, .product-card, .card { background: var(--surface-strong); border: 1px solid var(--line); border-radius: 24px; padding: 1.4rem; box-shadow: var(--shadow); }
.hero-card { background: linear-gradient(150deg, #101820, #2d3943); color: white; min-height: 280px; display: flex; flex-direction: column; justify-content: space-between; }
.hero-card p { color: rgba(255,255,255,.8); }
.hero-actions, .product-actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.5rem; }
.admin-actions { display: flex; gap: .75rem; flex-wrap: wrap; }
.button, button { appearance: none; border: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; border-radius: 999px; padding: .85rem 1.25rem; font-weight: 700; }
.button-primary { background: var(--primary); color: white; }
.button-primary:hover { background: var(--primary-dark); }
.button-secondary { background: transparent; border: 1px solid var(--line); color: var(--accent); }
.section-head, .admin-head { display: flex; justify-content: space-between; gap: 1rem; align-items: end; margin-bottom: 1.5rem; }
.card-grid, .product-grid, .stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.card-link:hover, .product-card:hover { transform: translateY(-4px); transition: .2s ease; }
.badge { display: inline-flex; padding: .35rem .75rem; border-radius: 999px; background: #ffe4e4; color: var(--primary); font-size: .78rem; font-weight: 700; }
.sku { font-size: .78rem; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.product-card-top, .summary-row, .list-row, .price-row { display: flex; justify-content: space-between; gap: .75rem; align-items: center; }
.product-card { display: grid; gap: 1rem; overflow: hidden; position: relative; background: linear-gradient(180deg, #fffefb, #fff); }
.product-card h3 { font-size: 1.2rem; min-height: 2.6em; }
.product-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 1rem; }
.product-image-frame { display: block; aspect-ratio: 4 / 3; border-radius: 20px; overflow: hidden; background: linear-gradient(160deg, #ffffff, #f4ede3); border: 1px solid #eee4d7; }
.product-image-frame img { width: 100%; height: 100%; object-fit: contain; padding: 1rem; }
.product-image-placeholder { width: 100%; height: 100%; display: grid; place-items: center; text-align: center; gap: .35rem; padding: 1rem; background:
    radial-gradient(circle at top right, rgba(215,25,32,.12), transparent 22%),
    linear-gradient(145deg, #f8f1e6, #fffdf8); color: var(--accent); }
.product-image-placeholder span { font-size: .78rem; letter-spacing: .3em; color: var(--primary); }
.product-image-placeholder strong { font-size: 1.15rem; max-width: 12ch; }
.price-tag { font-size: 1.35rem; color: var(--accent); }
.price-tag-large { font-size: clamp(1.8rem, 3vw, 2.8rem); }
.filters, .form-grid { display: grid; gap: 1rem; }
.filters { grid-template-columns: 2fr repeat(2, 1fr) auto auto; margin-bottom: 2rem; }
input, select, textarea { width: 100%; padding: .9rem 1rem; border-radius: 16px; border: 1px solid var(--line); background: white; font: inherit; }
textarea { min-height: 110px; resize: vertical; }
label { display: grid; gap: .45rem; font-weight: 600; }
.checkbox { grid-auto-flow: column; justify-content: start; align-items: center; gap: .6rem; }
.checkbox input { width: auto; }
.cart-grid, .admin-grid, .product-layout, .footer-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 1.25rem; }
.product-layout { align-items: start; }
.product-showcase { display: grid; grid-template-columns: 1.05fr 1fr; gap: 1.25rem; }
.product-media-panel, .product-hero-card { padding: 2rem; border-radius: 24px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.product-media-panel { background: radial-gradient(circle at top right, rgba(215,25,32,.12), transparent 20%), linear-gradient(160deg, #ffffff, #f6ecdf); min-height: 440px; display: grid; place-items: center; }
.product-detail-image { max-height: 380px; width: 100%; object-fit: contain; }
.product-image-placeholder-large { min-height: 340px; border-radius: 20px; }
.product-hero-card { background: linear-gradient(160deg, #fffef9, #f7efe4); }
.product-stat-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin: 1.4rem 0 1rem; }
.product-stat-strip div { border: 1px solid #eadfce; border-radius: 16px; padding: .9rem; background: rgba(255,255,255,.55); }
.product-stat-strip span { display: block; font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: .35rem; }
.spec-grid { display: grid; grid-template-columns: 1fr 2fr; gap: .7rem 1rem; }
.spec-grid dt { font-weight: 700; }
.spec-grid dd { margin: 0; color: var(--muted); }
.cart-item { display: grid; grid-template-columns: 2fr 1fr auto auto; gap: 1rem; align-items: center; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.cart-item:last-child { border-bottom: 0; }
.cart-actions { display: flex; gap: .5rem; align-items: center; }
.flash { padding: .9rem 0; }
.flash-success { background: var(--success); }
.flash-error { background: var(--error); }
.site-footer { padding: 3rem 0; background: #101820; color: white; margin-top: 4rem; }
.site-footer p { color: rgba(255,255,255,.75); }
.admin-body { background: #f2f0ea; }
.admin-shell { display: grid; grid-template-columns: 280px 1fr; min-height: 100vh; }
.admin-sidebar { padding: 2rem 1.2rem; background: #101820; color: white; }
.brand-admin { margin-bottom: 2rem; display: block; }
.admin-sidebar nav { display: grid; gap: .8rem; }
.admin-content { padding: 2rem; }
.link-button { background: none; padding: 0; color: inherit; text-align: left; font: inherit; }
.stat-card { background: #101820; color: white; border-radius: 20px; padding: 1.2rem; display: grid; gap: .5rem; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: .8rem; text-align: left; border-bottom: 1px solid var(--line); }
.center { text-align: center; }
.prose { line-height: 1.8; }
.panel-inline { background: #faf6ef; }
.pagination-wrap { margin-top: 1.5rem; }
.hero-mini-product { display: grid; grid-template-columns: 1fr 110px; gap: 1rem; align-items: center; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,.12); }
.hero-mini-copy small { display: block; text-transform: uppercase; letter-spacing: .2em; color: rgba(255,255,255,.65); margin-bottom: .4rem; }
.hero-mini-copy span { display: block; color: rgba(255,255,255,.75); margin-top: .3rem; }
.hero-mini-media { height: 90px; border-radius: 18px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); display: grid; place-items: center; overflow: hidden; }
.hero-mini-media img { max-width: 100%; max-height: 100%; object-fit: contain; padding: .45rem; }

@media (max-width: 900px) {
    .hero-grid, .cart-grid, .admin-grid, .product-layout, .footer-grid, .admin-shell, .product-showcase { grid-template-columns: 1fr; }
    .card-grid, .product-grid, .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .filters { grid-template-columns: 1fr; }
    .header-wrap { flex-direction: column; align-items: start; padding: 1rem 0; }
    .product-stat-strip { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .card-grid, .product-grid, .stats-grid { grid-template-columns: 1fr; }
    .cart-item { grid-template-columns: 1fr; }
}
