/*
HM Traders — static site stylesheet.
Plain CSS, no build step. Palette lives in the :root custom properties
below — change them there and the whole site updates.
*/

:root {
--background: hsl(210 40% 98%);
--foreground: hsl(222 47% 12%);
--card: hsl(0 0% 100%);
--muted: hsl(210 25% 95%);
--muted-foreground: hsl(215 16% 44%);
--primary: hsl(21 90% 48%);
--primary-hover: hsl(21 90% 40%);
--primary-foreground: hsl(0 0% 100%);
--secondary: hsl(210 32% 95%);
--secondary-foreground: hsl(213 60% 22%);
--accent: hsl(0 0% 12%);
--accent-foreground: hsl(0 0% 100%);
--destructive: hsl(0 68% 42%);
--destructive-foreground: hsl(0 0% 100%);
--success: hsl(152 55% 32%);
--success-foreground: hsl(0 0% 100%);
--warning: hsl(38 92% 46%);
--warning-foreground: hsl(26 40% 12%);
--border: hsl(214 24% 89%);
--input: hsl(214 24% 80%);
--ring: hsl(21 90% 48%);
--radius: 0.75rem;
--radius-lg: 1rem;
--container: 1280px;
--shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
--shadow-md: 0 6px 16px rgba(15, 23, 42, 0.08);
}

* {
box-sizing: border-box;
}

html {
scroll-behavior: smooth;
}

body {
margin: 0;
font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
color: var(--foreground);
background: var(--background);
-webkit-font-smoothing: antialiased;
min-height: 100dvh;
display: flex;
flex-direction: column;
}

main {
flex: 1;
}

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

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

h1, h2, h3, h4 {
font-family: 'Manrope', 'Inter', ui-sans-serif, system-ui, sans-serif;
margin: 0;
line-height: 1.15;
}

p {
margin: 0;
}

ul {
margin: 0;
padding: 0;
list-style: none;
}

button {
font: inherit;
cursor: pointer;
}

input, textarea, select {
font: inherit;
}

.container {
width: 100%;
max-width: var(--container);
margin: 0 auto;
padding: 0 1rem;
}

@media (min-width: 640px) {
.container { padding: 0 1.5rem; }
}

.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}

/* ---------- Buttons ---------- */

.btn {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 0.5rem;
height: 2.75rem;
padding: 0 1.25rem;
border-radius: 0.5rem;
font-size: 0.875rem;
font-weight: 600;
border: 1px solid transparent;
transition: transform 150ms ease, background-color 150ms ease, color 150ms ease, border-color 150ms ease;
white-space: nowrap;
}
.btn:active { transform: scale(0.98); }
.btn svg { width: 1rem; height: 1rem; flex-shrink: 0; }

.btn-primary {
background: var(--primary);
color: var(--primary-foreground);
}
.btn-primary:hover { background: var(--primary-hover); }

.btn-outline {
background: transparent;
border-color: var(--border);
color: var(--foreground);
}
.btn-outline:hover { background: var(--secondary); }

.btn-outline-primary {
background: transparent;
border-color: var(--primary);
color: var(--primary);
}
.btn-outline-primary:hover { background: var(--primary); color: var(--primary-foreground); }

.btn-sm { height: 2.25rem; padding: 0 0.875rem; font-size: 0.8125rem; }
.btn-block { width: 100%; }

.btn:disabled {
cursor: not-allowed;
background: var(--muted);
color: var(--muted-foreground);
border-color: var(--border);
}

.icon-btn {
display: inline-flex;
align-items: center;
justify-content: center;
width: 2.5rem;
height: 2.5rem;
border-radius: 999px;
border: none;
background: transparent;
color: var(--foreground);
transition: background-color 150ms ease;
}
.icon-btn:hover { background: var(--secondary); }
.icon-btn svg { width: 1.25rem; height: 1.25rem; }

/* ---------- Header ---------- */

.site-header { position: sticky; top: 0; z-index: 40; }

.topbar {
display: none;
background: var(--primary);
color: var(--primary-foreground);
font-size: 0.75rem;
}
.topbar .container {
display: flex;
align-items: center;
justify-content: space-between;
gap: 1rem;
padding-top: 0.5rem;
padding-bottom: 0.5rem;
}
.topbar a { display: inline-flex; align-items: center; gap: 0.375rem; }
.topbar a:hover { opacity: 0.85; }
.topbar svg { width: 0.875rem; height: 0.875rem; }
@media (min-width: 640px) { .topbar { display: block; } }

