/* ============================================
   Sorring Udlejning — storefront components
   ============================================
   Direction 01 Høvlbænk. All values come from css/brand.css (linked first on
   every page). No hex values in this file. */

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; -webkit-font-smoothing: antialiased; background: var(--bg); }
body { font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.6; font-variant-numeric: lining-nums; }
a { color: inherit; text-decoration: none; }
/* On-brand keyboard focus ring: steel blue on light, tape yellow on dark. */
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.site-footer :focus-visible, .admin-sidebar :focus-visible, .campaign-banner :focus-visible { outline-color: var(--focus-on-inverse); }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }
ul, ol { list-style: none; }

/* --- Layout --- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* --- Header: white board with the yellow tape stripe underneath --- */
.site-header {
  background: var(--surface);
  color: var(--text);
  border-bottom: var(--tape) solid var(--accent);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1rem;
  gap: 1.5rem;
}

.site-logo { --wm-hole: var(--surface); font-size: 1.75rem; color: var(--text); white-space: nowrap; }

.site-nav { display: flex; gap: 0; }

.site-nav a {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.5rem 0.85rem;
  border-bottom: var(--border-w) solid transparent;
  transition: color var(--transition), border-color var(--transition);
}

.site-nav a:hover,
.site-nav a.active { color: var(--text); border-bottom-color: var(--primary); }

/* Cross-sell link to the sister 3D-printing service: tape-marked so it reads
   as a separate/external service, not a normal nav item. */

/* Contact section (#kontakt) */
.contact-section { padding: 2.5rem 0; background: var(--bg-subtle); border-top: 1px solid var(--line); }
.contact-intro { max-width: 640px; margin: 0 auto 1.5rem; text-align: center; color: var(--muted); }
.contact-intro a { color: var(--primary); text-decoration: underline; }
.contact-form { max-width: 520px; margin: 0 auto; }
.contact-status { margin-top: 0.75rem; font-size: 0.875rem; min-height: 1.25rem; }
.contact-status.success { color: var(--ok); }
.contact-status.success::before { content: "✓ "; font-weight: 800; }
.contact-status.error { color: var(--error); }
.contact-status.error::before { content: "✕ "; font-weight: 800; }

/* Ratings & reviews (stars are text: the accent-as-text tone, AA on light) */
.stars { color: var(--primary); letter-spacing: 1px; }
.pdp-rating { margin-bottom: 0.75rem; font-size: 0.9375rem; color: var(--muted); }
.pdp-rating .rating-value { font-weight: 700; }
.product-card-rating { color: var(--primary); font-size: 0.8125rem; font-weight: 600; margin-top: 0.25rem; }
.pdp-reviews { margin-top: 2rem; }
.reviews-list { display: flex; flex-direction: column; gap: 1rem; max-width: 720px; }
.review { padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.review-head { margin-bottom: 0.25rem; }
.review-title { font-weight: 600; margin-bottom: 0.25rem; }
.review-body { color: var(--muted); white-space: pre-wrap; margin: 0; }
.star-input { display: inline-flex; flex-direction: row-reverse; gap: 2px; font-size: 1.5rem; }
.star-input input { position: absolute; width: 1px; height: 1px; opacity: 0; margin: 0; } /* visually hidden, still keyboard-reachable (F-41) */
.star-input input:focus-visible + label { outline: 2px solid var(--focus); outline-offset: 2px; }
.star-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.star-input label { color: var(--line-strong); cursor: pointer; }
.star-input label:hover, .star-input label:hover ~ label,
.star-input input:checked ~ label { color: var(--accent-text); }
.review-form-box { display: flex; flex-direction: column; gap: 0.5rem; max-width: 480px; margin: -0.25rem 0 1rem; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-subtle); }

.header-search {
  display: flex;
  flex: 1;
  max-width: 400px;
}

.header-search input {
  min-width: 0;
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  padding: 0.5rem 0.75rem;
  border: var(--border-w) solid var(--primary);
  border-right: 0;
  border-radius: var(--radius) 0 0 var(--radius);
  font-size: 0.875rem;
  font-family: var(--font);
  color: var(--text);
  background: var(--surface);
  outline: none;
}
.header-search input::placeholder { color: var(--muted); }

.header-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.85rem;
  background: var(--primary);
  border: var(--border-w) solid var(--primary);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--on-primary);
  font-size: 0.875rem;
}
.header-search button:hover { background: var(--primary-hover); }

