/* === CSS PROMĚNNÉ === */
:root {
  --c-primary: #c3215e;
  --c-primary-hover: #dc3071;
  --c-accent: #826643;
  --c-ok: #4CAF50;
  --c-warn: #ff9800;
  --c-bad: #f44336;
  --radius: 12px;
}

/* === LAYOUT PRODUKTU === */
SECTION.product {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  width: 100%;
  padding-bottom: 2rem;
}

/* === GALERIE OBRÁZKŮ === */
SECTION.product DIV.product_images {
  display: grid;
  grid-template-columns: 1fr;
  gap: .75rem;
  align-items: start;
  position: relative;
}

SECTION.product .product_images #product_image {
  order: 1;
  width: 100%;
  height: auto;
  display: block;
  opacity: 1;
  transition: opacity .25s ease;
}

SECTION.product UL#more_images {
  order: 2;
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem;
  max-width: 100%;
}

SECTION.product UL#more_images li {
  margin: 0;
}

SECTION.product UL#more_images a {
  display: block;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #eee;
  background: #fff;
}

SECTION.product UL#more_images img {
  display: block;
  width: 80px;
  height: 80px;
  object-fit: cover;
  transition: opacity .2s ease, transform .06s ease, box-shadow .2s ease, border-color .2s ease;
}

SECTION.product UL#more_images a.is-active img {
  outline: 2px solid var(--c-primary);
  border-color: var(--c-primary);
}

/* === TYPOGRAFIE === */
SECTION.product H1 {
  font-size: clamp(1.75rem, 4vw, 2.50rem);
  line-height: 1.15;
  margin: .5rem 0 .75rem;
  font-weight: 800;
  color: #1a1a1a;
  letter-spacing: -.02em;
}

SECTION.product .subtitle {
  font-size: clamp(.95rem, 1.8vw, 1.125rem);
  margin: 0 0 1rem;
  color: #666;
  display: flex;
  align-items: center;
  gap: .6rem;
}

SECTION.product .subtitle A.brand_info_link {
  font-size: .75rem;
  font-weight: 600;
  color: var(--c-primary);
  text-decoration: none;
  border: 1px solid var(--c-primary);
  border-radius: 20px;
  padding: .1rem .55rem;
  white-space: nowrap;
  transition: background .2s, color .2s;
}

SECTION.product .subtitle A.brand_info_link:hover {
  background: var(--c-primary);
  color: #fff;
}

/* === MADE IN ITALY === */
SECTION.product .made_in_italy {
  position: absolute;
  top: .75rem;
  right: .75rem;
  z-index: 2;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  background: rgba(255,255,255,.92);
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: .5rem .85rem;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  backdrop-filter: blur(4px);
  text-decoration: none;
  transition: box-shadow .2s, transform .2s;
}

SECTION.product A.made_in_italy:hover {
  box-shadow: 0 4px 14px rgba(0,0,0,.13);
  transform: translateY(-1px);
}

