/* Protecta V13 — one shared category entry for public pages and owner previews. */
body .sf13-root.sf7-root {
  padding-block: 12px 28px;
}

body #category-page-v8.sf13-root {
  padding-block: 0 20px;
}

body .sf13-root .sf13-entry {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  grid-template-areas: 'categories intro';
  gap: clamp(24px, 4vw, 60px);
  align-items: center;
  padding-block: 12px;
  margin-bottom: 24px;
}

body .sf13-root .sf13-entry--category {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr);
  grid-template-areas: 'intro categories';
}

body .sf13-root .sf13-entry > .sf7-section {
  margin: 0;
}

body .sf13-root .sf13-entry > .sf7-hero {
  grid-area: intro;
  display: block;
  padding: 0;
  border: 0;
  border-radius: 0;
  min-width: 0;
  background: transparent;
}

body .sf13-root .sf13-entry > .sf7-theme-navy {
  padding: 24px;
  background: var(--sf7-navy);
  border-radius: 16px;
}

body .sf13-root .sf13-entry > .sf13-category-section {
  grid-area: categories;
}

body .sf13-root :is(.sf13-entry, .sf13-standalone-intro) h1,
body #category-page-v8.sf13-root .sf7-hero h1 {
  font-size: clamp(27px, 2.6vw, 36px);
  line-height: 1.15;
  letter-spacing: -0.045em;
  margin: 0 0 12px;
}

body .sf13-root .sf7-eyebrow {
  font-size: 11px;
  margin-bottom: 12px !important;
}

body .sf13-root .sf7-description {
  font-size: 15px;
  line-height: 1.65;
}

body .sf13-root .sf13-entry .sf7-button {
  min-height: 44px;
  margin-top: 12px;
  padding: 8px 0;
  background: transparent;
  border-radius: 0;
  border-bottom: 1px solid #ed783070;
  color: inherit !important;
  box-shadow: none;
  font-size: 14px;
}

body .sf13-root .sf13-entry .sf7-button:hover {
  color: #ad4515 !important;
  transform: none;
}

body .sf13-root .sf13-entry .sf7-hero-image {
  width: 88px;
  height: 64px;
  max-height: 64px;
  aspect-ratio: auto;
  margin-top: 18px;
  object-fit: cover;
  border-radius: 9px;
}

/* The default heading duplicates the visible introduction; custom headings remain visible. */
body .sf13-root .sf13-default-category-heading {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body .sf13-root .sf7-section-head {
  margin-bottom: 16px;
}

body .sf13-root .sf7-section-head h2 {
  font-size: 23px;
}

body .sf13-root .sf7-categories {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 16px;
}

body .sf13-root .sf7-category {
  position: relative;
  min-width: 0;
  border: 1px solid #dfe7ed;
  border-radius: 15px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 2px 4px #122d4603;
}

body .sf13-root .sf7-category:hover {
  border-color: #b9c9d5;
  transform: translateY(-2px);
  box-shadow: 0 9px 24px #122d4610;
}

body .sf13-root .sf13-card-main {
  display: block;
}

/* A stretched main link keeps the whole card clickable; child links remain separate anchors. */
body .sf13-root .sf13-card-main::after {
  position: absolute;
  inset: 0;
  content: '';
}

body .sf13-root .sf13-card-main:focus-visible {
  outline: none;
}

body .sf13-root .sf7-category:has(.sf13-card-main:focus-visible) {
  outline: 3px solid #b84e15;
  outline-offset: 3px;
}

body .sf13-root .sf7-category-photo {
  height: clamp(112px, 10vw, 144px);
  aspect-ratio: auto;
  background: #eef2f4;
}

body .sf13-root .sf7-category-photo img {
  padding: 0;
  object-fit: contain;
}

body .sf13-root .sf7-category-copy {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 13px 16px;
}

body .sf13-root .sf7-category-copy h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.3;
}

body .sf13-root .sf7-category-copy .sf13-card-arrow {
  flex: 0 0 auto;
  margin: 0;
  font-size: 21px;
  color: #a84413;
}

body .sf13-root .sf13-child-links {
  display: flex;
  flex-wrap: wrap;
  align-items: start;
  gap: 0 12px;
  padding: 0 16px 10px;
  margin-top: auto;
}

body .sf13-root .sf13-child-links a {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  color: #53697b;
  font-size: 13px;
  text-decoration: underline;
  text-decoration-color: #bac7d1;
  text-underline-offset: 4px;
}

body .sf13-root .sf13-child-links a:hover {
  color: #a84413;
}

body .sf13-root .sf13-shopping-help {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #dfe7ed;
}

body .sf13-root .sf13-shopping-help > summary {
  display: none;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  list-style: none;
}

body .sf13-root .sf13-shopping-help > summary::-webkit-details-marker {
  display: none;
}

body .sf13-root .sf13-shopping-help > summary::after {
  content: '+';
  color: #a84413;
  font-size: 20px;
}

body .sf13-root .sf13-shopping-help[open] > summary::after {
  content: '−';
}

body .sf13-root .sf13-shopping-help ol {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

body .sf13-root .sf13-shopping-help li {
  display: flex;
  gap: 12px;
  align-items: start;
}

body .sf13-root .sf13-shopping-help li > span {
  flex: 0 0 auto;
  font-size: 12px;
  color: #a84413;
  padding-top: 2px;
}

body .sf13-root .sf13-shopping-help strong {
  font-size: 14px;
  font-weight: 700;
}

body .sf13-root .sf13-shopping-help p {
  margin-top: 3px;
  font-size: 13px;
  color: #607588;
  line-height: 1.55;
}

body .sf13-root .sf13-help-link {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  min-height: 44px;
  margin-top: 10px;
  color: #a84413;
  font-size: 14px;
  font-weight: 600;
}

body .sf13-root.sf7-root .sf13-standalone-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 20px;
  margin-bottom: 0;
}

