/* TDSD product cards: scoped to the shared WooCommerce loop template. */
ul.products li.product.tdsd-product-card,
ul.products li.product.tdsd-product-card:hover {
  box-sizing: border-box;
  min-width: 0;
  border: 3px solid #000 !important;
  background: #fff !important;
}

ul.products li.product.tdsd-product-card .price-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
  min-width: 0;
}

ul.products li.product.tdsd-product-card .price-block > .price-row {
  order: 0;
  margin-bottom: 0;
}

ul.products li.product.tdsd-product-card .price-block > .sku {
  order: 1;
  margin: 0;
  overflow-wrap: anywhere;
}

/* RTL puts the first item (Buy Now) on the right. The cart stays tappable. */
ul.products li.product.tdsd-product-card .tdsd-card-actions {
  order: 2;
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 1fr);
  gap: 4px;
  direction: rtl;
  align-items: start;
  width: 100%;
  min-width: 0;
  margin: 0;
}

ul.products li.product.tdsd-product-card .tdsd-card-actions > .add {
  position: relative;
  display: flex !important;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100% !important;
  min-width: 0;
  height: 48px;
  min-height: 48px;
  margin: 0 !important;
  padding: 4px 6px;
  float: none;
  border-radius: 6px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  text-decoration: none !important;
  box-shadow: none !important;
  transition: background-color .15s ease, box-shadow .15s ease, opacity .15s ease;
}

ul.products li.product.tdsd-product-card .tdsd-card-actions > .add.buy-now {
  grid-column: 1;
  grid-row: 1;
  padding: 0 2px !important;
  border: 0 !important;
  background: #10104a !important;
  color: #fff !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  letter-spacing: 0;
  white-space: normal;
  line-height: 1.15;
  word-break: normal;
  overflow-wrap: normal;
}

ul.products li.product.tdsd-product-card .tdsd-card-actions > .add.buy-now:hover,
ul.products li.product.tdsd-product-card .tdsd-card-actions > .add.buy-now:active {
  background: #23236b !important;
  color: #fff !important;
}

ul.products li.product.tdsd-product-card .tdsd-card-actions > .add.tdsd-card-cart {
  grid-column: 2;
  grid-row: 1;
  min-width: 44px;
  padding: 0 !important;
  border: 0 !important;
  background: #000098 !important;
  color: #000 !important;
}

ul.products li.product.tdsd-product-card .tdsd-card-actions > .add.tdsd-card-cart:hover,
ul.products li.product.tdsd-product-card .tdsd-card-actions > .add.tdsd-card-cart:active {
  background: #ea580c !important;
  color: #000 !important;
}

ul.products li.product.tdsd-product-card .tdsd-card-actions > .tdsd-card-cart svg {
  display: block;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  margin: 0;
  color: inherit;
}

ul.products li.product.tdsd-product-card .tdsd-card-actions > .add:focus-visible,
ul.products li.product.tdsd-product-card .tdsd-card-actions > .added_to_cart:focus-visible {
  outline: 3px solid #111 !important;
  outline-offset: 2px;
}

/* Quote, product-options and unavailable-product links keep their text/colors. */
ul.products li.product.tdsd-product-card .tdsd-card-actions-single {
  grid-template-columns: minmax(0, 1fr);
}

ul.products li.product.tdsd-product-card .tdsd-card-actions.tdsd-card-actions-single > .add {
  grid-column: 1 / -1;
  grid-row: 1;
  font-size: 14px;
  white-space: normal;
}

/* WooCommerce may insert this link after an AJAX add; give it its own row. */
ul.products li.product.tdsd-product-card .tdsd-card-actions > .added_to_cart {
  grid-column: 1 / -1;
  grid-row: 2;
  display: flex !important;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  width: 100%;
  margin: 0;
  padding: 4px 6px;
  border-radius: 4px;
  background: #ecfdf3;
  color: #14532d;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  text-decoration: underline;
}

ul.products li.product.tdsd-product-card .tdsd-card-cart.loading {
  cursor: wait;
  opacity: .85;
}

ul.products li.product.tdsd-product-card .tdsd-card-actions:not(.tdsd-card-actions-single) > .tdsd-card-cart.loading svg,
ul.products li.product.tdsd-product-card .tdsd-card-actions:not(.tdsd-card-actions-single) > .tdsd-card-cart.added:not(.loading) svg {
  opacity: 0;
}

ul.products li.product.tdsd-product-card .tdsd-card-actions:not(.tdsd-card-actions-single) > .tdsd-card-cart.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: tdsd-product-card-spin .7s linear infinite;
}

ul.products li.product.tdsd-product-card .tdsd-card-actions:not(.tdsd-card-actions-single) > .tdsd-card-cart.added:not(.loading)::after {
  content: "\2713";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  font-family: Arial, sans-serif;
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  color: #000;
}

