/* 1. Base e variáveis — todas as regras limitadas aos widgets Home. */
.sdmh {
  --sdmh-background:#13171b;
  --sdmh-surface:#1b2229;
  --sdmh-text:#f3f5f7;
  --sdmh-muted:#a7b3bd;
  --sdmh-accent:#9cc9e3;
  --sdmh-button_text:#13242f;
  --sdmh-columns:3;
  --sdmh-gap:20px;
  width:100%;
  min-width:0;
  color:var(--sdmh-text);
  background:var(--sdmh-background);
  font:400 14px/1.5 Inter,"Segoe UI",Arial,sans-serif;
  text-align:start;
  isolation:isolate
}

.sdmh *,.sdmh *::before,.sdmh *::after {
  box-sizing:border-box
}

.sdmh [hidden] {
  display:none!important
}

.sdmh :is(h2,h3,p) {
  font-family:inherit;
  margin:0;
  padding:0;
  color:inherit
}

.sdmh a {
  font-family:inherit;
  color:inherit;
  text-decoration:none;
  box-shadow:none
}

.sdmh img {
  display:block;
  max-width:100%;
  border:0;
  border-radius:0
}

.sdmh :is(a,button,[tabindex]):focus-visible {
  outline:2px solid var(--sdmh-accent);
  outline-offset:4px
}

/* 2. Títulos e cartões de produtos. */
.sdmh-showcase {
  padding:28px 24px 32px
}

.sdmh .sdmh-heading {
  margin-bottom:19px
}

.sdmh .sdmh-heading>span {
  display:block;
  color:#88a3b8;
  font-size:9px;
  text-transform:uppercase;
  letter-spacing:.12em;
  margin-bottom:6px
}

.sdmh .sdmh-heading h2 {
  font-size:24px;
  font-weight:650;
  line-height:1.2;
  letter-spacing:-.035em
}

.sdmh .sdmh-card {
  display:flex;
  flex-direction:column;
  min-width:0;
  background:var(--sdmh-surface);
  border:1px solid #ccdfea19;
  border-radius:10px;
  overflow:hidden;
  transition:border-color .2s
}

.sdmh .sdmh-card:hover {
  border-color:#a6cee144
}

.sdmh .sdmh-image {
  height:var(--sdmh-image-height,230px);
  padding:var(--sdmh-image-padding,22px);
  flex:0 0 auto;
  display:flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(145deg,#25313c,#1b242d);
  border-bottom:1px solid #cde1f01c
}

/* O arquivo completo vem do WooCommerce. Encaixe sem recorte ou distorção. */
.sdmh .sdmh-image img {
  width:100%;
  height:100%;
  max-width:100%;
  max-height:100%;
  min-width:0;
  min-height:0;
  margin:0;
  aspect-ratio:auto;
  object-position:center;
  object-fit:contain
}

.sdmh .sdmh-body {
  display:flex;
  flex:1;
  flex-direction:column;
  padding:22px
}

.sdmh .sdmh-title-row {
  display:flex;
  gap:10px;
  align-items:flex-start;
  justify-content:space-between;
  margin-bottom:11px
}

.sdmh .sdmh-title-row h3 {
  font-size:18px;
  font-weight:650;
  line-height:1.3;
  letter-spacing:-.025em
}

.sdmh .sdmh-badge {
  padding:3px 6px;
  border:1px solid #a2cce22e;
  border-radius:4px;
  background:#2b414f;
  color:#b9d9ec;
  font-size:9px;
  flex-shrink:0
}

.sdmh .sdmh-description {
  color:var(--sdmh-muted);
  font-size:12px;
  line-height:1.7;
  display:-webkit-box;
  -webkit-line-clamp:3;
  -webkit-box-orient:vertical;
  overflow:hidden;
  margin-bottom:18px
}

.sdmh .sdmh-sales {
  margin-top:auto
}

.sdmh .sdmh-price {
  font-size:26px;
  font-weight:650;
  letter-spacing:-.035em
}

.sdmh .sdmh-price del {
  display:block;
  font-size:12px;
  color:var(--sdmh-muted);
  font-weight:400
}

.sdmh .sdmh-price ins {
  background:transparent;
  color:inherit;
  text-decoration:none
}

.sdmh .sdmh-price .woocommerce-price-suffix {
  font-size:11px
}

.sdmh .sdmh-stock {
  color:var(--sdmh-muted);
  font-size:11px;
  margin-top:8px
}

.sdmh .sdmh-rating {
  color:#e8c78c;
  font-size:11px;
  margin-bottom:8px
}

.sdmh .star-rating {
  position:relative;
  display:block;
  width:5.4em;
  height:1.5em;
  overflow:hidden;
  letter-spacing:.05em
}

.sdmh .star-rating::before {
  content:'☆☆☆☆☆';
  position:absolute;
  inset:0
}

.sdmh .star-rating>span {
  position:absolute;
  inset:0 auto 0 0;
  overflow:hidden;
  white-space:nowrap;
  font-size:0
}

.sdmh .star-rating>span::before {
  content:'★★★★★';
  font-size:11px;
  letter-spacing:.05em
}

.sdmh .sdmh-footer {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:20px
}

.sdmh .sdmh-button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:24px;
  min-height:41px;
  padding:10px 16px;
  border:1px solid var(--sdmh-accent);
  border-radius:5px;
  background:var(--sdmh-accent);
  color:var(--sdmh-button_text);
  font-size:12px;
  font-weight:650;
  text-align:center;
  line-height:1.3;
  transition:filter .2s
}

