:root{
  --ag-bg:#071114;
  --ag-panel:#0d1b20;
  --ag-panel2:#11252b;
  --ag-border:rgba(73,235,207,.16);
  --ag-text:#f5fbfa;
  --ag-muted:#9fb5b2;
  --ag-accent:#31e6c4;
  --ag-accent2:#18bfa4;
  --ag-soft:rgba(49,230,196,.09);
}

body.single-product{background:var(--ag-bg);color:var(--ag-text)}
body.single-product .site-main,
body.single-product .content-area{background:transparent}

/* Estrutura principal: capa + conteúdo */
body.single-product div.product{
  display:grid!important;
  grid-template-columns:minmax(300px,420px) minmax(0,1fr)!important;
  gap:26px!important;
  align-items:start!important;
  max-width:1368px;
  margin:28px auto 0!important;
}
body.single-product div.product > *{min-width:0}

/* CAPA / GALERIA: qualquer imagem vira o mesmo quadro visual */
body.single-product .woocommerce-product-gallery{
  width:100%!important;
  max-width:420px!important;
  float:none!important;
  margin:0!important;
  padding:0!important;
  position:relative!important;
  top:auto!important;
  align-self:start!important;
  justify-self:start!important;
}
body.single-product .woocommerce-product-gallery .flex-viewport,
body.single-product .woocommerce-product-gallery__wrapper{
  margin:0!important;
  padding:0!important;
}
body.single-product .woocommerce-product-gallery__wrapper{
  border-radius:18px;
  overflow:hidden;
  background:var(--ag-panel);
  border:1px solid var(--ag-border);
}
body.single-product .woocommerce-product-gallery__image{
  width:100%!important;
  height:545px!important;
  margin:0!important;
  padding:0!important;
  display:flex!important;
  align-items:center;
  justify-content:center;
  background:#0a1519;
  overflow:hidden;
}
body.single-product .woocommerce-product-gallery__image a{
  display:block!important;
  width:100%!important;
  height:100%!important;
}
body.single-product .woocommerce-product-gallery__image img{
  width:100%!important;
  height:100%!important;
  object-fit:cover!important;
  object-position:center!important;
  display:block!important;
  margin:0!important;
}
body.single-product .flex-control-thumbs{
  display:grid!important;
  grid-template-columns:repeat(4,1fr);
  gap:10px;
  margin-top:12px!important;
}
body.single-product .flex-control-thumbs li{
  width:100%!important;
  float:none!important;
  margin:0!important;
  aspect-ratio:16/10;
  border-radius:10px;
  overflow:hidden;
  border:1px solid var(--ag-border);
  background:var(--ag-panel);
}
body.single-product .flex-control-thumbs img{
  width:100%!important;
  height:100%!important;
  object-fit:cover!important;
}

body.single-product .summary.entry-summary{
  width:100%!important;
  float:none!important;
  margin:0!important;
  padding:0!important;
  align-self:start!important;
}
.ag-product-shell{
  display:grid;
  grid-template-columns:minmax(0,1fr) 330px;
  gap:22px;
  align-items:start;
}
.ag-product-info,.ag-buy-card{
  background:linear-gradient(180deg,var(--ag-panel),rgba(13,27,32,.82));
  border:1px solid var(--ag-border);
  border-radius:18px;
}
.ag-product-info{padding:26px}
.ag-buy-card{padding:24px;position:sticky;top:105px}

