/*
Theme Name: JADOB CZ
Theme URI: https://jadob.cz
Author: JADOB s.r.o.
Description: Vlastná WooCommerce téma podľa schválenej českej prezentácie JADOB.
Version: 0.1.39
Text Domain: jadob-cz
Requires at least: 6.8
Requires PHP: 8.2
*/

html { scroll-behavior: smooth; }
body { margin: 0; }
body.admin-bar .header { top: 32px; }
@media (max-width: 782px) { body.admin-bar .header { top: 46px; } }

/* Keep the approved four-card contact grid; the WhatsApp asset is an icon. */
.contact-page-grid > a { min-width: 0; }
.contact-page-grid .contact-whatsapp-icon {
  display: block;
  width: 25px;
  height: 25px;
  object-fit: contain;
}

/* Map WooCommerce's native checkout to the approved CZ two-column composition. */
.commerce-system-content:has(form.checkout) { background: #f5fafb; }
.commerce-system-content .woocommerce form.checkout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(420px, .8fr);
  gap: 0 36px;
  align-items: start;
}
.commerce-system-content .woocommerce form.checkout .form-row {
  display: block;
  min-width: 0;
  margin: 0 0 18px;
}
.commerce-system-content .woocommerce form.checkout .form-row label {
  display: block;
  margin-bottom: 8px;
  color: #10213f;
  font-weight: 800;
}
.commerce-system-content .woocommerce form.checkout .form-row .woocommerce-input-wrapper {
  display: block;
  width: 100%;
}
.commerce-system-content .woocommerce form.checkout .form-row input.input-text,
.commerce-system-content .woocommerce form.checkout .form-row textarea,
.commerce-system-content .woocommerce form.checkout .form-row select,
.commerce-system-content .woocommerce form.checkout .select2-container .select2-selection {
  box-sizing: border-box;
  width: 100%;
  min-height: 62px;
  padding: 15px 17px;
  border: 1px solid rgba(16,32,59,.18);
  border-radius: 14px;
  background: #fff;
  color: #10213f;
  font: inherit;
}
.commerce-system-content .woocommerce form.checkout .form-row textarea { min-height: 110px; }
.commerce-system-content .woocommerce form.checkout #customer_details {
  grid-column: 1;
  grid-row: 1;
  display: grid;
  gap: 24px;
  min-width: 0;
}
.commerce-system-content .woocommerce form.checkout #customer_details > .col-1,
.commerce-system-content .woocommerce form.checkout #customer_details > .col-2 {
  box-sizing: border-box;
  float: none;
  width: 100%;
  min-width: 0;
  padding: 36px;
  border: 1px solid rgba(16,32,59,.12);
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 14px 40px rgba(16,32,59,.045);
}
.commerce-system-content .woocommerce form.checkout #customer_details h3 { margin: 0 0 26px; font-size: 26px; }
.commerce-system-content .woocommerce form.checkout #order_review_heading {
  grid-column: 2;
  grid-row: 1;
  z-index: 1;
  align-self: start;
  margin: 0;
  padding: 36px 36px 0;
  font-size: 28px;
}
.commerce-system-content .woocommerce form.checkout #order_review {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  position: sticky;
  top: 92px;
  min-width: 0;
  padding: 88px 36px 36px;
  border: 1px solid rgba(16,32,59,.12);
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(16,32,59,.07);
}
.commerce-system-content .woocommerce form.checkout #order_review table { width: 100%; }
.commerce-system-content .woocommerce form.checkout #payment { border-radius: 16px; }
@media (max-width: 1100px) {
  .commerce-system-content .woocommerce form.checkout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .commerce-system-content .woocommerce form.checkout #customer_details,
  .commerce-system-content .woocommerce form.checkout #order_review_heading,
  .commerce-system-content .woocommerce form.checkout #order_review { grid-column: 1; }
  .commerce-system-content .woocommerce form.checkout #customer_details { grid-row: 1; margin-bottom: 24px; }
  .commerce-system-content .woocommerce form.checkout #order_review_heading,
  .commerce-system-content .woocommerce form.checkout #order_review { grid-row: 2; }
  .commerce-system-content .woocommerce form.checkout #order_review { position: static; }
}
@media (max-width: 760px) {
  .commerce-system-content .woocommerce form.checkout #customer_details > .col-1,
  .commerce-system-content .woocommerce form.checkout #customer_details > .col-2 {
    padding: 20px;
  }
  .commerce-system-content .woocommerce form.checkout #order_review_heading { padding: 20px 20px 0; }
  .commerce-system-content .woocommerce form.checkout #order_review { padding: 74px 20px 20px; }
}

