/* ShopManagezer */

:root {
  --smz-card-radius: 10px;
  --smz-row-height: 64px;
  --smz-title-size-desktop: 16px;
  --smz-title-size-mobile: 14px;
  --smz-price-size-desktop: 20px;
  --smz-price-size-mobile: 16px;
  --smz-button-size-desktop: 17px;
  --smz-button-size-mobile: 13px;
  --smz-button-bg: #2389da;
  --smz-button-text: #ffffff;
  --smz-price-color: #334155;
}

/* Targets classic WooCommerce and Woo blocks product grids */
ul.products li.product,
ul.wc-block-grid__products li.wc-block-grid__product,
ul.wc-block-product-template li.wc-block-product {
  position: relative !important;
  background: #fff !important;
  border: 1px solid #e7ebf1 !important;
  border-radius: var(--smz-card-radius) !important;
  overflow: hidden !important;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06) !important;
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  padding-bottom: var(--smz-row-height) !important;
  margin-bottom: 14px !important;
}

ul.products,
ul.wc-block-grid__products,
ul.wc-block-product-template {
  row-gap: 14px !important;
}

ul.products li.product img,
ul.wc-block-grid__products li.wc-block-grid__product img,
ul.wc-block-product-template li.wc-block-product img {
  width: 100% !important;
  max-height: 320px !important;
  object-fit: contain !important;
  display: block !important;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title,
ul.wc-block-product-template li.wc-block-product .wp-block-post-title,
ul.wc-block-grid__products li.wc-block-grid__product .wp-block-post-title {
  font-size: var(--smz-title-size-desktop) !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
  color: #0f172a !important;
  padding: 12px 14px 0 !important;
  margin: 0 !important;
  text-align: center !important;
}

ul.products li.product .price {
  position: absolute !important;
  left: 0 !important;
  bottom: 0 !important;
  width: 50% !important;
  min-height: var(--smz-row-height) !important;
  margin: 0 !important;
  padding: 0 14px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  border-top: 1px solid #edf1f7 !important;
  background: #fff !important;
  color: var(--smz-price-color) !important;
  font-size: var(--smz-price-size-desktop) !important;
  font-weight: 700 !important;
}

ul.products li.product .add_to_cart_button,
ul.products li.product .button {
  position: absolute !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 50% !important;
  min-height: var(--smz-row-height) !important;
  margin: 0 !important;
  border-radius: 0 !important;
  border: 0 !important;
  background: var(--smz-button-bg) !important;
  color: var(--smz-button-text) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  font-size: var(--smz-button-size-desktop) !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  line-height: 1.15 !important;
  padding: 8px !important;
}

ul.wc-block-product-template li.wc-block-product .wp-block-woocommerce-product-price,
ul.wc-block-grid__products li.wc-block-grid__product .wp-block-woocommerce-product-price {
  position: absolute !important;
  left: 0 !important;
  bottom: 0 !important;
  width: 50% !important;
  min-height: var(--smz-row-height) !important;
  margin: 0 !important;
  padding: 0 14px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  border-top: 1px solid #edf1f7 !important;
  background: #fff !important;
  color: var(--smz-price-color) !important;
  font-size: var(--smz-price-size-desktop) !important;
  font-weight: 700 !important;
}

ul.wc-block-product-template li.wc-block-product .wp-block-woocommerce-product-button,
ul.wc-block-grid__products li.wc-block-grid__product .wp-block-woocommerce-product-button {
  position: absolute !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 50% !important;
  min-height: var(--smz-row-height) !important;
  margin: 0 !important;
  padding: 0 !important;
}

ul.wc-block-product-template li.wc-block-product .wp-block-woocommerce-product-button .wc-block-components-product-button__button,
ul.wc-block-product-template li.wc-block-product .wp-block-woocommerce-product-button .wp-block-button__link,
ul.wc-block-grid__products li.wc-block-grid__product .wp-block-woocommerce-product-button .wc-block-components-product-button__button,
ul.wc-block-grid__products li.wc-block-grid__product .wp-block-woocommerce-product-button .wp-block-button__link {
  width: 100% !important;
  min-height: var(--smz-row-height) !important;
  margin: 0 !important;
  border-radius: 0 !important;
  border: 0 !important;
  background: var(--smz-button-bg) !important;
  color: var(--smz-button-text) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  font-size: var(--smz-button-size-desktop) !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  line-height: 1.15 !important;
  padding: 8px !important;
}

/* Tablet */
@media (max-width: 992px) {
  ul.products li.product,
  ul.wc-block-grid__products li.wc-block-grid__product,
  ul.wc-block-product-template li.wc-block-product {
    padding-bottom: calc(var(--smz-row-height) - 6px) !important;
  }

  ul.products li.product img,
  ul.wc-block-grid__products li.wc-block-grid__product img,
  ul.wc-block-product-template li.wc-block-product img {
    max-height: 260px !important;
  }
}

/* Mobile */
@media (max-width: 767px) {
  ul.products li.product,
  ul.wc-block-grid__products li.wc-block-grid__product,
  ul.wc-block-product-template li.wc-block-product {
    padding-bottom: var(--smz-row-height) !important;
  }

  ul.products li.product img,
  ul.wc-block-grid__products li.wc-block-grid__product img,
  ul.wc-block-product-template li.wc-block-product img {
    max-height: 210px !important;
  }

  .woocommerce ul.products li.product .woocommerce-loop-product__title,
  ul.wc-block-product-template li.wc-block-product .wp-block-post-title,
  ul.wc-block-grid__products li.wc-block-grid__product .wp-block-post-title {
    font-size: var(--smz-title-size-mobile) !important;
    padding: 10px 10px 0 !important;
  }

  ul.products li.product .price,
  ul.wc-block-product-template li.wc-block-product .wp-block-woocommerce-product-price,
  ul.wc-block-grid__products li.wc-block-grid__product .wp-block-woocommerce-product-price {
    width: 46% !important;
    min-height: var(--smz-row-height) !important;
    padding: 0 10px !important;
    font-size: var(--smz-price-size-mobile) !important;
  }

  ul.products li.product .add_to_cart_button,
  ul.products li.product .button,
  ul.wc-block-product-template li.wc-block-product .wp-block-woocommerce-product-button,
  ul.wc-block-grid__products li.wc-block-grid__product .wp-block-woocommerce-product-button {
    width: 54% !important;
    min-height: var(--smz-row-height) !important;
  }

  ul.wc-block-product-template li.wc-block-product .wp-block-woocommerce-product-button .wc-block-components-product-button__button,
  ul.wc-block-product-template li.wc-block-product .wp-block-woocommerce-product-button .wp-block-button__link,
  ul.wc-block-grid__products li.wc-block-grid__product .wp-block-woocommerce-product-button .wc-block-components-product-button__button,
  ul.wc-block-grid__products li.wc-block-grid__product .wp-block-woocommerce-product-button .wp-block-button__link,
  ul.products li.product .add_to_cart_button,
  ul.products li.product .button {
    font-size: var(--smz-button-size-mobile) !important;
    padding: 6px !important;
  }

}

@media (max-width: 480px) {
  /* Extra-small mobile: show cart icon instead of text */
  ul.wc-block-product-template li.wc-block-product .wp-block-woocommerce-product-button .wc-block-components-product-button__button,
  ul.wc-block-product-template li.wc-block-product .wp-block-woocommerce-product-button .wp-block-button__link,
  ul.wc-block-grid__products li.wc-block-grid__product .wp-block-woocommerce-product-button .wc-block-components-product-button__button,
  ul.wc-block-grid__products li.wc-block-grid__product .wp-block-woocommerce-product-button .wp-block-button__link,
  ul.products li.product .add_to_cart_button,
  ul.products li.product .button {
    font-size: 0 !important;
    letter-spacing: 0 !important;
    position: relative;
    color: transparent !important;
    text-indent: -9999px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
  }

  ul.wc-block-product-template li.wc-block-product .wp-block-woocommerce-product-button .wc-block-components-product-button__button::before,
  ul.wc-block-product-template li.wc-block-product .wp-block-woocommerce-product-button .wp-block-button__link::before,
  ul.wc-block-grid__products li.wc-block-grid__product .wp-block-woocommerce-product-button .wc-block-components-product-button__button::before,
  ul.wc-block-grid__products li.wc-block-grid__product .wp-block-woocommerce-product-button .wp-block-button__link::before,
  ul.products li.product .add_to_cart_button::before,
  ul.products li.product .button::before {
    content: "\1F6D2";
    font-size: 18px;
    line-height: 1;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    text-indent: 0;
    color: var(--smz-button-text) !important;
  }

  /* Final hard override to prevent text from reappearing */
  .wc-block-components-product-button__button > span,
  .wp-block-button__link > span,
  .add_to_cart_button > span,
  .button > span {
    display: none !important;
  }

  .wc-block-components-product-button__button {
    color: transparent !important;
  }
}

/* Hard mobile fallback: prevent overlap + force cart icon button */
@media (max-width: 767px) {
  ul.products,
  ul.wc-block-grid__products,
  ul.wc-block-product-template {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 14px !important;
  }

  ul.products li.product,
  ul.wc-block-grid__products li.wc-block-grid__product,
  ul.wc-block-product-template li.wc-block-product {
    margin: 0 !important;
    padding-bottom: calc(var(--smz-row-height) + 6px) !important;
    height: auto !important;
  }

  ul.products li.product .price,
  ul.wc-block-product-template li.wc-block-product .wp-block-woocommerce-product-price,
  ul.wc-block-grid__products li.wc-block-grid__product .wp-block-woocommerce-product-price,
  ul.products li.product .add_to_cart_button,
  ul.products li.product .button,
  ul.wc-block-product-template li.wc-block-product .wp-block-woocommerce-product-button,
  ul.wc-block-grid__products li.wc-block-grid__product .wp-block-woocommerce-product-button,
  ul.wc-block-product-template li.wc-block-product .wp-block-woocommerce-product-button .wc-block-components-product-button__button,
  ul.wc-block-product-template li.wc-block-product .wp-block-woocommerce-product-button .wp-block-button__link,
  ul.wc-block-grid__products li.wc-block-grid__product .wp-block-woocommerce-product-button .wc-block-components-product-button__button,
  ul.wc-block-grid__products li.wc-block-grid__product .wp-block-woocommerce-product-button .wp-block-button__link {
    min-height: var(--smz-row-height) !important;
    max-height: var(--smz-row-height) !important;
    height: var(--smz-row-height) !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  ul.products li.product .add_to_cart_button,
  ul.products li.product .button,
  ul.wc-block-product-template li.wc-block-product .wp-block-woocommerce-product-button .wc-block-components-product-button__button,
  ul.wc-block-product-template li.wc-block-product .wp-block-woocommerce-product-button .wp-block-button__link,
  ul.wc-block-grid__products li.wc-block-grid__product .wp-block-woocommerce-product-button .wc-block-components-product-button__button,
  ul.wc-block-grid__products li.wc-block-grid__product .wp-block-woocommerce-product-button .wp-block-button__link {
    position: relative !important;
    font-size: 0 !important;
    color: transparent !important;
    text-indent: -9999px !important;
    letter-spacing: 0 !important;
    white-space: nowrap !important;
  }

  ul.products li.product .add_to_cart_button *,
  ul.products li.product .button *,
  ul.wc-block-product-template li.wc-block-product .wp-block-woocommerce-product-button .wc-block-components-product-button__button *,
  ul.wc-block-product-template li.wc-block-product .wp-block-woocommerce-product-button .wp-block-button__link *,
  ul.wc-block-grid__products li.wc-block-grid__product .wp-block-woocommerce-product-button .wc-block-components-product-button__button *,
  ul.wc-block-grid__products li.wc-block-grid__product .wp-block-woocommerce-product-button .wp-block-button__link * {
    display: none !important;
  }

  ul.products li.product .add_to_cart_button::before,
  ul.products li.product .button::before,
  ul.wc-block-product-template li.wc-block-product .wp-block-woocommerce-product-button .wc-block-components-product-button__button::before,
  ul.wc-block-product-template li.wc-block-product .wp-block-woocommerce-product-button .wp-block-button__link::before,
  ul.wc-block-grid__products li.wc-block-grid__product .wp-block-woocommerce-product-button .wc-block-components-product-button__button::before,
  ul.wc-block-grid__products li.wc-block-grid__product .wp-block-woocommerce-product-button .wp-block-button__link::before {
    content: "\1F6D2" !important;
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    font-size: 18px !important;
    line-height: 1 !important;
    color: var(--smz-button-text) !important;
    text-indent: 0 !important;
    display: block !important;
  }
}

/* Final lock: bottom row same height on every card */
ul.products li.product .price,
ul.wc-block-product-template li.wc-block-product .wp-block-woocommerce-product-price,
ul.wc-block-grid__products li.wc-block-grid__product .wp-block-woocommerce-product-price,
ul.products li.product .add_to_cart_button,
ul.products li.product .button,
ul.wc-block-product-template li.wc-block-product .wp-block-woocommerce-product-button,
ul.wc-block-grid__products li.wc-block-grid__product .wp-block-woocommerce-product-button,
ul.wc-block-product-template li.wc-block-product .wp-block-woocommerce-product-button .wc-block-components-product-button__button,
ul.wc-block-product-template li.wc-block-product .wp-block-woocommerce-product-button .wp-block-button__link,
ul.wc-block-grid__products li.wc-block-grid__product .wp-block-woocommerce-product-button .wc-block-components-product-button__button,
ul.wc-block-grid__products li.wc-block-grid__product .wp-block-woocommerce-product-button .wp-block-button__link {
  min-height: var(--smz-row-height) !important;
  height: var(--smz-row-height) !important;
  max-height: var(--smz-row-height) !important;
  box-sizing: border-box !important;
}

/* Action icons: wishlist / compare / quick view */
.smz-action-icons {
  position: absolute;
  top: 12px;
  right: 10px;
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.smz-badges {
  position: absolute;
  top: 12px;
  left: 10px;
  z-index: 31;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
  max-width: calc(100% - 56px);
}

.smz-badge {
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
  white-space: nowrap;
}

.smz-badge-new {
  background: #0ea5e9;
}

.smz-badge-instock {
  background: #16a34a;
}

.smz-badge-outofstock {
  background: #dc2626;
}

.smz-badge-sale {
  background: #f97316;
}

.smz-badge-shipping {
  background: #0284c7;
}

.smz-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.96);
  color: #475569;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.12);
  transition: transform 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}

.smz-icon svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.smz-icon:hover {
  transform: scale(1.06);
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.18);
}

