/*
 Theme Name:   Woodmart Child
 Description:  Woodmart Child Theme
 Author:       XTemos
 Author URI:   http://xtemos.com
 Template:     woodmart
 Version:      1.0.0
 Text Domain:  woodmart
*/

@media (min-width: 1025px) and (max-width: 1399px) {
  .wd-header-main-nav #menu-izvelne {
    column-gap: 10px;
  }
}

/* Dealit 2026-11-10: desktop category dropdown (menu #37, 3-column grid).
   Open each group's submenu to the right of the whole panel instead of over
   the neighbouring column. Presentation only; remove this block to revert. */
@media (min-width: 1025px) {
  .wd-dropdown-cats > ul.menu {
    position: relative !important;
  }
  .wd-dropdown-cats > ul.menu > li.menu-item-has-children {
    position: static !important;
  }
  .wd-dropdown-cats > ul.menu > li > .wd-dropdown-menu {
    left: 100% !important;
    top: 0 !important;
    margin-left: 0 !important;
    min-height: 100%;
  }
}

/* Match the wider home page content area across the site. */
#main-content.wd-content-layout.container {
  max-width: 1480px;
  width: calc(100% - 48px);
}

@media (max-width: 800px) {
  #main-content.wd-content-layout.container {
    width: calc(100% - 28px);
  }
}

@media (max-width: 480px) {
  #main-content.wd-content-layout.container {
    width: calc(100% - 16px);
  }
}

/* Align header and footer content with the wider page content on desktop. */
@media (min-width: 1025px) {
  .whb-header .whb-row > .container,
  footer.elementor-location-footer .elementor-top-section > .elementor-container {
    max-width: 1480px !important;
    width: calc(100% - 48px) !important;
  }
}

/* Keep the Woodmart sticky main row compact on desktop and mobile.
   Applies only after Woodmart switches the native header into sticky mode. */
.whb-header.whb-sticky-real.whb-sticked .whb-main-header,
.whb-header.whb-sticky-real.whb-sticked .whb-general-header,
.whb-header.whb-sticky-real.whb-sticked .whb-general-header .whb-flex-row {
  height: 60px !important;
  min-height: 60px !important;
  max-height: 60px !important;
}

.whb-header.whb-sticky-real.whb-sticked .whb-main-header,
.whb-header.whb-sticky-real.whb-sticked .whb-general-header {
  background-color: #fff;
}

.whb-header.whb-sticky-real.whb-sticked .whb-general-header .site-logo img {
  max-height: 50px !important;
  width: auto;
  object-fit: contain;
}

/* Lift the four footer information cards gently on pointer hover. */
@media (hover: hover) and (pointer: fine) {
  footer.elementor-location-footer .elementor-element-a273bf1 > .elementor-container > .elementor-column {
    position: relative;
  }

  footer.elementor-location-footer .elementor-element-a273bf1 > .elementor-container > .elementor-column > .elementor-widget-wrap {
    transition: transform 220ms ease, box-shadow 220ms ease;
    transform-origin: center center;
  }

  footer.elementor-location-footer .elementor-element-a273bf1 > .elementor-container > .elementor-column:hover {
    z-index: 2;
  }

  footer.elementor-location-footer .elementor-element-a273bf1 > .elementor-container > .elementor-column:hover > .elementor-widget-wrap {
    transform: translateY(-5px) scale(1.025);
    box-shadow: 0 14px 30px rgba(20, 45, 75, 0.12);
  }
}

@media (prefers-reduced-motion: reduce) {
  footer.elementor-location-footer .elementor-element-a273bf1 > .elementor-container > .elementor-column > .elementor-widget-wrap {
    transition: none;
  }
}

