/*
  Ajustes exclusivamente responsive. No alteran el diseño de escritorio.
  Este archivo se carga al final para evitar desbordes en móviles, tablets,
  pantallas plegables y ventanas estrechas.
*/
html,body{max-width:100%;overflow-x:clip}img,svg,video,canvas,iframe{max-width:100%;height:auto}input,select,textarea,button{max-width:100%}

@media (max-width:1180px){
  .ds-header-v5-inner,.ds-home-wrap,.ds-wrap,.ds-commerce-wrap,.ds-footer-v33-inner,.ds-footer-v33-bottom-inner,.ds-product-main-row,.ds-product-details-row,.ds-product-related-row{width:calc(100% - 40px)!important;max-width:none!important;margin-left:auto!important;margin-right:auto!important}
  .ds-home-hero .ds-home-wrap{width:calc(100% - 40px)!important}
}

@media (max-width:980px){
  .ds-product-main-row,.ds-product-details-row,.ds-archive-hero-grid,.ds-hero-grid{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:24px!important}
  .ds-product-left-col,.ds-product-right-col,.ds-product-details-col,.ds-archive-copy,.ds-archive-help,.ds-hero-grid>*{width:100%!important;max-width:none!important;min-width:0!important}
  .ds-cat-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .ds-grid-3{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .ds-contact-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .ds-footer-v33-inner{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:34px 28px!important}
  .ds-footer-v33-brand-col,.ds-footer-v33-col{min-width:0!important}
  .ds-product-feature-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .ds-variable-choice-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .ds-product-related .products{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}

@media (max-width:767px){
  .ds-header-v5-inner,.ds-home-wrap,.ds-wrap,.ds-commerce-wrap,.ds-footer-v33-inner,.ds-footer-v33-bottom-inner,.ds-product-main-row,.ds-product-details-row,.ds-product-related-row{width:calc(100% - 28px)!important}
  .ds-cat-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important}
  .ds-grid-3,.ds-contact-grid{grid-template-columns:minmax(0,1fr)!important}
  .ds-footer-v33-inner{grid-template-columns:minmax(0,1fr)!important;gap:30px!important}
  .ds-footer-v33-bottom-inner{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:10px!important;text-align:center!important;justify-items:center!important}
  .ds-footer-v33-bottom-center,.ds-footer-v33-credit{text-align:center!important}
  .ds-footer-v33-legal{grid-template-columns:repeat(2,minmax(0,1fr))!important;width:100%!important;max-width:440px!important}
  .ds-footer-v33-social-links{flex-wrap:wrap!important}
  .ds-product-feature-grid,.ds-variable-choice-grid{grid-template-columns:minmax(0,1fr)!important}
  .ds-product-qty-row,.ds-product-total-row,.ds-product-cart-head,.ds-product-details-header,.ds-product-related-header{align-items:flex-start!important;flex-direction:column!important;gap:12px!important}
  .ds-product-qty-control{width:100%!important;justify-content:space-between!important}
  .ds-product-qty-input{flex:1 1 auto!important;min-width:0!important}
  .dswc-btn-single,.single_add_to_cart_button,.ds-product-details-help a{width:100%!important;justify-content:center!important;text-align:center!important}
  .ds-search-v5-panel{width:calc(100% - 24px)!important;max-width:none!important;max-height:calc(100dvh - 24px)!important;overflow:auto!important}
}

@media (max-width:480px){
  .ds-header-v5-inner,.ds-home-wrap,.ds-wrap,.ds-commerce-wrap,.ds-footer-v33-inner,.ds-footer-v33-bottom-inner,.ds-product-main-row,.ds-product-details-row,.ds-product-related-row{width:calc(100% - 22px)!important}
  .ds-cat-grid{grid-template-columns:minmax(0,1fr)!important}
  .ds-product-related .products{grid-template-columns:minmax(0,1fr)!important}
  .ds-footer-v33-legal{grid-template-columns:minmax(0,1fr)!important;max-width:none!important}
  .ds-footer-v33-social-links{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;width:100%!important}
  .ds-footer-v33-social-link{width:100%!important;min-width:0!important}
  .ds-product-title h1,.product_title{overflow-wrap:anywhere!important}
}

@media (max-width:340px){
  .ds-header-v5-inner,.ds-home-wrap,.ds-wrap,.ds-commerce-wrap,.ds-footer-v33-inner,.ds-footer-v33-bottom-inner,.ds-product-main-row,.ds-product-details-row,.ds-product-related-row{width:calc(100% - 16px)!important}
  .ds-footer-v33-social-links{grid-template-columns:minmax(0,1fr)!important}
}


/* Refuerzo final de responsividad para todo el sitio público */
body,main,.page-main,section,header,footer,div{min-width:0}
img,video,svg,canvas{display:block;max-width:100%;height:auto}
h1,h2,h3,h4,p,a,span,button,input,select,textarea{overflow-wrap:break-word}

@media (max-width:980px){
  .ds-section-head,.ds-archive-catalog-head,.ds-product-related-header{max-width:100%!important}
  .ds-header-v5-mobile-controls{flex:0 0 auto!important}
  .ds-search-v5-panel{max-width:760px!important}
}

@media (max-width:767px){
  #ds-home-v147 .ds-section,#ds-home-v147 .ds-brand-premium-section{padding-top:48px!important;padding-bottom:48px!important}
  .ds-inner-section,.ds-product-detail,.ds-catalog-section{padding-left:0!important;padding-right:0!important}
  .ds-home-actions>a,.ds-page-cta-box a,.ds-contact-cta-box a{max-width:100%!important}
  .ds-search-v5-footer{align-items:flex-start!important;flex-direction:column!important;gap:10px!important}
  .ds-search-v5-footer a{width:100%!important;justify-content:center!important}
}

@media (max-width:520px){
  #ds-home-v147 .ds-home-products-shell .dswc-home-products{grid-template-columns:1fr!important}
  #ds-home-v147 .ds-home-products-shell .dswc-home-product-card{max-width:400px!important;margin-left:auto!important;margin-right:auto!important}
  .ds-archive-products.ds-home-products-shell>.dswc-home-products{grid-template-columns:1fr!important}
  .ds-product-related .products{grid-template-columns:1fr!important}
}

@media (max-width:420px){
  .ds-header-v5-inner{width:calc(100% - 20px)!important;gap:8px!important}
  .jolvex-wordmark__name{font-size:25px!important}
  .jolvex-wordmark__verify{width:17px!important;height:17px!important}
  .ds-header-v5-mobile-controls{gap:6px!important}
  .ds-header-v5-mobile-search,.ds-header-v5-mobile-controls .ds-header-v5-cart,.ds-header-v5-menu-toggle{width:40px!important;height:40px!important;min-height:40px!important;border-radius:12px!important}
  .ds-header-v5-mobile-inner{padding-left:10px!important;padding-right:10px!important}
  .ds-search-v5-panel{width:calc(100% - 16px)!important}
}

@media (max-width:360px){
  .ds-header-v5-mobile-search{display:none!important}
  .jolvex-wordmark__name{font-size:23px!important}
  #ds-home-v147 .ds-home-wrap,.ds-wrap,.ds-commerce-wrap,.ds-footer-v33-inner,.ds-footer-v33-bottom-inner{width:calc(100% - 16px)!important}
}

/* Jolvex: centrado final de la ficha. Este archivo se carga el último. */
@media (min-width:981px) and (max-width:1180px){
  body.single-product .ds-product-main-row{
    width:min(1120px,calc(100% - 48px))!important;
    max-width:1120px!important;
    margin-left:auto!important;
    margin-right:auto!important;
    justify-content:center!important;
  }
  body.single-product .ds-product-details-row,
  body.single-product .ds-product-related-row{
    width:min(1120px,calc(100% - 48px))!important;
    max-width:1120px!important;
    margin-left:auto!important;
    margin-right:auto!important;
  }
}
@media (max-width:980px){
  body.single-product .ds-product-main-row,
  body.single-product .ds-product-details-row,
  body.single-product .ds-product-related-row{
    width:min(760px,calc(100% - 28px))!important;
    max-width:760px!important;
    margin-left:auto!important;
    margin-right:auto!important;
  }
  body.single-product .ds-product-left-col,
  body.single-product .ds-product-right-col,
  body.single-product .ds-product-details-col{
    width:100%!important;
    max-width:100%!important;
    margin-left:auto!important;
    margin-right:auto!important;
    justify-self:center!important;
  }
}
@media (max-width:480px){
  body.single-product .ds-product-main-row,
  body.single-product .ds-product-details-row,
  body.single-product .ds-product-related-row{
    width:calc(100% - 18px)!important;
    max-width:none!important;
  }
}

/* ===== Jolvex: relacionados definitivos =====
   IMPORTANTE: "section.related.products" y "ul.products" comparten la clase
   products. El contenedor exterior debe ser block y SOLO el ul es grid. */
body.single-product .ds-product-related {
  width: 100% !important;
  min-width: 0 !important;
}

body.single-product .ds-product-related > section.related.products {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.single-product .ds-product-related > section.related.products > ul.products {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  display: grid !important;
  align-items: stretch !important;
  justify-items: stretch !important;
}

body.single-product .ds-product-related > section.related.products > ul.products > li.product {
  box-sizing: border-box !important;
  float: none !important;
  clear: none !important;
  position: relative !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
}

body.single-product .ds-product-related > section.related.products > ul.products > li.product > a.woocommerce-LoopProduct-link {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  min-width: 0 !important;
  flex: 1 1 auto !important;
}

body.single-product .ds-product-related .et_shop_image {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  overflow: hidden !important;
  background: #05070d !important;
}

body.single-product .ds-product-related .et_shop_image img {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  object-fit: cover !important;
  object-position: center !important;
}

/* Escritorio: sección más ancha SOLO para relacionados y 4 tarjetas reales. */
@media (min-width: 981px) {
  body.single-product .ds-product-related-row {
    box-sizing: border-box !important;
    width: min(1320px, calc(100% - 40px)) !important;
    max-width: 1320px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 26px !important;
    overflow: hidden !important;
  }

  body.single-product .ds-related-count-4 .ds-product-related > section.related.products > ul.products {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 20px !important;
  }

  body.single-product .ds-related-count-3 .ds-product-related > section.related.products > ul.products {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 20px !important;
    max-width: 970px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  body.single-product .ds-related-count-2 .ds-product-related > section.related.products > ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 20px !important;
    max-width: 640px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  body.single-product .ds-related-count-1 .ds-product-related > section.related.products > ul.products {
    grid-template-columns: minmax(0, 310px) !important;
    max-width: 310px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  body.single-product .ds-product-related > section.related.products > ul.products > li.product {
    padding: 12px !important;
    border-radius: 22px !important;
    min-height: 0 !important;
  }

  body.single-product .ds-product-related .et_shop_image {
    aspect-ratio: 1 / 1 !important;
    height: auto !important;
    border-radius: 17px !important;
  }

  body.single-product .ds-product-related .et_shop_image img {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    aspect-ratio: 1 / 1 !important;
    border-radius: 17px !important;
    margin-bottom: 14px !important;
  }

  body.single-product .ds-product-related .woocommerce-loop-product__title {
    min-height: 42px !important;
    font-size: 15px !important;
    line-height: 1.3 !important;
  }

  body.single-product .ds-product-related .price {
    min-height: 58px !important;
  }

  body.single-product .ds-product-related .ds-related-view-btn {
    min-height: 44px !important;
    width: 100% !important;
    margin-top: auto !important;
  }
}

/* Tablet: dos tarjetas proporcionadas. */
@media (min-width: 601px) and (max-width: 980px) {
  body.single-product .ds-product-related-row {
    box-sizing: border-box !important;
    width: min(900px, calc(100% - 28px)) !important;
    max-width: 900px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 20px !important;
    overflow: hidden !important;
  }

  body.single-product .ds-product-related > section.related.products > ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 16px !important;
  }

  body.single-product .ds-related-count-1 .ds-product-related > section.related.products > ul.products {
    grid-template-columns: minmax(0, 360px) !important;
    max-width: 360px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  body.single-product .ds-product-related .et_shop_image,
  body.single-product .ds-product-related .et_shop_image img {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1 / 1 !important;
  }
}

/* Móvil: una tarjeta, centrada y sin desbordar. */
@media (max-width: 600px) {
  body.single-product .ds-product-related-row {
    box-sizing: border-box !important;
    width: calc(100% - 18px) !important;
    max-width: 520px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 16px !important;
    overflow: hidden !important;
  }

  body.single-product .ds-product-related > section.related.products > ul.products {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 14px !important;
  }

  body.single-product .ds-product-related > section.related.products > ul.products > li.product {
    width: 100% !important;
    max-width: 430px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  body.single-product .ds-product-related .et_shop_image,
  body.single-product .ds-product-related .et_shop_image img {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1 / 1 !important;
  }
}

/* ===== Jolvex: relacionados contextualizados y visual limpio ===== */
body.single-product .ds-product-related-row {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

body.single-product .ds-product-related-header {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

body.single-product .ds-product-related > section.related.products > ul.products > li.product {
  background: #0b0e15 !important;
  border: 1px solid rgba(255,255,255,.065) !important;
  box-shadow: none !important;
}

body.single-product .ds-product-related .et_shop_image {
  margin-bottom: 16px !important;
  border: 0 !important;
  box-shadow: none !important;
}

body.single-product .ds-product-related .et_shop_image img {
  margin-bottom: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
}

body.single-product .ds-product-related .woocommerce-loop-product__title {
  margin: 0 4px 14px !important;
  padding: 0 !important;
}

body.single-product .ds-product-related .price {
  margin-left: 4px !important;
  margin-right: 4px !important;
}

body.single-product .ds-product-related .ds-related-view-btn {
  margin-left: 4px !important;
  margin-right: 4px !important;
  width: calc(100% - 8px) !important;
}


/* Jolvex 1.6.4 · menú móvil anclado al header visible */
@media (max-width:980px){
  html,body.ds-menu-open{overscroll-behavior:auto!important}
  body.ds-menu-open{overflow:visible!important}
  .ds-header-v5-mobile{
    position:fixed!important;
    top:var(--jx-mobile-menu-top,80px)!important;
    left:0!important;right:0!important;
    height:calc(100dvh - var(--jx-mobile-menu-top,80px))!important;
    max-height:calc(100dvh - var(--jx-mobile-menu-top,80px))!important;
    overflow-y:auto!important;
    overscroll-behavior:contain!important;
    -webkit-overflow-scrolling:touch;
    z-index:999998!important;
  }
}