.mobile-menu-btn {
  display: none;
  background: none;
  border: var(--border-w) solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 1.4rem;
  min-width: 44px;
  min-height: 44px;
  padding: 0.25rem;
}

/* Phone: logo + menu button on one row; the search and the nav open below it.
   Breaks at 767px so a 768px tablet gets the full desktop header. */
@media (max-width: 767px) {
  .mobile-menu-btn { display: block; }
  .header-inner { flex-wrap: wrap; gap: 0 1rem; }
  .site-logo { font-size: 1.5rem; }
  .header-search, .site-nav { display: none; }
  .site-header.menu-open .header-search { display: flex; order: 3; flex-basis: 100%; max-width: none; margin-top: 0.5rem; }
  .site-header.menu-open .header-search input { font-size: 16px; min-height: 44px; }
  .site-header.menu-open .header-search button { min-width: 48px; }
  .site-nav.open { display: flex; flex-direction: column; order: 4; flex-basis: 100%; padding: 0.25rem 0 0.5rem; }
  .site-nav.open a { padding: 0.75rem 0.5rem; border-bottom: 1px solid var(--line-soft); }
}

/* Tablet: same header as desktop, tightened so logo, search and six links fit. */
@media (min-width: 768px) and (max-width: 1023px) {
  .header-inner { gap: 0.75rem; }
  .header-search { max-width: 190px; min-width: 120px; }
  .site-nav a { padding: 0.5rem 0.45rem; font-size: 0.85rem; }
}

/* --- Buttons: steel blue primary, outlined secondary, square corners --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.55rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 700;
  border: var(--border-w) solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
  min-height: 40px;
}

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

/* Kept for markup compatibility: the secondary solid button is dark steel. */
.btn-navy { background: var(--inverse); color: var(--on-inverse); border-color: var(--inverse); }
.btn-navy:hover { background: var(--text); border-color: var(--text); }

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

.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.8125rem; min-height: 32px; }
.btn-lg { padding: 0.75rem 1.75rem; font-size: 1rem; min-height: 48px; }

.btn:disabled { opacity: 1; cursor: not-allowed; background: var(--booked-soft); color: var(--booked); border: var(--border-w) dashed var(--booked); }

/* --- Cards --- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow var(--transition);
}

.card:hover { box-shadow: var(--shadow-md); }

.card-img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  background: var(--bg);
}

.card-body { padding: 1rem; }

/* --- Typography: Zilla Slab on the tags, Libre Franklin to read --- */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; color: var(--text); line-height: 1.15; }
h1 { font-size: 2.25rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.2rem; }

.section-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  padding-bottom: 0.35rem;
  display: inline-block;
  border-bottom: var(--tape) solid var(--accent);
}

.price { color: var(--text); font-family: var(--font-display); font-weight: 700; font-variant-numeric: lining-nums tabular-nums; }
.price-label { color: var(--muted); font-weight: 400; font-size: 0.94rem; }

/* --- Forms --- */
.form-group { margin-bottom: 1rem; }

.form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  font-size: 16px; /* never below 16 px: iOS zooms the page on focus otherwise (F-39) */
  font-family: var(--font);
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  transition: border-color var(--transition), box-shadow var(--transition);
  min-height: 42px;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
}

.form-textarea { min-height: 80px; resize: vertical; }

/* Inline field errors (F-11): text + ✕ marker + dashed border, never colour only */
.field-error { color: var(--error); font-size: 0.8125rem; font-weight: 600; margin-top: 0.25rem; }
.field-error::before { content: "✕ "; font-weight: 800; }
.form-input[aria-invalid="true"], .form-select[aria-invalid="true"], .form-textarea[aria-invalid="true"] { border: 2px dashed var(--error); background: var(--error-soft); }
.form-hint { font-size: 0.94rem; color: var(--muted); margin-top: 0.25rem; }
.form-lead { font-weight: 600; margin: 0 0 0.75rem; }
.form-error-summary { border: 2px dashed var(--error); background: var(--error-soft); border-radius: var(--radius); padding: 0.6rem 0.9rem; margin-bottom: 1rem; font-size: 0.9rem; }
.form-error-summary ul { margin: 0.25rem 0 0; padding-left: 1.25rem; }
.form-error-summary a { color: var(--error); font-weight: 600; text-decoration: underline; }
.check-row { display: flex; align-items: flex-start; gap: 0.5rem; cursor: pointer; font-size: 0.94rem; }
.check-row input { margin-top: 3px; width: 18px; height: 18px; flex: none; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }

