/* OZDOBA – mobilní detail produktu (oz-detail) · verze 2.1 · 29. 9. 2026
   Načítá se z HTML kódů (Záhlaví). Platí jen pro detail produktu do šířky 767 px.
   Pravidla s body.type-detail se použijí hned; pravidla s body.oz-detail až po spuštění oz-detail.js
   (skrývají původní prvky, které skript nahrazuje – když skript selže, původní prvky zůstanou vidět). */
@media (max-width: 767px) {
  body.type-detail { --oz-gold: #8B6A35; --oz-ink: #1A1A1A; --oz-muted: #6B6B6B; --oz-line: #DCD6CD; --oz-bg: #F3F0EB; }

  /* Hlavička */
  body.type-detail .prodejna-wrapper { display: none !important; }
  body.type-detail #header { padding-top: 0 !important; height: 60px !important; }
  body.type-detail #header .site-name img { height: 36px !important; width: auto !important; }
  body.oz-detail .breadcrumbs-wrapper { display: none !important; }
  body.type-detail #content-wrapper { margin-top: 60px !important; }

  /* Fotka */
  body.type-detail .p-detail-inner-header { display: flex; flex-direction: column; }
  body.type-detail .p-detail-inner-header .p-image-wrapper { order: 1; margin: 0 calc(50% - 50vw) !important; width: 100vw !important; max-width: 100vw !important; padding: 0 !important; }
  body.type-detail .p-image { position: relative; height: 330px !important; background: var(--oz-bg); display: flex; align-items: center; justify-content: center; }
  body.type-detail .p-image a.p-main-image { display: flex !important; align-items: center; justify-content: center; width: 100%; height: 100%; }
  body.type-detail .p-image img { max-height: 290px !important; width: auto !important; max-width: 86% !important; object-fit: contain; mix-blend-mode: multiply; }
  body.oz-detail .p-thumbnails-wrapper { display: none !important; }
  body.type-detail .oz-dots { position: absolute; left: 0; right: 0; bottom: 8px; display: flex; justify-content: center; gap: 2px; z-index: 2; }
  body.type-detail .oz-dots button { width: 22px; height: 22px; padding: 0; border: 0; background: transparent; display: flex; align-items: center; justify-content: center; }
  body.type-detail .oz-dots button::before { content: ""; width: 6px; height: 6px; border-radius: 3px; background: #BDB6AC; transition: width .2s; }
  body.type-detail .oz-dots button.oz-on::before { width: 18px; background: var(--oz-ink); }
  body.type-detail .oz-fav { position: absolute; right: 12px; top: 12px; z-index: 2; width: 44px; height: 44px; border: 0; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
  body.type-detail .oz-fav svg { width: 20px; height: 20px; fill: none; stroke: var(--oz-ink); stroke-width: 1.8; }
  body.type-detail .oz-fav.oz-fav--on svg { fill: #C8372D; stroke: #C8372D; }
  body.oz-detail #dkLabFavouriteDiv { display: none !important; }

  /* Kategorie, název, varianta */
  body.type-detail .oz-cat { order: 2; display: block; margin: 16px 0 0; font-size: 12px; color: var(--oz-muted) !important; text-decoration: none !important; }
  body.type-detail .p-detail-inner-header h1 { order: 3; font-size: 22px !important; line-height: 1.25 !important; font-weight: 600 !important; margin: 4px 0 0 !important; padding: 0 !important; background: none !important; text-align: left !important; }
  body.type-detail .p-detail-inner-header h1::before { display: none !important; }
  body.type-detail h1 .oz-sub { display: block; margin-top: 2px; font-size: 14px; font-weight: 400; color: var(--oz-muted); }
  body.type-detail .p-detail-inner-header .p-code { display: none !important; }

  /* Pořadí: nákupní blok nad popisem */
  body.type-detail #product-detail-form .product-top { display: flex; flex-direction: column; }
  body.type-detail #product-detail-form .product-top > .p-info-wrapper { order: 1; }
  body.type-detail #product-detail-form .product-top > :not(.p-info-wrapper) { order: 2; }
  body.type-detail .p-info-wrapper { padding-top: 8px !important; }

  /* Hodnocení */
  body.oz-detail .p-info-wrapper .stars-wrapper { display: none !important; }
  body.type-detail .p-detail { padding-left: 0 !important; padding-right: 0 !important; }
  body.type-detail .oz-rating { order: -2; display: flex; align-items: center; gap: 10px; margin: 6px 0 6px; font-size: 13px; }
  body.type-detail .oz-rating__stars { color: var(--oz-gold); letter-spacing: 1px; font-weight: 700; }
  body.type-detail .oz-rating__val { color: var(--oz-gold); font-weight: 700; margin-left: -6px; }
  body.type-detail .oz-rating a { color: var(--oz-muted) !important; text-decoration: none !important; }

  /* Cena + sklad */
  body.type-detail .p-info-wrapper .price-line { margin: 0 0 14px !important; padding: 0 !important; }
  body.type-detail .p-final-price-wrapper { margin-top: 0 !important; padding-top: 0 !important; display: flex !important; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
  body.type-detail .p-info-wrapper .price-final { font-size: 26px !important; font-weight: 700 !important; }
  body.type-detail .p-info-wrapper .price-measure { display: none !important; }
  body.type-detail .oz-stock { font-size: 13px; font-weight: 600; }
  body.type-detail .oz-stock::before { content: "● "; }
  body.type-detail .oz-stock--ok { color: #2F6F2F; }
  body.type-detail .oz-stock--out { color: #B42318; }
  body.type-detail .oz-stock--other { color: var(--oz-muted); }
  body.oz-detail .p-info-wrapper .availability-value { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; white-space: nowrap !important; }

  /* Velikosti */
  body.type-detail .oz-variants { margin: 0 0 16px; width: 100%; }
  body.type-detail .oz-variants th { display: block; text-align: left; font-size: 13px; font-weight: 600; padding: 0 0 8px; }
  body.type-detail .oz-variants td { display: block; padding: 0; }
  body.type-detail .oz-variants .custom-variants { display: flex; flex-wrap: wrap; gap: 8px; }
  body.type-detail .oz-variants .custom-variants .variant { min-height: 44px; padding: 0 18px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--oz-line) !important; border-radius: 8px !important; font-size: 14px; font-weight: 500; color: var(--oz-ink) !important; background: #fff; }
  body.type-detail .oz-variants .custom-variants .variant.active { border: 2px solid var(--oz-ink) !important; font-weight: 700; }
  body.type-detail .oz-variants .custom-variants .variant.oz-soldout { color: #8A8A8A !important; }
  body.type-detail .oz-vprice { white-space: pre; }

  /* Původní řádek s množstvím */
  body.type-detail .p-info-wrapper .add-to-cart .btn-conversion { min-height: 50px; border-radius: 8px; background: var(--oz-gold) !important; border-color: var(--oz-gold) !important; }

  /* Lišta dole */
  .oz-sticky { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9990; display: flex; align-items: center; gap: 12px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid #EEEAE4; box-shadow: 0 -4px 14px rgba(0,0,0,.06); }
  .oz-sticky__info { display: flex; flex-direction: column; min-width: 0; }
  .oz-sticky__variant { font-size: 12px; color: #6B6B6B; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .oz-sticky__price { font-size: 18px; font-weight: 700; color: #1A1A1A; white-space: nowrap; }
  .oz-sticky__btn { flex: 1 1 auto; min-height: 50px; border: 0; border-radius: 8px; background: #8B6A35; color: #fff; font-size: 16px; font-weight: 700; font-family: inherit; cursor: pointer; }
  .oz-sticky__btn--ghost { background: #fff; color: #8B6A35; border: 1.5px solid #8B6A35; }
  body.oz-has-sticky { padding-bottom: 80px; }
  body.oz-has-sticky .messages { bottom: 80px !important; }
}
@media (min-width: 768px) { .oz-sticky, .oz-dots, .oz-fav, .oz-cat, .oz-rating, .oz-stock { display: none !important; } }
