/*
 * ============================================================
 *  04 – DETAIL PRODUKTU, KOŠÍK & OBJEDNÁVKY
 *  Původní soubory: primakoupelny.css, primakoupelny2.css,
 *                   primakoupelny4c-dm.css, primakoupelny5.css
 *  Optimalizace: oprava border-radius na checkbox, použití
 *                CSS proměnných, zpřehlednění logiky
 * ============================================================
 */


/* =============================================================
   POŘADÍ PRVKŮ V DETAILU PRODUKTU
   ============================================================= */

#content .p-detail {
  display:        flex;
  flex-direction: column;
}

#content .p-detail #related               { order: 31 !important; }
#content .p-detail .p-detail-tabs-wrapper { order: 32 !important; }
#content .p-detail #productsAlternative   { order: 33 !important; }


/* =============================================================
   TABULKA PARAMETRŮ – skrytí v detailu (.all-param)
   ============================================================= */

.type-detail .all-param { display: none !important; }


/* =============================================================
   ROZŠÍŘENÝ POPIS – tabulky vždy viditelné
   ============================================================= */

/* Od 9. řádku vždy zobrazit, i bez třídy .otevreno */
.type-detail .extended-description:not(.otevreno) table tr:nth-child(n+9) {
  display: table-row !important;
}

/* Zebra pruhy */
.type-detail .extended-description table tr:nth-child(odd) {
  background: #fbf9f9;
}


/* =============================================================
   SLEVOVÝ KÓD (add-on Dominik Martini)
   ============================================================= */

.dm-coupon-div {
  border:           dashed 1px #1eace2 !important;
  border-radius:    0 !important;
  background-color: #e0ffff !important;
  color:            #000 !important;
  padding:          12px !important;
  font-size:        16px !important;
}

.dm-coupon-div span {
  color: #1eace2 !important;
}

.dm-coupon-div::before {
  background-color: var(--color-primary-light, #d6f1fd) !important;
  color:            #fff !important;
  font-size:        16px !important;
}


/* =============================================================
   KOŠÍK – zaškrtávací pole „přidat poznámku"
   Oprava: přidán background-image fallback pro starší Safari,
   odstraněno border-radius (čtverec, ne kruh)
   ============================================================= */

input[type="checkbox"] + label[for="add-note"]::after {
  width:            22px;
  height:           22px;
  content:          "\e919";
  font-family:      ikony;
  color:            #fff;
  left:             0;
  font-size:        10px;
  text-align:       center;
  line-height:      22px;
  background-color: var(--color-primary, #00a8ee);
}


/* =============================================================
   OBJEDNÁVKA – skrytí neaktivních platebních metod
   ============================================================= */

#order-billing-methods .radio-wrapper.inactive-child {
  display: none;
}


/* =============================================================
   STRÁNKA ID-927 – speciální tabulka
   Refaktor: použití CSS proměnných místo hardcoded hodnot
   ============================================================= */

body.id-927 .content-inner table {
  border-collapse: collapse;
  width:           100%;
}

body.id-927 .content-inner th,
body.id-927 .content-inner td {
  padding: 10px;
  border:  1px solid var(--color-border, #E4E4E4);
}

body.id-927 .content-inner tr:nth-child(even) { background-color: #f2f2f2; }
body.id-927 .content-inner tr:hover           { background-color: #f5f5f5; }
body.id-927 .content-inner th                 { background-color: #f1f1f1; }


/* =============================================================
   BLOG / PŘÍSPĚVKY – obecné úpravy
   ============================================================= */

.type-post .content-inner { max-width: 1394px; }

/* Detail článku – centrovaný obsah s omezenou šířkou */
main#content .news-item-detail {
  max-width:     900px;
  width:         100%;
  margin-left:   auto;
  margin-right:  auto;
  padding-left:  16px;
  padding-right: 16px;
}

@media (max-width: 860px) {
  main#content .news-item-detail {
    padding-left:  12px;
    padding-right: 12px;
  }
}
