.cmhg-home-wrap{
  --radius:16px;
  --shadow:0 8px 24px rgba(13,27,61,.06);
  width:100%;
  max-width:1440px;
  margin:0 auto;
  font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  color:var(--cmhg-text,#1F2937);
}

.cmhg-search{
  width:100%;
  min-height:48px;
  display:flex;
  align-items:center;
  background:#fff;
  border:1px solid var(--cmhg-border,#E5E7EB);
  border-radius:14px;
  overflow:hidden;
  box-shadow:0 4px 18px rgba(13,27,61,.04);
  margin:0 0 18px;
}

.cmhg-search-input-wrap{flex:1;min-width:0;}
.cmhg-search-input{
  width:100%;
  height:48px;
  border:0!important;
  outline:0!important;
  box-shadow:none!important;
  padding:0 18px!important;
  font-size:15px;
  background:#fff!important;
}
.cmhg-search-input::placeholder{color:#9CA3AF;}
.cmhg-search-select{
  width:220px;
  max-width:36%;
  height:48px;
  border:0!important;
  border-left:1px solid var(--cmhg-border,#E5E7EB)!important;
  border-radius:0!important;
  background:#fff!important;
  padding:0 38px 0 14px!important;
  font-size:14px;
  color:#374151;
  outline:0!important;
  box-shadow:none!important;
}
.cmhg-search-button{
  width:58px;
  height:48px;
  border:0;
  border-radius:0;
  background:var(--cmhg-primary,#0D1B3D);
  color:#fff;
  cursor:pointer;
  font-size:24px;
  display:flex;
  align-items:center;
  justify-content:center;
}
.cmhg-search-icon{display:block;line-height:1;transform:translateY(-1px);}

.cmhg-section{margin:0 0 18px;}
.cmhg-section-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin:0 0 10px;
}
.cmhg-section-head h2{
  margin:0!important;
  font-size:22px!important;
  line-height:1.2!important;
  font-weight:800!important;
  color:var(--cmhg-text,#1F2937)!important;
}
.cmhg-section-link{
  font-size:14px;
  font-weight:700;
  color:#3957D7;
  text-decoration:none!important;
  white-space:nowrap;
}
.cmhg-section-link:hover{text-decoration:underline!important;}

.cmhg-category-row{
  display:grid;
  grid-template-columns:repeat(7,minmax(0,1fr));
  gap:16px;
}
.cmhg-category-card{
  min-height:112px;
  position:relative;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  background:#fff;
  border:1px solid var(--cmhg-border,#E5E7EB);
  border-radius:15px;
  padding:9px 12px 10px;
  text-decoration:none!important;
  color:var(--cmhg-text,#1F2937);
  overflow:hidden;
  box-shadow:0 6px 20px rgba(13,27,61,.04);
  transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease;
}
.cmhg-category-card:hover{
  transform:translateY(-2px);
  border-color:rgba(13,27,61,.22);
  box-shadow:var(--shadow);
  color:var(--cmhg-text,#1F2937);
}
.cmhg-category-img{
  height:66px;
  display:flex;
  align-items:center;
  justify-content:center;
}
.cmhg-category-img img{
  width:100%;
  height:100%;
  object-fit:contain;
  display:block;
}
.cmhg-category-title{
  font-size:13px;
  line-height:1.15;
  font-weight:800;
  max-width:80%;
}
.cmhg-category-arrow{
  position:absolute;
  right:13px;
  bottom:10px;
  color:var(--cmhg-primary,#0D1B3D);
  font-size:24px;
  line-height:1;
}

.cmhg-product-row{
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:16px;
}
.cmhg-product-card{
  position:relative;
  display:flex;
  flex-direction:column;
  min-width:0;
  background:#fff;
  border:1px solid var(--cmhg-border,#E5E7EB);
  border-radius:16px;
  overflow:hidden;
  box-shadow:0 6px 20px rgba(13,27,61,.04);
  transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease;
}
.cmhg-product-card:hover{
  transform:translateY(-2px);
  border-color:rgba(13,27,61,.2);
  box-shadow:var(--shadow);
}
.cmhg-product-img{
  position:relative;
  height:150px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:12px 12px 4px;
  text-decoration:none!important;
  background:#fff;
}
.cmhg-product-img img{
  width:100%;
  height:100%;
  object-fit:contain;
  display:block;
}
.cmhg-discount{
  position:absolute;
  left:9px;
  top:9px;
  z-index:2;
  background:var(--cmhg-accent,#D62828);
  color:#fff;
  border-radius:999px;
  padding:4px 7px;
  font-size:12px;
  line-height:1;
  font-weight:800;
}
.cmhg-product-info{
  display:flex;
  flex-direction:column;
  flex:1;
  padding:0 12px 12px;
}
.cmhg-product-brand{
  min-height:14px;
  margin:0 0 2px;
  font-size:12px;
  line-height:1.1;
  color:#6B7280;
  font-weight:800;
}
.cmhg-product-title{
  min-height:34px;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
  text-decoration:none!important;
  color:#253046;
  font-size:13.5px;
  line-height:1.24;
  font-weight:700;
}
.cmhg-product-title:hover{color:var(--cmhg-primary,#0D1B3D);}
.cmhg-rating{
  display:flex;
  align-items:center;
  gap:5px;
  min-height:18px;
  margin:5px 0 2px;
  font-size:12px;
}
.cmhg-stars{letter-spacing:.5px;color:#F59E0B;line-height:1;}
.cmhg-review-count{color:#8B95A1;font-size:11.5px;}
.cmhg-price-line{
  min-height:30px;
  display:flex;
  align-items:baseline;
  gap:7px;
  margin:0 0 8px;
  flex-wrap:wrap;
}
.cmhg-price-line .price{display:flex;align-items:baseline;gap:7px;flex-wrap:wrap;margin:0!important;}
.cmhg-price-line bdi,
.cmhg-price-line .woocommerce-Price-amount{
  color:var(--cmhg-primary,#0D1B3D);
  font-size:20px;
  font-weight:900;
  line-height:1.1;
}
.cmhg-price-line del{color:#9CA3AF;opacity:1;font-size:12px;font-weight:600;order:2;}
.cmhg-price-line del bdi,
.cmhg-price-line del .woocommerce-Price-amount{color:#9CA3AF;font-size:12px;font-weight:600;text-decoration:line-through;}
.cmhg-price-line ins{text-decoration:none;order:1;}
.cmhg-price-line ins bdi,
.cmhg-price-line ins .woocommerce-Price-amount{font-size:20px;font-weight:900;color:var(--cmhg-primary,#0D1B3D);}
.cmhg-bottom-line{
  margin-top:auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}
.cmhg-installments{
  min-width:0;
  display:inline-flex;
  align-items:center;
  gap:4px;
  max-width:calc(100% - 44px);
  padding:5px 8px;
  border-radius:999px;
  background:#EAF8F3;
  color:#15805E;
  font-size:11px;
  line-height:1;
  font-weight:800;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.cmhg-installments:before{content:"◈";font-size:10px;}
.cmhg-cart-btn,
.cmhg-cart-btn.button,
.woocommerce a.cmhg-cart-btn.button{
  width:38px!important;
  min-width:38px!important;
  height:34px!important;
  min-height:34px!important;
  padding:0!important;
  margin:0!important;
  border:0!important;
  border-radius:9px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  background:var(--cmhg-primary,#0D1B3D)!important;
  color:#fff!important;
  text-decoration:none!important;
  font-size:16px!important;
  line-height:1!important;
  box-shadow:none!important;
}
.cmhg-consult-btn{
  height:32px;
  padding:0 10px;
  border-radius:9px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:var(--cmhg-primary,#0D1B3D);
  color:#fff!important;
  text-decoration:none!important;
  font-size:10px;
  line-height:1;
  font-weight:800;
  white-space:nowrap;
}
.cmhg-note{padding:12px 14px;background:#fff;border:1px solid var(--cmhg-border,#E5E7EB);border-radius:12px;}

@media (max-width:1200px){
  .cmhg-category-row{grid-template-columns:repeat(4,minmax(0,1fr));}
  .cmhg-product-row{grid-template-columns:repeat(4,minmax(0,1fr));}
}
@media (max-width:900px){
  .cmhg-product-row{grid-template-columns:repeat(3,minmax(0,1fr));}
  .cmhg-search-select{width:180px;}
}
@media (max-width:767px){
  .cmhg-home-wrap{padding:0 2px;}
  .cmhg-search{min-height:auto;display:grid;grid-template-columns:1fr 50px;border-radius:14px;}
  .cmhg-search-input{height:46px;font-size:14px;}
  .cmhg-search-select{grid-column:1 / -1;grid-row:2;width:100%;max-width:100%;height:42px;border-left:0!important;border-top:1px solid var(--cmhg-border,#E5E7EB)!important;}
  .cmhg-search-button{grid-column:2;grid-row:1;width:50px;height:46px;}
  .cmhg-section-head h2{font-size:18px!important;}
  .cmhg-section-link{font-size:12px;}
  .cmhg-category-row{display:flex;overflow-x:auto;gap:10px;padding-bottom:5px;scroll-snap-type:x mandatory;}
  .cmhg-category-card{min-width:144px;min-height:104px;scroll-snap-align:start;}
  .cmhg-product-row{grid-template-columns:repeat(2,minmax(0,1fr));gap:11px;}
  .cmhg-product-img{height:132px;padding:10px 10px 2px;}
  .cmhg-product-info{padding:0 10px 10px;}
  .cmhg-product-title{font-size:12.5px;min-height:32px;}
  .cmhg-price-line bdi,
  .cmhg-price-line .woocommerce-Price-amount,
  .cmhg-price-line ins bdi,
  .cmhg-price-line ins .woocommerce-Price-amount{font-size:17px;}
  .cmhg-installments{font-size:10px;padding:5px 6px;}
  .cmhg-cart-btn,.cmhg-cart-btn.button,.woocommerce a.cmhg-cart-btn.button{width:34px!important;min-width:34px!important;height:32px!important;}
}

/* Productos destacados: carrusel automático cuando hay más de 6 */
.cmhg-product-carousel{
  position:relative;
}
.cmhg-product-carousel .cmhg-product-row{
  display:flex;
  grid-template-columns:none;
  gap:16px;
  overflow-x:auto;
  overflow-y:hidden;
  scroll-snap-type:x mandatory;
  scroll-behavior:smooth;
  scrollbar-width:none;
  padding:2px 2px 8px;
}
.cmhg-product-carousel .cmhg-product-row::-webkit-scrollbar{display:none;}
.cmhg-product-carousel .cmhg-product-card{
  flex:0 0 calc((100% - 80px) / 6);
  scroll-snap-align:start;
}
.cmhg-carousel-arrow{
  position:absolute;
  top:50%;
  z-index:5;
  width:42px;
  height:42px;
  border:1px solid var(--cmhg-border,#E5E7EB);
  border-radius:999px;
  background:#fff;
  color:var(--cmhg-primary,#0D1B3D);
  box-shadow:0 8px 24px rgba(13,27,61,.14);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:34px;
  line-height:1;
  font-weight:600;
  cursor:pointer;
  transform:translateY(-50%);
  transition:opacity .18s ease,transform .18s ease,box-shadow .18s ease;
}
.cmhg-carousel-prev{left:-14px;padding:0 3px 4px 0;}
.cmhg-carousel-next{right:-14px;padding:0 0 4px 3px;}
.cmhg-carousel-arrow:hover:not(:disabled){
  transform:translateY(-50%) scale(1.04);
  box-shadow:0 10px 28px rgba(13,27,61,.2);
}
.cmhg-carousel-arrow:disabled{
  opacity:.25;
  cursor:not-allowed;
  box-shadow:none;
}

@media (max-width:1200px){
  .cmhg-product-carousel .cmhg-product-card{flex-basis:calc((100% - 48px) / 4);}
}
@media (max-width:900px){
  .cmhg-product-carousel .cmhg-product-card{flex-basis:calc((100% - 32px) / 3);}
}
@media (max-width:767px){
  .cmhg-product-carousel .cmhg-product-row{gap:11px;padding:2px 2px 8px;}
  .cmhg-product-carousel .cmhg-product-card{flex-basis:calc((100% - 11px) / 2);}
  .cmhg-carousel-arrow{width:36px;height:36px;font-size:28px;}
  .cmhg-carousel-prev{left:-6px;}
  .cmhg-carousel-next{right:-6px;}
}

/* Categorías con acordeón + subcategorías */
.cmhg-category-accordion-section{margin-top:4px;}
.cmhg-category-accordions{display:grid;gap:12px;}
.cmhg-cat-accordion{
  background:#fff;
  border:1px solid var(--cmhg-border,#E5E7EB);
  border-radius:18px;
  box-shadow:0 6px 20px rgba(13,27,61,.04);
  overflow:hidden;
  transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease;
}
.cmhg-cat-accordion:hover{border-color:rgba(13,27,61,.18);box-shadow:0 10px 28px rgba(13,27,61,.08);}
.cmhg-cat-top{
  display:grid;
  grid-template-columns:150px minmax(0,1fr) auto;
  gap:18px;
  align-items:center;
  padding:14px 16px;
}
.cmhg-cat-image{
  width:150px;
  height:94px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(180deg,#F8FAFC 0%,#F3F5F8 100%);
  border-radius:15px;
  overflow:hidden;
  text-decoration:none!important;
}
.cmhg-cat-image img{width:100%;height:100%;object-fit:contain;display:block;mix-blend-mode:multiply;}
.cmhg-cat-title-line{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:5px;}
.cmhg-cat-number{
  width:28px;
  height:28px;
  border:1px solid rgba(13,27,61,.18);
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:13px;
  font-weight:900;
  color:var(--cmhg-primary,#0D1B3D);
  background:#fff;
}
.cmhg-cat-title-line h3{
  margin:0!important;
  font-size:19px!important;
  line-height:1.22!important;
  font-weight:850!important;
  color:var(--cmhg-primary,#0D1B3D)!important;
}
.cmhg-cat-count{
  display:inline-flex;
  align-items:center;
  min-height:24px;
  padding:4px 9px;
  border-radius:999px;
  background:#F3F5F8;
  color:#64748B;
  font-size:12px;
  line-height:1;
  font-weight:800;
}
.cmhg-cat-main p{margin:0!important;color:#4B5563;font-size:13.5px;line-height:1.45;}
.cmhg-cat-view{
  justify-self:end;
  display:inline-flex;
  align-items:center;
  gap:6px;
  min-height:38px;
  padding:0 12px;
  border-radius:999px;
  text-decoration:none!important;
  color:var(--cmhg-primary,#0D1B3D)!important;
  font-size:13px;
  font-weight:850;
  white-space:nowrap;
  transition:background .18s ease,transform .18s ease;
}
.cmhg-cat-view:hover{background:#F3F5F8;transform:translateX(2px);}
.cmhg-subcat-grid{
  display:grid;
  grid-template-columns:repeat(7,minmax(0,1fr));
  border-top:1px solid var(--cmhg-border,#E5E7EB);
  background:#fff;
}
.cmhg-subcat-tile{
  min-height:78px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:4px;
  padding:9px 7px;
  border:0;
  border-right:1px solid var(--cmhg-border,#E5E7EB);
  background:#fff;
  color:var(--cmhg-primary,#0D1B3D);
  text-align:center;
  text-decoration:none!important;
  cursor:pointer;
  transition:background .18s ease,color .18s ease;
}
.cmhg-subcat-tile:last-child{border-right:0;}
.cmhg-subcat-tile:hover{background:#F8FAFC;color:var(--cmhg-primary,#0D1B3D);}
.cmhg-subcat-icon{
  width:28px;
  height:28px;
  color:#415170;
  display:flex;
  align-items:center;
  justify-content:center;
}
.cmhg-subcat-icon svg{width:28px;height:28px;display:block;}
.cmhg-subcat-name{
  display:block;
  width:100%;
  max-width:100%;
  font-size:12px;
  line-height:1.15;
  font-weight:850;
  color:#172033;
  overflow:hidden;
  text-overflow:ellipsis;
}
.cmhg-subcat-count{font-size:10.5px;line-height:1.1;font-weight:700;color:#7B8794;}
.cmhg-subcat-more{
  font-family:inherit;
  color:var(--cmhg-primary,#0D1B3D);
  background:#FBFCFE;
}
.cmhg-subcat-more .cmhg-subcat-icon{color:var(--cmhg-primary,#0D1B3D);}
.cmhg-subcat-hidden{display:none;}
.cmhg-cat-accordion.is-expanded .cmhg-subcat-hidden{display:flex;}
.cmhg-cat-accordion.is-expanded .cmhg-subcat-more{background:var(--cmhg-primary,#0D1B3D);color:#fff;}
.cmhg-cat-accordion.is-expanded .cmhg-subcat-more .cmhg-subcat-icon,
.cmhg-cat-accordion.is-expanded .cmhg-subcat-more .cmhg-subcat-name,
.cmhg-cat-accordion.is-expanded .cmhg-subcat-more .cmhg-subcat-count{color:#fff;}

@media (max-width:1200px){
  .cmhg-subcat-grid{grid-template-columns:repeat(4,minmax(0,1fr));}
  .cmhg-subcat-tile:nth-child(4n){border-right:0;}
}
@media (max-width:767px){
  .cmhg-cat-top{grid-template-columns:92px minmax(0,1fr);gap:12px;padding:12px;}
  .cmhg-cat-image{width:92px;height:72px;border-radius:14px;grid-row:span 2;}
  .cmhg-cat-view{grid-column:2;justify-self:start;min-height:30px;padding:0;font-size:12.5px;}
  .cmhg-cat-title-line{gap:7px;margin-bottom:3px;}
  .cmhg-cat-number{width:24px;height:24px;font-size:12px;}
  .cmhg-cat-title-line h3{font-size:16px!important;}
  .cmhg-cat-main p{font-size:12.5px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
  .cmhg-cat-count{font-size:11px;min-height:22px;padding:4px 8px;}
  .cmhg-subcat-grid{
    display:flex;
    overflow-x:auto;
    overflow-y:hidden;
    scroll-snap-type:x mandatory;
    scrollbar-width:none;
  }
  .cmhg-subcat-grid::-webkit-scrollbar{display:none;}
  .cmhg-subcat-tile{
    flex:0 0 112px;
    min-height:86px;
    scroll-snap-align:start;
    border-right:1px solid var(--cmhg-border,#E5E7EB)!important;
  }
  .cmhg-subcat-name{white-space:normal;font-size:11.5px;}
}