SECTION.product .made_in_italy .mii_flag {
  width: 80px;
  height: 5px;
  border-radius: 3px;
  background: linear-gradient(to right, #009246 33.3%, #fff 33.3%, #fff 66.6%, #ce2b37 66.6%);
  border: 1px solid #ddd;
  box-sizing: border-box;
}

SECTION.product .made_in_italy span {
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: #333;
  white-space: nowrap;
}

SECTION.product .mii_divider {
  height: 4px;
  border-radius: 3px;
  background: linear-gradient(to right, #009246 33.3%, #e8e8e8 33.3%, #e8e8e8 66.6%, #ce2b37 66.6%);
  margin: 1.5rem 0 1.5rem;
}

/* === POPIS PRODUKTU === */
SECTION.product .description {
  margin-bottom: 1rem;
  line-height: 1.6;
}

SECTION.product .description p {
  margin: 0 0 1em;
}

SECTION.product .description ul {
  margin: 0 0 1em 1.25em;
  padding: 0;
}

SECTION.product .description li {
  margin: .25em 0;
}

/* === BENEFIT BOX === */
SECTION.product .benefit {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

SECTION.product .benefit span {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .95rem;
}

SECTION.product .benefit i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  font-size: 14px;
  border-radius: 50%;
  background: var(--c-primary);
  color: #fff;
  flex-shrink: 0;
}

SECTION.product .benefit a {
  color: var(--c-primary);
  text-decoration: none;
  font-weight: 600;
}

SECTION.product .benefit a:hover {
  text-decoration: underline;
}

/* === KOŠÍKOVÝ FORMULÁŘ === */
SECTION.product FORM.to_cart {
  background: linear-gradient(to bottom, #ffffff 0%, #fafafa 100%);
  border: 1px solid #e5e5e5;
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.04), 0 1px 2px rgba(0,0,0,.06);
}

/* === TABULKA VOLEB (mobil: block, desktop: table) === */
SECTION.product TABLE.options {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-bottom: .25rem;
  text-align: center;
}

SECTION.product TABLE.options TR {
  display: block;
  padding: .5rem 0;
}

SECTION.product TABLE.options TR:last-child,
SECTION.product TABLE.options TR.tr_availability {
  border-bottom: 0;
}

SECTION.product TABLE.options TR.tr_availability {
  border-top: 0;
}

SECTION.product TABLE.options TD {
  display: block;
  padding: 0;
  margin: 0 0 .35rem;
  text-align: center;
}

SECTION.product TABLE.options TD:first-child {
  font-weight: 600;
  margin-bottom: .35rem;
  color: #222;
}

/* === VÝBĚR VELIKOSTÍ/VARIANT === */
SECTION.product DIV.options {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  align-items: flex-start;
  justify-content: center;
  margin-top: .15rem;
}

SECTION.product DIV.options .option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.1rem;
  min-height: 2.75rem;
  padding: .35rem .9rem;
  border-radius: 9999px;
  border: 1.5px solid #d9d9d9;
  background: #fff;
  color: #1f1f1f;
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 1px .5px rgba(0,0,0,.06);
  cursor: pointer;
  user-select: none;
  transition: transform .06s ease, background-color .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease;
}

SECTION.product DIV.options .option:hover {
  border-color: #bdbdbd;
  box-shadow: 0 2px 6px rgba(0,0,0,.06);
}

SECTION.product DIV.options .option:active {
  transform: translateY(1px);
}

SECTION.product DIV.options .option.selected {
  background: var(--c-primary);
  border-color: var(--c-primary);
  color: #fff;
  box-shadow: 0 2px 0 rgba(0,0,0,.12), inset 0 0 0 1.5px rgba(255,255,255,.15);
}

SECTION.product DIV.options .option.inactive {
  color: #888;
  background: repeating-linear-gradient(-45deg, #f2f2f2 0, #f2f2f2 6px, #e9e9e9 6px, #e9e9e9 12px);
  border-color: #d0d0d0;
  cursor: not-allowed;
  position: relative;
}

SECTION.product DIV.options .option.inactive::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  box-shadow: inset 0 0 0 1.5px rgba(0,0,0,.06);
}

SECTION.product DIV.options .option.inactive.selected {
  background: #b8b8b8;
  border-color: #b8b8b8;
  color: #eee;
  box-shadow: none;
}

/* === DOSTUPNOST === */
SECTION.product FORM.to_cart SPAN#availability {
  display: inline-block;
  font-weight: 700;
  padding: .25rem .5rem;
  border-radius: 8px;
  color: #fff;
}

SECTION.product FORM.to_cart SPAN#availability.avl_green {
  background: var(--c-ok);
}

SECTION.product FORM.to_cart SPAN#availability.avl_orange {
  background: var(--c-warn);
}

SECTION.product FORM.to_cart SPAN#availability.avl_red {
  background: var(--c-bad);
}

/* === CENA A TLAČÍTKO === */
SECTION.product DIV.price_submit {
  display: grid;
  gap: .75rem;
  align-items: center;
}

SECTION.product DIV.price {
  display: block;
  text-align: center;
}

SECTION.product DIV.price .price,
SECTION.product DIV.price .price_val {
  display: inline-block;
  vertical-align: baseline;
  line-height: 1;
  font-size: clamp(2rem, 3vw, 3rem);
  font-weight: 900;
  color: var(--c-primary);
  text-shadow: 0 1px 2px rgba(195,33,94,.1);
}

SECTION.product DIV.price .curr_symbol {
  display: inline-block;
  vertical-align: baseline;
  line-height: 1;
  margin-left: .35rem;
}