body .sf13-root .sf13-standalone-intro .sf7-hero-image {
  flex: 0 0 auto;
  width: 60px;
  height: 60px;
  aspect-ratio: 1;
  object-fit: cover;
}

body .sf13-root.sf13-leaf .sf13-standalone-intro .sf13-default-eyebrow {
  display: none;
}

body .sf13-root.sf13-leaf .sf13-standalone-intro h1:only-child {
  margin-bottom: 0;
}

body .sf13-root.sf13-leaf .sf13-standalone-intro .sf7-hero-copy:not(:has(.sf7-description)) h1 {
  margin-bottom: 0;
}

/* Breadcrumbs orient the visitor; the visible category cards replace the duplicate tab row. */
body:has(#storefront-editorial:not([hidden])) #category-shortcuts,
body:has(#category-page-v8:not([hidden])) #category-shortcuts {
  display: none;
}

body:has(.sf13-root:not([hidden])) .commerce-catalog-intro {
  padding-block: 16px 8px;
}

body:has(.sf13-root:not([hidden])) #catalog-breadcrumb {
  margin: 0;
}

@media (min-width: 1081px) and (min-height: 650px) {
  #storefront-editorial.sf13-root > .sf13-entry:only-child {
    min-height: calc(
      100svh - var(--pd-header-rest-height, 132px) - var(--pd-topbar-height, 28px) - 88px
    );
    margin-bottom: 0;
  }
}

@media (max-width: 900px) {
  body .sf13-root .sf13-entry,
  body .sf13-root .sf13-entry--category {
    grid-template-columns: 1fr;
    grid-template-areas: 'intro' 'categories';
    gap: 22px;
    align-items: start;
  }

  body .sf13-root .sf13-shopping-help {
    margin-top: 10px;
    padding-top: 2px;
  }

  body .sf13-root .sf13-shopping-help > summary {
    display: flex;
  }

  body .sf13-root .sf13-shopping-help ol {
    margin-top: 10px;
  }

  body .sf13-root .sf13-entry .sf7-hero-image {
    display: none;
  }

  body .sf13-root .sf7-category-photo {
    height: clamp(128px, 24vw, 190px);
  }
}

@media (max-width: 560px) {
  body .sf13-root.sf7-root {
    padding-block: 12px 24px;
  }

  body .sf13-root .sf13-entry {
    padding-block: 4px;
  }

  body .sf13-root .sf7-categories {
    gap: 12px;
  }

  body .sf13-root .sf7-category-photo {
    height: 112px;
  }

  body .sf13-root .sf7-category-copy {
    min-height: 68px;
    gap: 6px;
    padding: 12px;
  }

  body .sf13-root .sf7-category-copy h3 {
    font-size: 15px;
  }

  body .sf13-root .sf13-child-links {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2px 10px;
    padding-inline: 12px;
    margin-top: 0;
  }

  body .sf13-root .sf13-child-links a {
    min-height: 36px;
    font-size: 13px;
  }

  body .sf13-root.sf7-root .sf13-standalone-intro {
    padding: 12px 16px;
    gap: 16px;
  }

  body .sf13-root .sf13-standalone-intro .sf7-hero-image {
    width: 56px;
    height: 56px;
  }
}

@media (max-width: 360px) {
  body .sf13-root .sf7-categories {
    grid-template-columns: 1fr;
  }

  body .sf13-root .sf7-category-copy {
    min-height: 56px;
  }

  body .sf13-root .sf13-child-links {
    display: flex;
  }
}

@media (prefers-reduced-motion: reduce) {
  body .sf13-root .sf7-category:hover {
    transform: none;
  }
}

/* The local catalogue remains usable when its optional editorial API fails.
   Its fallback cards follow the same dimensions and two-column rule. */
body.pd-v13[data-page='magazin'] #category-landing .commerce-category-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
body.pd-v13[data-page='magazin'] #category-landing .commerce-category-image {
  height: 144px;
  aspect-ratio: auto;
}
body.pd-v13[data-page='magazin'] #category-landing .commerce-category-image img {
  padding: 0;
}
body.pd-v13[data-page='magazin'] #category-landing .commerce-category-copy {
  padding: 14px 16px;
}
body.pd-v13[data-page='magazin'] #category-landing .commerce-category-copy h3 {
  font-size: 17px;
  margin-bottom: 8px;
}
body.pd-v13[data-page='magazin'] #category-landing .commerce-category-copy p {
  margin-bottom: 10px;
}
@media (max-width: 560px) {
  body.pd-v13[data-page='magazin'] #category-landing .commerce-category-image {
    height: 112px;
  }
  body.pd-v13[data-page='magazin'] #category-landing .commerce-category-copy h3 {
    font-size: 15px;
  }
}
@media (max-width: 360px) {
  body.pd-v13[data-page='magazin'] #category-landing .commerce-category-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Short laptop viewports (including browser zoom) use shorter photos, never
   smaller body text or clipped cards. Extra categories continue on new rows. */
@media (min-width: 1081px) and (max-height: 720px) {
  body #storefront-editorial.sf13-root {
    padding-block: 8px 12px;
  }
  body .sf13-root .sf13-entry {
    padding-block: 8px;
    margin-bottom: 8px;
  }
  body .sf13-root .sf7-category-photo {
    height: clamp(76px, calc(40svh - 170px), 96px);
  }
  body .sf13-root .sf13-shopping-help {
    margin-top: 16px;
    padding-top: 12px;
  }
  body .sf13-root .sf13-shopping-help ol {
    gap: 10px;
  }
}
