/* ══════════════════════════════════════════════
   PRODUCT DESCRIPTION – UNIVERSAL TEMPLATE
   Prefix .pd – neovlivní zbytek Shoptet šablony
   v7 – fix: obrázky ve features si zachovají přirozený poměr stran
   ══════════════════════════════════════════════ */

.pd {
  --pd-primary: #0097b2;
  --pd-primary-light: #00b0d0;
  --pd-accent: #ffc83d;
  --pd-text: #333;
  --pd-text-light: #666;
  --pd-bg: #fff;
  --pd-bg-alt: #fefefe;
  --pd-bg-dark: #007a91;
  --pd-radius: 12px;
  --pd-max-w: 960px;
  --pd-gap: 2rem;

  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--pd-text);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
.pd *, .pd *::before, .pd *::after { box-sizing: border-box; }
.pd img { max-width: 100%; height: auto; display: block; }

/* ── HERO ── */
.pd-hero {
  background: linear-gradient(135deg, var(--pd-bg-dark) 0%, var(--pd-primary) 100%);
  color: #fff;
  border-radius: var(--pd-radius);
  padding: 3rem 2rem;
  text-align: center;
  max-width: var(--pd-max-w);
  margin: 0 auto 1rem;
}
.pd-hero h2 {
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 700;
  margin: 0 0 1rem;
  line-height: 1.3;
}
.pd-hero p {
  font-size: 17px;
  opacity: .9;
  max-width: 680px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ── FEATURE ── */
.pd-feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--pd-gap);
  align-items: center;
  max-width: var(--pd-max-w);
  margin: 0 auto;
  padding: 2.5rem 1rem;
}
.pd-feature.--reverse .pd-feature__text { order: 2; }
.pd-feature.--reverse .pd-feature__img  { order: 1; }

.pd-feature__text h3 {
  font-size: clamp(18px, 3vw, 22px);
  font-weight: 700;
  color: var(--pd-primary);
  margin: 0 0 .75rem;
  line-height: 1.35;
}
.pd-feature__text p { margin: 0; color: var(--pd-text-light); }
.pd-feature__text p + p { margin-top: .75rem; }

/* v7 FIX: odstraněn aspect-ratio: 4/3 a object-fit: cover,
   obrázek si zachová přirozený poměr stran (landscape i čtverec) */
.pd-feature__img img {
  border-radius: var(--pd-radius);
  width: 100%;
  height: auto;
  background: var(--pd-bg-alt);
}

/* ── HIGHLIGHTS ── */
.pd-highlights {
  background: var(--pd-bg-alt);
  border-radius: var(--pd-radius);
  padding: 2.5rem 2rem;
  max-width: var(--pd-max-w);
  margin: 0 auto 1rem;
}
.pd-highlights h3 {
  font-size: clamp(18px, 3vw, 22px);
  font-weight: 700;
  color: var(--pd-primary);
  margin: 0 0 1.25rem;
  text-align: center;
}
.pd-highlights ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem 2rem;
}
.pd-highlights li {
  position: relative;
  padding-left: 2.25rem;
  color: var(--pd-text-light);
}
.pd-highlights li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .35em;
  width: 18px;
  height: 18px;
  background: var(--pd-accent);
  border-radius: 50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
  background-size: 12px;
  background-repeat: no-repeat;
  background-position: center;
}

/* ── HOWTO ── */
.pd-howto {
  max-width: var(--pd-max-w);
  margin: 0 auto;
  padding: 2.5rem 1rem;
}
.pd-howto h3 {
  font-size: clamp(18px, 3vw, 22px);
  font-weight: 700;
  color: var(--pd-primary);
  margin: 0 0 1.25rem;
  text-align: center;
}
.pd-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  counter-reset: step;
}
.pd-step {
  background: var(--pd-bg-alt);
  border-radius: var(--pd-radius);
  padding: 1.5rem;
  counter-increment: step;
}
.pd-step::before {
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--pd-primary);
  color: #fff;
  border-radius: 50%;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: .75rem;
}
.pd-step p { margin: 0; color: var(--pd-text-light); font-size: 16px; }

/* ── WARNING ── */
.pd-warning {
  max-width: var(--pd-max-w);
  margin: 0 auto;
  padding: 1rem;
}
.pd-warning__box {
  background: #fef3e2;
  border-left: 4px solid var(--pd-accent);
  border-radius: 0 var(--pd-radius) var(--pd-radius) 0;
  padding: 1.25rem 1.5rem;
  font-size: 16px;
  color: #7a5a1f;
  line-height: 1.6;
}

