/* ==========================================================================
   DETAILINGSHOP.cz — Produktový popis Detailing Studio V5 (Mobile-First Split)
   Soubor: ds-product-desc-v5.css
   Scope: výhradně body #ds-studio (přebíjí i staré inline <style> z V4)
   Font: Google Sans | Primární barva: #02838f | Tmavý blok: #202829
   ========================================================================== */

body #ds-studio {
  container-type: inline-size;
  container-name: ds;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  color: #252729;
  font-family: 'Google Sans', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  --ds-ink: #202829;
  --ds-teal: #02838f;
  --ds-text-teal: #026d77;
  --ds-teal-light: #8be0e1;
  --ds-line: #dce6e8;
  --ds-soft: #f2f7f8;
  --ds-muted: #526165;
  --ds-radius-lg: 10px;
  --ds-radius-sm: 6px;
}

/* 1. Scoped reset proti přepsání globálními styly Shoptetu i V4 inline */
body #ds-studio *,
body #ds-studio *::before,
body #ds-studio *::after {
  box-sizing: border-box;
}

body #ds-studio h2,
body #ds-studio h3,
body #ds-studio h4,
body #ds-studio p,
body #ds-studio figure,
body #ds-studio ul,
body #ds-studio ol,
body #ds-studio dl,
body #ds-studio dd,
body #ds-studio address {
  margin: 0;
}

body #ds-studio h2,
body #ds-studio h3,
body #ds-studio h4,
body #ds-studio summary {
  font-family: inherit;
  overflow-wrap: break-word;
  text-transform: none;
  border: 0;
  padding: 0;
  background: transparent;
}

body #ds-studio img {
  max-width: 100%;
  height: auto;
}

body #ds-studio a {
  color: var(--ds-text-teal);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 500;
}

body #ds-studio a:hover {
  color: var(--ds-ink);
}

body #ds-studio a:focus-visible,
body #ds-studio summary:focus-visible {
  outline: 3px solid var(--ds-teal);
  outline-offset: 4px;
  border-radius: 4px;
}

body #ds-studio .ds-eyebrow {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ds-text-teal);
  line-height: 1.4;
}

/* 2. Hero blok (Asymetrický Split) */
body #ds-studio .ds-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(280px, 460px);
  min-height: 0;
  background: var(--ds-ink);
  color: #fff;
  border-radius: var(--ds-radius-lg);
  overflow: hidden;
  box-shadow: 0 6px 22px rgba(32, 40, 41, 0.08);
}

body #ds-studio .ds-hero-copy {
  padding: 40px 38px;
  align-self: center;
  min-width: 0;
}

body #ds-studio .ds-hero .ds-eyebrow {
  display: inline-block;
  background: rgba(2, 131, 143, 0.28);
  color: var(--ds-teal-light);
  padding: 4px 10px;
  border-radius: var(--ds-radius-sm);
}

body #ds-studio .ds-hero h2 {
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.16;
  letter-spacing: -0.02em;
  font-weight: 600;
  margin: 14px 0 14px;
  color: #fff;
}

body #ds-studio .ds-hero p {
  font-size: clamp(15px, 1.4vw, 16.5px);
  line-height: 1.65;
  color: #d6e4e5;
  max-width: 560px;
}

body #ds-studio .ds-hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

body #ds-studio .ds-hero-tags span {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  padding: 5px 11px;
  border-radius: var(--ds-radius-sm);
  background: #fff;
  color: var(--ds-ink);
  border: 0;
  text-decoration: none;
}

body #ds-studio .ds-hero-photo {
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  min-width: 0;
  order: 0;
}

body #ds-studio .ds-hero-photo img {
  display: block;
  width: 100%;
  max-width: 450px;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: contain;
}

/* 3. Sekce a číslované nadpisy */
body #ds-studio .ds-section {
  margin-top: 40px;
}

body #ds-studio .ds-section-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

body #ds-studio .ds-section-title > div {
  min-width: 0;
}

body #ds-studio .ds-number {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: var(--ds-teal);
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