/* Carrier labels: one layout for cart and checkout. */
body:is(.woocommerce-cart,.woocommerce-checkout) ul#shipping_method > li {
  display:grid !important;
  grid-template-columns:20px minmax(0,1fr) !important;
  align-items:start;
  gap:12px;
  margin:0 0 12px !important;
  padding:8px 0 !important;
}
body:is(.woocommerce-cart,.woocommerce-checkout) ul#shipping_method > li > input[type="radio"] {
  grid-column:1; grid-row:1; position:static !important;
  float:none !important; margin:5px 0 0 !important; transform:none !important;
}
body:is(.woocommerce-cart,.woocommerce-checkout) ul#shipping_method > li > label[for^="shipping_method"] {
  grid-column:2; grid-row:1; display:block !important; float:none !important;
  width:100%; min-width:0; margin:0 !important; padding:0 !important; text-align:left !important;
}
body:is(.woocommerce-cart,.woocommerce-checkout) .dealit-shipping-brand {
  display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px;
  width:100%; min-width:0; text-align:left;
}
body:is(.woocommerce-cart,.woocommerce-checkout) .dealit-shipping-brand__logo {
  display:block; flex:0 0 70px; width:70px; max-width:70px; height:38px;
  object-fit:contain; margin:0;
}
body:is(.woocommerce-cart,.woocommerce-checkout) .dealit-shipping-brand__text {
  display:block; flex:1 1 150px; min-width:0; max-width:100%;
  white-space:normal; word-break:normal; overflow-wrap:normal; line-height:1.45;
}
body:is(.woocommerce-cart,.woocommerce-checkout) input[type="radio"][value^="woo_lithuaniapost_lpexpress_terminal"] + img {
  display:none !important;
}
/* The Unisend plugin inserts a second label containing its terminal picker. */
body:is(.woocommerce-cart,.woocommerce-checkout) ul#shipping_method > li > label:not([for^="shipping_method"]) {
  grid-column:2; grid-row:auto; display:block; width:100%; min-width:0; margin:0;
}
body:is(.woocommerce-cart,.woocommerce-checkout) ul#shipping_method > li > br { display:none; }
body:is(.woocommerce-cart,.woocommerce-checkout) ul#shipping_method .woo_lithuaniapost_lpexpress_terminal_select_container {
  width:100%; min-width:0; margin:0;
}
body:is(.woocommerce-cart,.woocommerce-checkout) ul#shipping_method select {
  max-width:100%; width:100%; min-width:0;
}
/* Woodmart renders review rows with flex, so use a full-width column. */
body.woocommerce-checkout .wd-order-table tr.shipping {
  display:flex !important; flex-direction:column !important; align-items:stretch !important;
  width:100% !important; min-width:0;
}
body.woocommerce-checkout .wd-order-table tr.shipping > th,
body.woocommerce-checkout .wd-order-table tr.shipping > td {
  display:block !important; flex:0 0 auto !important; float:none !important;
  width:100% !important; min-width:0 !important; max-width:100%;
  padding:10px 0 !important; text-align:left !important;
}
body.woocommerce-checkout .wd-order-table tr.shipping > td::before { display:none !important; }
body.woocommerce-checkout .wd-order-table #shipping_method {
  width:100%; min-width:0; margin:0; padding:0;
}
@media(max-width:480px) {
  body:is(.woocommerce-cart,.woocommerce-checkout) .dealit-shipping-brand { flex-direction:column; align-items:flex-start; }
  body:is(.woocommerce-cart,.woocommerce-checkout) .dealit-shipping-brand__logo { flex:0 0 38px; }
  body:is(.woocommerce-cart,.woocommerce-checkout) .dealit-shipping-brand__text { flex:0 1 auto; width:100%; }
}

/* Company buyers: show a required asterisk rather than the optional suffix.
   VAT number retains WooCommerce's optional indication. */
body.woocommerce-checkout .dealit-company-required label .optional {
  display: none !important;
}
body.woocommerce-checkout .dealit-company-required label .dealit-company-star {
  display: inline !important;
  color: #e02b2b;
  margin-left: 4px;
}
body.woocommerce-checkout .dealit-company-required label .dealit-company-star[hidden] {
  display: none !important;
}

/* Buyer type in checkout: radio cards instead of the select2 dropdown.
   Keep the original select available to WooCommerce / field-editor scripts. */
/* Hide the original company/private dropdown regardless of where the
   checkout-field editor inserts Select2. Keep the select in the DOM so its
   value, conditional logic and order metadata still work. */
body.woocommerce-checkout .dealit-buyer-type-field select,
body.woocommerce-checkout .dealit-buyer-type-field .select2-container,
body.woocommerce-checkout .dealit-buyer-type-field .select2,
body.woocommerce-checkout #fiz_jur_per_field select,
body.woocommerce-checkout #fiz_jur_per_field .select2-container,
body.woocommerce-checkout #fiz_jur_per_field .select2 {
  display: none !important;
}

body.woocommerce-checkout .dealit-buyer-type-choices {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0 0 10px;
  border: 0;
  min-width: 0;
}

body.woocommerce-checkout .dealit-buyer-type-choices legend {
  padding: 0;
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
}