/* ── FAQ ── */
.pd-faq {
  max-width: var(--pd-max-w);
  margin: 0 auto;
  padding: 2.5rem 1rem;
}
.pd-faq h3 {
  font-size: clamp(18px, 3vw, 22px);
  font-weight: 700;
  color: var(--pd-primary);
  margin: 0 0 1.25rem;
  text-align: center;
}
.pd-faq-item { border-bottom: 1px solid #e5e7eb; }
.pd-faq-item:first-of-type { border-top: 1px solid #e5e7eb; }
.pd-faq-q {
  width: 100%;
  background: none;
  border: none;
  padding: 1rem 2.5rem 1rem 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--pd-text);
  text-align: left;
  cursor: pointer;
  position: relative;
  font-family: inherit;
  line-height: 1.4;
}
.pd-faq-q::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 22px;
  font-weight: 300;
  color: var(--pd-primary);
  transition: transform .25s ease;
}
.pd-faq-item.--open .pd-faq-q::after { content: "\2212"; }
.pd-faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease, padding .3s ease;
}
.pd-faq-item.--open .pd-faq-a { max-height: 500px; padding-bottom: 1rem; }
.pd-faq-a p { margin: 0; color: var(--pd-text-light); font-size: 16px; line-height: 1.65; }

/* ── TRUST ── */
.pd-trust {
  background: var(--pd-bg-alt);
  border-radius: var(--pd-radius);
  padding: 2.5rem 2rem;
  max-width: var(--pd-max-w);
  margin: 0 auto;
}
.pd-trust h3 {
  font-size: clamp(18px, 3vw, 22px);
  font-weight: 700;
  color: var(--pd-primary);
  margin: 0 0 1.5rem;
  text-align: center;
}
.pd-trust__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.pd-trust__card {
  background: #fff;
  border-radius: var(--pd-radius);
  padding: 1.5rem;
  text-align: center;
}
.pd-trust__icon {
  width: 48px;
  height: 48px;
  margin: 0 auto .75rem;
  background: var(--pd-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pd-trust__icon svg { width: 24px; height: 24px; fill: #fff; }

/* Fallback ikony přes CSS (když Shoptet smaže SVG) */
.pd-trust__icon--shield,
.pd-trust__icon--star,
.pd-trust__icon--delivery {
  background-repeat: no-repeat;
  background-position: center;
  background-size: 24px;
}
.pd-trust__icon--shield {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm-2 16l-4-4 1.41-1.41L10 14.17l6.59-6.59L18 9l-8 8z'/%3E%3C/svg%3E");
}
.pd-trust__icon--star {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z'/%3E%3C/svg%3E");
}
.pd-trust__icon--delivery {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 2c1.93 0 3.5 1.57 3.5 3.5S13.93 12 12 12s-3.5-1.57-3.5-3.5S10.07 5 12 5zm7 14H5v-.23c0-.62.28-1.2.76-1.58C7.47 15.82 9.64 15 12 15s4.53.82 6.24 2.19c.48.38.76.97.76 1.58V19z'/%3E%3C/svg%3E");
}
.pd-trust__card h4 { font-size: 16px; font-weight: 600; color: var(--pd-text); margin: 0 0 .5rem; }
.pd-trust__card p { margin: 0; color: var(--pd-text-light); font-size: 16px; }

/* ── Lazy fade-in ── */
.pd img[loading="lazy"] { opacity: 0; transition: opacity .4s ease; }
.pd img.--loaded { opacity: 1; }

/* ── FOOTNOTE ── */
.pd-footnote { margin-top: .75rem; }
.pd-footnote small { font-size: 13px; color: var(--pd-text-light); }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .pd-feature { grid-template-columns: 1fr; gap: 1.25rem; }
  .pd-feature.--reverse .pd-feature__text { order: 1; }
  .pd-feature.--reverse .pd-feature__img  { order: 2; }
  .pd-highlights ul { grid-template-columns: 1fr; }
  .pd-trust__grid { grid-template-columns: 1fr; }
  .pd-hero { padding: 2rem 1.25rem; }
  .pd-highlights, .pd-trust { padding: 2rem 1.25rem; }
}
