/* v2.40 — stabilize wishlist card-heart placement + restore editorial mega menu styling */

/* ------------------------
   Wishlist heart on product cards
------------------------- */
body.demit-theme .woocommerce ul.products li.product,
body.demit-theme .woocommerce ul.products li.product .product,
body.demit-theme .woocommerce ul.products li.product .dg-product-card,
body.demit-theme .woocommerce ul.products li.product .demit-product-card,
body.demit-theme .woocommerce ul.products li.product .v17-card{position:relative!important}

body.demit-theme .woocommerce ul.products li.product .dg238-catalog-favorite,
body.demit-theme .woocommerce ul.products li.product .dg238-catalog-favorite.dg239-card-heart{
  position:absolute!important;
  top:12px!important;
  left:12px!important;
  right:auto!important;
  bottom:auto!important;
  z-index:45!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:40px!important;
  height:40px!important;
  min-width:40px!important;
  min-height:40px!important;
  padding:0!important;
  margin:0!important;
  border-radius:999px!important;
  border:1px solid #e4d8c7!important;
  background:rgba(255,253,249,.96)!important;
  color:#2c5648!important;
  box-shadow:0 8px 22px rgba(20,54,41,.14)!important;
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
  font-size:0!important;
  line-height:0!important;
  text-indent:0!important;
  overflow:hidden!important;
  cursor:pointer!important;
  transition:transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease, border-color .18s ease!important;
}
body.demit-theme .woocommerce ul.products li.product .dg238-catalog-favorite:hover,
body.demit-theme .woocommerce ul.products li.product .dg238-catalog-favorite:focus-visible{
  transform:translateY(-1px) scale(1.04)!important;
  background:#ffffff!important;
  box-shadow:0 10px 24px rgba(20,54,41,.18)!important;
}
body.demit-theme .woocommerce ul.products li.product .dg238-catalog-favorite.is-favorited,
body.demit-theme .woocommerce ul.products li.product .dg238-catalog-favorite.dg239-card-heart.is-favorited{
  color:#b57a27!important;
  background:#fff3e4!important;
  border-color:#dcc08f!important;
}
body.demit-theme .woocommerce ul.products li.product .dg238-catalog-favorite .dg239-heart-icon,
body.demit-theme .woocommerce ul.products li.product .dg238-catalog-favorite .dg239-heart-icon svg,
body.demit-theme .woocommerce ul.products li.product .dg238-catalog-favorite svg{
  display:block!important;
  width:18px!important;
  height:18px!important;
  stroke:currentColor!important;
  fill:none!important;
  flex:0 0 18px!important;
  pointer-events:none!important;
}
body.demit-theme .woocommerce ul.products li.product .dg238-catalog-favorite.is-favorited .dg239-heart-icon svg,
body.demit-theme .woocommerce ul.products li.product .dg238-catalog-favorite.is-favorited svg{fill:rgba(181,122,39,.20)!important}
body.demit-theme .woocommerce ul.products li.product .dg238-catalog-favorite .screen-reader-text,
body.demit-theme .woocommerce ul.products li.product .dg238-catalog-favorite [data-fav-label]{
  position:absolute!important;
  width:1px!important;height:1px!important;
  margin:-1px!important;padding:0!important;border:0!important;
  overflow:hidden!important;clip:rect(0 0 0 0)!important;clip-path:inset(50%)!important;white-space:nowrap!important;
}
/* Hide any accidental duplicate text button rendering on cards, without touching PDP/account controls */
body.demit-theme .woocommerce ul.products li.product .product_type_simple + .dg238-catalog-favorite,
body.demit-theme .woocommerce ul.products li.product .added_to_cart + .dg238-catalog-favorite{margin:0!important}

@media (max-width:760px){
  body.demit-theme .woocommerce ul.products li.product .dg238-catalog-favorite,
  body.demit-theme .woocommerce ul.products li.product .dg238-catalog-favorite.dg239-card-heart{
    top:8px!important;left:8px!important;width:35px!important;height:35px!important;min-width:35px!important;min-height:35px!important;
  }
}