body.woocommerce-checkout .dealit-buyer-type-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

body.woocommerce-checkout .dealit-buyer-type-option {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-width: 0;
  padding: 14px 16px;
  margin: 0 !important;
  border: 1px solid #d9dee6;
  border-radius: 7px;
  background: #fff;
  color: #222;
  font-size: 15px;
  line-height: 1.35;
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease;
}

body.woocommerce-checkout .dealit-buyer-type-option:has(input:checked) {
  border-color: #1269ca;
  background: #f5f9ff;
}

body.woocommerce-checkout .dealit-buyer-type-option input[type="radio"] {
  position: static !important;
  display: inline-block !important;
  float: none !important;
  width: 18px !important;
  min-width: 18px !important;
  height: 18px !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
  opacity: 1 !important;
  accent-color: #1269ca;
  cursor: pointer;
}

body.woocommerce-checkout .dealit-buyer-type-option:focus-within {
  outline: 2px solid #1269ca;
  outline-offset: 2px;
}

@media (max-width: 420px) {
  body.woocommerce-checkout .dealit-buyer-type-options {
    gap: 8px;
  }
  body.woocommerce-checkout .dealit-buyer-type-option {
    padding: 12px 10px;
    font-size: 14px;
  }
}

/* Force consistent buyer selection cards in Woodmart desktop + mobile. */
body.woocommerce-checkout form.checkout .dealit-buyer-type-choices {
  display: block !important;
  border: 0 !important;
  padding: 0 !important;
  margin: 4px 0 12px !important;
  min-width: 0 !important;
}
body.woocommerce-checkout form.checkout .dealit-buyer-type-choices > legend {
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1.5 !important;
  padding: 0 !important;
  margin: 0 0 10px !important;
  width: auto !important;
}
body.woocommerce-checkout form.checkout .dealit-buyer-type-options {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
  align-items: stretch;
}
body.woocommerce-checkout form.checkout label.dealit-buyer-type-option {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 10px !important;
  border: 1px solid #d9dee6 !important;
  border-radius: 7px !important;
  padding: 12px 14px !important;
  margin: 0 !important;
  min-width: 0 !important;
  width: 100% !important;
  background: #fff;
  cursor: pointer;
}
body.woocommerce-checkout form.checkout label.dealit-buyer-type-option:has(input:checked) {
  border-color: #1269ca !important;
  background: #f5f9ff !important;
}
body.woocommerce-checkout form.checkout .dealit-buyer-type-option input[type="radio"] {
  display: inline-block !important;
  position: static !important;
  float: none !important;
  width: 18px !important;
  height: 18px !important;
  flex: 0 0 18px !important;
  margin: 0 !important;
  opacity: 1 !important;
}
body.woocommerce-checkout .dealit-company-required label .optional,
body.woocommerce-checkout .dealit-company-required label .thwcfe-optional,
body.woocommerce-checkout .dealit-company-required .optional {
  display: none !important;
}
@media (max-width: 420px) {
  body.woocommerce-checkout form.checkout label.dealit-buyer-type-option {
    padding: 12px 10px !important;
    gap: 7px !important;
    font-size: 13px !important;
  }
}

/* Dealit Checkout + PVN: keep both buyer choices readable on 320px phones. */
@media (max-width: 349px) {
  body.woocommerce-checkout form.checkout .dealit-buyer-type-options {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 8px !important;
  }
  body.woocommerce-checkout form.checkout label.dealit-buyer-type-option {
    min-width: 0 !important;
    padding: 10px 12px !important;
    gap: 9px !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
  }
}

/* Center the two product-section links on the home page. */
@media (min-width: 801px) {
  body.home .elementor-element-c745b2e6 .elementor-button-wrapper,
  body.home .elementor-element-d78ac165 .elementor-button-wrapper {
    text-align: center !important;
  }
}

/* Dealit 2026-11-04: shipping logos and delivery page / footer links.
   Presentation only: no shipping rate, gateway, availability or tax changes. */