.sdmh .sdmh-footer .sdmh-button {
  flex:1
}

.sdmh .sdmh-button:hover {
  filter:brightness(1.1)
}

.sdmh .sdmh-secondary {
  color:var(--sdmh-accent);
  background:transparent;
  border-color:#b8d2e32e
}

/* 3. Grade e carrossel: rolagem nativa, toque e setas no centro. */
.sdmh .sdmh-viewport {
  position:relative;
  min-width:0
}

.sdmh .sdmh-track {
  display:flex;
  gap:var(--sdmh-gap);
  overflow-x:auto;
  scroll-snap-type:x mandatory;
  scrollbar-width:thin;
  padding:2px 1px 10px
}

.sdmh .sdmh-track>[data-card] {
  flex:0 0 calc((100% - (var(--sdmh-columns) - 1)*var(--sdmh-gap))/var(--sdmh-columns));
  scroll-snap-align:start
}

.sdmh.sdmh-grid .sdmh-track {
  display:grid;
  grid-template-columns:repeat(var(--sdmh-columns),minmax(0,1fr));
  overflow:visible
}

.sdmh .sdmh-arrows button {
  position:absolute;
  z-index:3;
  top:50%;
  transform:translateY(-50%);
  display:flex;
  align-items:center;
  justify-content:center;
  width:44px;
  height:44px;
  padding:0;
  border:1px solid #d3e2ee26;
  border-radius:50%;
  background:#151b20ed;
  color:#fff;
  box-shadow:0 4px 16px #0005;
  cursor:pointer;
  transition:background .2s
}

.sdmh .sdmh-arrows button[data-step='-1'] {
  inset-inline-start:-22px
}

.sdmh .sdmh-arrows button[data-step='1'] {
  inset-inline-end:-22px
}

.sdmh .sdmh-arrows button:hover {
  background:#263742;
  border-color:#a4cce166
}

.sdmh .sdmh-arrows button:disabled {
  opacity:0;
  visibility:hidden;
  pointer-events:none
}

.sdmh .sdmh-arrows svg {
  display:block;
  width:21px;
  height:21px
}

.sdmh .sdmh-empty {
  padding:32px 24px;
  color:var(--sdmh-muted);
  font-size:14px
}

/* 4. Destaques conectados ao produto. Sem rotação automática. */
.sdmh.sdmh-hero .sdmh-track {
  gap:0;
  padding:0
}

.sdmh.sdmh-hero .sdmh-track>.sdmh-slide {
  flex-basis:100%
}