/* --- Badges: signals carry an icon AND a border style, never colour only --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  padding: 0.1rem 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.5;
  border-radius: var(--radius-sm);
  border: var(--border-w) solid transparent;
  white-space: nowrap;
}

.badge-success { background: var(--ok-soft); color: var(--ok); border-color: var(--ok); border-style: solid; }
.badge-success::before { content: "✓"; font-weight: 800; }
.badge-error { background: var(--error-soft); color: var(--error); border-color: var(--error); border-style: dashed; }
.badge-error::before { content: "✕"; font-weight: 800; }
.badge-warning { background: var(--warn-soft); color: var(--warn); border-color: var(--warn); border-style: dotted; }
.badge-warning::before { content: "!"; font-weight: 800; }
.badge-info { background: var(--primary-soft); color: var(--primary); border-color: var(--primary-soft); }
.badge-orange { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }

/* --- Tables --- */
.table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.table th { text-align: left; padding: 0.5rem 0.75rem; font-weight: 700; color: var(--muted); border-bottom: var(--border-w) solid var(--text); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; }
.table td { padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--line-soft); }
.table tr:hover { background: var(--bg-subtle); }
.table-actions { display: flex; gap: 0.25rem; }

.icon-btn { background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 0.25rem 0.5rem; min-width: 32px; min-height: 32px; font-size: 0.875rem; transition: all var(--transition); }
.icon-btn:hover { background: var(--bg-subtle); border-color: var(--primary); }
.icon-btn-danger:hover { background: var(--error-soft); border-color: var(--error); border-style: dashed; }

/* --- Spinner --- */
.spinner { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Alerts --- */
.alert { padding: 0.6rem 1rem; border-radius: var(--radius); border: var(--border-w) solid; border-left-width: 6px; font-size: 0.875rem; margin-bottom: 1rem; }
.alert-success { background: var(--ok-soft); border-color: var(--ok); color: var(--ok); }
.alert-success::before { content: "✓ "; font-weight: 800; }
.alert-error { background: var(--error-soft); border-color: var(--error); border-style: dashed; color: var(--error); }
.alert-error::before { content: "✕ "; font-weight: 800; }

/* --- Toast (dark steel, signal edge) --- */
#toast-container {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 9999;
  display: flex;
  flex-direction: column-reverse;
  gap: 0.5rem;
  pointer-events: none;
  max-height: 80vh;
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 200ms, transform 200ms;
  background: var(--inverse);
  color: var(--on-inverse);
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  cursor: pointer;
  max-width: 400px;
  user-select: none;
}

.toast-visible { opacity: 1; transform: translateY(0); }
.toast-message { flex: 1; word-break: break-word; }
.toast-count { font-size: 0.8rem; font-weight: 700; background: var(--accent-on-inverse); color: var(--inverse); padding: 1px 5px; border-radius: var(--radius-sm); }
.toast-success { border-left: 6px solid var(--accent-on-inverse); }
.toast-success::before { content: "✓"; font-weight: 800; color: var(--accent-on-inverse); }
.toast-error { border-left: 6px dashed var(--accent-on-inverse); }
.toast-error::before { content: "✕"; font-weight: 800; color: var(--accent-on-inverse); }
.toast-info { border-left: 6px solid var(--muted-inverse); }
.toast-warning { border-left: 6px dotted var(--accent-on-inverse); }
.toast-warning::before { content: "!"; font-weight: 800; color: var(--accent-on-inverse); }

/* --- Modal --- */
.modal-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: var(--overlay);
  display: flex; align-items: center; justify-content: center;
  z-index: 2000; padding: 1rem;
}