body #ds-studio h3 {
  font-size: clamp(21px, 2.3vw, 26px);
  line-height: 1.24;
  letter-spacing: -0.015em;
  font-weight: 600;
  color: var(--ds-ink);
}

body #ds-studio .ds-section-title .ds-eyebrow {
  margin-bottom: 2px;
}

/* 4. Blok 01: Benefity (výchozí 3 nebo 4 karty) */
body #ds-studio .ds-benefits {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

body #ds-studio .ds-benefits.ds-benefits--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body #ds-studio .ds-benefit {
  background: var(--ds-soft);
  border-top: 4px solid var(--ds-teal);
  border-radius: 0 0 var(--ds-radius-lg) var(--ds-radius-lg);
  padding: 22px 20px;
  min-width: 0;
}

body #ds-studio .ds-benefit h4 {
  font-size: 17.5px;
  line-height: 1.3;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--ds-ink);
}

body #ds-studio .ds-benefit p {
  font-size: 14.5px;
  color: var(--ds-muted);
}

/* 5. Použití + 2. fotografie (max 450 px) */
body #ds-studio .ds-use {
  display: grid;
  grid-template-columns: minmax(0, 450px) minmax(0, 1fr);
  gap: 32px;
  align-items: center;
}

body #ds-studio .ds-use > div {
  min-width: 0;
}

body #ds-studio .ds-use figure {
  width: 100%;
  max-width: 450px;
  margin: 0 auto;
}

body #ds-studio .ds-use img {
  display: block;
  width: 100%;
  max-width: 450px;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--ds-radius-lg);
  box-shadow: 0 4px 16px rgba(32, 40, 41, 0.07);
}

body #ds-studio .ds-use img.ds-contain {
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--ds-line);
  box-shadow: none;
}

body #ds-studio .ds-use figcaption {
  font-size: 12px;
  color: #5f6e72;
  margin-top: 8px;
  line-height: 1.45;
}

body #ds-studio .ds-use h3 {
  margin: 6px 0 12px;
}

body #ds-studio .ds-use p {
  color: var(--ds-muted);
  margin-bottom: 14px;
}

body #ds-studio .ds-use ul {
  padding: 0;
  margin: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

body #ds-studio .ds-use li {
  padding: 10px 14px;
  border: 1px solid var(--ds-line);
  border-left: 3px solid var(--ds-teal);
  border-radius: var(--ds-radius-sm);
  background: #fff;
  display: flex;
  gap: 10px;
  font-size: 14.5px;
  align-items: flex-start;
  list-style: none;
}

body #ds-studio .ds-use li::before {
  content: '\2713';
  position: static;
  display: inline-block;
  flex: 0 0 16px;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  transform: none;
  line-height: inherit;
  left: auto;
  top: auto;
  color: var(--ds-text-teal);
  font-weight: 700;
}

/* 6. Blok 02: Praktické parametry & Správný pracovní postup */
body #ds-studio .ds-instructions {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 28px;
  background: var(--ds-soft);
  color: #252729;
  padding: 28px;
  border-radius: var(--ds-radius-lg);
}

body #ds-studio .ds-instructions > div {
  min-width: 0;
}

body #ds-studio .ds-instructions h4 {
  font-size: 19px;
  line-height: 1.35;
  font-weight: 600;
  color: var(--ds-ink);
  margin-bottom: 6px;
}

/* Tabulka parametrů — chráněná proti Shoptet striping/hover stylům */
body #ds-studio .ds-instructions table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-size: 14.5px;
  table-layout: fixed;
  border: 0;
}

body #ds-studio .ds-instructions :is(table, thead, tbody, tr, th, td),
body #ds-studio .ds-instructions tbody tr:hover,
body #ds-studio .ds-instructions tbody tr:hover td {
  background: transparent;
  color: #252729;
}

body #ds-studio .ds-instructions :is(th, td) {
  padding: 10px 6px;
  border: 0;
  border-bottom: 1px solid #d0dddd;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
  font-weight: 400;
}

body #ds-studio .ds-instructions th {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #546367;
}

body #ds-studio .ds-instructions td:first-child {
  width: 44%;
}

