/* Header mini-cart — keep Elementor header + green cart button */

.dmk-mini-cart{
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-left: 0;
  z-index: 10050;
  flex: 0 0 auto;
}
.dmk-mini-cart__btn{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 7px 12px;
  border: 0;
  border-radius: 4px;
  background: #1D5F3E;
  color: #fff;
  cursor: pointer;
  font-family: Roboto, Arial, sans-serif;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  text-transform: none;
  white-space: nowrap;
}
.dmk-mini-cart__btn:hover,
.dmk-mini-cart__btn:focus{
  background: #174f33;
  outline: none;
}
.dmk-mini-cart__btn-icon{
  display: inline-flex;
  line-height: 0;
}
.dmk-mini-cart__count{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 50%;
  background: #fff;
  color: #1D5F3E;
  font-size: 11px;
  font-weight: 700;
}
.dmk-mini-cart__btn-total{
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.dmk-mini-cart__dropdown{
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(420px, calc(100vw - 24px));
  padding: 16px;
  border: 1px solid #E6E6E6;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(31, 24, 15, 0.12);
  box-sizing: border-box;
}
.dmk-mini-cart__dropdown[hidden]{
  display: none !important;
}
.dmk-mini-cart__empty{
  padding: 18px 8px;
  text-align: center;
  color: #5F5F5F;
  font-size: 14px;
}
.dmk-mini-cart__items{
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 320px;
  overflow: auto;
}
.dmk-mini-cart__item{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.dmk-mini-cart__item-main{
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.dmk-mini-cart__thumb{
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  border-radius: 6px;
  overflow: hidden;
  background: #f7f7f7;
}
.dmk-mini-cart__thumb img{
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.dmk-mini-cart__title{
  color: #2C2C2C;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
}
.dmk-mini-cart__unit{
  margin-top: 4px;
  color: #2C2C2C;
  font-size: 12px;
  font-weight: 400;
}
.dmk-mini-cart__unit span{
  font-weight: 800;
}
.dmk-mini-cart__item-side{
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}
.dmk-mini-cart__remove{
  border: 0;
  background: transparent;
  padding: 0;
  line-height: 0;
  cursor: pointer;
}
.dmk-mini-cart__line-total{
  color: #2C2C2C;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}
.dmk-mini-cart__footer{
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #ECECEC;
}
.dmk-mini-cart__total{
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  color: #2C2C2C;
  font-size: 16px;
}
.dmk-mini-cart__total strong{
  font-size: 16px;
  font-weight: 800;
}
.dmk-mini-cart__actions{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.dmk-mini-cart__link-cart,
.dmk-mini-cart__link-checkout{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 10px 12px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  box-sizing: border-box;
}
.dmk-mini-cart__link-cart{
  border: 1px solid #1D5F3E;
  background: #fff;
  color: #1D5F3E;
}
.dmk-mini-cart__link-checkout{
  border: 1px solid #1D5F3E;
  background: #1D5F3E;
  color: #fff !important;
}
.dmk-mini-cart__link-cart:hover{
  background: #F9F7F3;
}
.dmk-mini-cart__link-checkout:hover,
a.dmk-mini-cart__link-checkout:hover{
  background: #174f33;
  color: #fff !important;
}

/* Header working width 1280 — only header, not whole site kit */
.elementor-location-header .elementor-section-boxed > .elementor-container,
.elementor-497 .elementor-section-boxed > .elementor-container{
  max-width: 1280px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  width: 100%;
  box-sizing: border-box;
}

/* Hide icons near phone (keep number) */
.elementor-location-header .elementor-element-adfb938 .elementor-icon-list-item:nth-child(1),
.elementor-location-header .elementor-element-adfb938 .elementor-icon-list-item:nth-child(2),
.elementor-497 .elementor-element-adfb938 .elementor-icon-list-item:nth-child(1),
.elementor-497 .elementor-element-adfb938 .elementor-icon-list-item:nth-child(2){
  display: none !important;
}
.elementor-location-header .elementor-element-adfb938 .elementor-icon-list-icon,
.elementor-location-header .elementor-element-24d530e .elementor-icon-list-icon,
.elementor-497 .elementor-element-adfb938 .elementor-icon-list-icon,
.elementor-497 .elementor-element-24d530e .elementor-icon-list-icon{
  display: none !important;
}

/* Callback + cart cluster */
.dmk-header-actions,
[data-dmk-header-actions]{
  display: inline-flex !important;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 8px;
  width: auto !important;
  max-width: 100%;
  margin: 0 !important;
  vertical-align: middle;
}
.elementor-location-header .elementor-element-f2194aa,
.elementor-497 .elementor-element-f2194aa{
  width: auto !important;
  max-width: none !important;
  --container-widget-width: auto !important;
}
.elementor-location-header .elementor-element-f2194aa .elementor-button,
.elementor-497 .elementor-element-f2194aa .elementor-button{
  padding-left: 14px !important;
  padding-right: 14px !important;
  white-space: nowrap;
}
.elementor-location-header .dmk-mini-cart,
.elementor-497 .dmk-mini-cart,
.dmk-header-actions .dmk-mini-cart{
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  vertical-align: middle;
}

/* Materials cards: keep img ABOVE title (Woo wraps both in one <a>) — always-on backup */
.dmk-woo-materials ul.products li.product a.woocommerce-LoopProduct-link,
.dmk-woo-materials ul.products li.product a.woocommerce-loop-product__link{
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  width: 100% !important;
  float: none !important;
}
.dmk-woo-materials ul.products li.product a img{
  display: block !important;
  float: none !important;
  width: 100% !important;
  margin: 0 0 24px !important;
}
.dmk-woo-materials ul.products li.product .woocommerce-loop-product__title,
.dmk-woo-materials ul.products li.product h2{
  display: block !important;
  float: none !important;
  width: 100% !important;
  clear: both !important;
  text-align: center !important;
}

@media (max-width: 1200px){
  .dmk-mini-cart__btn-total{ display: none; }
}
@media (max-width: 1024px){
  /* Compact cart in mobile/sticky header: icon + badge only */
  .dmk-mobile-cart-slot{
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    margin: 0 6px 0 0;
    z-index: 10050;
    order: 5;
  }
  .elementor-element-1a90b82 .e-con-inner,
  .index-mobile .e-con-inner{
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 8px;
  }
  .dmk-mobile-cart-slot .dmk-mini-cart__btn{
    min-height: 40px;
    min-width: 40px;
    padding: 8px;
    border-radius: 50%;
    gap: 0;
  }
  .dmk-mobile-cart-slot .dmk-mini-cart__btn-total{
    display: none !important;
  }
  .dmk-mobile-cart-slot .dmk-mini-cart__count{
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 16px;
    height: 16px;
    font-size: 10px;
  }
  .dmk-mobile-cart-slot .dmk-mini-cart__btn{
    position: relative;
  }
  .dmk-mobile-cart-slot .dmk-mini-cart__dropdown{
    position: fixed;
    top: auto;
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
    max-height: 70vh;
    overflow: auto;
    z-index: 10070;
  }
}
@media (min-width: 1025px){
  .dmk-mobile-cart-slot{
    display: none !important;
  }
}
@media (max-width: 767px){
  .dmk-mini-cart__btn-total{ display: none; }
  .dmk-mini-cart__dropdown{
    position: fixed;
    top: auto;
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
    max-height: 70vh;
    overflow: auto;
  }
  .dmk-mini-cart__actions{
    grid-template-columns: 1fr;
  }
  /* Hide desktop-header cart copy on phones (lives in elementor-hidden-mobile). */
  .elementor-hidden-mobile .dmk-mini-cart,
  .elementor-hidden-mobile .dmk-header-actions .dmk-mini-cart{
    display: none !important;
  }
}