ul.products li.product.tdsd-product-card .tdsd-card-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@keyframes tdsd-product-card-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 360px) {
  ul.products li.product.tdsd-product-card {
    padding-inline: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  ul.products li.product.tdsd-product-card .tdsd-card-actions > .add {
    transition: none;
  }

  ul.products li.product.tdsd-product-card .tdsd-card-actions:not(.tdsd-card-actions-single) > .tdsd-card-cart.loading::after {
    animation: none;
  }
}

/* Shared TDSD surfaces. The body class is restricted to the tdsd-child theme. */
body.tdsd-ui-design {
  background: #fff;
}

body.tdsd-ui-design :is(
  .hero-c,
  .hero-slider,
  .hero-banner,
  .sub-banner,
  .product-page > .product-gallery,
  .product-page > .product-info,
  .spec-card,
  .product-overview-card,
  .product-info .installments,
  .product-info .ship-badges > .sb,
  .product-info .norton-row,
  .trust-card,
  .pop-cat,
  .brand-cell,
  .rv-card,
  .brand-tiles > .btile,
  .shop-sidebar > .filter-card,
  .shop-main > .shop-toolbar,
  .shop-main > .no-products,
  .tdsd-page .faq-item,
  .tdsd-ui-panel
) {
  box-sizing: border-box;
  min-width: 0;
  background: #fff !important;
  border: 3px solid #000 !important;
}

body.tdsd-ui-design .tdsd-ui-panel {
  border-radius: 12px;
}

/* The main hero displays product cutouts on white. Banner <img> elements and
   their contrast overlays keep their existing appearance. */
body.tdsd-ui-design .hero-slider .hero-slide {
  background: #fff;
}

/* Actual drawer/dropdown surfaces from the theme. Overlay backdrops retain
   their existing transparency, visibility and positioning. */
body.tdsd-ui-design #mcDrawer,
body.tdsd-ui-design #mcDrawer .woocommerce-mini-cart-item,
body.tdsd-ui-design .cats-panel,
body.tdsd-ui-design .ls-panel,
body.tdsd-ui-design .navbar .nav-sub,
body.tdsd-ui-design .cat-rail .rail-fly,
body.tdsd-ui-design #tdsdLb > img {
  box-sizing: border-box;
  background: #fff !important;
  border: 3px solid #000 !important;
}

body.tdsd-ui-design #mcDrawer .woocommerce-mini-cart-item {
  min-height: 96px;
  margin-bottom: 12px;
  padding: 12px 30px 12px 12px;
  border-radius: 8px;
}

body.tdsd-ui-design #tdsdLb > img {
  border-radius: 8px;
}

/* These are outer cart/checkout panels, not payment-provider controls. */
body.tdsd-ui-design.woocommerce-cart .woocommerce-cart-form,
body.tdsd-ui-design.woocommerce-cart .cart_totals,
body.tdsd-ui-design.woocommerce-checkout #td-cart-card,
body.tdsd-ui-design.woocommerce-checkout .td-step,
body.tdsd-ui-design.woocommerce-checkout .td-step.is-active,
body.tdsd-ui-design.woocommerce-checkout #payment,
body.tdsd-ui-design.woocommerce-checkout form.checkout:not(.td-preview-ready) .woocommerce-billing-fields,
body.tdsd-ui-design.woocommerce-checkout form.checkout:not(.td-preview-ready) .woocommerce-shipping-fields,
body.tdsd-ui-design.woocommerce-checkout form.checkout:not(.td-preview-ready) .woocommerce-additional-fields {
  box-sizing: border-box;
  min-width: 0;
  background: #fff !important;
  border: 3px solid #000 !important;
  border-radius: 8px;
}

body.tdsd-ui-design.woocommerce-cart .woocommerce-cart-form,
body.tdsd-ui-design.woocommerce-cart .cart_totals,
body.tdsd-ui-design.woocommerce-checkout form.checkout:not(.td-preview-ready) .woocommerce-billing-fields,
body.tdsd-ui-design.woocommerce-checkout form.checkout:not(.td-preview-ready) .woocommerce-shipping-fields,
body.tdsd-ui-design.woocommerce-checkout form.checkout:not(.td-preview-ready) .woocommerce-additional-fields {
  padding: 16px;
}

body.tdsd-ui-design .fs-bar,
body.tdsd-ui-design .fs-bar.done {
  background: #fff;
  border: 3px solid #000;
}

body.tdsd-ui-design .fs-bar.tdsd-commerce-notice {
  display: block !important;
  font-size: 16px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

/* A 226px card leaves more than 180px for the exact 3:1 action row.
   The grid reduces its column count instead of shrinking a cart touch target. */
body.tdsd-ui-design .woocommerce ul.products,
body.tdsd-ui-design.woocommerce-page ul.products {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 226px), 1fr)) !important;
}

body.tdsd-ui-design :is(.shop-main, .shop-sidebar, .product-page, .header-in, .header-in > *, .search-row) {
  min-width: 0;
}

body.tdsd-ui-design .shop-main {
  max-width: 100%;
}

body.tdsd-ui-design.single-product .product-page {
  grid-template-columns: minmax(0, 1fr) minmax(0, 430px);
}

body.tdsd-ui-design.single-product .product-info h1,
body.tdsd-ui-design.single-product .product-info .meta-row .val,
body.tdsd-ui-design.single-product .product-overview-card .body,
body.tdsd-ui-design.single-product .spec-table .v {
  overflow-wrap: anywhere;
}

