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

 Homepage styles live in: assets/css/home.css
 (enqueued on the front page via functions.php)
*/

/*
 * Header builder: unused bottom row stays collapsed.
 * Top bar is the site-wide trust strip.
 */
.whb-header .whb-header-bottom {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
}

.whb-header .whb-top-bar,
.whb-header .whb-top-bar.whb-hidden-desktop,
.whb-header .whb-top-bar.whb-hidden-mobile,
html[data-theme="light"] .whb-header .whb-top-bar,
html[data-theme="light"] .whb-header .whb-top-bar.whb-hidden-desktop,
html[data-theme="light"] .whb-header .whb-top-bar.whb-hidden-mobile {
  display: block !important;
  height: 42px;
  min-height: 42px;
  overflow: visible;
  padding: 0;
  margin: 0;
  /* Stay charcoal in both themes so cream/gold trust copy remains readable */
  background: #262626 !important;
  background-image: none !important;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.whb-header .whb-top-bar .container,
.whb-header .whb-top-bar .whb-flex-row,
.whb-header .whb-top-bar .whb-column {
  height: 100%;
}

.whb-header .whb-top-bar .whb-column.whb-empty-column,
.whb-header .whb-top-bar .wd-social-icons,
.whb-header .whb-top-bar .wd-header-social,
.whb-header .whb-top-bar .social-icons {
  display: none !important;
}

.whb-header .whb-top-bar .wd-header-text,
.whb-header .whb-top-bar .dd-top-trust-el {
  width: 100%;
}

.whb-header .whb-top-bar .whb-flex-row {
  justify-content: center;
}

.whb-header .whb-top-bar .whb-col-left,
.whb-header .whb-top-bar .whb-col-mobile {
  flex: 1 1 100% !important;
  max-width: 100% !important;
  width: 100% !important;
  justify-content: center;
}

.whb-header .whb-top-bar .wd-header-text p {
  margin: 0;
}

@media (max-width: 1024px) {
  .whb-header .whb-top-bar {
    height: auto;
    min-height: 40px;
  }

  .whb-header .whb-top-bar .whb-visible-lg {
    display: flex !important;
    visibility: visible !important;
  }

  .whb-header .whb-top-bar .whb-hidden-lg {
    display: none !important;
  }
}

.dd-top-trust {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.65rem 2.5rem;
  width: 100%;
  min-height: 42px;
  padding: 0.35rem 0.75rem;
  box-sizing: border-box;
}

.dd-top-trust__item,
html[data-theme="light"] .dd-top-trust__item {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: #f4f4f4 !important;
  font-family: "Montserrat", system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-transform: uppercase;
  white-space: nowrap;
}

.dd-top-trust__icon,
html[data-theme="light"] .dd-top-trust__icon {
  display: inline-flex;
  flex: 0 0 auto;
  width: 1.85rem;
  height: 1.85rem;
  color: #e9c176 !important;
}

.dd-top-trust__icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

@media (max-width: 1024px) {
  .dd-top-trust {
    gap: 0.4rem 1.15rem;
    min-height: 40px;
    padding-block: 0.4rem;
  }

  .dd-top-trust__item {
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    white-space: normal;
  }

  .dd-top-trust__icon,
  html[data-theme="light"] .dd-top-trust__icon {
    width: 1.5rem;
    height: 1.5rem;
  }
}

:root,
.whb-header,
.whb-sticky-prepared,
.whb-clone {
  --wd-top-bar-h: 42px;
  --wd-top-bar-sm-h: 40px;
  --wd-top-bar-sticky-h: 42px;
  --wd-header-bottom-h: 0px;
  --wd-header-bottom-sm-h: 0px;
  --wd-header-bottom-sticky-h: 0px;
  --wd-header-bottom-brd-w: 0px;
  --wd-header-general-h: 140px;
  --wd-header-general-sticky-h: 80px;
  --wd-header-general-sm-h: 80px;
  --wd-header-clone-h: 80px;
  --wd-header-h: 182px;
  --wd-header-sm-h: 120px;
}

/* Sticky clone: WoodMart sometimes emits --wd-header-clone-h:.00001px which
 * collapses the bar to 0 height (nav floats, no background). */
.whb-clone.whb-sticked {
  height: var(--wd-header-clone-h, 80px) !important;
  min-height: var(--wd-header-clone-h, 80px) !important;
  background-color: #141313 !important;
  background-image: none !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
}

.whb-clone.whb-sticked .whb-general-header,
.whb-clone.whb-sticked .whb-general-header-inner {
  height: var(--wd-header-clone-h, 80px) !important;
  min-height: var(--wd-header-clone-h, 80px) !important;
  background-color: #141313 !important;
  background-image: none !important;
}

.whb-clone.whb-sticked .whb-general-header-inner {
  align-items: center !important;
}

html[data-theme="light"] .whb-clone.whb-sticked,
html[data-theme="light"] .whb-clone.whb-sticked .whb-general-header,
html[data-theme="light"] .whb-clone.whb-sticked .whb-general-header-inner {
  background-color: var(--dd-theme-bg, #f3eee6) !important;
}

body.admin-bar .whb-clone.whb-sticked {
  top: 32px !important;
}

@media screen and (max-width: 782px) {
  body.admin-bar .whb-clone.whb-sticked {
    top: 46px !important;
  }
}

/* Header logos — landscape SVG must have an explicit height or WoodMart
 * flex + img[src$=".svg"]{height:100%} collapses it to 0×0.
 * Do not force display on .wd-logo — that un-hides .wd-sticky-logo. */
.whb-header .site-logo,
.whb-clone .site-logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0 !important;
  min-width: 8rem;
  max-height: 120px;
}

.whb-header .wd-main-logo,
.whb-clone .wd-main-logo,
.whb-clone.whb-sticked .wd-switch-logo .wd-sticky-logo,
.whb-sticked .wd-switch-logo .wd-sticky-logo {
  align-items: center;
  flex-shrink: 0 !important;
  min-width: 8rem;
  max-height: 120px;
}

.wd-switch-logo .wd-sticky-logo {
  display: none !important;
}

/* Only swap logos once the sticky clone is actually stuck — matching bare
 * .whb-clone hides the main mark before WoodMart measures/shows the clone. */
.whb-clone.whb-sticked .wd-switch-logo .wd-main-logo,
.whb-sticked:not(.whb-clone) .wd-switch-logo .wd-main-logo {
  display: none !important;
}

.whb-clone.whb-sticked .wd-switch-logo .wd-sticky-logo,
.whb-sticked:not(.whb-clone) .wd-switch-logo .wd-sticky-logo {
  display: inline-flex !important;
}

.whb-header .site-logo img,
.whb-header .wd-logo img,
.whb-header a.wd-logo img,
.whb-header a.site-logo img,
.whb-clone .site-logo img,
.whb-clone .wd-logo img,
.whb-header .wd-logo img[src$=".svg"],
.whb-header .site-logo img[src$=".svg"],
.whb-clone .wd-logo img[src$=".svg"],
.whb-clone .site-logo img[src$=".svg"] {
  display: block !important;
  width: auto !important;
  min-width: 8rem !important;
  max-width: min(280px, 46vw) !important;
  height: 72px !important;
  max-height: 120px !important;
  padding: 0 !important;
  object-fit: contain !important;
  aspect-ratio: auto !important;
  flex-shrink: 0 !important;
}

@media (max-width: 1024px) {
  .whb-header .site-logo,
  .whb-clone .site-logo,
  .whb-header .wd-main-logo,
  .whb-clone .wd-main-logo,
  .whb-clone.whb-sticked .wd-switch-logo .wd-sticky-logo,
  .whb-sticked .wd-switch-logo .wd-sticky-logo {
    min-width: 6.5rem;
    max-height: 56px;
  }

  .whb-header .site-logo img,
  .whb-header .wd-logo img,
  .whb-header a.wd-logo img,
  .whb-header a.site-logo img,
  .whb-clone .site-logo img,
  .whb-clone .wd-logo img,
  .whb-header .wd-logo img[src$=".svg"],
  .whb-header .site-logo img[src$=".svg"],
  .whb-clone .wd-logo img[src$=".svg"],
  .whb-clone .site-logo img[src$=".svg"] {
    min-width: 6.5rem !important;
    max-width: min(200px, 55vw) !important;
    height: 48px !important;
    max-height: 56px !important;
  }
}

@media (max-width: 1024px) {
  :root,
  .whb-header,
  .whb-sticky-prepared,
  .whb-clone {
    --wd-header-h: 120px;
    --wd-header-sm-h: 120px;
    --wd-header-general-h: 80px;
    --wd-header-general-sticky-h: 72px;
    --wd-header-clone-h: 72px;
  }
}

/* Header tools: account / wishlist / cart / search (main + sticky clone) */
:is(.whb-header, .whb-clone) .wd-tools-element {
  --wd-header-el-color: #f4f4f4;
  --wd-header-el-color-hover: #e9c176;
}

:is(.whb-header, .whb-clone) .wd-tools-element > a,
:is(.whb-header, .whb-clone) .wd-tools-element .wd-tools-icon,
:is(.whb-header, .whb-clone) .wd-tools-element [class*="wd-tools-text"],
:is(.whb-header, .whb-clone) .wd-tools-element .wd-cart-subtotal,
:is(.whb-header, .whb-clone) .wd-tools-element .wd-cart-number,
:is(.whb-header, .whb-clone) .wd-header-cart .cart-widget-side,
:is(.whb-header, .whb-clone) .wd-header-cart .wd-cart-subtotal .amount {
  color: #f4f4f4 !important;
  fill: currentColor;
  stroke: currentColor;
  transition: color 0.2s ease, fill 0.2s ease, stroke 0.2s ease;
}

:is(.whb-header, .whb-clone) .wd-tools-element:hover > a,
:is(.whb-header, .whb-clone) .wd-tools-element:hover .wd-tools-icon,
:is(.whb-header, .whb-clone) .wd-tools-element:hover [class*="wd-tools-text"],
:is(.whb-header, .whb-clone) .wd-tools-element:hover .wd-cart-subtotal,
:is(.whb-header, .whb-clone) .wd-tools-element:hover .wd-cart-subtotal .amount {
  color: #e9c176 !important;
}

/* Light header tools — ink icons on cream */
html[data-theme="light"] :is(.whb-header, .whb-clone) .wd-tools-element {
  --wd-header-el-color: #1c1916;
  --wd-header-el-color-hover: #8c6d3e;
}

html[data-theme="light"] :is(.whb-header, .whb-clone) .wd-tools-element > a,
html[data-theme="light"] :is(.whb-header, .whb-clone) .wd-tools-element .wd-tools-icon,
html[data-theme="light"] :is(.whb-header, .whb-clone) .wd-tools-element [class*="wd-tools-text"],
html[data-theme="light"] :is(.whb-header, .whb-clone) .wd-tools-element .wd-cart-subtotal,
html[data-theme="light"] :is(.whb-header, .whb-clone) .wd-tools-element .wd-cart-number,
html[data-theme="light"] :is(.whb-header, .whb-clone) .wd-header-cart .wd-cart-subtotal .amount {
  color: #1c1916 !important;
}

html[data-theme="light"] :is(.whb-header, .whb-clone) .wd-tools-element:hover > a,
html[data-theme="light"] :is(.whb-header, .whb-clone) .wd-tools-element:hover .wd-tools-icon,
html[data-theme="light"] :is(.whb-header, .whb-clone) .wd-tools-element:hover [class*="wd-tools-text"],
html[data-theme="light"] :is(.whb-header, .whb-clone) .wd-tools-element:hover .wd-cart-subtotal,
html[data-theme="light"] :is(.whb-header, .whb-clone) .wd-tools-element:hover .wd-cart-subtotal .amount {
  color: #8c6d3e !important;
}

:is(.whb-header, .whb-clone) .wd-tools-element .wd-tools-icon svg,
:is(.whb-header, .whb-clone) .wd-tools-element .wd-tools-icon svg *,
:is(.whb-header, .whb-clone) .wd-tools-element .wd-custom-icon,
:is(.whb-header, .whb-clone) .wd-tools-element .wd-custom-icon img {
  color: inherit !important;
  fill: currentColor !important;
  opacity: 1 !important;
}

:is(.whb-header, .whb-clone) .wd-tools-element:hover .wd-custom-icon {
  opacity: 1 !important;
}

/* Cart / wishlist count badges */
:is(.whb-header, .whb-clone) .wd-tools-element .wd-tools-count {
  background-color: #e9c176 !important;
  color: #050505 !important;
}

/* —— Quick View: ATC + View Details (ghost buttons) —— */
.popup-quick-view .single_add_to_cart_button,
.popup-quick-view .single_add_to_cart_button.button,
.popup-quick-view .single_add_to_cart_button.alt,
.popup-quick-view .btn.view-details-btn,
.popup-quick-view .view-details-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 3rem !important;
  padding: 0.75rem 1.25rem !important;
  box-sizing: border-box;
  background: transparent !important;
  color: #f4f4f4 !important;
  border: 1px solid #f4f4f4 !important;
  border-radius: 0.25rem !important;
  font-family: "Montserrat", system-ui, sans-serif !important;
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  box-shadow: none !important;
  text-decoration: none !important;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}