.sdmh .sdmh-slide {
  position:relative;
  isolation:isolate;
  display:flex;
  align-items:center;
  gap:24px;
  min-height:450px;
  padding:56px 64px 64px;
  overflow:hidden;
  background:linear-gradient(115deg,#11171d,#25313c)
}

.sdmh .sdmh-backdrop {
  position:absolute;
  z-index:-2;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover
}

.sdmh .sdmh-slide::before {
  content:'';
  position:absolute;
  z-index:-1;
  inset:0;
  background:linear-gradient(90deg,#000b,#0002)
}

.sdmh .sdmh-hero-content {
  flex:1;
  min-width:0;
  max-width:540px;
  text-shadow:0 2px 14px #0005
}

.sdmh .sdmh-kicker {
  display:block;
  margin-bottom:17px;
  color:#c5e5f6;
  font-size:10px;
  font-weight:650;
  letter-spacing:.14em;
  text-transform:uppercase
}

.sdmh .sdmh-hero-content h2 {
  font-size:clamp(30px,4vw,56px);
  line-height:1.06;
  font-weight:700;
  letter-spacing:-.045em;
  margin-bottom:17px
}

.sdmh .sdmh-hero-content p {
  font-size:16px;
  line-height:1.65;
  color:#d4dce3;
  margin-bottom:26px
}

.sdmh .sdmh-hero-content .sdmh-button {
  text-shadow:none
}

.sdmh .sdmh-hero-image {
  flex:1;
  min-width:0;
  max-width:45%
}

.sdmh .sdmh-hero-image img {
  width:100%;
  max-height:330px;
  object-fit:contain
}

.sdmh.sdmh-hero .sdmh-arrows button[data-step='-1'] {
  inset-inline-start:12px
}

.sdmh.sdmh-hero .sdmh-arrows button[data-step='1'] {
  inset-inline-end:12px
}

/* 5. Responsividade e movimento reduzido. Controles do Elementor têm prioridade. */
@media(max-width:1024px) {
  .sdmh {
  --sdmh-columns:2
}
.sdmh .sdmh-slide {
  padding:44px;
  min-height:400px
}

}

@media(max-width:767px) {
  .sdmh {
  --sdmh-columns:1
}
.sdmh-showcase {
  padding:24px 18px
}
.sdmh .sdmh-body {
  padding:19px
}
.sdmh .sdmh-image {
  height:var(--sdmh-image-height,205px)
}
.sdmh .sdmh-arrows button {
  width:38px;
  height:38px
}
.sdmh .sdmh-arrows button[data-step='-1'] {
  inset-inline-start:-14px
}
.sdmh .sdmh-arrows button[data-step='1'] {
  inset-inline-end:-14px
}
.sdmh .sdmh-slide {
  flex-direction:column;
  align-items:stretch;
  gap:22px;
  padding:34px 38px 40px;
  min-height:435px
}
.sdmh .sdmh-hero-content p {
  font-size:13px
}
.sdmh .sdmh-hero-image {
  max-width:100%;
  align-self:center
}
.sdmh .sdmh-hero-image img {
  max-height:180px
}

}

@media(prefers-reduced-motion:reduce) {
  .sdmh *,.sdmh *::before,.sdmh *::after {
  transition:none!important;
  animation:none!important;
  scroll-behavior:auto!important
}

}


/* 6. Presets independentes por widget. Valores personalizados do Elementor
   continuam tendo prioridade pelas variáveis CSS do contêiner. */
.sdmh .sdmh-card { position: relative; }
.sdmh .sdmh-cart-icon { display: none; }

/* KaBuM: cartões brancos arredondados, fundo cinza e ações em laranja. */
.sdmh.sdmh-theme-kabum {
  --sdmh-background: #f2f3f5;
  --sdmh-surface: #ffffff;
  --sdmh-text: #334451;
  --sdmh-muted: #758490;
  --sdmh-accent: #e85c00;
  --sdmh-button_text: #ffffff;
}
.sdmh.sdmh-theme-kabum .sdmh-card {
  border: 1px solid transparent;
  border-radius: 18px;
  box-shadow: 0 3px 12px #172c3c06;
}
.sdmh.sdmh-theme-kabum .sdmh-card:hover { border-color: #d4dce2; }
.sdmh.sdmh-theme-kabum .sdmh-image {
  height: var(--sdmh-image-height,210px);
  padding: var(--sdmh-image-padding,40px 24px 14px);
  background: var(--sdmh-surface);
  border: 0;
}
.sdmh.sdmh-theme-kabum .sdmh-body { padding: 10px 14px 14px; }
.sdmh.sdmh-theme-kabum .sdmh-title-row { gap: 7px; margin-bottom: 7px; }
.sdmh.sdmh-theme-kabum .sdmh-title-row h3 {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sdmh.sdmh-theme-kabum .sdmh-description { font-size: 11px; -webkit-line-clamp: 2; margin-bottom: 10px; }
.sdmh.sdmh-theme-kabum .sdmh-price { font-size: 18px; letter-spacing: 0; font-weight: 700; }
.sdmh.sdmh-theme-kabum .sdmh-badge {
  background: #f2e6ff;
  border: 0;
  color: #6500a8;
  font-size: 8px;
}
.sdmh.sdmh-theme-kabum .sdmh-rating { color: #e85c00; }
.sdmh.sdmh-theme-kabum .sdmh-footer { margin-top: 12px; }
.sdmh.sdmh-theme-kabum .sdmh-button { min-height: 34px; padding: 7px 10px; font-size: 11px; }
.sdmh.sdmh-theme-kabum .sdmh-purchase {
  position: absolute;
  inset-block-start: 10px;
  inset-inline-end: 10px;
  width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 5px;
  border: 0;
  background: transparent;
  color: var(--sdmh-muted);
}
.sdmh.sdmh-theme-kabum .sdmh-purchase:hover { background: #f2f3f5; color: var(--sdmh-accent); }
.sdmh.sdmh-theme-kabum .sdmh-cart-icon { display: block; width: 22px; height: 22px; }
.sdmh.sdmh-theme-kabum .sdmh-buy-label {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

/* Mercado Livre: vitrine branca, imagens neutras, cartões sem moldura,
   preços leves e ofertas verdes. Não cria frete, parcelas ou vendas fictícias. */
.sdmh.sdmh-theme-mercado {
  --sdmh-background: #ffffff;
  --sdmh-surface: #ffffff;
  --sdmh-text: #252525;
  --sdmh-muted: #737373;
  --sdmh-accent: #3483fa;
  --sdmh-button_text: #ffffff;
}
.sdmh.sdmh-theme-mercado.sdmh-showcase { border: 1px solid #e1e1e1; border-radius: 6px; }
.sdmh.sdmh-theme-mercado .sdmh-heading>span { color: var(--sdmh-muted); }
.sdmh.sdmh-theme-mercado .sdmh-heading h2 { font-size: 21px; font-weight: 500; letter-spacing: 0; }
.sdmh.sdmh-theme-mercado .sdmh-card { border: 0; border-radius: 0; box-shadow: none; }
.sdmh.sdmh-theme-mercado .sdmh-image { height: var(--sdmh-image-height,180px); padding: var(--sdmh-image-padding,14px); background: #f5f5f5; border: 0; }
.sdmh.sdmh-theme-mercado .sdmh-body { padding: 14px 1px 8px; }
.sdmh.sdmh-theme-mercado .sdmh-title-row { gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.sdmh.sdmh-theme-mercado .sdmh-title-row h3 {
  flex-basis: 100%;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sdmh.sdmh-theme-mercado .sdmh-description { font-size: 11px; -webkit-line-clamp: 2; margin-bottom: 10px; }
.sdmh.sdmh-theme-mercado .sdmh-badge { background: #00a650; color: #fff; border: 0; border-radius: 2px; font-size: 10px; }
.sdmh.sdmh-theme-mercado .sdmh-price { font-size: 25px; font-weight: 400; letter-spacing: -.025em; }
.sdmh.sdmh-theme-mercado .sdmh-price del { font-size: 11px; }
.sdmh.sdmh-theme-mercado .sdmh-footer { margin-top: 14px; }
.sdmh.sdmh-theme-mercado .sdmh-button { font-size: 11px; min-height: 34px; padding: 7px 10px; }

/* Setas claras para os dois presets claros; continuam no centro da vitrine. */
.sdmh:is(.sdmh-theme-kabum,.sdmh-theme-mercado) .sdmh-arrows button {
  border-color: #dedede;
  background: #ffffff;
  color: var(--sdmh-accent);
  box-shadow: 0 2px 5px #00000018;
}
.sdmh:is(.sdmh-theme-kabum,.sdmh-theme-mercado) .sdmh-arrows button:hover { background: #f5f6f7; }
.sdmh.sdmh-theme-kabum .sdmh-slide { background: linear-gradient(115deg,#f7f8fa,#e5ebef); }
.sdmh.sdmh-theme-mercado .sdmh-slide { background: linear-gradient(115deg,#fff,#f5f5f5); }
.sdmh:is(.sdmh-theme-kabum,.sdmh-theme-mercado) .sdmh-slide::before { background: #ffffffd9; }
.sdmh:is(.sdmh-theme-kabum,.sdmh-theme-mercado) .sdmh-kicker { color: var(--sdmh-accent); }
.sdmh:is(.sdmh-theme-kabum,.sdmh-theme-mercado) .sdmh-hero-content { text-shadow: none; }
.sdmh:is(.sdmh-theme-kabum,.sdmh-theme-mercado) .sdmh-hero-content p { color: var(--sdmh-muted); }
.sdmh:is(.sdmh-theme-kabum,.sdmh-theme-mercado) .sdmh-secondary { border-color: #d6dce1; }
/* Scrollbar oculta apenas com JS ativo: sem JS, a barra continua disponível. */
.sdmh.sdmh-enhanced .sdmh-track { scrollbar-width: none; }
.sdmh.sdmh-enhanced .sdmh-track::-webkit-scrollbar { display: none; }