/* Native Woo quantity stays above the buttons. No form, nonce or submit
   handler is replaced; the MU hooks wrap the existing submit controls. */
body.tdsd-ui-design.single-product .product-info form.cart {
  display: block;
}

body.tdsd-ui-design.single-product .product-info form.cart .tdsd-purchase-actions,
body.tdsd-ui-design.single-product .tdsd-sticky-actions {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 1fr);
  direction: rtl;
  gap: 4px;
  align-items: stretch;
  width: 100%;
  min-width: 0;
  clear: both;
}

body.tdsd-ui-design.single-product .product-info form.cart .tdsd-purchase-actions {
  margin-top: 12px;
}

body.tdsd-ui-design.single-product .product-info form.cart .tdsd-purchase-actions > button,
body.tdsd-ui-design.single-product .tdsd-sticky-actions > button {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 7px;
  box-sizing: border-box;
  width: 100% !important;
  min-width: 0 !important;
  height: 48px;
  min-height: 48px;
  float: none !important;
  margin: 0 !important;
  padding: 4px 6px !important;
  border: 0 !important;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.15;
  white-space: normal;
  text-align: center;
  box-shadow: none !important;
  transform: none;
}

body.tdsd-ui-design.single-product .product-info form.cart .tdsd-purchase-actions > .tdsd-buy-now-button,
body.tdsd-ui-design.single-product .tdsd-sticky-actions > .tdsd-sticky-buy {
  grid-column: 1;
  grid-row: 1;
  background: #10104a !important;
  color: #fff !important;
}

body.tdsd-ui-design.single-product .product-info form.cart .tdsd-purchase-actions > .tdsd-buy-now-button:hover,
body.tdsd-ui-design.single-product .tdsd-sticky-actions > .tdsd-sticky-buy:hover {
  background: #23236b !important;
}

body.tdsd-ui-design.single-product .product-info form.cart .tdsd-purchase-actions > .single_add_to_cart_button,
body.tdsd-ui-design.single-product .tdsd-sticky-actions > .tdsd-sticky-cart {
  grid-column: 2;
  grid-row: 1;
  background: #000098 !important;
  color: #000 !important;
}

body.tdsd-ui-design.single-product .product-info form.cart .tdsd-purchase-actions > .single_add_to_cart_button:hover,
body.tdsd-ui-design.single-product .tdsd-sticky-actions > .tdsd-sticky-cart:hover {
  background: #ea580c !important;
}

/* Keep Woo's text as the native accessible name; display the familiar cart icon. */
body.tdsd-ui-design.single-product .product-info form.cart .tdsd-purchase-actions > .single_add_to_cart_button {
  font-size: 0 !important;
  padding: 0 !important;
}

body.tdsd-ui-design.single-product .product-info form.cart .tdsd-purchase-actions > .single_add_to_cart_button::before {
  content: "";
  display: block;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Cpath d='M2 3h2.5l1.7 11.6a2 2 0 002 1.7h8.6a2 2 0 002-1.6l1.5-7.7H6'/%3E%3Ccircle cx='9' cy='20' r='1.5'/%3E%3Ccircle cx='18' cy='20' r='1.5'/%3E%3C/svg%3E") center / contain no-repeat;
}

body.tdsd-ui-design.single-product .tdsd-sticky-cart svg {
  display: block;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
}

body.tdsd-ui-design.single-product .product-info form.cart .tdsd-purchase-actions > button:focus-visible,
body.tdsd-ui-design.single-product .tdsd-sticky-actions > button:focus-visible {
  outline: 3px solid #111;
  outline-offset: 2px;
}

body.tdsd-ui-design.single-product .product-info form.cart .tdsd-purchase-actions > button:disabled,
body.tdsd-ui-design.single-product .product-info form.cart .tdsd-purchase-actions > button.disabled {
  opacity: .6;
  cursor: not-allowed;
}

body.tdsd-ui-design.single-product .tdsd-sticky {
  border-top: 3px solid #000;
  background: #fff;
}

body.tdsd-ui-design.single-product .tdsd-sticky-actions {
  flex: 0 1 300px;
  max-width: 300px;
  min-width: 180px;
}

body.tdsd-ui-design.single-product .tdsd-sticky-actions-single {
  grid-template-columns: minmax(0, 1fr);
}

body.tdsd-ui-design.single-product .tdsd-sticky-actions-single > .tdsd-sticky-cart {
  grid-column: 1;
}

body.tdsd-ui-design .tdsd-ui-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Contain real header content, leaving category dropdowns outside the scroller. */
body.tdsd-ui-design .header-in .search-row input {
  min-width: 0;
}

body.tdsd-ui-design .navbar .navbar-in {
  min-width: 0;
  min-height: 40px;
  height: auto;
  overflow: visible;
}

body.tdsd-ui-design .navbar .nav-links {
  flex: 1 1 0;
  min-width: 0;
  height: auto;
}

body.tdsd-ui-design .navbar .nav-links > li > a {
  min-height: 40px;
  padding-inline: 8px;
}

body.tdsd-ui-design .cats-dd .cats-panel {
  max-width: calc(100vw - 24px);
}