/* ------------------------
   Mega menu restoration (desktop/tablet)
------------------------- */
@media (min-width:761px){
  html body #site-header.dg313-header #dg214-quick-menu.dg215-mega{
    width:min(1120px,calc(100vw - 48px))!important;
    max-width:min(1120px,calc(100vw - 48px))!important;
    border:1px solid #e6dccb!important;
    border-radius:18px!important;
    background:#fffdfa!important;
    box-shadow:0 24px 60px rgba(14,45,35,.14)!important;
    overflow:hidden!important;
  }
  html body #site-header #dg214-quick-menu.dg215-mega .dg215-menu-heading{
    min-height:58px!important;
    padding:12px 18px!important;
    background:#fbf7ef!important;
    border-bottom:1px solid #eadfcf!important;
  }
  html body #site-header #dg214-quick-menu.dg215-mega .dg215-menu-layout{
    display:grid!important;
    grid-template-columns:250px minmax(0,1fr)!important;
    min-height:420px!important;
    max-height:none!important;
    overflow:visible!important;
    align-items:stretch!important;
    background:#fffdfa!important;
  }
  html body #site-header #dg214-quick-menu.dg215-mega .dg215-rail{
    padding:14px 10px 16px!important;
    background:#fcf8f2!important;
    border-left:1px solid #ece2d5!important;
    overflow:visible!important;
  }
  html body #site-header #dg214-quick-menu.dg215-mega .dg215-rail-caption{
    margin:0 12px 10px!important;
    font-size:10px!important;
    letter-spacing:1.2px!important;
    color:#b08a4f!important;
  }
  html body #site-header #dg214-quick-menu.dg215-mega .dg215-rail :is(.dg214-tree,.demit-menu){
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:4px!important;
  }
  html body #site-header #dg214-quick-menu.dg215-mega .dg215-rail :is(.dg214-tree,.demit-menu)>li{
    min-height:40px!important;
  }
  html body #site-header #dg214-quick-menu.dg215-mega .dg215-rail :is(.dg214-tree,.demit-menu)>li>a{
    min-height:40px!important;
    padding:8px 12px 8px 34px!important;
    font-size:12px!important;
    font-weight:600!important;
    border-radius:10px!important;
    color:#224637!important;
  }
  html body #site-header #dg214-quick-menu.dg215-mega .dg215-rail :is(.dg214-tree,.demit-menu)>li:hover>a,
  html body #site-header #dg214-quick-menu.dg215-mega .dg215-rail li.dg215-active>a{
    background:#f2e9d9!important;
    color:#855d2c!important;
  }
  html body #site-header #dg214-quick-menu.dg215-mega .dg215-rail li.dg215-active>a{
    box-shadow:inset -3px 0 #c29b61!important;
  }
  html body #site-header #dg214-quick-menu.dg215-mega .dg215-rail .dg215-branch{
    width:30px!important;height:30px!important;top:5px!important;left:4px!important;border-radius:8px!important;
  }
  html body #site-header #dg214-quick-menu.dg215-mega .dg215-showcase{
    padding:16px 18px 18px!important;
    background:linear-gradient(115deg,#fffdfa 0%,#fff8ee 100%)!important;
    overflow:visible!important;
  }
  html body #site-header #dg214-quick-menu.dg215-mega .dg215-showcase-top{
    margin-bottom:12px!important;
    align-items:flex-end!important;
  }
  html body #site-header #dg214-quick-menu.dg215-mega .dg215-showcase-top h2{
    font-size:19px!important;
    line-height:1.5!important;
    color:#143d30!important;
  }
  html body #site-header #dg214-quick-menu.dg215-mega .dg215-show-all{
    padding:4px 0!important;
    border-bottom:1px solid #d2b07b!important;
    color:#94682d!important;
  }
  html body #site-header #dg214-quick-menu.dg215-mega .dg215-showcase-body{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) 180px!important;
    gap:14px!important;
    align-items:start!important;
  }
  html body #site-header #dg214-quick-menu.dg215-mega .dg215-card-grid{
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:10px!important;
    align-content:start!important;
  }
  html body #site-header #dg214-quick-menu.dg215-mega .dg215-cat-card{
    background:#fff!important;
    border:1px solid #eadfce!important;
    border-radius:12px!important;
    overflow:hidden!important;
    box-shadow:0 4px 12px rgba(18,57,42,.06)!important;
    transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease!important;
  }
  html body #site-header #dg214-quick-menu.dg215-mega .dg215-cat-card:hover{
    transform:translateY(-2px)!important;
    border-color:#d9ba83!important;
    box-shadow:0 10px 22px rgba(18,57,42,.12)!important;
  }
  html body #site-header #dg214-quick-menu.dg215-mega .dg215-cat-picture{
    display:block!important;
    width:100%!important;
    height:96px!important;
    max-height:96px!important;
    background:#f3ebde!important;
  }
  html body #site-header #dg214-quick-menu.dg215-mega .dg215-cat-picture img{
    width:100%!important;height:100%!important;object-fit:cover!important;object-position:center!important;display:block!important;
  }
  html body #site-header #dg214-quick-menu.dg215-mega .dg215-cat-info{
    padding:7px 9px 8px!important;
    min-height:46px!important;
    gap:2px!important;
    text-align:right!important;
    align-items:flex-start!important;
  }
  html body #site-header #dg214-quick-menu.dg215-mega .dg215-cat-info strong{
    font-size:11.5px!important;
    line-height:1.6!important;
    color:#224738!important;
  }
  html body #site-header #dg214-quick-menu.dg215-mega .dg215-cat-info>span{
    display:none!important;
  }
  html body #site-header #dg214-quick-menu.dg215-mega .dg215-promo{
    display:block!important;
    min-height:100%!important;
    max-height:none!important;
    border-radius:13px!important;
    overflow:hidden!important;
    background:#0b4335!important;
  }
  html body #site-header #dg214-quick-menu.dg215-mega .dg215-promo>img{
    width:100%!important;height:100%!important;object-fit:cover!important;display:block!important;
  }
}

/* Keep responsive drawer intact but visually cleaner */
@media (max-width:760px){
  html body #site-header #dg214-quick-menu.dg215-mega .dg215-menu-heading{padding:11px 14px!important}
  html body #site-header #dg214-quick-menu.dg215-mega .dg215-card-grid{gap:8px!important}
}