.ag-breadcrumb-wrap{margin-bottom:16px}
.ag-breadcrumb-wrap .woocommerce-breadcrumb{color:var(--ag-muted);font-size:13px;margin:0}
.ag-breadcrumb-wrap a{color:#d8e7e4}
.ag-bc-sep{padding:0 7px;color:#5b7b75}

.ag-top-badges{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:14px}
.ag-badge{font-size:11px;font-weight:800;letter-spacing:.04em;padding:7px 10px;border-radius:999px;background:var(--ag-soft);color:var(--ag-accent);border:1px solid rgba(49,230,196,.22)}
.ag-badge-offer{background:var(--ag-accent);color:#04110f;border-color:transparent}
body.single-product .product_title{font-size:clamp(28px,3vw,44px);line-height:1.05;margin:0 0 14px;color:var(--ag-text)}
body.single-product .woocommerce-product-rating{margin:0 0 20px}
body.single-product .star-rating span::before{color:var(--ag-accent)}

.ag-info-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:22px 0}
.ag-info-card{display:flex;gap:12px;padding:15px;border-radius:14px;background:rgba(255,255,255,.025);border:1px solid rgba(255,255,255,.06);min-height:82px}
.ag-info-icon{width:42px;height:42px;border-radius:12px;display:flex;align-items:center;justify-content:center;background:var(--ag-soft);font-size:21px;flex:0 0 42px}
.ag-info-card strong{display:block;color:#fff;font-size:14px;margin-bottom:4px}
.ag-info-card span{display:block;color:var(--ag-muted);font-size:12.5px;line-height:1.35}
.ag-short-description{color:#c8d7d4;font-size:14px;line-height:1.7;padding-top:8px}

.ag-buy-label{color:var(--ag-muted);font-size:12px;text-transform:uppercase;letter-spacing:.08em;margin-bottom:4px}
.ag-buy-card .price{font-size:34px!important;font-weight:900;color:#fff!important;margin:0 0 10px!important}
.ag-buy-card .price del{font-size:16px;color:#718985!important;opacity:.7}
.ag-buy-card .price ins{text-decoration:none}
.ag-stock{display:flex;align-items:center;gap:8px;font-size:13px;color:#d9ffef;margin:0 0 18px}
.ag-stock span{width:9px;height:9px;border-radius:50%;background:var(--ag-accent);box-shadow:0 0 0 5px rgba(49,230,196,.1)}
.ag-buy-card form.cart{margin:0 0 18px!important}
.ag-buy-card .quantity .qty{height:48px;background:#071114;color:#fff;border:1px solid var(--ag-border);border-radius:10px}
.ag-buy-card .single_add_to_cart_button{
  width:100%;min-height:52px!important;border-radius:12px!important;background:linear-gradient(180deg,var(--ag-accent),var(--ag-accent2))!important;color:#02110e!important;font-weight:900!important;font-size:16px!important;box-shadow:0 10px 24px rgba(49,230,196,.14)!important
}
.ag-buy-card .single_add_to_cart_button:hover{filter:brightness(1.05)}
.ag-safe-box{display:grid;gap:10px;padding-top:16px;border-top:1px solid rgba(255,255,255,.06)}
.ag-safe-box>div{display:grid;gap:2px}
.ag-safe-box strong{font-size:13px;color:#fff}
.ag-safe-box small{font-size:11.5px;color:var(--ag-muted)}
.ag-buy-card .product_meta{margin-top:18px;padding-top:16px;border-top:1px solid rgba(255,255,255,.06);color:var(--ag-muted);font-size:12px}
.ag-buy-card .product_meta a{color:var(--ag-accent)}

/* Conteúdo inferior */
body.single-product .woocommerce-tabs,
body.single-product .related.products,
body.single-product .up-sells{grid-column:1/-1;width:100%;margin-top:20px}
body.single-product .woocommerce-tabs{background:var(--ag-panel);border:1px solid var(--ag-border);border-radius:18px;padding:22px}
body.single-product .woocommerce-tabs ul.tabs{padding:0!important;margin:0 0 20px!important;border-bottom:1px solid rgba(255,255,255,.08)}
body.single-product .woocommerce-tabs ul.tabs li{background:transparent!important;border:0!important;margin:0 16px 0 0!important;padding:0!important}
body.single-product .woocommerce-tabs ul.tabs li a{color:var(--ag-muted)!important;padding:12px 0!important}
body.single-product .woocommerce-tabs ul.tabs li.active a{color:var(--ag-accent)!important}
body.single-product .woocommerce-tabs ul.tabs::before,body.single-product .woocommerce-tabs ul.tabs li::before,body.single-product .woocommerce-tabs ul.tabs li::after{display:none!important}

/* Cards relacionados também ficam padronizados */
body.single-product ul.products li.product img{
  width:100%!important;
  aspect-ratio:3/4!important;
  object-fit:cover!important;
  border-radius:12px!important;
  background:#0a1519;
}

@media(max-width:1100px){
  body.single-product div.product{grid-template-columns:1fr}
  body.single-product .woocommerce-product-gallery{position:relative!important;top:auto!important;max-width:520px!important;margin:0 auto!important;justify-self:center!important}
  .ag-product-shell{grid-template-columns:1fr}
  .ag-buy-card{position:relative;top:auto}
}
@media(max-width:680px){
  body.single-product div.product{gap:18px}
  body.single-product .woocommerce-product-gallery__image{height:460px!important}
  .ag-product-info,.ag-buy-card{padding:18px;border-radius:14px}
  .ag-info-grid{grid-template-columns:1fr}
  .ag-product-shell{gap:14px}
  body.single-product .product_title{font-size:29px}
  .ag-buy-card .price{font-size:30px!important}
  body.single-product .flex-control-thumbs{grid-template-columns:repeat(3,1fr)}
}

/* Correções de alinhamento com temas WooCommerce */
body.single-product .woocommerce-product-gallery__trigger{top:12px!important;right:12px!important}
body.single-product .woocommerce-product-gallery .flex-viewport{height:auto!important}
body.single-product .woocommerce-product-gallery__wrapper{transform:none!important}
body.single-product .woocommerce-product-gallery__image:first-child{margin-top:0!important}
body.single-product .woocommerce-notices-wrapper + div.product{clear:both}

@media(min-width:1101px){
  body.single-product .woocommerce-product-gallery,
  body.single-product .summary.entry-summary{margin-top:0!important}
}

/* ===== v1.2: alinhamento e informações mais objetivas ===== */
@media(min-width:1101px){
  body.single-product div.product{
    grid-template-columns:minmax(250px,320px) minmax(0,1fr)!important;
    gap:22px!important;
    align-items:start!important;
  }

  body.single-product .woocommerce-product-gallery{
    max-width:320px!important;
    width:100%!important;
    margin:0!important;
    align-self:start!important;
  }

  body.single-product .woocommerce-product-gallery__image{
    height:520px!important;
  }

  body.single-product .summary.entry-summary{
    margin:0!important;
    align-self:start!important;
  }

  .ag-product-shell{
    grid-template-columns:minmax(0,1fr) 315px;
    gap:18px;
    align-items:stretch;
    min-height:520px;
  }

  .ag-product-info,
  .ag-buy-card{
    box-sizing:border-box;
    min-height:520px;
    height:520px;
  }

  .ag-product-info{
    display:flex;
    flex-direction:column;
    padding:24px;
  }

  .ag-buy-card{
    position:sticky;
    top:105px;
    padding:22px;
  }

  .ag-info-grid{
    margin:18px 0 14px;
  }

  .ag-info-card{
    min-height:86px;
  }

  .ag-compat-row{
    margin-top:auto;
  }
}

.ag-info-icon:empty{display:none}
.ag-info-icon img{
  width:100%;
  height:100%;
  object-fit:contain;
  display:block;
}
.ag-info-card:has(.ag-info-icon:empty){gap:0}

.ag-compat-row{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  padding-top:14px;
  border-top:1px solid rgba(255,255,255,.08);
  color:var(--ag-muted);
  font-size:13px;
}
.ag-compat-row strong{color:#fff}
.ag-compat-row a{
  color:var(--ag-accent);
  font-weight:700;
  text-decoration:none;
  margin-left:4px;
}
.ag-compat-row a:hover{text-decoration:underline}

@media(max-width:1100px){
  .ag-product-info,.ag-buy-card{height:auto;min-height:0}
}


/* ===== v1.5: relacionados em uma única linha ===== */
body.single-product .related.products ul.products{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:18px!important;
  width:100%!important;
  margin:0!important;
  padding:0!important;
}
body.single-product .related.products ul.products li.product{
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  float:none!important;
}
@media(max-width:900px){
  body.single-product .related.products ul.products{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}
@media(max-width:520px){
  body.single-product .related.products ul.products{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:12px!important;
  }
}

/* ===== v1.6: força relacionados em uma única linha de 4 no desktop ===== */
body.single-product section.related.products ul.products,
body.single-product section.related.products ul.products.columns-4{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  grid-auto-flow:row!important;
  gap:18px!important;
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  padding:0!important;
  float:none!important;
  clear:both!important;
}
body.single-product section.related.products ul.products::before,
body.single-product section.related.products ul.products::after{display:none!important;content:none!important}
body.single-product section.related.products ul.products li.product,
body.single-product section.related.products ul.products li.product.first,
body.single-product section.related.products ul.products li.product.last{
  width:100%!important;
  min-width:0!important;
  max-width:none!important;
  margin:0!important;
  float:none!important;
  clear:none!important;
}
@media(max-width:900px){
  body.single-product section.related.products ul.products,
  body.single-product section.related.products ul.products.columns-4{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