.modal { background: var(--surface); border-radius: var(--radius-lg); border-top: var(--tape) solid var(--accent); max-width: 500px; width: 100%; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg); }
.modal-header { padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.modal-title { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; }
.modal-close { background: none; border: none; font-size: 1.4rem; color: var(--muted); padding: 0; min-width: 44px; min-height: 44px; }
.modal-body { padding: 1.25rem; }
.modal-footer { padding: 0.75rem 1.25rem; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 0.5rem; }

/* --- Campaign banner (dark steel + tape; OFF on live until the owner turns it on) --- */
.campaign-banner {
  background-color: var(--inverse);
  background-size: cover;
  background-position: center;
  color: var(--on-inverse);
  border-bottom: var(--tape) solid var(--accent);
  padding: 2rem 0;
}
/* A banner photo always sits under the scrim, so on-inverse text stays
   readable on any image. The URL comes from campaign-banner.js via --campaign-bg. */
.campaign-banner.has-bg-image {
  background-image: linear-gradient(var(--scrim), var(--scrim)), var(--campaign-bg);
}
.campaign-content { display: flex; flex-direction: column; align-items: flex-start; gap: 0.75rem; }
/* The global h1 rule sets --text (near-black); the banner overrides it. */
.campaign-banner .campaign-title,
.campaign-banner .campaign-text { color: var(--on-inverse); }
.campaign-title { font-size: 2rem; line-height: 1.15; }
.campaign-banner .campaign-code { color: var(--on-inverse); border: 2px dashed var(--on-inverse); padding: 0.25rem 0.75rem; font-size: 1.125rem; }
.campaign-text { max-width: 640px; }
/* Touch targets: 44px on touch devices (2.5.8), the compact 32px stays for a mouse. */
@media (pointer: coarse) { .btn-sm { min-height: 44px; } }

/* Banner CTA: the tape-yellow button with black-steel text. */
.btn-on-dark { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.btn-on-dark:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

/* --- Hero --- */
.hero {
  background: var(--bg-subtle);
  padding: 3rem 0;
  border-bottom: var(--border-w) dashed var(--line);
}

.hero h1 { margin-bottom: 0.75rem; font-size: 2.6rem; max-width: 16em; }
.hero p { color: var(--muted); font-size: 1.1rem; margin-bottom: 1.5rem; max-width: 34em; }
.hero-steps { list-style: none; display: flex; gap: 0.5rem 1.25rem; flex-wrap: wrap; margin: 0 0 1.5rem; padding: 0; font-weight: 600; }
.hero-steps li::before { content: "\2713\00a0"; color: var(--primary); }
.hero-cta { display: flex; gap: 0.75rem; flex-wrap: wrap; }
@media (max-width: 640px) { .hero h1 { font-size: 2rem; } }

/* --- Category Bar: label tags on a rail --- */
.category-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 0.5rem 0;
}

.category-bar-inner {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.25rem 0;
}

.category-pill {
  position: relative;
  padding: 0.35rem 0.9rem 0.35rem 1.6rem;
  font-size: 0.8125rem;
  font-weight: 600;
  border: var(--border-w) solid var(--line);
  border-radius: var(--radius-sm) 0.9rem 0.9rem var(--radius-sm);
  color: var(--text);
  white-space: nowrap;
  transition: all var(--transition);
  background: var(--surface);
  min-height: 36px;
  display: inline-flex;
  align-items: center;
}
/* the punched hole of the tag */
.category-pill::before { content: ""; position: absolute; left: 0.6rem; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; border: 2px solid var(--line-strong); }

.category-pill:hover, .category-pill.active {
  background: var(--primary);
  color: var(--on-primary);
  border-color: var(--primary);
}
.category-pill:hover::before, .category-pill.active::before { border-color: var(--on-primary); }

/* --- Product Grid --- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  padding: 1.5rem 0;
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: box-shadow var(--transition), border-color var(--transition);
  display: flex;
  flex-direction: column;
}

.product-card:hover { box-shadow: var(--shadow-md); border-color: var(--primary); }

.product-card-img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.product-card-body {
  padding: 0.875rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-card-category {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.product-card-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.product-card-footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--line);
}

.product-card-price {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: lining-nums tabular-nums;
}

/* --- PDP (Product Detail) --- */
.pdp-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  padding: 2rem 0;
}

@media (max-width: 767px) { .pdp-layout { grid-template-columns: 1fr; } }

.pdp-gallery-main {
  width: 100%;
  aspect-ratio: 4/3;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  object-fit: cover;
}

.pdp-thumbnails { display: flex; gap: 0.5rem; margin-top: 0.75rem; }
.pdp-thumb { width: 64px; height: 64px; border-radius: var(--radius); object-fit: cover; border: var(--border-w) solid var(--line); cursor: pointer; background: var(--surface); }
.pdp-thumb.active { border-color: var(--primary); }