.popup-quick-view .single_add_to_cart_button:hover,
.popup-quick-view .single_add_to_cart_button.button:hover,
.popup-quick-view .single_add_to_cart_button.alt:hover,
.popup-quick-view .btn.view-details-btn:hover,
.popup-quick-view .view-details-btn:hover {
  background: #f4f4f4 !important;
  color: #141313 !important;
  border-color: #f4f4f4 !important;
  box-shadow: none !important;
}

/* View Details lives outside the carousel (see child quick-view template) */
.popup-quick-view .wd-gallery-images > .btn.view-details-btn,
.popup-quick-view .wd-gallery-images > .view-details-btn {
  position: static !important;
  inset: auto !important;
  transform: none !important;
  width: 100% !important;
  margin-top: 1rem !important;
}

.popup-quick-view .cart .quantity {
  --wd-form-brd-color: #f4f4f4;
  --wd-form-brd-color-focus: #e9c176;
  --wd-form-color: #f4f4f4;
  --wd-form-bg: transparent;
}

.popup-quick-view .cart .quantity input.qty,
.popup-quick-view .cart .quantity .wd-quantity-btn,
.popup-quick-view .cart .quantity .minus,
.popup-quick-view .cart .quantity .plus {
  background: transparent !important;
  color: #f4f4f4 !important;
  border-color: #f4f4f4 !important;
  box-shadow: none !important;
}