body #ds-studio .ds-instructions td:last-child {
  font-weight: 600;
  text-align: right;
  white-space: normal;
  overflow-wrap: anywhere;
}

body #ds-studio .ds-instructions .ds-table-note {
  font-size: 12px;
  color: #546367;
  margin-top: 12px;
}

/* Pracovní postup (ol > li > strong + p, CSS counter 01, 02...) */
body #ds-studio .ds-instructions ol {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: steps;
  display: grid;
  gap: 10px;
}

body #ds-studio .ds-instructions ol > li {
  counter-increment: steps;
  position: relative;
  padding: 14px 16px 14px 52px;
  margin: 0;
  background: #fff;
  border: 1px solid var(--ds-line);
  border-radius: var(--ds-radius-sm);
  line-height: 1.6;
  list-style: none;
}

body #ds-studio .ds-instructions ol > li::before {
  content: counter(steps, decimal-leading-zero);
  position: absolute;
  left: 14px;
  top: 14px;
  width: auto;
  height: auto;
  margin: 0;
  border: 0;
  transform: none;
  color: var(--ds-text-teal);
  background: var(--ds-soft);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.5;
  padding: 2px 7px;
  border-radius: 4px;
}

body #ds-studio .ds-instructions ol > li > strong {
  display: block;
  margin: 0;
  padding: 0;
  color: var(--ds-ink);
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.5;
}

body #ds-studio .ds-instructions ol > li > p {
  margin: 3px 0 0;
  padding: 0;
  color: var(--ds-muted);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
}

/* 7. Video blok (tmavý #202829, vycentrovaný 16:9 max 960 px) */
body #ds-studio .ds-video-section {
  min-width: 0;
  background: var(--ds-ink);
  color: #fff;
  padding: 28px;
  border-radius: var(--ds-radius-lg);
}

body #ds-studio .ds-video-section .ds-section-title {
  margin-bottom: 22px;
}

body #ds-studio .ds-video-section h3 {
  color: #fff;
}

body #ds-studio .ds-video-section .ds-eyebrow {
  color: var(--ds-teal-light);
}

body #ds-studio .ds-video-section .ds-number {
  background: var(--ds-teal);
  color: #fff;
}

body #ds-studio .ds-video-section .ds-video-frame,
body #ds-studio .ds-video-frame {
  width: 100%;
  max-width: 960px;
  aspect-ratio: var(--ds-video-ratio, 16 / 9);
  position: relative;
  overflow: hidden;
  background: #141a1b;
  margin: 0 auto;
  justify-self: center;
  border-radius: var(--ds-radius-sm);
}

body #ds-studio .ds-video-frame iframe,
body #ds-studio .ds-video-frame video {
  display: block;
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  border: 0;
  background: #141a1b;
  object-fit: contain;
}

body #ds-studio .ds-video-frame video::cue {
  background: var(--ds-ink);
  color: #fff;
}

/* 8. Kontextové interní odkazy & neutrální bezpečnost */
body #ds-studio .ds-related,
body #ds-studio .ds-safety {
  margin-top: 24px;
  padding: 20px 22px;
  background: #fff;
  border: 1px solid var(--ds-line);
  border-left: 4px solid var(--ds-teal);
  border-radius: var(--ds-radius-sm);
  color: #252729;
}

body #ds-studio .ds-safety {
  background: var(--ds-soft);
  border-left-color: var(--ds-ink);
}

body #ds-studio .ds-related h4,
body #ds-studio .ds-safety h4 {
  font-size: 17px;
  font-weight: 600;
  color: var(--ds-ink);
}

body #ds-studio .ds-related p,
body #ds-studio .ds-safety p {
  font-size: 14.5px;
  color: var(--ds-muted);
  margin-top: 8px;
}

/* 9. FAQ (přesně 5 otevřených otázek, pohodlné dotykové plochy) */
body #ds-studio .ds-faq {
  display: grid;
  gap: 10px;
  border-top: 0;
}

body #ds-studio .ds-faq details {
  background: var(--ds-soft);
  border: 1px solid var(--ds-line);
  border-radius: var(--ds-radius-sm);
  padding: 0 18px;
}

