/*
 * layout.css — utility class layer for hidplanet_staging.
 *
 * Ported literally from the Tailwind utility classes used in the prototype
 * (/tmp/hidplanet_proto_6). NOT a Tailwind compile — a hand-written subset
 * covering exactly the classes referenced in the template PHP + JoomShopping
 * overrides. Tokens come from template.css (byte-literal JOOMLA_VISUAL_REFERENCE.css).
 * Any additions must be sourced from the prototype, never invented.
 */

/* Reset + base */
*, *::before, *::after { box-sizing: border-box; }
html { font-family: var(--hp-font-sans); font-size: 16px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: clip; }
body { margin: 0; background: var(--hp-background); color: var(--hp-text); line-height: var(--hp-lh-body); overflow-x: clip; min-width: 0; }
/* Phase 8: no element may push past viewport width. Category tiles + product cards + featured grids inherit min-width:0 so long alias/title strings wrap instead of stretching the row. */
.hp-app, main, section, header, footer, .max-w-7xl { max-width: 100%; }
img, video, iframe, svg { max-width: 100%; height: auto; }
.hp-product-card, .hp-product-card__title { min-width: 0; word-wrap: break-word; overflow-wrap: anywhere; }
.hp-product-card__image { width: 100%; height: auto; object-fit: cover; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; background: none; border: 0; padding: 0; color: inherit; }
img, svg { display: block; max-width: 100%; height: auto; }
input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: var(--hp-fw-bold); line-height: var(--hp-lh-tight); color: var(--hp-text); }
p { margin: 0; }
ul, ol { list-style: none; margin: 0; padding: 0; }
.font-sans { font-family: var(--hp-font-sans); }
.antialiased { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

/* Layout containers */
.hp-app { display: flex; flex-direction: column; min-height: 100dvh; }
.min-h-dvh { min-height: 100dvh; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.block { display: block; }
.inline-block { display: inline-block; }
.hidden { display: none; }
.flex-1 { flex: 1 1 0%; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.items-baseline { align-items: baseline; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.self-start { align-self: flex-start; }
.shrink-0 { flex-shrink: 0; }
.min-w-0 { min-width: 0; }
.w-full { width: 100%; }
.h-full { height: 100%; }

/* Container widths */
.mx-auto { margin-left: auto; margin-right: auto; }
.max-w-7xl { max-width: var(--hp-container-max); }
.max-w-3xl { max-width: 48rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-md { max-width: 28rem; }
.max-w-xl { max-width: 36rem; }

/* Spacing scale — matches prototype uses */
.p-0 { padding: 0; }
.p-1 { padding: var(--hp-space-1); }
.p-2 { padding: var(--hp-space-2); }
.p-3 { padding: var(--hp-space-3); }
.p-4 { padding: var(--hp-space-4); }
.p-5 { padding: 1.25rem; }
.p-6 { padding: var(--hp-space-6); }
.p-8 { padding: var(--hp-space-8); }
.p-10 { padding: 2.5rem; }
.p-12 { padding: var(--hp-space-12); }
.px-2 { padding-left: var(--hp-space-2); padding-right: var(--hp-space-2); }
.px-2\.5 { padding-left: 0.625rem; padding-right: 0.625rem; }
.px-3 { padding-left: var(--hp-space-3); padding-right: var(--hp-space-3); }
.px-4 { padding-left: var(--hp-space-4); padding-right: var(--hp-space-4); }
.px-6 { padding-left: var(--hp-space-6); padding-right: var(--hp-space-6); }
.py-1 { padding-top: var(--hp-space-1); padding-bottom: var(--hp-space-1); }
.py-1\.5 { padding-top: 0.375rem; padding-bottom: 0.375rem; }
.py-2 { padding-top: var(--hp-space-2); padding-bottom: var(--hp-space-2); }
.py-2\.5 { padding-top: 0.625rem; padding-bottom: 0.625rem; }
.py-3 { padding-top: var(--hp-space-3); padding-bottom: var(--hp-space-3); }
.py-5 { padding-top: 1.25rem; padding-bottom: 1.25rem; }
.py-8 { padding-top: var(--hp-space-8); padding-bottom: var(--hp-space-8); }
.py-12 { padding-top: var(--hp-space-12); padding-bottom: var(--hp-space-12); }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.pt-3 { padding-top: var(--hp-space-3); }
.pt-4 { padding-top: var(--hp-space-4); }
.pt-6 { padding-top: var(--hp-space-6); }
.pl-9 { padding-left: 2.25rem; }
.pl-10 { padding-left: 2.5rem; }
.pr-3 { padding-right: var(--hp-space-3); }
.pr-4 { padding-right: var(--hp-space-4); }
.pb-4 { padding-bottom: var(--hp-space-4); }
.mt-0\.5 { margin-top: 0.125rem; }
.mt-1 { margin-top: var(--hp-space-1); }
.mt-1\.5 { margin-top: 0.375rem; }
.mt-2 { margin-top: var(--hp-space-2); }
.mt-3 { margin-top: var(--hp-space-3); }
.mt-4 { margin-top: var(--hp-space-4); }
.mt-5 { margin-top: 1.25rem; }
.mt-6 { margin-top: var(--hp-space-6); }
.mt-7 { margin-top: 1.75rem; }
.mt-8 { margin-top: var(--hp-space-8); }
.mt-auto { margin-top: auto; }
.mt-12 { margin-top: var(--hp-space-12); }
.mb-1 { margin-bottom: var(--hp-space-1); }
.mb-1\.5 { margin-bottom: 0.375rem; }
.mb-4 { margin-bottom: var(--hp-space-4); }
.mb-5 { margin-bottom: 1.25rem; }
.mb-6 { margin-bottom: var(--hp-space-6); }
.mb-8 { margin-bottom: var(--hp-space-8); }
.ml-auto { margin-left: auto; }
.gap-0\.5 { gap: 0.125rem; }
.gap-1 { gap: var(--hp-space-1); }
.gap-1\.5 { gap: 0.375rem; }
.gap-2 { gap: var(--hp-space-2); }
.gap-2\.5 { gap: 0.625rem; }
.gap-3 { gap: var(--hp-space-3); }
.gap-4 { gap: var(--hp-space-4); }
.gap-6 { gap: var(--hp-space-6); }
.gap-8 { gap: var(--hp-space-8); }
.gap-12 { gap: var(--hp-space-12); }
.gap-px { gap: 1px; }
.space-x-2 > * + * { margin-left: var(--hp-space-2); }
.space-y-1 > * + * { margin-top: var(--hp-space-1); }
.space-y-2 > * + * { margin-top: var(--hp-space-2); }
.space-y-2\.5 > * + * { margin-top: 0.625rem; }
.space-y-3 > * + * { margin-top: var(--hp-space-3); }
.space-y-4 > * + * { margin-top: var(--hp-space-4); }
.space-y-6 > * + * { margin-top: var(--hp-space-6); }

/* Grid utilities */
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* Typography */
.text-xs { font-size: var(--hp-fs-xs); line-height: 1rem; }
.text-sm { font-size: var(--hp-fs-sm); line-height: 1.25rem; }
.text-base { font-size: var(--hp-fs-base); line-height: 1.5rem; }
.text-lg { font-size: var(--hp-fs-lg); line-height: 1.75rem; }
.text-xl { font-size: var(--hp-fs-xl); line-height: 1.75rem; }
.text-2xl { font-size: var(--hp-fs-2xl); line-height: 1.15; }
.text-3xl { font-size: 1.875rem; line-height: 1.15; }
.text-4xl { font-size: 2.25rem; line-height: 1.1; }
.text-5xl { font-size: 3rem; line-height: 1.05; }
.text-\[10px\] { font-size: 10px; }
.text-\[11px\] { font-size: 11px; }
.font-medium { font-weight: var(--hp-fw-medium); }
.font-semibold { font-weight: var(--hp-fw-semibold); }
.font-bold { font-weight: var(--hp-fw-bold); }
.tracking-tight { letter-spacing: -0.015em; }
.tracking-wide { letter-spacing: 0.025em; }
.uppercase { text-transform: uppercase; }
.leading-tight { line-height: var(--hp-lh-tight); }
.leading-snug { line-height: 1.375; }
.leading-relaxed { line-height: var(--hp-lh-body); }
.text-balance { text-wrap: balance; }
.text-pretty { text-wrap: pretty; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.line-through { text-decoration: line-through; }
.tabular-nums { font-variant-numeric: tabular-nums; }
.text-foreground { color: var(--hp-text); }
.text-muted-foreground { color: var(--hp-text-secondary); }
.text-muted-text { color: var(--hp-text-muted); }
.text-primary { color: var(--hp-primary); }
.text-primary-foreground { color: var(--hp-primary-foreground); }
.text-destructive { color: var(--hp-error); }
.hover\:text-primary:hover { color: var(--hp-primary); }
.hover\:text-primary-hover:hover { color: var(--hp-primary-hover); }
.hover\:text-foreground:hover { color: var(--hp-text); }
.hover\:text-destructive:hover { color: var(--hp-error); }

/* Backgrounds */
.bg-background { background-color: var(--hp-background); }
.bg-header { background-color: var(--hp-header); }
.bg-nav { background-color: var(--hp-nav); }
.bg-card { background-color: var(--hp-card); }
.bg-accent { background-color: var(--hp-header); }
.bg-border { background-color: var(--hp-border); }
.bg-primary { background-color: var(--hp-primary); }
.hover\:bg-primary:hover { background-color: var(--hp-primary); }
.hover\:bg-primary-hover:hover { background-color: var(--hp-primary-hover); }
.hover\:bg-nav:hover { background-color: var(--hp-nav); }
.hover\:bg-card:hover { background-color: var(--hp-card); }
.bg-header\/95 { background-color: color-mix(in oklab, var(--hp-header) 95%, transparent); }
.bg-header\/80 { background-color: color-mix(in oklab, var(--hp-header) 80%, transparent); }

/* Borders */
.border { border: var(--hp-border-width) var(--hp-border-style) var(--hp-border); }
.border-b { border-bottom: var(--hp-border-width) var(--hp-border-style) var(--hp-border); }
.border-t { border-top: var(--hp-border-width) var(--hp-border-style) var(--hp-border); }
.border-y { border-top: var(--hp-border-width) var(--hp-border-style) var(--hp-border); border-bottom: var(--hp-border-width) var(--hp-border-style) var(--hp-border); }
.border-b-2 { border-bottom-width: 2px; border-bottom-style: solid; border-bottom-color: var(--hp-border); }
.border-2 { border-width: 2px; border-style: solid; border-color: var(--hp-border); }
.border-border { border-color: var(--hp-border); }
.border-primary { border-color: var(--hp-primary); }
.border-transparent { border-color: transparent; }
.border-primary\/40 { border-color: color-mix(in oklab, var(--hp-primary) 40%, transparent); }
.hover\:border-primary\/40:hover { border-color: color-mix(in oklab, var(--hp-primary) 40%, transparent); }
.rounded-md { border-radius: 0.375rem; }
.rounded-lg { border-radius: var(--hp-radius); }
.rounded-xl { border-radius: var(--hp-radius-lg); }
.rounded-full { border-radius: var(--hp-radius-full); }

/* Position + sticky */
.relative { position: relative; }
.absolute { position: absolute; }
.sticky { position: sticky; }
.top-0 { top: 0; }
.top-1\/2 { top: 50%; }
.top-3 { top: var(--hp-space-3); }
.top-28 { top: 7rem; }
.right-0 { right: 0; }
.left-3 { left: var(--hp-space-3); }
.-right-1 { right: -0.25rem; }
.-top-1 { top: -0.25rem; }
.-right-1\.5 { right: -0.375rem; }
.-top-1\.5 { top: -0.375rem; }
.-translate-y-1\/2 { transform: translateY(-50%); }
.z-50 { z-index: 50; }

/* Sizing */
.size-3 { width: 0.75rem; height: 0.75rem; }
.size-3\.5 { width: 0.875rem; height: 0.875rem; }
.size-4 { width: 1rem; height: 1rem; }
.size-5 { width: 1.25rem; height: 1.25rem; }
.size-7 { width: 1.75rem; height: 1.75rem; }
.size-8 { width: 2rem; height: 2rem; }
.size-9 { width: 2.25rem; height: 2.25rem; }
.size-11 { width: 2.75rem; height: 2.75rem; }
.size-12 { width: 3rem; height: 3rem; }
.size-16 { width: 4rem; height: 4rem; }
.size-24 { width: 6rem; height: 6rem; }
.h-4 { height: 1rem; }
.h-9 { height: 2.25rem; }
.h-10 { height: 2.5rem; }
.h-11 { height: 2.75rem; }
.w-6 { width: 1.5rem; }
.w-8 { width: 2rem; }
.w-10 { width: 2.5rem; }
.w-20 { width: 5rem; }
.h-px { height: 1px; }
.h-56 { height: 14rem; }
.aspect-square { aspect-ratio: 1 / 1; }
.aspect-\[4\/3\] { aspect-ratio: 4 / 3; }

/* Backdrop / overflow / cursor */
.backdrop-blur { backdrop-filter: blur(8px); }
.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }
.cursor-pointer { cursor: pointer; }
.pointer-events-none { pointer-events: none; }

/* Rings + focus */
.focus\:border-primary:focus { border-color: var(--hp-primary); outline: none; }
.focus\:outline-none:focus { outline: none; }
.focus\:ring-2:focus { box-shadow: 0 0 0 2px var(--hp-primary); }
.focus\:ring-primary\/20:focus { box-shadow: 0 0 0 2px color-mix(in oklab, var(--hp-primary) 20%, transparent); }
.outline-none { outline: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0; }

/* Media queries */
@media (min-width: 640px) {
	.sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.sm\:flex-row { flex-direction: row; }
	.sm\:col-span-2 { grid-column: span 2 / span 2; }
	.sm\:inline { display: inline; }
	.sm\:inline-flex { display: inline-flex; }
	.sm\:text-3xl { font-size: 1.875rem; line-height: 1.15; }
	.sm\:text-4xl { font-size: 2.25rem; line-height: 1.1; }
	.sm\:w-10 { width: 2.5rem; }
	.sm\:flex-none { flex: none; }
}
@media (min-width: 768px) {
	.md\:block { display: block; }
	.md\:hidden { display: none; }
	.md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.md\:p-6 { padding: var(--hp-space-6); }
	.md\:p-10 { padding: 2.5rem; }
	.md\:py-16 { padding-top: 4rem; padding-bottom: 4rem; }
	.md\:gap-6 { gap: var(--hp-space-6); }
	.md\:h-full { height: 100%; }
	.md\:min-h-\[280px\] { min-height: 280px; }
}
@media (min-width: 1024px) {
	.lg\:block { display: block; }
	.lg\:hidden { display: none; }
	.lg\:inline-flex { display: inline-flex; }
	.lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.lg\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
	.lg\:grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
	.lg\:grid-cols-\[1fr_360px\] { grid-template-columns: 1fr 360px; }
	.lg\:grid-cols-\[220px_1fr\] { grid-template-columns: 220px 1fr; }
	.lg\:gap-12 { gap: var(--hp-space-12); }
	.lg\:order-1 { order: 1; }
	.lg\:order-2 { order: 2; }
	.lg\:sticky { position: sticky; }
	.lg\:self-start { align-self: flex-start; }
	.lg\:text-5xl { font-size: 3rem; line-height: 1.05; }
	.lg\:top-28 { top: 7rem; }
}