.jadob-shipping-progress {
  margin: 0 0 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(8, 159, 189, 0.24);
  border-radius: 0.9rem;
  background: #eaf8fb;
  color: #10213f;
  font-weight: 800;
  line-height: 1.45;
}

.jadob-shipping-progress .woocommerce-Price-amount {
  color: #009fbd;
}

.jadob-shipping-progress-row td {
  padding: 0 0 0.8rem !important;
  border: 0 !important;
}

.jadob-shipping-progress-row .jadob-shipping-progress {
  margin: 0;
}

/* Keep the Packeta branch name and address together in WooCommerce checkout. */
.woocommerce-checkout .packeta-widget {
  display: block;
  width: 100%;
}

.woocommerce-checkout .packeta-widget.after-rate .packetery-widget-button-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.woocommerce-checkout .packeta-widget.after-rate .packetery-widget-button-row img.packetery-widget-button-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.woocommerce-checkout .packeta-widget-place,
.woocommerce-checkout .packeta-widget-info {
  margin: 0.4rem 0 0;
  line-height: 1.4;
}

/* WooCommerce's high-specificity button rules must not collapse the product CTA. */
body.woocommerce.single-product form.cart.detail-purchase {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  width: 100%;
  margin-bottom: 0;
}

body.woocommerce.single-product form.cart.detail-purchase button.single_add_to_cart_button.add-to-cart.button.alt {
  float: none;
  flex: 0 0 auto;
  min-width: 220px;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 999px;
  background: #009fbd;
  color: #fff;
  line-height: 1.2;
  white-space: nowrap;
}

body.woocommerce.single-product form.cart.detail-purchase + .detail-delivery {
  clear: both;
  width: 100%;
}

/* WooCommerce supplies a native input inside the approved rounded quantity control. */
body.woocommerce.single-product form.cart.detail-purchase .quantity,
body.woocommerce-cart .woocommerce .quantity {
  width: 112px;
  min-width: 112px;
}

.woocommerce .quantity.jadob-quantity-ready {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.woocommerce .quantity.jadob-quantity-ready input.qty {
  width: 100%;
  padding: 0 31px;
}

.woocommerce .quantity .jadob-quantity-step {
  position: absolute;
  z-index: 1;
  top: 0;
  bottom: 0;
  width: 31px;
  border: 0;
  background: transparent;
  color: #10213f;
  cursor: pointer;
  font: inherit;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
}

.woocommerce .quantity .jadob-quantity-step-minus { left: 0; }
.woocommerce .quantity .jadob-quantity-step-plus { right: 0; }
.woocommerce .quantity .jadob-quantity-step:hover { color: #009fbd; }
.woocommerce .quantity .jadob-quantity-step:focus-visible {
  outline: 2px solid #009fbd;
  outline-offset: -3px;
}

.woocommerce .quantity input.qty {
  box-sizing: border-box;
  display: block;
  width: 100%;
  min-width: 0;
  height: 100%;
  margin: 0;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
  color: #10213f;
  font: inherit;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  -moz-appearance: textfield;
}

.woocommerce .quantity input.qty::-webkit-inner-spin-button,
.woocommerce .quantity input.qty::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.woocommerce .quantity input.qty:focus-visible {
  outline: 2px solid #009fbd;
  outline-offset: -3px;
}

@media (max-width: 640px) {
  body.woocommerce.single-product form.cart.detail-purchase {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    height: auto;
  }

  body.woocommerce.single-product form.cart.detail-purchase .quantity {
    float: none;
    position: static;
  }

  body.woocommerce.single-product form.cart.detail-purchase button.single_add_to_cart_button.add-to-cart.button.alt {
    float: none;
    position: static;
    display: inline-flex;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    margin: 0;
  }
}