body #ds-studio .ds-faq summary {
  min-height: 50px;
  padding: 12px 0;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  line-height: 1.4;
  color: var(--ds-ink);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  transition: color 0.15s ease;
}

body #ds-studio .ds-faq summary:hover {
  color: var(--ds-text-teal);
}

body #ds-studio .ds-faq summary::-webkit-details-marker {
  display: none;
}

body #ds-studio .ds-faq summary::after {
  content: '\25BE';
  color: var(--ds-text-teal);
  font-size: 16px;
  flex: 0 0 auto;
  transition: transform 0.18s ease;
}

body #ds-studio .ds-faq details[open] summary::after {
  transform: rotate(180deg);
}

body #ds-studio .ds-faq p {
  margin: 0 0 14px;
  max-width: 920px;
  color: var(--ds-muted);
  font-size: 14.5px;
  line-height: 1.65;
}

/* 10. GPSR, identifikace a GHS bezpečnost */
body #ds-studio .ds-gpsr {
  border-top: 3px solid var(--ds-teal);
  margin-top: 42px;
  padding-top: 24px;
}

body #ds-studio .ds-gpsr h3 {
  font-size: clamp(20px, 2.2vw, 24px);
  margin-top: 4px;
}

body #ds-studio .ds-gpsr-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  margin-top: 18px;
}

body #ds-studio .ds-gpsr-grid > div {
  min-width: 0;
  padding: 18px 20px;
  background: var(--ds-soft);
  border: 1px solid var(--ds-line);
  border-radius: var(--ds-radius-sm);
}

body #ds-studio .ds-gpsr h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--ds-ink);
}

body #ds-studio address {
  font-style: normal;
  font-size: 14px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

body #ds-studio dl {
  font-size: 14px;
}

body #ds-studio dl > div {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 10px;
  padding: 5px 0;
  border-bottom: 1px solid #e1eaec;
}

body #ds-studio dl > div:last-child {
  border-bottom: 0;
}

body #ds-studio dt {
  color: #5e6d71;
}

body #ds-studio dd {
  font-weight: 500;
  color: var(--ds-ink);
  overflow-wrap: anywhere;
}

body #ds-studio .ds-hazard {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 22px;
  margin-top: 18px;
  padding: 22px;
  border: 1px solid #e3bfb8;
  border-left: 4px solid #a62c22;
  background: #fff8f7;
  border-radius: var(--ds-radius-sm);
}

body #ds-studio .ds-pictograms {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-content: start;
  max-width: 204px;
}

body #ds-studio .ds-hazard figure,
body #ds-studio .ds-pictograms figure {
  display: block;
  text-align: center;
  width: 92px;
  margin: 0;
}

body #ds-studio .ds-hazard img {
  display: block;
  width: 92px;
  height: 92px;
  object-fit: contain;
  margin: 0 auto;
}

body #ds-studio .ds-hazard figcaption {
  color: #742e28;
  font-size: 11px;
  margin-top: 5px;
  line-height: 1.3;
}

body #ds-studio .ds-danger {
  color: #8b2e25;
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 6px;
}

body #ds-studio .ds-hazard p {
  font-size: 14px;
  line-height: 1.65;
  margin-top: 6px;
  color: #252729;
}

body #ds-studio .ds-hazard strong {
  font-weight: 600;
}

body #ds-studio .ds-hazard h4 {
  font-size: 14.5px;
  margin: 14px 0 4px;
  color: var(--ds-ink);
}

body #ds-studio .ds-hazard-note {
  padding-top: 10px;
  margin-top: 12px;
  border-top: 1px solid #e8cec9;
  color: var(--ds-muted);
  font-size: 12.5px;
}

body #ds-studio .ds-footer {
  font-size: 12px;
  color: #657174;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--ds-line);
}

/* ==========================================================================
   11. RESPONZIVITA (Container Queries + Media Query fallback)
   ========================================================================== */