.pdp-title { font-size: 2.1rem; margin-bottom: 0.25rem; }
.pdp-manufacturer { color: var(--muted); font-size: 0.875rem; margin-bottom: 1rem; }
/* The day price is a price tag: black steel on white, ruled box */
.pdp-price { display: inline-block; font-family: var(--font-display); font-size: 2rem; font-weight: 700; color: var(--text); font-variant-numeric: lining-nums tabular-nums; border: var(--border-w) solid var(--text); border-radius: var(--radius); background: var(--surface); padding: 0.1rem 0.75rem; }
.pdp-price-label { font-family: var(--font); font-size: 0.94rem; color: var(--muted); font-weight: 400; }
.pdp-deposit { display: block; width: fit-content; font-size: 0.9rem; color: var(--text); font-weight: 700; margin-top: 0.4rem; border: var(--border-w) dashed var(--line-strong); border-radius: var(--radius); padding: 0.15rem 0.6rem; background: var(--surface); }
.pdp-deposit-row { margin-top: 0.5rem; }
.pdp-deposit-row small { color: var(--muted); font-weight: 400; }
.pdp-description { color: var(--text); margin: 1.25rem 0; line-height: 1.7; }
.pdp-description p { margin: 0 0 0.75rem; }
.pdp-intro { font-size: 1.05rem; }
.pdp-goodtoknow { border-left: 3px solid var(--primary); background: var(--surface); padding: 0.5rem 0.75rem; font-size: 0.9rem; }
.pdp-goodtoknow p { margin: 0.25rem 0 0; }
.pdp-rates { border-collapse: collapse; margin: 0.5rem 0 0; font-size: 0.9rem; }
.pdp-rates th, .pdp-rates td { text-align: left; padding: 0.15rem 1rem 0.15rem 0; font-weight: 400; }
.pdp-rates th { color: var(--muted); }

.pdp-specs { margin: 1rem 0; }
.pdp-spec { display: flex; padding: 0.4rem 0; border-bottom: 1px solid var(--line-soft); font-size: 0.875rem; }
.pdp-spec-label { color: var(--muted); min-width: 120px; }
.pdp-spec-value { color: var(--text); font-weight: 600; }

/* --- Availability Calendar ---
   ok ✓ solid · partly booked ! dotted · fully booked ✕ dashed + struck through.
   The icon and the border carry the meaning; the tint only helps. */
.cal-wrapper {
  margin-top: 1.5rem;
  border: var(--border-w) solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1rem;
  background: var(--surface);
}

.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.cal-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
}

.cal-nav {
  background: var(--surface);
  border: var(--border-w) solid var(--primary);
  border-radius: var(--radius);
  width: 40px;
  height: 40px;
  font-size: 1.1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  transition: background var(--transition);
}

.cal-nav:hover:not(:disabled) { background: var(--primary-soft); }
.cal-nav:disabled { opacity: 1; color: var(--muted); border-color: var(--line); border-style: dashed; cursor: not-allowed; }

.cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-bottom: 0.75rem;
  font-size: 0.8125rem;
  color: var(--text);
}

.cal-legend-item { display: flex; align-items: center; gap: 6px; }

/* Legend key: a mini calendar cell with the same icon + border as the grid */
.cal-dot {
  width: 20px;
  height: 20px;
  border-radius: var(--radius-sm);
  display: inline-grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1;
}

.cal-dot-green { background: var(--ok-soft); color: var(--ok); border: var(--border-w) solid var(--ok); }
.cal-dot-green::before { content: "✓"; }
.cal-dot-yellow { background: var(--warn-soft); color: var(--warn); border: var(--border-w) dotted var(--warn); }
.cal-dot-yellow::before { content: "!"; }
.cal-dot-red { background: var(--booked-soft); color: var(--booked); border: var(--border-w) dashed var(--booked); }
.cal-dot-red::before { content: "✕"; }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}

.cal-day-header {
  text-align: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  padding: 4px 0;
  text-transform: uppercase;
}

.cal-cell {
  position: relative;
  text-align: center;
  padding: 6px 2px;
  border-radius: var(--radius-sm);
  min-height: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: var(--border-w) solid transparent;
  transition: outline var(--transition), background var(--transition);
}
.cal-cell::after { position: absolute; top: 1px; right: 3px; font-size: 0.8rem; font-weight: 800; line-height: 1.2; }