@media (min-width: 1201px) {
  body.tdsd-ui-design .navbar .nav-links {
    flex-wrap: nowrap;
    overflow: visible;
  }

  body.tdsd-ui-design .navbar .nav-links > li:nth-last-child(-n+2) > .nav-sub {
    inset-inline-start: auto;
    inset-inline-end: 0;
  }
}

@media (max-width: 1200px) {
  body.tdsd-ui-design .navbar .nav-links {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-inline: contain;
  }
}

@media (max-width: 900px) {
  body.tdsd-ui-design.single-product .product-page {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 600px) {
  body.tdsd-ui-design.single-product .tdsd-sticky-in {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(180px, 2fr);
    gap: 10px;
  }

  body.tdsd-ui-design.single-product .tdsd-sticky-in > img,
  body.tdsd-ui-design.single-product .tdsd-sticky-in > .nm {
    display: none;
  }

  body.tdsd-ui-design.single-product .tdsd-sticky-in > .pr {
    min-width: 0;
    font-size: 17px;
  }

  body.tdsd-ui-design.single-product .tdsd-sticky-actions {
    max-width: none;
  }
}

@media (max-width: 480px) {
  body.tdsd-ui-design .woocommerce ul.products,
  body.tdsd-ui-design.woocommerce-page ul.products {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.tdsd-ui-design.single-product .product-page {
    padding-inline: 0;
  }

  body.tdsd-ui-design.single-product .product-info .ship-badges {
    grid-template-columns: minmax(0, 1fr);
  }

  body.tdsd-ui-design.woocommerce-cart .woocommerce-cart-form,
  body.tdsd-ui-design.woocommerce-cart .cart_totals {
    padding: 10px;
  }
}

/* Woo coupon notices keep their existing icons and text flow. */
body.tdsd-ui-design.woocommerce-cart .woocommerce-info,
body.tdsd-ui-design.woocommerce-checkout .woocommerce-info,
body.tdsd-ui-design.woocommerce-cart form.checkout_coupon,
body.tdsd-ui-design.woocommerce-checkout form.checkout_coupon {
  box-sizing: border-box;
  background: #fff !important;
  border: 3px solid #000 !important;
  border-radius: 8px;
}

@media (max-width: 767px) {
  /* The body already supplies 15px on each side. These nested page wrappers
     must not add another 10 + 10 + 15px before the checkout/card content. */
  body.tdsd-ui-design.woocommerce-cart main.site-main,
  body.tdsd-ui-design.woocommerce-checkout main.site-main,
  body.tdsd-ui-design.woocommerce-cart main#content.site-main > .page-content > .woocommerce,
  body.tdsd-ui-design.woocommerce-checkout main#content.site-main > .page-content > .woocommerce {
    padding-inline: 0 !important;
  }
}

/* Product image workspace: fit the viewport, keep the full image visible. */
body.tdsd-ui-design.single-product.woocommerce {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}
body.tdsd-ui-design.single-product.woocommerce > :is(.top-util, header.site, .navbar, .ticker, footer.site-foot) {
  margin-inline: 0;
}
body.tdsd-ui-design.single-product #tdsd-main-content {
  width: 100%;
  max-width: 1640px;
  margin-inline: auto;
  padding-inline: clamp(12px, 2.2vw, 36px);
}
body.tdsd-ui-design.single-product #tdsd-main-content #main.site-main {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}
body.tdsd-ui-design.single-product #tdsd-main-content div.product.type-product {
  max-width: none;
  margin: 18px 0 28px;
  padding: 0;
}
body.tdsd-ui-design.single-product .product-page {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 420px);
  gap: clamp(18px, 2vw, 30px);
  align-items: start;
}
body.tdsd-ui-design.single-product .product-page > .product-gallery {
  min-width: 0;
  padding: clamp(10px, 1.2vw, 20px);
  position: sticky;
  top: 76px;
}
body.tdsd-ui-design.single-product .product-gallery .gal-ribbon {
  position: absolute;
  z-index: 2;
  top: 14px;
  inset-inline-start: 14px;
  border-radius: 6px;
  padding: 4px 10px;
  background: #10104a;
  color: #fff;
  font-weight: 700;
  pointer-events: none;
}
body.tdsd-ui-design.single-product .product-gallery .main-img {
  position: relative;
  display: flex;
  width: 100%;
  height: clamp(340px, calc(100vh - 230px), 920px);
  height: clamp(340px, calc(100svh - 230px), 920px);
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 6px;
  box-shadow: none;
  background: #fff;
  color: #10104a;
  cursor: zoom-in;
  -webkit-tap-highlight-color: transparent;
}
body.tdsd-ui-design.single-product .product-gallery .main-img:hover,
body.tdsd-ui-design.single-product .product-gallery .main-img:active {
  background: #fff;
  color: #10104a;
}
body.tdsd-ui-design.single-product .product-gallery .main-img img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  margin: 0;
  object-fit: contain;
  object-position: center;
  mix-blend-mode: normal;
}
body.tdsd-ui-design.single-product .product-gallery .tdsd-gallery-hint {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin: 10px 0 0;
  color: #425466;
  font-size: 13px;
  line-height: 1.5;
}
body.tdsd-ui-design.single-product .product-gallery .tdsd-gallery-hint svg {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
}
body.tdsd-ui-design.single-product .product-gallery .thumbs {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: 10px;
  width: fit-content;
  max-width: 100%;
  margin: 12px auto 0;
  padding: 3px;
  overflow-x: auto;
}
body.tdsd-ui-design.single-product .product-gallery .thumb {
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  padding: 5px;
  background: #fff;
  border: 2px solid #9ca3af;
  border-radius: 6px;
  cursor: pointer;
}
body.tdsd-ui-design.single-product .product-gallery .thumb.active {
  border: 3px solid #000098;
}
body.tdsd-ui-design.single-product .product-gallery .thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
body.tdsd-ui-design.single-product .product-gallery .disclaimer {
  margin: 12px 0 0;
  color: #52616b;
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
body.tdsd-ui-design.single-product .product-page > .product-info {
  min-width: 0;
  position: static;
  padding: clamp(18px, 1.7vw, 28px);
}
body.tdsd-ui-design.single-product .product-info .meta-grid {
  gap: 7px;
  margin-bottom: 14px;
  padding-bottom: 14px;
}
body.tdsd-ui-design.single-product .product-info .tdsd-product-summary {
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid #d8e0e5;
}
body.tdsd-ui-design.single-product .product-gallery :is(.main-img, .thumb):focus-visible {
  outline: 3px solid #000098;
  outline-offset: 3px;
}
body.tdsd-ui-design.single-product #tdsdLb {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 60px 20px 20px;
  background: rgba(15, 23, 42, .88);
}
body.tdsd-ui-design.single-product #tdsdLb[hidden] { display: none !important; }
body.tdsd-ui-design.single-product #tdsdLb > img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 1400px;
  max-height: calc(100vh - 80px);
  max-height: calc(100svh - 80px);
  object-fit: contain;
}
body.tdsd-ui-design.single-product #tdsdLb .lb-x {
  position: absolute;
  top: 10px;
  inset-inline-end: 16px;
  width: 44px;
  height: 44px;
  padding: 0;
  line-height: 1;
  border: 2px solid #000;
  border-radius: 6px;
  background: #fff;
  color: #10104a;
}
@media (max-width: 900px) {
  body.tdsd-ui-design.single-product .product-page {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }
  body.tdsd-ui-design.single-product .product-page > .product-gallery {
    position: static;
  }
  body.tdsd-ui-design.single-product .product-gallery .main-img {
    height: clamp(280px, calc(100vh - 280px), 680px);
    height: clamp(280px, calc(100svh - 280px), 680px);
  }
}
@media (max-width: 480px) {
  body.tdsd-ui-design.single-product #tdsd-main-content { padding-inline: 10px; }
  body.tdsd-ui-design.single-product #tdsd-main-content div.product.type-product { margin-top: 12px; }
  body.tdsd-ui-design.single-product .product-page > .product-gallery { padding: 8px; }
  body.tdsd-ui-design.single-product .product-page > .product-info { padding: 18px 14px; }
  body.tdsd-ui-design.single-product .product-gallery .main-img {
    height: clamp(240px, calc(100vw - 44px), 440px);
    max-height: calc(100vh - 220px);
    max-height: calc(100svh - 220px);
  }
  body.tdsd-ui-design.single-product .product-gallery .gal-ribbon { top: 10px; inset-inline-start: 10px; }
  body.tdsd-ui-design.single-product .product-gallery .thumb { flex-basis: 56px; width: 56px; height: 56px; }
  body.tdsd-ui-design.single-product #tdsdLb { padding: 60px 10px 16px; }
}