.popup-quick-view .cart .quantity .wd-quantity-btn:hover,
.popup-quick-view .cart .quantity .minus:hover,
.popup-quick-view .cart .quantity .plus:hover {
  color: #e9c176 !important;
  border-color: #e9c176 !important;
}

/* Global qty — single bordered frame, open interior (all product qty UIs) */
div.quantity,
.quantity {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: space-between;
  height: 3rem !important;
  width: 8rem !important;
  min-width: 8rem !important;
  margin: 0 !important;
  padding: 0 0.15rem !important;
  border: 1px solid #353434 !important;
  border-radius: 0.25rem !important;
  background: #1a1a1a !important;
  overflow: hidden;
  box-shadow: none !important;
  gap: 0 !important;
}

div.quantity input.qty,
div.quantity .qty,
.quantity input.qty,
.quantity .qty {
  width: 2.75rem !important;
  min-width: 0 !important;
  flex: 1 1 auto;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  text-align: center !important;
  color: #f4f4f4 !important;
  font-size: 0.95rem !important;
  appearance: textfield;
  -moz-appearance: textfield;
}

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

div.quantity .btn,
div.quantity .button,
div.quantity .wd-quantity-btn,
div.quantity .minus,
div.quantity .plus,
.quantity .btn,
.quantity .wd-quantity-btn,
.quantity .minus,
.quantity .plus {
  width: 2.35rem !important;
  min-width: 2.35rem !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  color: #c4c7c7 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

div.quantity .minus:hover,
div.quantity .plus:hover,
div.quantity .wd-quantity-btn:hover,
.quantity .minus:hover,
.quantity .plus:hover,
.quantity .wd-quantity-btn:hover {
  color: #e9c176 !important;
  background: transparent !important;
  border: 0 !important;
}

html[data-theme="light"] div.quantity,
html[data-theme="light"] .quantity {
  border-color: #c4c7c7 !important;
  background: #f5f3ee !important;
}

html[data-theme="light"] div.quantity input.qty,
html[data-theme="light"] div.quantity .qty,
html[data-theme="light"] .quantity input.qty {
  color: #1a1a1a !important;
}

html[data-theme="light"] div.quantity .minus,
html[data-theme="light"] div.quantity .plus,
html[data-theme="light"] div.quantity .wd-quantity-btn,
html[data-theme="light"] .quantity .minus,
html[data-theme="light"] .quantity .plus,
html[data-theme="light"] .quantity .wd-quantity-btn {
  color: #4a4947 !important;
}
