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

/* ==========================================================================
   1. FIXIERTE NAVIGATION (STICKY NAV) - FULL HEIGHT SUBMENUS
   ========================================================================== */
.wd-sticky-nav .wd-nav-sticky {
  position: static !important;
}

.wd-sticky-nav .wd-nav-sticky > li {
  position: static !important;
}

.wd-sticky-nav .wd-nav-sticky .wd-dropdown-menu {
  position: fixed !important;
  top: var(--wd-admin-bar-h, 0px) !important;
  bottom: 0 !important;
  inset-block: var(--wd-admin-bar-h, 0px) 0 !important;
  left: 275px !important;
  inset-inline-start: 275px !important;
  width: var(--wd-dropdown-width, 350px) !important;
  max-width: calc(100vw - var(--wd-scroll-w, 0px) - 275px) !important;
  height: calc(100vh - var(--wd-admin-bar-h, 0px)) !important;
  max-height: calc(100vh - var(--wd-admin-bar-h, 0px)) !important;
  margin: 0 !important;
  padding: 0 !important;
  box-shadow: 15px 0 45px rgba(0, 0, 0, 0.14) !important;
  border-radius: 0 12px 12px 0 !important;
  border-left: 1px solid rgba(0, 0, 0, 0.06) !important;
  background-color: var(--bgcolor-white, #ffffff) !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  z-index: 395 !important;
  display: flex !important;
  flex-direction: column !important;
  transform: none !important;
}

.wd-sticky-nav .wd-nav-sticky .wd-dropdown-menu > .container.wd-entry-content {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 auto !important;
  min-height: 100% !important;
  padding: 24px 20px 20px !important;
  box-sizing: border-box !important;
}

.wd-sticky-nav .wd-nav-sticky .wd-dropdown-menu .wp-block-wd-cover {
  margin-top: auto !important;
  margin-bottom: 0 !important;
  flex-shrink: 0 !important;
}

/* ==========================================================================
   2. STICKY NAV CONTACT ICONS & WIDGET (PERFECT CIRCULAR ALIGNMENT)
   ========================================================================== */
.wd-sticky-nav .wd-sticky-nav-content {
  margin-top: auto !important;
  padding: 0 !important;
  min-width: 0 !important;
  width: 100% !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  background: transparent !important;
  box-sizing: border-box !important;
}

.moelders-sticky-contact-widget {
  width: 100% !important;
  box-sizing: border-box !important;
  padding: 8px 0 12px 0 !important;
}

.moelders-contact-divider {
  height: 1px !important;
  background: rgba(0, 0, 0, 0.08) !important;
  margin: 6px 10px 10px 10px !important;
}

.moelders-contact-list {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  width: 100% !important;
  gap: 8px !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* --- IDLE / COLLAPSED STATE (WIDTH ~60px) --- */
.wd-sticky-nav:not(:hover):not(.wd-opened) .moelders-contact-item {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 40px !important;
  height: 40px !important;
  margin: 0 auto !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  border-radius: 50% !important;
  box-shadow: none !important;
  text-decoration: none !important;
  transform: none !important;
  gap: 0 !important;
  cursor: pointer !important;
}

.wd-sticky-nav:not(:hover):not(.wd-opened) .moelders-contact-icon {
  flex: 0 0 38px !important;
  width: 38px !important;
  height: 38px !important;
  border-radius: 50% !important;
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  color: #1e293b !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06) !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  margin: 0 !important;
  padding: 0 !important;
}

.wd-sticky-nav:not(:hover):not(.wd-opened) .moelders-contact-item:hover .moelders-contact-icon {
  background: #1c61e7 !important;
  border-color: #1c61e7 !important;
  color: #ffffff !important;
  transform: scale(1.08) !important;
  box-shadow: 0 4px 12px rgba(28, 97, 231, 0.35) !important;
}

/* Hide all text containers completely when collapsed */
.wd-sticky-nav:not(:hover):not(.wd-opened) .moelders-contact-content,
.wd-sticky-nav:not(:hover):not(.wd-opened) .moelders-contact-texts {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Popover flyout on hover when collapsed */
.moelders-contact-popover {
  position: fixed !important;
  left: 68px !important;
  display: none !important;
  flex-direction: column !important;
  background: #ffffff !important;
  padding: 12px 16px !important;
  border-radius: 10px !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.06) !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  z-index: 9999 !important;
  white-space: nowrap !important;
  pointer-events: auto !important;
  min-width: 220px !important;
}

.moelders-contact-popover:before {
  content: "" !important;
  position: absolute !important;
  left: -6px !important;
  top: 50% !important;
  margin-top: -6px !important;
  width: 12px !important;
  height: 12px !important;
  background: #ffffff !important;
  transform: rotate(45deg) !important;
  border-left: 1px solid rgba(0, 0, 0, 0.08) !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
}

.wd-sticky-nav:not(:hover):not(.wd-opened) .moelders-contact-item:hover .moelders-contact-popover {
  display: flex !important;
  animation: moeldersFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

@keyframes moeldersFadeIn {
  from { opacity: 0; transform: translateX(-6px); }
  to { opacity: 1; transform: translateX(0); }
}

.moelders-popover-tag {
  font-size: 10px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.6px !important;
  color: #1c61e7 !important;
  margin-bottom: 3px !important;
}

.moelders-popover-title {
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #212121 !important;
  margin-bottom: 3px !important;
}

.moelders-popover-text,
.moelders-popover-desc {
  font-size: 11px !important;
  color: #666666 !important;
  line-height: 1.4 !important;
  margin: 0 0 8px 0 !important;
}

.moelders-popover-btn {
  display: inline-block !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  color: #ffffff !important;
  background: #1c61e7 !important;
  padding: 4px 10px !important;
  border-radius: 4px !important;
  text-align: center !important;
  width: fit-content !important;
}

/* --- EXPANDED STATE (WIDTH 275px) --- */
.wd-sticky-nav:is(:hover, .wd-opened) .moelders-contact-item {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  width: calc(100% - 20px) !important;
  height: auto !important;
  margin: 4px 10px !important;
  padding: 8px 10px !important;
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px !important;
  box-sizing: border-box !important;
  text-decoration: none !important;
  color: inherit !important;
  gap: 10px !important;
  transition: all 0.2s ease !important;
}

.wd-sticky-nav:is(:hover, .wd-opened) .moelders-contact-item:hover {
  background: #ffffff !important;
  border-color: rgba(28, 97, 231, 0.4) !important;
  box-shadow: 0 4px 14px rgba(28, 97, 231, 0.1) !important;
  transform: translateX(2px) !important;
}

.wd-sticky-nav:is(:hover, .wd-opened) .moelders-contact-icon {
  flex: 0 0 34px !important;
  width: 34px !important;
  height: 34px !important;
  border-radius: 50% !important;
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  color: #334155 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.2s ease !important;
  margin: 0 !important;
  padding: 0 !important;
}

.wd-sticky-nav:is(:hover, .wd-opened) .moelders-contact-item:hover .moelders-contact-icon {
  background: #1c61e7 !important;
  border-color: #1c61e7 !important;
  color: #ffffff !important;
}

.wd-sticky-nav:is(:hover, .wd-opened) .moelders-contact-content,
.wd-sticky-nav:is(:hover, .wd-opened) .moelders-contact-texts {
  display: flex !important;
  flex-direction: column !important;
  margin: 0 !important;
  padding: 0 !important;
  width: auto !important;
  opacity: 1 !important;
  visibility: visible !important;
  overflow: hidden !important;
  white-space: nowrap !important;
}

.wd-sticky-nav:is(:hover, .wd-opened) .moelders-contact-label {
  font-size: 10px !important;
  font-weight: 700 !important;
  letter-spacing: 0.5px !important;
  text-transform: uppercase !important;
  color: #777777 !important;
  line-height: 1.2 !important;
}

.wd-sticky-nav:is(:hover, .wd-opened) .moelders-contact-value {
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #1c61e7 !important;
  line-height: 1.3 !important;
}

.wd-sticky-nav:is(:hover, .wd-opened) .moelders-contact-sub {
  font-size: 11px !important;
  color: #666666 !important;
  line-height: 1.2 !important;
}

.wd-sticky-nav:is(:hover, .wd-opened) .moelders-contact-popover {
  display: none !important;
}

/* ==========================================================================
   MEGA MENU DYNAMIC FEED (DEALS & BESTSELLERS)
   ========================================================================== */
.moelders-feed-block {
  margin-top: 14px !important;
  margin-bottom: 16px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
}

.moelders-feed-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding-bottom: 6px !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
}

.moelders-feed-title {
  font-size: 11px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.6px !important;
  color: #212121 !important;
}

.moelders-feed-badge {
  font-size: 9px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  color: #16a34a !important;
  background: rgba(22, 163, 74, 0.1) !important;
  padding: 2px 6px !important;
  border-radius: 3px !important;
  letter-spacing: 0.5px !important;
}

.moelders-feed-grid {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
}

.moelders-feed-item {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 6px 8px !important;
  background: #f8fafc !important;
  border: 1px solid #eef2f6 !important;
  border-radius: 8px !important;
  text-decoration: none !important;
  color: #212121 !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.moelders-feed-item:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
  border-color: #1c61e7 !important;
}

.moelders-feed-thumb {
  position: relative !important;
  flex: 0 0 52px !important;
  width: 52px !important;
  height: 52px !important;
  background: #ffffff !important;
  border-radius: 6px !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 1px solid rgba(0, 0, 0, 0.04) !important;
}

.moelders-feed-thumb img {
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  padding: 2px !important;
}

.moelders-feed-tag-deal {
  position: absolute !important;
  top: 2px !important;
  left: 2px !important;
  background: #e11d48 !important;
  color: #ffffff !important;
  font-size: 8px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  padding: 2px 4px !important;
  border-radius: 3px !important;
  text-transform: uppercase !important;
}

.moelders-feed-info {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
}

.moelders-feed-name {
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
  color: #212121 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.moelders-feed-item:hover .moelders-feed-name {
  color: #1c61e7 !important;
}

.moelders-feed-price-wrap {
  display: flex !important;
  align-items: baseline !important;
  gap: 6px !important;
  font-size: 12px !important;
}

.moelders-feed-price-old,
.moelders-feed-price-old .woocommerce-Price-amount {
  font-size: 11px !important;
  color: #94a3b8 !important;
  text-decoration: line-through !important;
}

.moelders-feed-price-current,
.moelders-feed-price-current .woocommerce-Price-amount {
  font-size: 13px !important;
  font-weight: 700 !important;
  color: #1c61e7 !important;
}

/* ==========================================================================
   PAGE HERO TYPOGRAPHY FIX (SCOPED STRICTLY OUTSIDE HOMEPAGE)
   ========================================================================== */
body:not(.home) .wp-block-wd-row .color-scheme-light h1,
body:not(.home) .wp-block-wd-row .color-scheme-light .wp-block-wd-title {
  color: #ffffff !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

body:not(.home) .wp-block-wd-row .color-scheme-light p,
body:not(.home) .wp-block-wd-row .color-scheme-light .wp-block-wd-paragraph {
  color: #e0e8ff !important;
}

/* ==========================================================================
   MÖLDERS24 STICKY & RESPONSIVE SIDEBAR (KONTAKT & BERATUNG)
   ========================================================================== */

/* Parent columns alignment: align-items flex-start is required for sticky */
.entry-content .wp-block-columns:has(.moelders-sticky-sidebar) {
  align-items: flex-start !important;
  display: flex !important;
  gap: 30px !important;
}

/* Desktop: Sticky behavior */
@media (min-width: 993px) {
  .moelders-sticky-sidebar {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: calc(var(--wd-admin-bar-h, 0px) + 95px) !important;
    align-self: flex-start !important;
    flex: 0 0 30% !important;
    max-width: 30% !important;
    box-sizing: border-box !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05) !important;
    transition: box-shadow 0.25s ease !important;
    z-index: 20 !important;
  }

  .moelders-sticky-sidebar:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.09) !important;
  }

  /* Main content column on desktop */
  .entry-content .wp-block-columns:has(.moelders-sticky-sidebar) > .wp-block-column:first-child {
    flex: 0 0 calc(70% - 30px) !important;
    max-width: calc(70% - 30px) !important;
    box-sizing: border-box !important;
  }
}

/* Mobile & Tablet: Responsive Stacking */
@media (max-width: 992px) {
  .entry-content .wp-block-columns:has(.moelders-sticky-sidebar) {
    flex-direction: column !important;
    gap: 20px !important;
  }

  .entry-content .wp-block-columns:has(.moelders-sticky-sidebar) > .wp-block-column:first-child {
    width: 100% !important;
    max-width: 100% !important;
    flex-basis: 100% !important;
  }

  .moelders-sticky-sidebar {
    position: static !important;
    width: 100% !important;
    max-width: 100% !important;
    flex-basis: 100% !important;
    margin-top: 15px !important;
  }
}

/* Touch & links styling inside sidebar */
.moelders-sticky-sidebar a {
  transition: color 0.2s ease;
}

.moelders-sticky-sidebar a:hover {
  color: #0d3b94 !important;
  text-decoration: underline !important;
}

.moelders-sticky-sidebar ul li {
  padding: 6px 0 !important;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.07);
}

.moelders-sticky-sidebar ul li:last-child {
  border-bottom: none !important;
}