.smz-icon.is-active.smz-wishlist {
  color: #dc2626;
}

.smz-icon.is-active.smz-compare {
  color: #0284c7;
}

.smz-launchers {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 2147483647;
  display: flex;
  gap: 8px;
  pointer-events: auto;
}

.smz-launchers.smz-near-cart {
  position: absolute;
  z-index: 2147483647;
}

.smz-launcher {
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #0f172a;
  border-radius: 999px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(2, 6, 23, 0.12);
}

.smz-compare-bar {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 12px;
  background: #0f172a;
  color: #fff;
  border-radius: 10px;
  padding: 10px 12px;
  box-shadow: 0 8px 20px rgba(2, 6, 23, 0.3);
}

.smz-compare-bar[hidden] {
  display: none !important;
}

.smz-compare-go {
  border: 0;
  background: #22c55e;
  color: #052e16;
  font-weight: 700;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
}

.smz-count {
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #0f172a;
  color: #fff;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}

.smz-toast-stack {
  position: fixed;
  top: 56px;
  right: 12px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.smz-toast {
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  background: #0f172a;
  color: #fff;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  box-shadow: 0 8px 20px rgba(2, 6, 23, 0.25);
}

.smz-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 767px) {
  .smz-action-icons {
    top: 8px;
    right: 8px;
    gap: 6px;
  }

  .smz-badges {
    top: 8px;
    left: 8px;
    gap: 5px;
  }

  .smz-badge {
    font-size: 10px;
    padding: 3px 8px;
  }

  .smz-icon {
    width: 30px;
    height: 30px;
  }

  .smz-launchers {
    top: 8px;
    right: 8px;
    gap: 6px;
  }

  .smz-compare-bar {
    top: 48px;
    left: 8px;
    right: 8px;
    gap: 8px;
    justify-content: space-between;
    padding: 8px 10px;
  }

  .smz-launcher {
    font-size: 11px;
    padding: 7px 8px;
  }

  .smz-toast-stack {
    top: 92px;
    right: 8px;
  }
}

body.smz-ui-open {
  overflow: hidden;
}

.smz-modal-overlay,
.smz-sidepanel-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.5);
  z-index: 9998;
}