.main-header {
background: rgba(250, 251, 252, 0.95);
backdrop-filter: blur(6px);
border-bottom: 1px solid var(--border);
}
.main-header-row {
display: flex;
align-items: center;
gap: 0.75rem;
padding: 0.75rem 0;
}
.logo {
display: flex;
align-items: baseline;
gap: 0.375rem;
flex-shrink: 0;
font-family: 'Manrope', sans-serif;
font-size: 1.25rem;
font-weight: 800;
}
.logo .accent { color: var(--primary); }

.search-form {
display: none;
flex: 1;
align-items: center;
border: 1px solid var(--input);
border-radius: 0.5rem;
overflow: hidden;
background: var(--card);
}
.search-form svg {
width: 1.125rem;
height: 1.125rem;
flex-shrink: 0;
margin-left: 0.875rem;
color: var(--muted-foreground);
}
.search-form input {
flex: 1;
height: 2.75rem;
border: none;
outline: none;
padding: 0 0.75rem;
background: transparent;
font-size: 0.875rem;
}
.search-form button {
height: 2.75rem;
padding: 0 1.25rem;
border: none;
background: var(--primary);
color: var(--primary-foreground);
font-size: 0.875rem;
font-weight: 500;
}
.search-form button:hover { background: var(--primary-hover); }
@media (min-width: 768px) { .search-form { display: flex; } }

.search-form-mobile {
display: flex;
align-items: center;
border: 1px solid var(--input);
border-radius: 0.5rem;
overflow: hidden;
background: var(--card);
padding: 0;
}
.search-form-mobile svg {
width: 1.125rem;
height: 1.125rem;
flex-shrink: 0;
margin-left: 0.875rem;
color: var(--muted-foreground);
}
.search-form-mobile input {
flex: 1;
height: 2.75rem;
border: none;
outline: none;
padding: 0 0.75rem;
background: transparent;
font-size: 0.875rem;
}
.mobile-search-wrap {
border-top: 1px solid var(--border);
padding: 0.75rem 1rem;
}
@media (min-width: 768px) { .mobile-search-wrap { display: none; } }

.header-actions {
margin-left: auto;
display: flex;
align-items: center;
gap: 0.125rem;
}

.header-nav-links {
display: none;
align-items: center;
gap: 1.5rem;
margin-right: 0.5rem;
}
.header-nav-links a { font-size: 0.875rem; font-weight: 500; color: var(--foreground); opacity: 0.8; }
.header-nav-links a:hover, .header-nav-links a.active { opacity: 1; color: var(--primary); }
@media (min-width: 1024px) { .header-nav-links { display: flex; } }

.icon-badge { position: relative; }
.icon-badge .count {
position: absolute;
top: -0.15rem;
right: -0.15rem;
min-width: 1rem;
height: 1rem;
padding: 0 0.25rem;
border-radius: 999px;
background: var(--primary);
color: var(--primary-foreground);
font-size: 0.625rem;
font-weight: 700;
display: none;
align-items: center;
justify-content: center;
font-variant-numeric: tabular-nums;
}
.icon-badge.wishlist .count { background: var(--accent); }
.icon-badge.compare .count { background: var(--foreground); }
.icon-badge .count.show { display: inline-flex; }

.category-nav {
display: none;
border-top: 1px solid var(--border);
}
.category-nav .container {
display: flex;
align-items: center;
gap: 0.25rem;
padding-top: 0.375rem;
padding-bottom: 0.375rem;
overflow-x: auto;
}
.category-nav a {
display: inline-flex;
align-items: center;
gap: 0.375rem;
padding: 0.5rem 0.75rem;
border-radius: 0.5rem;
font-size: 0.875rem;
font-weight: 500;
color: var(--foreground);
opacity: 0.8;
white-space: nowrap;
}
.category-nav a:hover { background: var(--secondary); color: var(--primary); opacity: 1; }
.category-nav svg { width: 1rem; height: 1rem; }
@media (min-width: 1024px) { .category-nav { display: block; } }