body:is(.woocommerce-cart,.woocommerce-checkout) .dealit-shipping-brand__logo {
  flex: 0 0 94px !important;
  width: 94px !important;
  max-width: 94px !important;
  height: 52px !important;
  object-fit: contain !important;
  object-position: center;
}
@media (max-width: 480px) {
  body:is(.woocommerce-cart,.woocommerce-checkout) .dealit-shipping-brand {
    flex-direction: row !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 8px 10px !important;
  }
  body:is(.woocommerce-cart,.woocommerce-checkout) .dealit-shipping-brand__logo {
    flex: 0 0 84px !important;
    width: 84px !important;
    max-width: 84px !important;
    height: 48px !important;
  }
  body:is(.woocommerce-cart,.woocommerce-checkout) .dealit-shipping-brand__text {
    flex: 1 1 148px !important;
    width: auto !important;
  }
}

/* Four named shipping methods on the informational page use existing
   media-library logo files, matching the checkout and footer design. */
body.page-id-100 .dealit-delivery-method-title {
  display: flex;
  align-items: center;
  gap: 22px;
  width: 100%;
  min-height: 112px;
  padding: 18px 24px;
  margin: 28px 0 15px;
  box-sizing: border-box;
  border: 1px solid #e1e8f1;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 5px 18px rgba(20,45,75,.045);
}
body.page-id-100 .dealit-delivery-method-title .dealit-delivery-brand-logo {
  flex: 0 0 154px;
  width: 154px;
  max-width: 38%;
  height: 76px;
  object-fit: contain;
  object-position: center;
  margin: 0;
}
body.page-id-100 .dealit-delivery-method-title strong {
  display: block;
  font-family: Poppins, Arial, sans-serif;
  font-size: clamp(18px,2vw,22px);
  line-height: 1.35;
  font-weight: 600;
  color: #27313f;
}
@media (max-width: 560px) {
  body.page-id-100 .dealit-delivery-method-title {
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    text-align: center;
    padding: 16px 12px;
    min-height: 136px;
  }
  body.page-id-100 .dealit-delivery-method-title .dealit-delivery-brand-logo {
    flex: none;
    width: 145px;
    max-width: 100%;
    height: 65px;
  }
  body.page-id-100 .dealit-delivery-method-title strong { font-size: 18px; }
}

/* Entire free-delivery information card in the existing Elementor footer
   links to the shipping page, as the support card already does. */
.elementor-23338 .elementor-element-61f4bdc {
  position: relative;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.elementor-23338 .elementor-element-61f4bdc .dealit-footer-delivery-card-link {
  position: absolute;
  inset: 0;
  display: block;
  z-index: 5;
  border-radius: 16px;
}
.elementor-23338 .elementor-element-61f4bdc .dealit-footer-delivery-card-link:focus-visible {
  outline: 3px solid #1168c5;
  outline-offset: 3px;
}
@media (hover: hover) and (pointer: fine) {
  .elementor-23338 .elementor-element-61f4bdc:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(20,45,75,.10);
  }
}
@media (prefers-reduced-motion: reduce) {
  .elementor-23338 .elementor-element-61f4bdc { transition: none; }
}

/* Dealit 2026-11-04: balance shipping copy against larger courier logos.
   Typography only: keep icon dimensions, shipping prices and logic unchanged. */
body:is(.woocommerce-cart,.woocommerce-checkout) .dealit-shipping-brand__text {
  font-size: 15px !important;
  line-height: 1.5;
  font-weight: 500;
}
body.page-id-100 .dealit-delivery-method-title strong {
  font-size: clamp(20px, 2.2vw, 24px);
  line-height: 1.35;
}
body.page-id-100 .entry-content p:not(.dealit-delivery-method-title) {
  font-size: 16px;
  line-height: 1.65;
}
.elementor-23338 .elementor-element-468584f,
.elementor-23338 .elementor-element-468584f p,
.elementor-23338 .elementor-element-468584f span {
  font-size: 15px !important;
  line-height: 1.5;
}
.elementor-23338 .elementor-element-31ef839 .elementor-heading-title {
  font-size: 20px !important;
  line-height: 1.35;
}
@media (max-width: 560px) {
  body.page-id-100 .dealit-delivery-method-title strong {
    font-size: 20px;
  }
  .elementor-23338 .elementor-element-468584f,
  .elementor-23338 .elementor-element-468584f p,
  .elementor-23338 .elementor-element-468584f span {
    font-size: 13px !important;
  }
  .elementor-23338 .elementor-element-31ef839 .elementor-heading-title {
    font-size: 16px !important;
  }
}
@media (max-width: 480px) {
  body:is(.woocommerce-cart,.woocommerce-checkout) .dealit-shipping-brand__text {
    font-size: 14px !important;
    line-height: 1.45;
  }
}