.cal-cell-empty { background: transparent; }

.cal-cell-green { background: var(--ok-soft); color: var(--ok); border-color: var(--ok); }
.cal-cell-green::after { content: "✓"; }
.cal-cell-yellow { background: var(--warn-soft); color: var(--warn); border-color: var(--warn); border-style: dotted; }
.cal-cell-yellow::after { content: "!"; }
.cal-cell-red { background: var(--booked-soft); color: var(--booked); border-color: var(--booked); border-style: dashed; }
.cal-cell-red::after { content: "✕"; }
.cal-cell-red .cal-day-num { text-decoration: line-through; text-decoration-thickness: 2px; }

.cal-cell-past { opacity: 1; background: var(--bg-subtle); color: var(--muted); border-color: var(--line); border-style: dotted; }
.cal-cell-past::after { content: none; }
.cal-cell-past .cal-day-num { text-decoration: none; }

.cal-cell[data-date]:not(.cal-cell-past):not(.cal-cell-red):hover {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
  z-index: 1;
  cursor: pointer;
}

.cal-cell-selected {
  background: var(--primary-soft) !important;
  color: var(--text) !important;
  outline: 3px solid var(--text) !important;
  outline-offset: -1px;
  z-index: 2;
}
.cal-cell-selected .cal-day-num { font-weight: 800; }

.cal-day-num {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: lining-nums tabular-nums;
}

.cal-day-qty {
  font-size: 0.8rem;
  color: inherit;
  line-height: 1;
  margin-top: 3px;
}

@media (max-width: 480px) {
  .cal-cell { min-height: 40px; padding: 4px 1px; }
  .cal-day-num { font-size: 0.8rem; }
  .cal-day-qty { font-size: 0.8rem; }
  .cal-legend { gap: 0.5rem; font-size: 0.8rem; }
}

.pdp-booking-form {
  background: var(--surface);
  border: var(--border-w) solid var(--text);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-top: 1.5rem;
}

.pdp-booking-form h2 { margin-bottom: 1rem; font-size: 1.4rem; }

.pdp-price-calc {
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.875rem;
  margin-bottom: 1rem;
}

.pdp-price-calc-row { display: flex; justify-content: space-between; font-size: 0.875rem; color: var(--muted); }
.pdp-price-calc-total { display: flex; justify-content: space-between; font-size: 1.25rem; font-weight: 700; margin-top: 0.5rem; padding-top: 0.5rem; border-top: var(--border-w) solid var(--text); }
.pdp-price-calc-total .price { color: var(--text); }

/* Booking form: period summary, price blocks, deposit explainer (F-09, F-15) */
.pdp-period { font-weight: 600; font-size: 0.9rem; margin: 0 0 1rem; }
.pdp-availability-line { padding: 0.55rem 0; font-weight: 600; color: var(--muted); font-size: 0.875rem; }
.pdp-price-block + .pdp-price-block { margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px dashed var(--line-strong); }
.pdp-deposit-total { font-size: 1rem; border-top: 0; margin-top: 0; padding-top: 0; }
.pdp-explainer { margin-top: 0.35rem; font-size: 0.94rem; }
.pdp-explainer summary, .pdp-code summary { cursor: pointer; color: var(--primary); font-weight: 600; padding: 0.4rem 0; min-height: 24px; }
.pdp-explainer p { margin: 0.25rem 0 0; color: var(--muted); }
.pdp-code { margin-bottom: 1rem; font-size: 0.875rem; }
.pdp-unavailable { border: 2px dashed var(--line-strong); border-radius: var(--radius); padding: 1rem; }
.pdp-success { text-align: center; padding: 2rem 0; }
.cal-heading { font-size: 1.15rem; margin: 0 0 0.75rem; }
.cal-month2 { display: none; margin-top: 1rem; }
.cal-title2 { margin-bottom: 0.5rem; }
.cal-help { font-size: 0.94rem; margin: 0.75rem 0 0; }
@media (min-width: 768px) { .cal-month2 { display: block; } }
button.cal-cell { font: inherit; cursor: pointer; width: 100%; }
button.cal-cell:disabled { cursor: not-allowed; }
button.cal-cell:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; z-index: 3; }