.smz-modal-overlay[hidden],
.smz-sidepanel-overlay[hidden],
.smz-sidepanel[hidden] {
  display: none !important;
}

.smz-modal {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(920px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(2, 6, 23, 0.4);
  overflow: auto;
}

.smz-modal .smz-close {
  position: sticky;
  top: 0;
  float: right;
  width: 38px;
  height: 38px;
  border: 0;
  background: #fff;
  font-size: 26px;
  cursor: pointer;
  z-index: 2;
}

.smz-modal-body {
  padding: 16px 20px 20px;
}

.smz-qv-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.smz-qv-image img {
  width: 100%;
  height: auto;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
}

.smz-qv-content h3 {
  margin: 0 0 12px;
  font-size: 22px;
}

.smz-qv-price {
  font-size: 24px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 12px;
}

.smz-qv-desc {
  color: #475569;
  line-height: 1.45;
}

.smz-qv-actions {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.smz-qv-actions .button {
  border-radius: 8px !important;
}

.smz-compare-title {
  margin: 0 0 12px;
}

.smz-compare-wrap {
  overflow: auto;
}

.smz-compare-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

.smz-compare-table th,
.smz-compare-table td {
  border: 1px solid #e2e8f0;
  padding: 10px;
  vertical-align: top;
  text-align: left;
  background: #fff;
}

.smz-compare-table th {
  background: #f8fafc;
  position: sticky;
  top: 0;
  z-index: 1;
}

.smz-compare-img {
  width: 68px;
  height: 68px;
  object-fit: contain;
}

.smz-sidepanel {
  position: fixed;
  top: 0;
  right: 0;
  width: min(420px, 92vw);
  height: 100vh;
  background: #fff;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  box-shadow: -12px 0 30px rgba(2, 6, 23, 0.22);
}

.smz-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #e5e7eb;
}

.smz-panel-head h3 {
  margin: 0;
  font-size: 18px;
}

.smz-panel-head .smz-close {
  width: 36px;
  height: 36px;
  border: 0;
  background: #fff;
  font-size: 24px;
  cursor: pointer;
}

.smz-panel-body {
  padding: 12px;
  overflow: auto;
}

.smz-empty-state {
  color: #64748b;
}

.smz-side-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.smz-list-item {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 10px;
  align-items: center;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 8px;
}

.smz-list-thumb img {
  width: 72px;
  height: 72px;
  object-fit: contain;
}

.smz-list-title {
  color: #0f172a;
  text-decoration: none;
  font-weight: 600;
  line-height: 1.2;
}

.smz-list-price {
  margin-top: 6px;
  color: #334155;
  font-weight: 700;
}

.smz-remove-item {
  width: 28px;
  height: 28px;
  border: 1px solid #cbd5e1;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

@media (max-width: 767px) {
  .smz-modal {
    width: calc(100vw - 16px);
  }

  .smz-modal-body {
    padding: 12px;
  }

  .smz-qv-layout {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}