.hamburger-btn { display: inline-flex; }
@media (min-width: 1024px) { .hamburger-btn { display: none; } }

/* The "Categories" header dropdown menu sits a small margin below its
   toggle button; without a hoverable bridge across that gap, moving the
   mouse from the button down to a menu item exits the hover area first
   and the menu closes before it can be clicked. */
.nav-dropdown-menu::before {
content: "";
position: absolute;
top: -0.75rem;
left: 0;
right: 0;
height: 0.75rem;
}

/* Mobile drawer */
.drawer-overlay {
position: fixed;
inset: 0;
background: rgba(15, 23, 42, 0.5);
z-index: 50;
opacity: 0;
pointer-events: none;
transition: opacity 200ms ease;
}
.drawer-overlay.open { opacity: 1; pointer-events: auto; }

.drawer {
position: fixed;
top: 0;
right: 0;
bottom: 0;
width: min(85vw, 360px);
background: var(--card);
z-index: 51;
transform: translateX(100%);
transition: transform 250ms ease;
overflow-y: auto;
padding: 1.25rem;
}
.drawer.open { transform: translateX(0); }
.drawer-close { margin-left: auto; display: flex; }
.drawer-title { font-size: 1.125rem; font-weight: 700; color: var(--primary); }
.drawer nav a {
display: block;
padding: 0.75rem 0;
border-bottom: 1px solid var(--border);
font-size: 1rem;
font-weight: 600;
}
.drawer-categories { margin-top: 0.5rem; }
.drawer-categories summary {
padding: 0.75rem 0;
font-size: 0.75rem;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.05em;
color: var(--muted-foreground);
cursor: pointer;
}
.drawer-categories a {
display: flex;
align-items: center;
gap: 0.625rem;
padding: 0.625rem 0.5rem;
border-radius: 0.5rem;
font-size: 0.875rem;
font-weight: 500;
border: none;
}
.drawer-categories a:hover { background: var(--secondary); }
.drawer-categories svg { width: 1rem; height: 1rem; color: var(--primary); }
.drawer-contact {
margin-top: 1.5rem;
padding-top: 1.5rem;
border-top: 1px solid var(--border);
display: flex;
flex-direction: column;
gap: 0.5rem;
font-size: 0.875rem;
color: var(--muted-foreground);
}
.drawer-contact a { display: flex; align-items: center; gap: 0.5rem; }
.drawer-contact svg { width: 1rem; height: 1rem; }

/* ---------- Footer ---------- */

.site-footer { background: var(--primary); color: var(--primary-foreground); }
.footer-grid {
display: grid;
gap: 2.5rem;
padding: 3.5rem 0;
grid-template-columns: 1fr;
}
@media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(4, 1fr); } }
.footer-title { font-family: 'Manrope', sans-serif; font-size: 1.25rem; font-weight: 700; }
.footer-desc { margin-top: 0.75rem; max-width: 20rem; font-size: 0.875rem; line-height: 1.6; color: rgba(255,255,255,0.7); }
.footer-heading { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: rgba(255,255,255,0.6); }
.footer-links { margin-top: 1rem; display: flex; flex-direction: column; gap: 0.5rem; font-size: 0.875rem; }
.footer-links a { color: rgba(255,255,255,0.8); }
.footer-links a:hover { color: #fff; }
.footer-contact { margin-top: 1rem; display: flex; flex-direction: column; gap: 0.75rem; font-size: 0.875rem; color: rgba(255,255,255,0.8); }
.footer-contact li { display: flex; align-items: flex-start; gap: 0.5rem; }
.footer-contact svg { width: 1rem; height: 1rem; flex-shrink: 0; margin-top: 0.15rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.15); }
.footer-bottom .container {
display: flex;
flex-direction: column;
gap: 0.875rem;
padding: 1.25rem 0;
font-size: 0.8125rem;
color: rgba(255,255,255,0.55);
}
.footer-bottom nav { display: flex; flex-wrap: wrap; row-gap: 0.5rem; column-gap: 1.25rem; }
.footer-bottom nav a { padding: 0.125rem 0; }
.footer-bottom nav a:hover { color: rgba(255,255,255,0.85); }
@media (min-width: 1024px) {
.footer-bottom .container { flex-direction: row; align-items: center; justify-content: space-between; gap: 1.5rem; }
}