/* Sticky price + CTA, phone only (F-14) */
.pdp-sticky { display: none; }
@media (max-width: 767px) {
  .pdp-sticky { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.6rem 1rem calc(0.6rem + env(safe-area-inset-bottom)); background: var(--surface); border-top: var(--border-w) solid var(--text); transition: transform var(--transition); }
  .pdp-sticky-hidden { transform: translateY(110%); }
  .pdp-sticky-text { display: flex; flex-direction: column; font-size: 0.8125rem; color: var(--muted); line-height: 1.3; }
  .pdp-sticky-text strong { color: var(--text); font-size: 1.1rem; font-family: var(--font-display); }
  body.has-sticky { padding-bottom: 4.5rem; }
}

.pdp-availability { font-size: 0.875rem; margin-bottom: 0.75rem; }

.pdp-back { display: inline-flex; align-items: center; gap: 0.25rem; color: var(--primary); font-weight: 600; font-size: 0.875rem; margin-bottom: 1rem; }
.pdp-back:hover { color: var(--text); text-decoration: underline; }

/* --- Footer (dark steel with the tape on top) --- */
.site-footer {
  background: var(--inverse);
  color: var(--muted-inverse);
  border-top: var(--tape) solid var(--accent);
  padding: 2rem 0;
  margin-top: 3rem;
  font-size: 0.8125rem;
  text-align: center;
}

.site-footer a { color: var(--on-inverse); text-decoration: underline; }
.site-footer a:hover { color: var(--accent-on-inverse); }
.footer-business p { margin: 0.25rem 0; }
.footer-facts { color: var(--on-inverse); }
.footer-links a { display: inline-block; margin: 0 0.15rem; padding: 6px 0.3rem; } /* 24 px target (WCAG 2.5.8) */

/* --- About page (/om) and legal pages --- */
.about-page { max-width: 760px; padding-top: 2rem; padding-bottom: 2rem; }
.about-page h1 { margin-bottom: 1.5rem; }
.about-section { margin-bottom: 1.75rem; }
.about-section h2 { font-size: 1.35rem; margin-bottom: 0.5rem; }
.about-section p { color: var(--text); margin-bottom: 0.5rem; }
.about-section ul { padding-left: 1.25rem; color: var(--text); list-style: square; }
.about-section li { margin-bottom: 0.35rem; }
.about-section li::marker { color: var(--primary); }
.about-section a { color: var(--primary); text-decoration: underline; }

/* --- Utility --- */
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-secondary { color: var(--muted); }
.text-muted { color: var(--muted); }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }

/* --- Empty / Loading States --- */
.loading-center { display: flex; justify-content: center; align-items: center; min-height: 200px; }
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.empty-state-icon { font-size: 2.5rem; margin-bottom: 0.5rem; opacity: 0.6; }

/* --- Stats Grid --- */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.stat-card { background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--primary); border-radius: var(--radius-lg); padding: 1.25rem; display: flex; justify-content: space-between; align-items: center; }
.stat-card h4 { font-family: var(--font); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 700; }
.stat-card .stat-value { font-family: var(--font-display); font-size: 2rem; font-weight: 700; font-variant-numeric: lining-nums tabular-nums; }
.stat-card .stat-icon { font-size: 1.5rem; }

/* --- Master Data Completeness --- */
.master-data-card { grid-column: 1 / -1; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.5rem; }
.md-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.75rem; }
.md-header h3 { font-size: 1.1rem; font-weight: 700; margin: 0; }
.md-pct { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; }
.md-progress-bar { width: 100%; height: 10px; background: var(--line-soft); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.md-progress-fill { height: 100%; border-radius: 0; transition: width 0.5s ease; }
.md-summary { font-size: 0.85rem; color: var(--muted); margin-top: 0.5rem; }
.md-criteria { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }
.md-criteria span { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; background: var(--bg); color: var(--muted); padding: 0.2rem 0.5rem; border-radius: var(--radius-sm); }
.md-details { margin-top: 1rem; }
.md-details summary { cursor: pointer; font-size: 0.85rem; font-weight: 700; color: var(--primary); }
.md-table { width: 100%; border-collapse: collapse; margin-top: 0.5rem; font-size: 0.85rem; }
.md-table th { text-align: left; padding: 0.4rem 0.5rem; border-bottom: var(--border-w) solid var(--text); font-size: 0.8rem; text-transform: uppercase; color: var(--muted); }
.md-table td { padding: 0.4rem 0.5rem; border-bottom: 1px solid var(--line-soft); }
.md-table tr:last-child td { border-bottom: none; }
.md-all-complete { margin-top: 0.75rem; font-size: 0.85rem; font-weight: 700; color: var(--ok); }
.md-all-complete::before { content: "✓ "; }

/* --- Admin Tool Thumbnails --- */
.admin-tool-thumb { width: 40px; height: 40px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--line); }