@container ds (max-width: 880px) {
  body #ds-studio .ds-hero,
  body #ds-studio .ds-use,
  body #ds-studio .ds-instructions {
    grid-template-columns: 1fr;
  }

  body #ds-studio .ds-hero-photo {
    order: -1;
    padding: 20px;
  }

  body #ds-studio .ds-hero-copy {
    padding: 26px 24px;
  }

  body #ds-studio .ds-benefits {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body #ds-studio .ds-benefits.ds-benefits--three {
    grid-template-columns: 1fr;
  }
}

@container ds (max-width: 640px) {
  body #ds-studio .ds-hero-photo {
    padding: 14px 18px;
  }

  body #ds-studio .ds-hero-photo img {
    max-height: 240px;
    width: auto;
  }

  body #ds-studio .ds-gpsr-grid,
  body #ds-studio .ds-hazard {
    grid-template-columns: 1fr;
  }

  body #ds-studio .ds-pictograms {
    max-width: none;
  }

  body #ds-studio .ds-instructions {
    padding: 20px 16px;
    gap: 24px;
  }

  body #ds-studio .ds-video-section {
    padding: 22px 16px;
  }
}

@container ds (max-width: 480px) {
  body #ds-studio .ds-section {
    margin-top: 32px;
  }

  body #ds-studio .ds-hero-copy {
    padding: 22px 18px;
  }

  body #ds-studio .ds-benefits {
    grid-template-columns: 1fr;
  }

  /* Skládání řádků tabulky pod sebe pro 100% čitelnost bez kolizí */
  body #ds-studio .ds-instructions thead {
    display: none;
  }

  body #ds-studio .ds-instructions tbody tr {
    display: block;
    padding: 9px 10px;
    margin-bottom: 6px;
    background: #fff;
    border: 1px solid var(--ds-line);
    border-radius: var(--ds-radius-sm);
  }

  body #ds-studio .ds-instructions tbody tr:last-child {
    margin-bottom: 0;
  }

  body #ds-studio .ds-instructions td {
    display: block;
    width: 100% !important;
    padding: 1px 0;
    border: 0;
    text-align: left !important;
  }

  body #ds-studio .ds-instructions td:first-child {
    font-size: 11.5px;
    color: #5a6a6e;
    text-transform: uppercase;
    letter-spacing: 0.4px;
  }

  body #ds-studio .ds-instructions td:last-child {
    font-size: 15px;
    color: var(--ds-ink);
  }

  body #ds-studio .ds-instructions ol > li {
    padding: 12px 14px 12px 46px;
  }

  body #ds-studio .ds-instructions ol > li::before {
    left: 12px;
    top: 12px;
  }

  body #ds-studio .ds-faq details {
    padding: 0 14px;
  }

  body #ds-studio dl > div {
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 8px;
  }

  body #ds-studio .ds-hazard {
    padding: 16px;
    gap: 16px;
  }

  body #ds-studio .ds-hazard img {
    width: 76px;
    height: 76px;
  }

  body #ds-studio .ds-hazard figure,
  body #ds-studio .ds-pictograms figure {
    width: 76px;
  }
}

/* Fallback pro starší prohlížeče bez podpory @container */
@supports not (container-type: inline-size) {
  @media (max-width: 880px) {
    body #ds-studio .ds-hero,
    body #ds-studio .ds-use,
    body #ds-studio .ds-instructions {
      grid-template-columns: 1fr;
    }
    body #ds-studio .ds-hero-photo {
      order: -1;
    }
    body #ds-studio .ds-benefits {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    body #ds-studio .ds-benefits.ds-benefits--three {
      grid-template-columns: 1fr;
    }
  }
  @media (max-width: 640px) {
    body #ds-studio .ds-gpsr-grid,
    body #ds-studio .ds-hazard {
      grid-template-columns: 1fr;
    }
  }
  @media (max-width: 480px) {
    body #ds-studio .ds-benefits {
      grid-template-columns: 1fr;
    }
  }
}

@media print {
  body #ds-studio .ds-hero,
  body #ds-studio .ds-video-section {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  body #ds-studio details,
  body #ds-studio .ds-hazard,
  body #ds-studio .ds-instructions ol > li {
    break-inside: avoid;
  }
}