/* Mobile catalog: the positive body class excludes cart, checkout, account and
   order/payment endpoints. Only product lists change; the main gallery keeps
   its full-width single-product layout above. */
@media (max-width: 760px) {
  /* Remove nested template insets only on pages that render catalog lists. */
  body.tdsd-ui-design.tdsd-mobile-catalog.tdsd-product-list-page main.site-main {
    width: 100%;
    max-width: none;
    margin-inline: 0;
    padding-inline: 12px;
  }

  body.tdsd-ui-design.tdsd-mobile-catalog.tdsd-product-list-page.home main.site-main,
  body.tdsd-ui-design.tdsd-mobile-catalog.tdsd-product-list-page.woocommerce main.site-main,
  body.tdsd-ui-design.tdsd-mobile-catalog.tdsd-product-list-page div.site-main,
  body.tdsd-ui-design.tdsd-mobile-catalog.tdsd-product-list-page .page-content > .woocommerce {
    width: 100%;
    max-width: none;
    padding-inline: 0;
  }

  body.tdsd-ui-design.tdsd-mobile-catalog ul.products {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-auto-flow: row;
    grid-auto-columns: auto;
    gap: 8px;
    width: 100%;
    min-width: 0;
    margin-inline: 0 !important;
    padding: 0;
  }

  body.tdsd-ui-design.tdsd-mobile-catalog ul.products::before,
  body.tdsd-ui-design.tdsd-mobile-catalog ul.products::after {
    display: none !important;
  }

  /* The section already provides the page margin; avoid a second inset on
     its WooCommerce shortcode wrapper. */
  body.tdsd-ui-design.tdsd-mobile-catalog .section > .woocommerce {
    min-width: 0;
    padding-inline: 0;
  }

  body.tdsd-ui-design.tdsd-mobile-catalog ul.products li.product.tdsd-product-card,
  body.tdsd-ui-design.tdsd-mobile-catalog ul.products li.product.tdsd-product-card:hover {
    width: auto !important;
    max-width: 100%;
    min-width: 0;
    margin: 0 !important;
    padding: 0;
    transform: none;
  }

  body.tdsd-ui-design.tdsd-mobile-catalog ul.products li.product.tdsd-product-card .tdsd-card-link {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    padding: 0;
  }

  body.tdsd-ui-design.tdsd-mobile-catalog ul.products li.product.tdsd-product-card .pic {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    box-sizing: border-box;
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 1;
    margin: 0 0 8px;
    padding: 2px;
    background: #fff;
  }

  body.tdsd-ui-design.tdsd-mobile-catalog ul.products li.product.tdsd-product-card .pic img,
  body.tdsd-ui-design.tdsd-mobile-catalog ul.products li.product.tdsd-product-card:hover .pic img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    margin: 0;
    object-fit: contain;
    object-position: center;
    mix-blend-mode: normal;
    transform: none;
  }

  body.tdsd-ui-design.tdsd-mobile-catalog ul.products li.product.tdsd-product-card .pn {
    min-width: 0;
    margin-bottom: 4px;
    padding-inline: 6px;
    font-size: 11px;
    line-height: 1.4;
    overflow-wrap: anywhere;
  }

  body.tdsd-ui-design.tdsd-mobile-catalog ul.products li.product.tdsd-product-card .title {
    min-width: 0;
    min-height: 63px;
    margin-bottom: 8px;
    padding-inline: 6px;
    font-size: 14px;
    line-height: 1.5;
    -webkit-line-clamp: 3;
    overflow-wrap: anywhere;
  }

  body.tdsd-ui-design.tdsd-mobile-catalog ul.products li.product.tdsd-product-card .price-block {
    gap: 6px;
    min-width: 0;
    padding: 0 6px 8px;
  }

  body.tdsd-ui-design.tdsd-mobile-catalog ul.products li.product.tdsd-product-card .price-row {
    flex-wrap: wrap;
    min-width: 0;
    gap: 4px;
  }

  body.tdsd-ui-design.tdsd-mobile-catalog ul.products li.product.tdsd-product-card .price-row .price {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px;
    min-width: 0;
    max-width: 100%;
    font-size: 17px;
    line-height: 1.4;
    white-space: normal;
  }

  body.tdsd-ui-design.tdsd-mobile-catalog ul.products li.product.tdsd-product-card .price-row .price del {
    margin-inline: 0;
  }

  body.tdsd-ui-design.tdsd-mobile-catalog ul.products li.product.tdsd-product-card .price-ask {
    font-size: 14px;
    overflow-wrap: anywhere;
  }

  body.tdsd-ui-design.tdsd-mobile-catalog ul.products li.product.tdsd-product-card .sku {
    font-size: 11px;
    line-height: 1.4;
  }

  /* Preserve the exact 3:1 row and 48px height. The existing cart icon and
     accessible label fit its narrow track without overflowing the card. */
  body.tdsd-ui-design.tdsd-mobile-catalog ul.products li.product.tdsd-product-card .tdsd-card-actions > .add.buy-now {
    font-size: 14px !important;
  }

  body.tdsd-ui-design.tdsd-mobile-catalog ul.products li.product.tdsd-product-card .tdsd-card-actions > .add.tdsd-card-cart {
    min-width: 0;
  }

  body.tdsd-ui-design.tdsd-mobile-catalog ul.products li.product.tdsd-product-card .tdsd-card-actions-single > .add {
    gap: 4px;
    padding-inline: 4px;
    font-size: 13px;
  }

  body.tdsd-ui-design.tdsd-mobile-catalog .tdsd-rv .rv-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-flow: row;
    grid-auto-columns: auto;
    gap: 8px;
    width: 100%;
    min-width: 0;
    padding-bottom: 0;
    overflow-x: visible;
  }

  body.tdsd-ui-design.tdsd-mobile-catalog .tdsd-rv .rv-card {
    width: auto;
    min-width: 0;
    max-width: 100%;
    padding: 0 0 8px;
    gap: 8px;
  }

  body.tdsd-ui-design.tdsd-mobile-catalog .tdsd-rv .rv-card img {
    display: block;
    flex: none;
    box-sizing: border-box;
    width: 100%;
    height: auto;
    max-width: 100%;
    aspect-ratio: 1;
    margin: 0;
    padding: 2px;
    object-fit: contain;
    object-position: center;
    mix-blend-mode: normal;
    transform: none;
  }

  body.tdsd-ui-design.tdsd-mobile-catalog .tdsd-rv .rv-card .rv-t {
    min-width: 0;
    min-height: 63px;
    padding-inline: 6px;
    font-size: 14px;
    line-height: 1.5;
    -webkit-line-clamp: 3;
    overflow-wrap: anywhere;
  }

  body.tdsd-ui-design.tdsd-mobile-catalog .tdsd-rv .rv-card .rv-p {
    min-width: 0;
    margin-top: auto;
    padding-inline: 6px;
    font-size: 16px;
    line-height: 1.4;
    overflow-wrap: anywhere;
  }
}

