/**
 * Pargas Platform — Mobile refinements
 * Breakpoint-specific polish: header compression, rails, sticky bars, grids.
 */

/* ≤1024px — tablet: hide category bar (drawer covers it) */
@media (max-width: 1023px) {
	.pg-header__main .pg-container { gap: 10px; }
	.pg-bottomnav + .pg-footer { margin-bottom: 0; }
}

/* ≤768px */
@media (max-width: 768px) {
	.pg-section-head { flex-direction: column; align-items: flex-start; gap: 8px; }
	.pg-section-head__link { padding-bottom: 0; }
	.pg-hero .pg-container { padding-block: var(--pg-space-9); }
	.pg-hero__ctas .pg-btn { flex: 1 1 auto; justify-content: center; }
	.pg-trustrow { margin-top: calc(var(--pg-space-6) * -1); }
	.pg-cta-band { text-align: center; }
	.pg-cta-band__actions { justify-content: center; }
	.pg-quote-form__grid { grid-template-columns: 1fr; }
	.pg-finder-band { padding: var(--pg-space-5); border-radius: var(--pg-radius-lg); }
	.pg-pdp-tabs { padding: var(--pg-space-4); border-radius: var(--pg-radius-lg); }
	.pg-footer__main { padding-block: var(--pg-space-7); }
	.pg-departments { grid-template-columns: 1fr; }
}

/* ≤640px */
@media (max-width: 640px) {
	/* Product grid: compact 2-col with tighter cards */
	.pg-products { gap: 10px; }
	.pg-pcard__body { padding: 12px; }
	.pg-pcard__title { font-size: 0.78125rem; }
	.pg-pcard__spec:nth-child(n+3) { display: none; }
	.pg-pcard__act { width: 30px; height: 30px; }

	/* Quote list rows stack */
	.pg-qlist__item { flex-wrap: wrap; }
	.pg-qlist__controls { width: 100%; justify-content: space-between; }
	.pg-qlist__controls .pg-qty { margin-inline-start: 0; }

	/* Buttons full-ish */
	.pg-btn--block-sm { width: 100%; justify-content: center; }

	/* Dashboard nav becomes horizontal scroll chips */
	.pg-dash__nav {
		flex-direction: row;
		overflow-x: auto;
		position: static;
		gap: 6px;
		padding: 10px;
	}
	.pg-dash__nav a { white-space: nowrap; padding: 8px 14px; border: 1px solid var(--pg-border); }
	.pg-dash__nav a .pg-ico { display: none; }
	.pg-dash__nav .pg-dash__logout { margin-top: 0; border-top: 0; padding-top: 8px; }
	.pg-dash__content form .form-row { width: 100% !important; }

	/* Data tables → horizontal scroll wrapper */
	.pg-table-scroll { overflow-x: auto; }
	.pg-table-scroll .pg-data-table { min-width: 560px; }

	/* Toast above bottom nav */
	.pg-toast-wrap { bottom: 80px; }

	/* Sticky buy bar + bottom nav spacing */
	body.pg-has-bottom-nav .pg-single-canvas { padding-bottom: 120px; }

	/* Hide address line + topbar handled by display:none at their tiers */
	.pg-cart-summary { position: static; }
	.pg-quote-form-card { position: static; }
}

/* ≤480px */
@media (max-width: 480px) {
	.pg-hact { width: 38px; height: 38px; }
	.pg-logo__tag { display: none; }
	.pg-trustrow__grid { grid-template-columns: 1fr 1fr; gap: 8px; }
	.pg-trustrow__card { flex-direction: column; gap: 8px; }
	.pg-hero__stats { gap: var(--pg-space-4); }
	.pg-modal__panel { max-height: 94vh; }
	.pg-filtersheet__panel { max-height: 92vh; }
	.pg-final-cta { padding: var(--pg-space-8) var(--pg-space-5); }
}

/* Touch targets ≥44px on coarse pointers */
@media (pointer: coarse) {
	.pg-chip { padding-block: 9px; }
	.pg-check input { width: 20px; height: 20px; }
	.pg-check input:checked::after { inset-inline-start: 6px; top: 3px; }
}

/* Print — clean quote/invoice prints */
@media print {
	.pg-header, .pg-footer, .pg-bottomnav, .pg-stickybar, .pg-totop, .pg-compare-bar, .pg-toast-wrap { display: none !important; }
	body { background: #fff; }
	.pg-card, .pg-dash-card { box-shadow: none; border-color: #ddd; }
}

/* ===== v4: bottomnav 6 slots (consult) + header actions trim ===== */
@media (max-width: 1023.98px) {
	.pg-bottomnav.pg-bottomnav { grid-template-columns: repeat(6, 1fr); }
	.pg-bottomnav .pg-bottomnav__item { padding-inline: 2px; }
	.pg-bottomnav .pg-bottomnav__item > span { font-size: 0.625rem; }
}
@media (max-width: 560px) {
	/* header icons that duplicate bottom-nav entry points */
	.pg-hact--consult, .pg-header__actions .pg-hact[href="compare.html"] { display: none; }
	.pg-header__actions { gap: 6px; }
	.pg-hact { width: 38px; }
}