SECTION.product DIV.price .price_common {
  display: block;
  margin-top: .35rem;
  font-size: .95rem;
  color: #666;
}

SECTION.product DIV.price .price_common .cross b {
  text-decoration: line-through;
}

SECTION.product DIV.price .discount {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
  color: #fff;
  font-weight: 800;
  padding: .3rem .6rem;
  border-radius: 8px;
  border: 0;
  box-shadow: 0 2px 6px rgba(238,90,111,.25);
  font-size: .9rem;
  letter-spacing: .02em;
}

SECTION.product BUTTON.add_to_cart {
  width: 100%;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: .6rem;
  background: linear-gradient(135deg, var(--c-primary) 0%, #b01d54 100%);
  color: #fff;
  border: 0;
  border-radius: 12px;
  height: 58px;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: .02em;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(195,33,94,.3), inset 0 1px 0 rgba(255,255,255,.2);
  transition: transform .25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow .25s cubic-bezier(0.4, 0, 0.2, 1), background .25s ease;
}

SECTION.product BUTTON.add_to_cart:hover {
  background: linear-gradient(135deg, var(--c-primary-hover) 0%, #c72361 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(195,33,94,.4), inset 0 1px 0 rgba(255,255,255,.25);
}

SECTION.product BUTTON.add_to_cart:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(195,33,94,.3), inset 0 1px 0 rgba(255,255,255,.15);
}

SECTION.product BUTTON.add_to_cart.disabled {
  color: #DDD;
  background: #999;
  cursor: default;
}

/* === PRŮVODCE VELIKOSTMI === */
SECTION.product A.size_guide_link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .85rem;
  font-weight: 600;
  color: #888;
  text-decoration: none;
  margin-bottom: 1.25rem;
  border-bottom: 1px dashed #ccc;
  padding-bottom: 1px;
  transition: color .2s ease, border-color .2s ease;
}

SECTION.product A.size_guide_link:hover {
  color: var(--c-primary);
  border-color: var(--c-primary);
}

/* === PARAMETRY PRODUKTU (inline chips) === */
SECTION.product .attributes_inline {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem .75rem;
  margin-bottom: 1.5rem;
  padding-top: .25rem;
  font-size: .88rem;
  line-height: 1.4;
}

SECTION.product .attributes_inline .attr_chip {
  color: #555;
}

SECTION.product .attributes_inline .attr_chip_label {
  font-weight: 700;
  color: #222;
}

/* === BREAKPOINT: TABLET (768px+) === */
@media (min-width: 768px) {
  SECTION.product TABLE.options TR {
    display: table-row;
    padding: 0;
    border-bottom: 0;
  }

  SECTION.product TABLE.options TD {
    display: table-cell;
    padding: 0 10px 20px 0;
    margin: 0;
    text-align: left;
  }

  SECTION.product UL#more_images img {
    width: 72px;
    height: 72px;
  }
}

/* === BREAKPOINT: DESKTOP (992px+) === */
@media (min-width: 992px) {
  SECTION.product {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
  }

  SECTION.product DIV.product_images {
    grid-template-columns: 92px 1fr;
    position: sticky;
    top: 1rem;
  }

  SECTION.product DIV.product_images:not(:has(UL#more_images)) {
    grid-template-columns: 1fr;
  }

  SECTION.product UL#more_images {
    grid-column: 1;
    grid-row: 1;
    flex-direction: column;
    justify-content: flex-start;
    max-height: calc(100vh - 2rem);
    overflow: auto;
  }

  SECTION.product UL#more_images img {
    width: 100%;
    height: auto;
  }

  SECTION.product .product_images #product_image {
    grid-column: 2;
    grid-row: 1;
  }

  SECTION.product FORM.to_cart {
    padding: 1.25rem;
    text-align: left;
  }

  SECTION.product TABLE.options {
    text-align: left;
  }

  SECTION.product TABLE.options TD {
    text-align: left;
  }

  SECTION.product DIV.options {
    justify-content: flex-start;
  }

  SECTION.product DIV.price_submit {
    grid-template-columns: 1fr auto;
    gap: 1rem;
    align-items: center;
  }

  SECTION.product DIV.price {
    text-align: left;
    justify-self: start;
  }

  SECTION.product BUTTON.add_to_cart {
    width: 260px;
    height: 56px;
    font-size: 1.1rem;
    margin: 0;
  }
}