/* --- QR Scanner --- */
.qr-scan-btn { background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 0.375rem; min-width: 44px; min-height: 44px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: var(--text); transition: background 0.15s; }
.qr-scan-btn:hover { background: var(--bg-subtle); }
.qr-scanner-wrapper { position: relative; }
.qr-video { width: 100%; border-radius: var(--radius-lg); background: var(--inverse); display: block; }
.qr-canvas { display: none; }
.qr-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
.qr-frame { width: 200px; height: 200px; border: 3px solid var(--accent-on-inverse); border-radius: var(--radius-lg); box-shadow: 0 0 0 9999px var(--overlay); }
.qr-hint { color: var(--on-inverse); font-size: 0.875rem; font-weight: 600; margin-top: 1rem; background: var(--inverse); padding: 0.2rem 0.6rem; border-radius: var(--radius-sm); }
.qr-error { color: var(--error); font-size: 0.875rem; text-align: center; padding: 1rem; }
.qr-error::before { content: "✕ "; font-weight: 800; }
.qr-fallback { margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid var(--line); }
.radio-label { display: flex; align-items: center; gap: 0.5rem; padding: 0.375rem 0; min-height: 44px; cursor: pointer; font-size: 0.9375rem; }


/* --- Navigation, search and catalogue (card-fffbdb8d) --- */

/* Reserve the rails the JS fills in later, so nothing jumps (F-46). */
.category-bar { min-height: 56px; }
.category-bar-inner { min-height: 38px; }
#toolDetailContainer { min-height: 70vh; }

/* Home: categories first as compact tiles, then the featured tools (F-26, F-28). */
.home-categories { padding: 2rem 0 1rem; }
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.75rem; min-height: 96px; }
.category-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 1rem 0.5rem; min-height: 96px; text-align: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  color: var(--primary); font-weight: 600; font-size: 0.9375rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.category-tile:hover { border-color: var(--primary); box-shadow: var(--shadow-md); }
.category-tile-name { color: var(--text); }
.home-featured { padding: 2rem 0 2.5rem; }
@media (max-width: 767px) {
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  #featuredTools { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
  #featuredTools .product-card-body { padding: 0.625rem; }
  .section-title { border-bottom: 0; padding-bottom: 0; }
}

/* /tools: result summary, category intro, phone search (F-05, F-23, F-24). */
.tools-intro { margin-top: 0.4rem; max-width: 42em; color: var(--muted); }
.tools-summary { margin-top: 0.25rem; font-size: 0.875rem; color: var(--muted); min-height: 1.3em; }
.tools-summary a, .empty-state a { color: var(--primary); text-decoration: underline; }
.tools-search { display: none; gap: 0.5rem; margin-bottom: 1rem; }
.tools-search .form-input { flex: 1; min-width: 0; font-size: 1rem; min-height: 44px; }
.tools-search .btn { min-height: 44px; }
@media (max-width: 767px) { .tools-search { display: flex; } }

/* Tool page: one dominant price; the deposit is a quiet second line (F-47). */
.pdp-deposit { border: 0; padding: 0; background: none; font-weight: 400; color: var(--muted); }

/* /konto: footer stays at the bottom on a short page (F-33); in-page confirm dialog */
body.page-konto { display: flex; flex-direction: column; min-height: 100vh; }
body.page-konto .site-footer { margin-top: auto; }
.confirm-dialog { border: var(--border-w) solid var(--text); border-radius: var(--radius-lg); padding: 1.25rem; max-width: min(28rem, calc(100vw - 2rem)); background: var(--surface); color: var(--text); }
.confirm-dialog::backdrop { background: color-mix(in srgb, var(--text) 45%, transparent); }
.confirm-dialog h3 { margin: 0 0 0.5rem; }
.confirm-dialog p { margin: 0 0 1rem; white-space: pre-line; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 0.5rem; }