/* YITH wishlist product lists retain native actions and row identifiers. */
@media (max-width: 760px) {
  body.tdsd-ui-design.tdsd-mobile-catalog table.wishlist_table.wishlist_view.traditional {
    display: block;
    width: 100%;
    max-width: 100%;
    border: 0;
    background: #fff;
  }

  body.tdsd-ui-design.tdsd-mobile-catalog table.wishlist_table.wishlist_view.traditional > thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  body.tdsd-ui-design.tdsd-mobile-catalog table.wishlist_table.wishlist_view.traditional > tbody.wishlist-items-wrapper,
  body.tdsd-ui-design.tdsd-mobile-catalog ul.wishlist_table.wishlist_view.mobile {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  body.tdsd-ui-design.tdsd-mobile-catalog table.wishlist_table.wishlist_view.traditional > tbody > tr[data-row-id],
  body.tdsd-ui-design.tdsd-mobile-catalog ul.wishlist_table.wishlist_view.mobile > li[data-row-id] {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    width: auto;
    min-width: 0;
    max-width: 100%;
    margin: 0;
    padding: 0 0 6px;
    background: #fff;
    border: 3px solid #000;
    border-radius: 8px;
    overflow-wrap: anywhere;
  }

  /* Empty-state and pagination rows never become half-width product cards. */
  body.tdsd-ui-design.tdsd-mobile-catalog table.wishlist_table.wishlist_view.traditional > tbody > tr:not([data-row-id]),
  body.tdsd-ui-design.tdsd-mobile-catalog ul.wishlist_table.wishlist_view.mobile > .wishlist-empty {
    display: block;
    grid-column: 1 / -1;
    width: 100%;
  }

  body.tdsd-ui-design.tdsd-mobile-catalog table.wishlist_table.wishlist_view.traditional > tbody > tr:not([data-row-id]) > td {
    display: block;
    width: 100%;
  }

  body.tdsd-ui-design.tdsd-mobile-catalog table.wishlist_table.wishlist_view.traditional > tbody > tr[data-row-id] > td {
    display: block !important;
    box-sizing: border-box;
    width: 100% !important;
    min-width: 0;
    margin: 0;
    padding: 4px 6px;
    border: 0 !important;
    background: #fff !important;
    text-align: start !important;
  }

  body.tdsd-ui-design.tdsd-mobile-catalog table.wishlist_table.wishlist_view.traditional > tbody > tr[data-row-id] > .product-thumbnail { order: 0; padding: 2px; }
  body.tdsd-ui-design.tdsd-mobile-catalog table.wishlist_table.wishlist_view.traditional > tbody > tr[data-row-id] > .product-name { order: 1; }
  body.tdsd-ui-design.tdsd-mobile-catalog table.wishlist_table.wishlist_view.traditional > tbody > tr[data-row-id] > .product-price { order: 2; }
  body.tdsd-ui-design.tdsd-mobile-catalog table.wishlist_table.wishlist_view.traditional > tbody > tr[data-row-id] > .product-quantity { order: 3; }
  body.tdsd-ui-design.tdsd-mobile-catalog table.wishlist_table.wishlist_view.traditional > tbody > tr[data-row-id] > .product-stock-status { order: 4; }
  body.tdsd-ui-design.tdsd-mobile-catalog table.wishlist_table.wishlist_view.traditional > tbody > tr[data-row-id] > .product-add-to-cart { order: 5; margin-top: auto; }
  body.tdsd-ui-design.tdsd-mobile-catalog table.wishlist_table.wishlist_view.traditional > tbody > tr[data-row-id] > .product-remove { order: 6; }
  body.tdsd-ui-design.tdsd-mobile-catalog table.wishlist_table.wishlist_view.traditional > tbody > tr[data-row-id] > .product-checkbox { order: 7; }
  body.tdsd-ui-design.tdsd-mobile-catalog table.wishlist_table.wishlist_view.traditional > tbody > tr[data-row-id] > .product-arrange { order: 8; }

  body.tdsd-ui-design.tdsd-mobile-catalog ul.wishlist_table.wishlist_view.mobile > li[data-row-id] > .item-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    margin: 0 0 6px;
  }

  body.tdsd-ui-design.tdsd-mobile-catalog ul.wishlist_table.wishlist_view.mobile > li[data-row-id] .item-wrapper > .product-thumbnail {
    display: block;
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    margin: 0 0 6px;
    padding: 2px;
  }

  body.tdsd-ui-design.tdsd-mobile-catalog .wishlist_table.wishlist_view [data-row-id] .product-thumbnail > a {
    display: block;
    width: 100%;
    height: auto;
    max-width: none;
    aspect-ratio: 1;
    margin: 0;
    padding: 0;
  }

  body.tdsd-ui-design.tdsd-mobile-catalog .wishlist_table.wishlist_view [data-row-id] .product-thumbnail img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    max-width: 100%;
    max-height: 100%;
    margin: 0;
    padding: 0;
    object-fit: contain;
    object-position: center;
    mix-blend-mode: normal;
  }

  body.tdsd-ui-design.tdsd-mobile-catalog ul.wishlist_table.wishlist_view.mobile > li[data-row-id] .item-wrapper > .item-details,
  body.tdsd-ui-design.tdsd-mobile-catalog ul.wishlist_table.wishlist_view.mobile > li[data-row-id] > .additional-info-wrapper {
    display: block;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    padding: 0 6px;
  }

  body.tdsd-ui-design.tdsd-mobile-catalog ul.wishlist_table.wishlist_view.mobile > li[data-row-id] > .additional-info-wrapper {
    margin-top: auto;
  }

  body.tdsd-ui-design.tdsd-mobile-catalog .wishlist_table.wishlist_view [data-row-id] .product-name,
  body.tdsd-ui-design.tdsd-mobile-catalog .wishlist_table.wishlist_view [data-row-id] .product-name h3 {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    overflow-wrap: anywhere;
  }

  body.tdsd-ui-design.tdsd-mobile-catalog .wishlist_table.wishlist_view [data-row-id] .product-name a {
    display: -webkit-box;
    min-height: 63px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
  }

  body.tdsd-ui-design.tdsd-mobile-catalog ul.wishlist_table.wishlist_view.mobile > li[data-row-id] :is(.item-details-table, .additional-info) {
    width: 100%;
    min-width: 0;
    margin: 6px 0;
    table-layout: fixed;
  }

  body.tdsd-ui-design.tdsd-mobile-catalog ul.wishlist_table.wishlist_view.mobile > li[data-row-id] :is(.item-details-table, .additional-info) tr {
    display: flex;
    flex-direction: column;
    margin-bottom: 4px;
  }

  body.tdsd-ui-design.tdsd-mobile-catalog ul.wishlist_table.wishlist_view.mobile > li[data-row-id] :is(.item-details-table, .additional-info) td {
    display: block;
    width: 100%;
    min-width: 0;
    padding: 0;
    font-size: 12px;
    line-height: 1.4;
    text-align: start;
    overflow-wrap: anywhere;
  }

  body.tdsd-ui-design.tdsd-mobile-catalog .wishlist_table.wishlist_view [data-row-id] .product-add-to-cart > a {
    box-sizing: border-box;
    max-width: 100%;
    min-height: 44px;
    padding: 8px 4px !important;
    font-size: 13px;
    line-height: 1.3;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  body.tdsd-ui-design.tdsd-mobile-catalog .wishlist_table.wishlist_view [data-row-id] .product-remove .remove_from_wishlist {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    margin: 0;
  }

  body.tdsd-ui-design.tdsd-mobile-catalog .wishlist_table.wishlist_view [data-row-id] :is(input, select) {
    box-sizing: border-box;
    max-width: 100%;
  }
}

