/* Base layout */
.dd143-wrap{display:grid;grid-template-columns:260px 1fr;column-gap:20px;align-items:start}
@media(max-width:992px){.dd143-wrap{grid-template-columns:1fr;column-gap:0;row-gap:14px}}
.dd143-veil{display:none}

/* Sidebar card */
.dd143-side{position:sticky;top:72px;background:#fff;border:0px solid #e6eaf0;border-radius:16px;padding:14px;box-shadow:0 6px 18px rgba(255,255,255,.0)}
.dd143-group{border:0px solid #fff;border-radius:14px;background:#fff;margin:10px 0;overflow:hidden}
.dd143-h{padding:10px 12px;border-bottom:0px solid #f1f5f9}
.dd143-h h5{margin:0;font-size:.9rem;font-weight:800}
.dd143-b{padding:10px 12px}
.dd143-input,.dd143-select{width:100%;height:38px;border:0px solid #e2e8f0;border-radius:12px;padding:0 12px;background:#fff}
.dd143-orderline{display:flex;gap:8px;align-items:center}
.dd143-btn{height:34px;border-radius:9px;padding:0 12px;border:0px solid #FF9A00;background:#FF9A00;color:#fff;font-weight:800;cursor:pointer}
.dd143-btn:hover{background:#fff;border-color:#323D4A}

.dd143-parent{border-radius:10px}
.dd143-parent-h{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 12px;cursor:pointer;border-radius:10px}
.dd143-sub{margin:6px 0 0 12px;display:none;flex-direction:column;gap:6px}
.dd143-parent.open .dd143-sub{display:flex}
.dd143-check{display:flex;align-items:center;gap:10px;font-weight:600}
.dd143-check input{width:16px;height:16px;accent-color:#00A2B8}

/* Nutrition chips */
.dd143-chem{display:flex;gap:8px;flex-wrap:wrap}
.dd143-chip{display:inline-flex;align-items:center;justify-content:center;height:30px;padding:0 12px;border-radius:9px;border:0px solid #007CC9;background:#fff;font-weight:800;font-size:.9rem;color:#007CC9;cursor:pointer}
.dd143-chip.active{background:#007CC9;color:#fff;border-color:#007CC9}

/* Main column */
.dd143-main{padding-left:0;padding-right:0}
.dd143-main .dd143-banner{border:0px solid #fff;border-radius:12px;overflow:hidden;background:#fff;box-shadow:0 4px 14px rgba(255,255,255,.0);margin:0 0 16px}
.dd143-main .dd143-banner img{max-width:100%;height:auto;display:block}

/* Grid 4x3 */
.dd143-main ul.products.dd-grid{display:grid;gap:20px;grid-template-columns:repeat(4,minmax(0,1fr))}
@media(max-width:1200px){.dd143-main ul.products.dd-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:640px){.dd143-main ul.products.dd-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}}

.dd143-main ul.products.dd-grid > li.product{list-style:none;background:#fff;border:0px solid #eff3f7;border-radius:14px;padding:12px;box-shadow:0 0px 0px rgba(255,255,255,.0);display:flex;flex-direction:column;text-align:center;align-items:center}
.dd143-main ul.products.dd-grid > li.product a img{display:block;width:100% !important;height:auto !important;aspect-ratio:1/1;max-height:200px;object-fit:contain;object-position:center;background:#fff;border-radius:12px;padding:10px;margin:0 0 8px}
.dd143-main ul.products.dd-grid > li.product .woocommerce-loop-product__title{font-size:.92rem;line-height:1.3;margin:6px 0 6px;font-weight:700}
.dd143-main ul.products.dd-grid > li.product .price{font-weight:800;margin:2px 0 8px;color:#111827}
.dd143-main ul.products.dd-grid > li.product a.button{display:inline-block;border-radius:10px;padding:.55rem .8rem;margin-top:auto}

/* Pagination */
.dd143-pagination{display:flex;gap:.5rem;justify-content:center;margin:1rem 0}
.dd143-page{padding:.45rem .75rem;border:0px solid #e2e8f0;border-radius:10px;cursor:pointer;background:#fff;font-weight:700}
.dd143-page.active{background:#323D4A;color:#fff;border-color:#323D4A}

/* Mobile drawer */
.dd143-mbar{display:none}
@media(max-width:992px){
  .dd143-mbar{display:flex;justify-content:flex-start;margin:0 0 10px}
  .dd143-filter-toggle{border:0px solid #FF9A00;background:#FF9A00;color:#fff;font-weight:800;padding:.55rem .9rem;border-radius:10px;cursor:pointer}
  body.dd143-noscroll{overflow:hidden}
  .dd143-veil.show{display:block;position:fixed;inset:0;background:rgba(255,255,255,.0);z-index:9998}
  .dd143-side{position:fixed !important;top:72px;left:0;height:calc(100vh - 72px);max-height:calc(100vh - 72px);width:86vw;max-width:360px;z-index:9999;transform:translateX(-105%);transition:transform .25s ease;box-shadow:0 10px 30px rgba(255,255,255,.0)}
  .dd143-side.open{transform:translateX(0)}
}

/* Phone tighter */
@media(max-width:640px){
  .dd143-main ul.products.dd-grid > li.product a img{max-height:130px;padding:8px;margin:0 0 6px}
  .dd143-main ul.products.dd-grid > li.product .woocommerce-loop-product__title{font-size:13px;margin:4px 0 4px}
  .dd143-main ul.products.dd-grid > li.product .price{font-size:13px;margin:2px 0 6px}
}
@media(max-width:380px){
  .dd143-main ul.products.dd-grid{gap:8px}
  .dd143-main ul.products.dd-grid > li.product a img{max-height:110px}
  .dd143-btn{height:32px;padding:0 10px}
}

/* === r12: equal edge spacing for banner & grid === */

.dd143-main{ --dd143-edge: 12px; }
.dd143-main .dd143-banner,
.dd143-main ul.products.dd-grid{
  margin-left: var(--dd143-edge) !important;
  margin-right: var(--dd143-edge) !important;
}
.dd143-main ul.products.dd-grid{ padding-left:0 !important; padding-right:0 !important; }
.dd143-main ul.products.dd-grid > li.product{ margin:0 !important; }
/* On mobile, use zero edges for max space */
@media(max-width: 640px){
  .dd143-main{ --dd143-edge: 8px; }
}

/* === r13: squared (9px) filter buttons, centered text & alignment === */

.dd143-orderline{ display:grid !important; grid-template-columns: 1fr auto auto; gap:8px; align-items:center; }
.dd143-select{ height:38px !important; }
.dd143-btn{
  height:38px !important;
  border-radius:9px !important;
  padding:0 14px !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  line-height:1 !important;
  text-align:center !important;
  white-space:nowrap !important;
}

/* === r14: section title styling === */

.dd143-section-title{
  font-size: 1.1rem;
  line-height: 1.2;
  font-weight: 800;
  color: #111827;
  margin: 6px var(--dd143-edge,12px) 12px;
  position: relative;
  display: inline-block;
  padding-bottom: 6px;
  border-bottom: 1px solid #fff;
}
.dd143-section-title::before{
  content: "";
  position: absolute;
  left: -40px;
  top: calc(100% - 1px);
  width: 36px;
  height: 2px;
  background: #FF9A00;
  border-radius: 2px;
}
@media(max-width:640px){
  .dd143-section-title{ margin-left: var(--dd143-edge,8px); margin-right: var(--dd143-edge,8px); }
  .dd143-section-title::before{ left: -24px; width: 20px; }
}

/* === r15: H4 title and centered yellow accent === */

.dd143-section-title{
  font-size: 1rem;            /* H4 visual size */
  line-height: 1.25;
  font-weight: 800;
  color: #111827;
  margin: 8px var(--dd143-edge,12px) 14px;
  position: relative;
  display: block;
  padding-bottom: 8px;
  border-bottom: 1px solid #fff; /* light grey rule under title area */
}
/* Centered yellow accent */
.dd143-section-title::after{
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -2px;                /* sits over the grey rule */
  width: 44px;
  height: 3px;
  background: #FF9A00;
  border-radius: 2px;
}
@media(max-width:640px){
  .dd143-section-title{
    margin-left: var(--dd143-edge,8px);
    margin-right: var(--dd143-edge,8px);
    font-size: .95rem;
  }
  .dd143-section-title::after{ width: 34px; }
}

/* === r16: section title with left yellow bar, no bottom rule === */

.dd143-section-title{
  font-size: 1rem;
  line-height: 1.25;
  font-weight: 800;
  color: #111827;
  margin: 8px var(--dd143-edge,12px) 14px;
  display: flex; align-items: center; gap: 14px;
  padding: 0; border: none; position: relative;
}
.dd143-section-title::after{ display:none; } /* disable centered line from r15 */
.dd143-section-title::before{
  content: "";
  flex: 0 0 64px;             /* line length */
  height: 4px;
  background: #FF9A00;
  border-radius: 2px;
  display: inline-block;
}
@media(max-width:640px){
  .dd143-section-title{ margin-left: var(--dd143-edge,8px); margin-right: var(--dd143-edge,8px); gap: 10px; }
  .dd143-section-title::before{ flex-basis: 48px; height: 3px; }
}

/* === r17: H5 size for section title === */

.dd143-section-title{
  font-size: .95rem;   /* H5 visual size */
  line-height: 1.25;
  margin: 6px var(--dd143-edge,12px) 12px;
  gap: 12px;
}
@media(max-width:640px){
  .dd143-section-title{ font-size: .9rem; gap: 8px; }
  .dd143-section-title::before{ flex-basis: 44px; }
}

/* === r18: remove yellow line on section title === */

.dd143-section-title{ gap: 0 !important; }
.dd143-section-title::before{ display: none !important; content: none !important; }

/* === r19: small yellow dash icon before section title === */

.dd143-section-title{
  display:inline-flex; align-items:center; gap:10px;
  margin-left: var(--dd143-edge,12px); margin-right: var(--dd143-edge,12px);
}
.dd143-section-title::before{
  content:""; display:inline-block;
  width: 18px; height: 4px; background:#FF9A00; border-radius: 2px;
}
@media(max-width:640px){
  .dd143-section-title{ gap:8px; }
  .dd143-section-title::before{ width:16px; height:3px; }
}

/* === r20: MOBILE OVERFLOW FIXES === */

/* Prevent horizontal scroll on mobile */
html, body { max-width: 100%; overflow-x: hidden; }
.dd143-wrap, .dd143-main, .dd143-side { max-width: 100%; box-sizing: border-box; }
.dd143-main .dd143-banner { max-width: 100%; overflow: hidden; }
.dd143-main .dd143-banner, .dd143-main .dd143-banner * { box-sizing: border-box; }
.dd143-main .dd143-banner img, 
.dd143-main .dd143-banner iframe,
.dd143-main .dd143-banner .elementor, 
.dd143-main .dd143-banner .elementor-section,
.dd143-main .dd143-banner .elementor-container,
.dd143-main .dd143-banner .elementor-widget-container{ max-width:100% !important; width:100% !important; }

/* Ensure product grid can't create overflow */
.dd143-main ul.products.dd-grid{ max-width:100%; box-sizing:border-box; }
.dd143-main ul.products.dd-grid > li.product{ min-width: 0; }

/* Order line: avoid overflow at very small widths */
.dd143-orderline{ min-width: 0; }
.dd143-select, .dd143-btn{ min-width: 0; }
@media(max-width: 420px){
  .dd143-orderline{ grid-template-columns: 1fr !important; }
  .dd143-orderline .dd143-btn{ width: 100%; }
}

/* Drawer: guarantee hidden state doesn't push layout */
@media(max-width:992px){
  .dd143-side{ left:0; right:auto; }
  .dd143-side:not(.open){ transform: translateX(-105%) !important; }
}

/* Safety: any images/iframes inside the component should never exceed viewport */
.dd143-wrap img, .dd143-wrap iframe{ max-width: 100%; height: auto; }

/* === r21: show exactly 3 rows at each breakpoint === */

/* Desktop (≥1200px): 4 columns x 3 rows = 12 items */
@media (min-width:1200px){
  .dd143-main ul.products.dd-grid > li.product:nth-child(n+13){ display:none !important; }
}
/* Tablet (641–1199px): 3 columns x 3 rows = 9 items (your grid switches to 3 cols here) */
@media (min-width:641px) and (max-width:1199px){
  .dd143-main ul.products.dd-grid > li.product:nth-child(n+10){ display:none !important; }
}
/* Mobile (≤640px): 2 columns x 3 rows = 6 items */
@media (max-width:640px){
  .dd143-main ul.products.dd-grid > li.product:nth-child(n+7){ display:none !important; }
}

/* === r22: Shop by Brand block === */

.dd143-section-title--brands{ margin-top: 18px; }
.dd143-brands{
  margin: 6px var(--dd143-edge,12px) 22px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px 36px;
  align-items: center;
  justify-items: center;
}
.dd143-brand{ display:flex; align-items:center; justify-content:center; }
.dd143-brand img{
  max-height: 44px; width: auto; height: auto;
  filter: none;
  transition: transform .2s ease, filter .2s ease, opacity .2s ease;
  opacity: .95;
}
.dd143-brand:hover img{ transform: translateY(-1px); opacity: 1; }

@media (max-width: 991px){
  .dd143-brands{ grid-template-columns: repeat(3, minmax(0,1fr)); gap: 24px 28px; }
  .dd143-brand img{ max-height: 42px; }
}
@media (max-width: 640px){
  .dd143-brands{ grid-template-columns: repeat(2, minmax(0,1fr)); gap: 20px 24px; }
  .dd143-brand img{ max-height: 40px; }
}

/* === r23: sidebar banner under Nutrition === */

.dd143-side-banner{
  margin: 10px var(--dd143-edge,12px) 12px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 0px 0 rgba(255,255,255,.0), 0 0px 0px rgba(255,255,255,.0);
}
.dd143-side-banner img, 
.dd143-side-banner iframe,
.dd143-side-banner .elementor, 
.dd143-side-banner .elementor-section, 
.dd143-side-banner .elementor-container, 
.dd143-side-banner .elementor-widget-container{
  width:100% !important; max-width:100% !important; box-sizing:border-box;
}
@media(max-width:992px){
  /* inside drawer: keep margins compact */
  .dd143-side-banner{ margin: 12px 12px 18px; }
}

/* Scroll solo en menú lateral móvil */
@media (max-width: 992px) {
  .dd143-side, .dd143-sidebar {
    max-height: 80vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* Banner debajo de brands */
.dd143-brands-banner {
  margin-top: 20px;
  margin-bottom: 20px;
  text-align: center;
}

/* Guion naranja antes de cada título de sección */
.dd143-section-title {
  position: relative;
  padding-left: 28px;
}
.dd143-section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 3px;
  background-color: #FF9A00;
  border-radius: 2px;
}