/* ---------- Badges ---------- */

.badge {
display: inline-flex;
align-items: center;
border-radius: 0.375rem;
padding: 0.125rem 0.5rem;
font-size: 0.6875rem;
font-weight: 600;
}
.badge-destructive { background: var(--destructive); color: var(--destructive-foreground); }
.badge-success { background: var(--success); color: var(--success-foreground); }
.badge-muted { background: var(--muted); color: var(--muted-foreground); }

/* ---------- Cards / grids ---------- */

.card {
background: var(--card);
border: 1px solid var(--border);
border-radius: var(--radius);
box-shadow: var(--shadow-sm);
}

.product-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 1rem;
}
@media (min-width: 640px) { .product-grid { gap: 1.25rem; } }
@media (min-width: 1024px) { .product-grid.cols-4 { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1024px) { .product-grid.cols-3 { grid-template-columns: repeat(3, 1fr); } }

.product-card {
display: flex;
flex-direction: column;
overflow: hidden;
border-radius: var(--radius);
border: 1px solid var(--border);
background: var(--card);
box-shadow: var(--shadow-sm);
transition: box-shadow 200ms ease;
}
.product-card:hover { box-shadow: var(--shadow-md); }
.product-card .media {
position: relative;
aspect-ratio: 1 / 1;
overflow: hidden;
background: var(--secondary);
display: block;
}
.product-card .media img { width: 100%; height: 100%; object-fit: cover; transition: transform 300ms ease; }
.product-card:hover .media img { transform: scale(1.04); }
.product-card .badges-top-left { position: absolute; top: 0.625rem; left: 0.625rem; z-index: 2; display: flex; flex-direction: column; gap: 0.375rem; }
.product-card .actions-top-right { position: absolute; top: 0.625rem; right: 0.625rem; z-index: 2; display: flex; flex-direction: column; gap: 0.5rem; }
.product-card .float-btn {
width: 2.25rem;
height: 2.25rem;
border-radius: 999px;
border: none;
background: rgba(255,255,255,0.92);
display: flex;
align-items: center;
justify-content: center;
box-shadow: var(--shadow-sm);
}
.product-card .float-btn:hover { background: #fff; }
.product-card .float-btn svg { width: 1rem; height: 1rem; }
.product-card .float-btn.active svg { color: var(--destructive); fill: var(--destructive); }
.product-card .float-btn.compare-active svg { color: var(--primary); }
.product-card .body { padding: 1rem; display: flex; flex-direction: column; flex: 1; }
.product-card .eyebrow { font-size: 0.6875rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted-foreground); }
.product-card h3 { margin-top: 0.25rem; font-size: 1rem; font-weight: 600; line-height: 1.35; }
.product-card h3 a:hover { color: var(--primary); }
.product-card .short { margin-top: 0.25rem; font-size: 0.8125rem; line-height: 1.5; color: var(--muted-foreground); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-card .price-row { margin-top: 0.75rem; display: flex; align-items: baseline; gap: 0.5rem; }
.product-card .price { font-size: 1.125rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.product-card .old-price { font-size: 0.875rem; color: var(--muted-foreground); text-decoration: line-through; font-variant-numeric: tabular-nums; }
.product-card .compare-row { margin-top: 0.75rem; display: flex; align-items: center; gap: 0.4rem; font-size: 0.75rem; color: var(--muted-foreground); }
.product-card .compare-row svg { width: 0.875rem; height: 0.875rem; }
.product-card .actions { margin-top: 0.75rem; }

.category-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 1rem;
}
@media (min-width: 640px) { .category-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .category-grid { grid-template-columns: repeat(4, 1fr); } }
.category-card {
display: flex;
flex-direction: column;
padding: 1.25rem;
border-radius: var(--radius);
border: 1px solid var(--border);
background: var(--card);
box-shadow: var(--shadow-sm);
transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}
.category-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: rgba(242,91,10,0.3); }
.category-card .icon-wrap {
width: 2.75rem;
height: 2.75rem;
border-radius: 0.65rem;
background: var(--secondary);
color: var(--primary);
display: flex;
align-items: center;
justify-content: center;
transition: background-color 200ms ease, color 200ms ease;
}
.category-card .icon-wrap svg { width: 1.25rem; height: 1.25rem; }
.category-card:hover .icon-wrap { background: var(--primary); color: var(--primary-foreground); }
.category-card h3 { margin-top: 1rem; font-size: 1rem; font-weight: 600; }
.category-card p { margin-top: 0.25rem; font-size: 0.8125rem; line-height: 1.5; color: var(--muted-foreground); }
.category-card .count { margin-top: 0.75rem; font-size: 0.75rem; font-weight: 500; color: var(--muted-foreground); font-variant-numeric: tabular-nums; }

/* ---------- Hero ---------- */

.hero { background: var(--primary); color: var(--primary-foreground); }
.hero-inner {
display: grid;
gap: 2.5rem;
padding: 3.5rem 0;
}
@media (min-width: 768px) { .hero-inner { grid-template-columns: 1fr 1fr; align-items: center; padding: 5rem 0; } }
.hero-pill {
display: inline-flex;
padding: 0.25rem 0.75rem;
border-radius: 999px;
background: rgba(255,255,255,0.1);
font-size: 0.75rem;
font-weight: 500;
color: rgba(255,255,255,0.85);
}
.hero h1 { margin-top: 1.25rem; max-width: 32rem; font-size: 2.25rem; font-weight: 800; line-height: 1.1; }
@media (min-width: 640px) { .hero h1 { font-size: 3rem; } }
.hero p.lead { margin-top: 1.25rem; max-width: 30rem; font-size: 1rem; line-height: 1.6; color: rgba(255,255,255,0.75); }
@media (min-width: 640px) { .hero p.lead { font-size: 1.125rem; } }
.hero-ctas { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }
.hero-ctas .btn-primary { background: #fff; color: var(--primary); }
.hero-ctas .btn-primary:hover { background: rgba(255,255,255,0.9); }
.hero-ctas .btn-outline-primary { border-color: rgba(255,255,255,0.3); color: #fff; }
.hero-ctas .btn-outline-primary:hover { background: transparent; border-color: #fff; color: #fff; }
.hero img { border-radius: var(--radius-lg); border: 1px solid rgba(255,255,255,0.15); aspect-ratio: 4/3; object-fit: cover; width: 100%; }

.hero-strip { border-top: 1px solid rgba(255,255,255,0.15); }
.hero-strip .container { display: grid; grid-template-columns: 1fr; gap: 1px; background: rgba(255,255,255,0.1); }
@media (min-width: 640px) { .hero-strip .container { grid-template-columns: repeat(3, 1fr); } }
.hero-strip .item { background: var(--primary); padding: 1.25rem 1.5rem; }
.hero-strip .item svg { width: 1.25rem; height: 1.25rem; color: rgba(255,255,255,0.8); }
.hero-strip .item h4 { margin-top: 0.75rem; font-size: 1rem; font-weight: 600; }
.hero-strip .item p { margin-top: 0.25rem; font-size: 0.875rem; color: rgba(255,255,255,0.65); }

/* Hero slideshow: stack every slide in the same grid cell so only the
   active one is visible instead of all of them piling up the page. */
.hero-slides { position: relative; display: grid; }
.hero-slides > .hero-slide {
grid-area: 1 / 1;
opacity: 0;
visibility: hidden;
transition: opacity 500ms ease;
pointer-events: none;
}
.hero-slides > .hero-slide.is-active {
opacity: 1;
visibility: visible;
pointer-events: auto;
}
.hero-dots {
position: relative;
z-index: 2;
display: flex;
align-items: center;
justify-content: center;
gap: 0.5rem;
padding-bottom: 1.5rem;
}
.hero-dot {
width: 0.5rem;
height: 0.5rem;
padding: 0;
border: none;
border-radius: 999px;
background: rgba(255,255,255,0.4);
cursor: pointer;
transition: background-color 200ms ease, width 200ms ease;
}
.hero-dot:hover { background: rgba(255,255,255,0.7); }
.hero-dot.is-active { width: 1.375rem; background: #fff; }

/* ---------- Section layout ---------- */

.section { padding: 4rem 0; }
.section.tight { padding: 4rem 0; }
.section-band { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: rgba(240, 244, 248, 0.5); }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.eyebrow-link { font-size: 0.8125rem; font-weight: 600; color: var(--primary); }
.eyebrow-link:hover { text-decoration: underline; }
.section-eyebrow { font-size: 0.8125rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--accent); }
.section-title { margin-top: 0.5rem; font-size: 1.75rem; font-weight: 700; }
@media (min-width: 640px) { .section-title { font-size: 2.1rem; } }

/* Trust band */
.trust-band { background: var(--primary); color: var(--primary-foreground); }
.trust-grid { margin-top: 2.5rem; display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .trust-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .trust-grid { grid-template-columns: repeat(3, 1fr); } }
.trust-item { border-radius: var(--radius); border: 1px solid rgba(255,255,255,0.15); background: rgba(255,255,255,0.05); padding: 1.25rem; }
.trust-item svg { width: 1.25rem; height: 1.25rem; color: rgba(255,255,255,0.85); }
.trust-item h4 { margin-top: 0.75rem; font-size: 1rem; font-weight: 600; }
.trust-item p { margin-top: 0.25rem; font-size: 0.875rem; color: rgba(255,255,255,0.65); }

.cta-box { border-radius: var(--radius-lg); background: var(--secondary); padding: 2rem; }
@media (min-width: 640px) { .cta-box { padding: 3rem; } }
.cta-grid { display: grid; gap: 2rem; align-items: end; }
@media (min-width: 768px) { .cta-grid { grid-template-columns: 1fr auto; } }
.cta-buttons { display: flex; flex-direction: column; gap: 0.75rem; }
@media (min-width: 640px) { .cta-buttons { flex-direction: row; } }
@media (min-width: 768px) { .cta-buttons { flex-direction: column; } }

/* ---------- Breadcrumb ---------- */
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 0.375rem; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted-foreground); }
.breadcrumb a:hover { color: var(--foreground); }
.breadcrumb svg { width: 0.75rem; height: 0.75rem; }
.breadcrumb .current { color: var(--foreground); }

.page-header { border-bottom: 1px solid var(--border); padding-bottom: 1.5rem; }
.page-title { margin-top: 0.5rem; font-size: 1.9rem; font-weight: 700; color: var(--foreground); }
@media (min-width: 640px) { .page-title { font-size: 2.4rem; } }

/* ---------- Forms ---------- */

.field { display: flex; flex-direction: column; gap: 0.5rem; }
.field label { font-size: 0.875rem; font-weight: 500; }
.field input, .field textarea, .field select {
height: 2.75rem;
width: 100%;
border-radius: 0.5rem;
border: 1px solid var(--input);
background: transparent;
padding: 0 0.75rem;
font-size: 0.875rem;
outline: none;
transition: border-color 150ms ease, box-shadow 150ms ease;
}
.field textarea { height: auto; padding: 0.625rem 0.75rem; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus {
border-color: var(--primary);
box-shadow: 0 0 0 3px rgba(242,91,10,0.15);
}
.form-grid { display: grid; gap: 1rem; }
@media (min-width: 640px) { .form-grid.cols-2 { grid-template-columns: repeat(2, 1fr); } }
.col-span-2 { grid-column: 1 / -1; }
.form-note { border-radius: 0.5rem; border: 1px solid rgba(242,91,10,0.25); background: var(--secondary); padding: 0.75rem 1rem; font-size: 0.875rem; }
.form-error { border-radius: 0.5rem; border: 1px solid rgba(185,28,28,0.3); background: rgba(185,28,28,0.08); padding: 0.75rem 1rem; font-size: 0.875rem; color: var(--destructive); }

/* ---------- Shop layout ---------- */

.shop-layout { display: grid; gap: 2rem; margin-top: 2rem; }
@media (min-width: 1024px) { .shop-layout { grid-template-columns: 16rem 1fr; } }
.sidebar { display: none; }
@media (min-width: 1024px) { .sidebar { display: block; position: sticky; top: 8rem; align-self: start; } }
.sidebar-heading { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted-foreground); margin-top: 1.5rem; }
.sidebar-list { margin-top: 0.75rem; display: flex; flex-direction: column; gap: 0.25rem; }
.sidebar-list a {
display: flex;
align-items: center;
justify-content: space-between;
gap: 0.5rem;
padding: 0.5rem 0.75rem;
border-radius: 0.5rem;
font-size: 0.875rem;
color: var(--foreground);
opacity: 0.85;
}
.sidebar-list a:hover { background: var(--secondary); }
.sidebar-list a.active { background: var(--secondary); font-weight: 600; color: var(--primary); opacity: 1; }
.sidebar-list .cat-label { display: flex; align-items: center; gap: 0.5rem; }
.sidebar-list svg { width: 1rem; height: 1rem; }
.sidebar-list .count { font-size: 0.75rem; color: var(--muted-foreground); font-variant-numeric: tabular-nums; }

.mobile-toolbar {
position: sticky;
top: 3.5rem;
z-index: 20;
display: flex;
gap: 0.75rem;
padding: 0.75rem 0;
margin: 0 -1rem 1.5rem;
padding-left: 1rem;
padding-right: 1rem;
background: rgba(250,251,252,0.95);
backdrop-filter: blur(6px);
border-top: 1px solid var(--border);
border-bottom: 1px solid var(--border);
}
@media (min-width: 1024px) { .mobile-toolbar { display: none; } }

.results-bar { display: none; align-items: center; justify-content: space-between; }
@media (min-width: 640px) { .results-bar { display: flex; } }
.results-count { font-size: 0.875rem; color: var(--muted-foreground); font-variant-numeric: tabular-nums; }

.select-control {
height: 2.5rem;
border-radius: 0.5rem;
border: 1px solid var(--input);
background: var(--card);
padding: 0 0.75rem;
font-size: 0.875rem;
}

.empty-state {
margin-top: 1.5rem;
border: 1px dashed var(--border);
border-radius: var(--radius-lg);
padding: 4rem 1.5rem;
text-align: center;
}
.empty-state svg { width: 2rem; height: 2rem; color: var(--muted-foreground); margin: 0 auto; }
.empty-state h2 { margin-top: 1rem; font-size: 1.5rem; font-weight: 700; }
.empty-state p { margin-top: 0.5rem; font-size: 0.875rem; color: var(--muted-foreground); }
.empty-state .btn { margin-top: 1.5rem; }

/* ---------- Tabs ---------- */
.tabs-list { display: flex; gap: 0.25rem; background: var(--secondary); padding: 0.25rem; border-radius: 0.65rem; width: fit-content; overflow-x: auto; max-width: 100%; }
.tabs-list button {
border: none;
background: transparent;
padding: 0.5rem 1rem;
border-radius: 0.5rem;
font-size: 0.875rem;
font-weight: 500;
color: var(--muted-foreground);
white-space: nowrap;
}
.tabs-list button.active { background: var(--card); color: var(--foreground); box-shadow: var(--shadow-sm); }
.tab-panel { display: none; margin-top: 1.5rem; }
.tab-panel.active { display: block; }

/* ---------- Spec table / compare ---------- */
.spec-table { width: 100%; border-collapse: collapse; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.spec-table tr { border-top: 1px solid var(--border); }
.spec-table tr:first-child { border-top: none; }
.spec-table td { padding: 0.75rem 1rem; font-size: 0.875rem; }
.spec-table td:first-child { color: var(--muted-foreground); width: 40%; }
.spec-table td:last-child { font-weight: 500; font-variant-numeric: tabular-nums; }

.compare-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); margin-top: 1.5rem; }
.compare-table { width: 100%; min-width: 640px; border-collapse: collapse; }
.compare-table th, .compare-table td { border-top: 1px solid var(--border); padding: 0.75rem; text-align: left; font-size: 0.875rem; vertical-align: top; }
.compare-table thead th { border-top: none; background: var(--card); vertical-align: top; }
.compare-table td:first-child, .compare-table th:first-child { background: var(--secondary); color: var(--muted-foreground); font-weight: 500; width: 9rem; }
.compare-table td:not(:first-child), .compare-table th:not(:first-child) { border-left: 1px solid var(--border); }
.compare-col-head img { border-radius: 0.5rem; aspect-ratio: 1/1; object-fit: cover; width: 100%; }
.compare-col-head .remove-btn { float: right; border: none; background: transparent; color: var(--muted-foreground); }
.compare-col-head .remove-btn:hover { color: var(--destructive); }
.compare-col-head p.name { margin-top: 0.75rem; font-weight: 600; font-size: 0.875rem; }
.compare-col-head p.price { margin-top: 0.25rem; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- Cart / lines ---------- */
.cart-line {
display: grid;
grid-template-columns: 5rem 1fr auto;
gap: 1rem;
align-items: center;
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 1rem;
}
@media (min-width: 640px) { .cart-line { gap: 1.5rem; } }
.cart-line .thumb { border-radius: 0.5rem; overflow: hidden; background: var(--secondary); aspect-ratio: 1/1; }
.cart-line .thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-line .info .eyebrow { font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted-foreground); font-weight: 500; }
.cart-line .info h3 { margin-top: 0.15rem; font-size: 1rem; font-weight: 600; }
.cart-line .info .unit-price { margin-top: 0.25rem; font-size: 0.875rem; color: var(--muted-foreground); font-variant-numeric: tabular-nums; }
.cart-line .qty-controls { display: flex; align-items: stretch; border: 1px solid var(--input); border-radius: 0.5rem; overflow: hidden; }
.cart-line .qty-controls button { width: 2.25rem; border: none; background: transparent; }
.cart-line .qty-controls button:hover { background: var(--secondary); }
.cart-line .qty-controls span { width: 2.5rem; display: flex; align-items: center; justify-content: center; border-left: 1px solid var(--input); border-right: 1px solid var(--input); font-size: 0.875rem; font-variant-numeric: tabular-nums; }
.cart-line .line-end { display: flex; flex-direction: column; align-items: flex-end; gap: 0.75rem; }
.cart-line .line-total-row { display: flex; align-items: center; gap: 0.75rem; }
.cart-line .line-total { font-weight: 600; font-variant-numeric: tabular-nums; }
.cart-line .remove-btn { width: 2.25rem; height: 2.25rem; border-radius: 0.5rem; border: none; background: transparent; color: var(--muted-foreground); display: flex; align-items: center; justify-content: center; }
.cart-line .remove-btn:hover { background: var(--secondary); color: var(--destructive); }

.summary-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; align-self: start; }
@media (min-width: 1024px) { .summary-card { position: sticky; top: 8rem; } }
.summary-row { display: flex; justify-content: space-between; font-size: 0.875rem; }
.summary-row + .summary-row { margin-top: 0.75rem; }
.summary-row .value { font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- Skeleton ---------- */
.skeleton { background: var(--secondary); border-radius: var(--radius); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* ---------- Toast ---------- */
#toast-root { position: fixed; bottom: 1.25rem; right: 1.25rem; z-index: 60; display: flex; flex-direction: column; gap: 0.5rem; }
.toast {
background: var(--foreground);
color: #fff;
padding: 0.75rem 1rem;
border-radius: 0.5rem;
font-size: 0.875rem;
box-shadow: var(--shadow-md);
animation: toast-in 200ms ease;
max-width: 20rem;
}
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- Utility ---------- */
.text-muted { color: var(--muted-foreground); }
.text-success { color: var(--success); }
.text-destructive { color: var(--destructive); }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.hidden { display: none !important; }

/* Trust-badge / feature lists (e.g. product page "function-tested",
   "genuine parts" rows) render their icon svg with no intrinsic size,
   so without this it fills all available space. */
ul.mt-8 svg, .mt-8 ul svg {
width: 1.5rem;
height: 1.5rem;
flex-shrink: 0;
color: var(--primary);
}

.warning-note {
border-radius: 0.5rem;
border: 1px solid rgba(217,119,6,0.4);
background: rgba(217,119,6,0.1);
padding: 0.875rem 1rem;
font-size: 0.875rem;
}
.legal-content { max-width: 42rem; margin: 2rem auto 0; font-size: 0.875rem; line-height: 1.7; color: var(--muted-foreground); }
.legal-content h2 { margin-top: 2rem; font-size: 1.1rem; font-weight: 700; color: var(--foreground); }
.legal-content p { margin-top: 0.75rem; }
.legal-content ul { margin-top: 0.75rem; padding-left: 1.25rem; list-style: disc; }
.legal-content li + li { margin-top: 0.25rem; }