/* TDSD category tiles: large native images and readable, wrapping labels. */
body.tdsd-ui-design #tdsd-main-content .pop-cats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
body.tdsd-ui-design #tdsd-main-content .pop-cats .pop-cat {
  min-width: 0;
  padding: 6px 6px 12px;
  gap: 8px;
  align-items: center;
}
body.tdsd-ui-design #tdsd-main-content .pop-cats .pop-cat .ph {
  width: 100%;
  max-width: 240px;
  height: auto;
  min-height: 0;
  aspect-ratio: 1;
  flex-shrink: 0;
  padding: 2px;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}
body.tdsd-ui-design #tdsd-main-content .pop-cats .pop-cat .ph img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: none;
  aspect-ratio: 1;
  object-fit: contain;
  object-position: center;
}
body.tdsd-ui-design #tdsd-main-content .pop-cats .pop-cat .ph svg {
  width: 50%;
  height: 50%;
  max-width: 80px;
  max-height: 80px;
}
body.tdsd-ui-design #tdsd-main-content .pop-cats .pop-cat .nm {
  width: 100%;
  min-width: 0;
  min-height: 2.6em;
  margin: 0;
  padding: 0 4px;
  font-size: 22px;
  font-weight: 750;
  line-height: 1.3;
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
  overflow: visible;
  text-wrap: balance;
}
body.tdsd-ui-design #tdsd-main-content .pop-cats .pop-cat .ct {
  margin-top: auto;
  padding: 0 4px;
  font-size: 14px;
  line-height: 1.4;
  color: #54626d;
}
@media (max-width: 760px) {
  body.tdsd-ui-design #tdsd-main-content .pop-cats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  body.tdsd-ui-design #tdsd-main-content .pop-cats .pop-cat {
    padding: 4px 4px 12px;
  }
  body.tdsd-ui-design #tdsd-main-content .pop-cats .pop-cat .nm {
    font-size: 20px;
  }
}

/* Give specification values enough room on mobile; retain native multiline data. */
@media (max-width: 760px) {
  body.tdsd-ui-design.single-product .spec-table > .spec-row {
    grid-template-columns: minmax(0, 35%) minmax(0, 1fr);
  }
  body.tdsd-ui-design.single-product .spec-table > .spec-row > .k,
  body.tdsd-ui-design.single-product .spec-table > .spec-row > .v {
    min-width: 0;
    padding: 10px 12px;
    font-size: 15px;
    line-height: 1.5;
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
  }
}

