﻿/* Detalhes.aspx - reprodução da área de compra do print, apenas mobile. */
@media(max-width:767.98px){
.single_product{background:#f5faff!important}
.single_product>.container-fluid{padding:3px 7px 12px!important}
.single_product .detalhe-produto-grid{display:flex!important;flex-direction:column!important;margin:0!important}
.single_product .detalhe-produto-grid>.detalhe-hero,.single_product .detalhe-produto-grid>.detalhe-thumbs,.single_product .detalhe-produto-grid>.detalhe-info{flex:0 0 100%!important;max-width:100%!important;width:100%!important;padding:0!important}
.single_product .detalhe-hero{order:1!important}.single_product .detalhe-thumbs{order:2!important}.single_product .detalhe-info{order:3!important}
.single_product .detalhe-hero .image_selected{min-height:0!important;height:185px!important;padding:5px!important;background:white!important;border:0!important;box-shadow:none!important}
.single_product .detalhe-hero .image_selected img{height:175px!important;max-height:175px!important;width:auto!important;max-width:100%!important;object-fit:contain!important}
.single_product .detalhe-thumbs .image_list{display:flex!important;gap:7px!important;justify-content:center!important;margin:0!important;padding:4px 6px!important;background:#fff!important}
.single_product .detalhe-thumbs .image_list li{flex:1 1 0!important;min-width:0!important;max-width:110px!important;height:48px!important;min-height:48px!important;margin:0!important;padding:2px!important;border:1px solid #dce9f5!important;border-radius:6px!important}
.single_product .detalhe-thumbs .image_list li img{height:42px!important;max-width:100%!important;width:auto!important;object-fit:contain!important}
.single_product .detalhe-info .product_description{display:flex!important;flex-direction:column!important;height:auto!important;margin:0!important;padding:7px 6px!important;background:#fff!important;border:0!important;border-radius:0 0 14px 14px!important;box-shadow:none!important}
.single_product .detalhe-info .product_name{order:1!important;margin:0 0 4px!important}
.single_product .detalhe-info .product_name [id*="lblNomeProduto"]{font-size:clamp(19px,5.2vw,27px)!important;line-height:1.14!important;color:#06285d!important;font-weight:800!important}
/* Duas colunas no mesmo nível: preço amarelo e quantidade azul-clara */
.single_product .detalhe-info .detalhe-compra-linha{order:2!important;display:grid!important;grid-template-columns:minmax(0,1.35fr) minmax(0,1fr)!important;gap:7px 10px!important;align-items:end!important;width:100%!important;background:transparent!important;padding:0!important;margin:0!important}
.single_product .detalhe-info .detalhe-preco{grid-column:1!important;grid-row:1!important;align-self:stretch!important;min-width:0!important;margin:0!important;padding:9px 11px!important;background:#fff9cf!important;border-radius:11px!important}
.single_product .detalhe-info .detalhe-preco>span{display:block!important;margin:0 0 2px!important;color:#35506f!important;font-size:clamp(10px,2.7vw,13px)!important;font-weight:500!important;line-height:1.15!important}
.single_product .detalhe-info .detalhe-preco [id*="lblValor"]{display:block!important;white-space:nowrap!important;color:#06285d!important;font-size:clamp(26px,7.5vw,39px)!important;font-weight:900!important;line-height:1.05!important}
.single_product .detalhe-info .detalhe-comprar,.single_product .detalhe-info .detalhe-comprar>div,.single_product .detalhe-info .detalhe-comprar>div>div:last-child{display:contents!important}
.single_product .detalhe-info .detalhe-comprar>div>div:first-child{grid-column:1/-1!important;grid-row:3!important}
.single_product .detalhe-info .detalhe-comprar>div>div:last-child>div:first-child{grid-column:2!important;grid-row:1!important;align-self:end!important;min-width:0!important;width:100%!important;flex:none!important}
.single_product .detalhe-info .detalhe-comprar>div>div:last-child>div:first-child>span{display:block!important;font-size:clamp(11px,2.8vw,14px)!important;color:#243d65!important;font-weight:600!important;margin:0 0 5px!important}
.single_product .detalhe-info .ctrl{display:flex!important;align-items:stretch!important;width:100%!important;max-width:none!important;height:43px!important;overflow:hidden!important;border-radius:10px!important;background:#fff!important;border:1px solid #d7eefa!important}
.single_product .detalhe-info .ctrl-button{flex:0 0 29%!important;width:29%!important;height:43px!important;line-height:41px!important;background:#e4f4ff!important;color:#0085e7!important;font-size:23px!important;text-align:center!important;cursor:pointer!important}
.single_product .detalhe-info .ctrl-counter{flex:1!important;min-width:0!important;height:43px!important;background:#fff!important}
.single_product .detalhe-info .ctrl-counter-input{width:100%!important;height:43px!important;padding:0!important;border:0!important;text-align:center!important;color:#06285d!important;font-size:17px!important;background:white!important}
.single_product .detalhe-info .ctrl-counter-num{display:none!important}
/* Botão original do ASP.NET permanece clicável, texto e ícone ficam na camada visual */
.single_product .detalhe-info .detalhe-comprar>div>div:last-child>div:last-child{grid-column:1/-1!important;grid-row:2!important;flex:none!important;min-width:0!important;width:100%!important;margin:0!important}
.single_product .detalhe-info .detalhe-botoes{position:relative!important;display:flex!important;align-items:center!important;justify-content:center!important;width:100%!important;height:49px!important;margin:0!important;border-radius:9px!important;background:#0079e8!important;box-shadow:0 2px 5px rgba(0,94,191,.16)!important;overflow:hidden!important}
.single_product .detalhe-info .detalhe-botoes:has([id*="btnCarrinho"]:not([style*="display: none"]))::after{content:"▤  Adicionar ao carrinho"!important;position:absolute!important;inset:0!important;display:flex!important;align-items:center!important;justify-content:center!important;color:#fff!important;font-size:clamp(14px,3.7vw,18px)!important;font-weight:700!important;pointer-events:none!important}
.single_product .detalhe-info .detalhe-botoes [id*="btnCarrinho"]{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;max-width:none!important;opacity:0!important;z-index:2!important;cursor:pointer!important}
.single_product .detalhe-info .detalhe-botoes [id*="btnIndisponivel"]{position:relative!important;z-index:3!important;max-width:100%!important;max-height:100%!important}
/* Caixa Sobre o produto abaixo do botão */
.single_product .detalhe-info .detalhe-descricao{order:3!important;margin:12px -4px 0!important;padding:12px 14px!important;background:#fff!important;border:1px solid #e7f2fc!important;border-radius:15px!important;box-shadow:0 2px 7px rgba(19,118,191,.08)!important}
.single_product .detalhe-info .detalhe-desc-heading{color:#06326c!important;font-size:clamp(16px,4vw,20px)!important;font-weight:800!important;margin-bottom:6px!important}
.single_product .detalhe-info .detalhe-descricao p,.single_product .detalhe-info .detalhe-descricao p span{font-size:clamp(12px,3vw,15px)!important;line-height:1.4!important;color:#606976!important}
}

/* Correções: descrição fora do cartão de compra; quantidade funcional e layout estável */
@media(max-width:767.98px){
.single_product .detalhe-info{background:transparent!important}
.single_product .detalhe-info .product_description{padding:8px 9px 9px!important;border-radius:13px!important;background:#fff!important}
.single_product .detalhe-info .detalhe-descricao{display:block!important;margin:11px 0 0!important;padding:13px 14px!important;background:#fff!important;border:1px solid #e4f1fb!important;border-radius:15px!important;box-shadow:0 2px 7px rgba(19,118,191,.10)!important}
.single_product .detalhe-info .detalhe-descricao .detalhe-desc-heading{color:#082e69!important;margin-bottom:5px!important}
.single_product .detalhe-info .detalhe-descricao p{margin:0!important;padding-left:25px!important}
.single_product .detalhe-info .ctrl-counter-input{position:relative!important;opacity:1!important;visibility:visible!important;z-index:2!important;display:block!important;pointer-events:auto!important}
.single_product .detalhe-info .ctrl-counter-num{display:none!important}
.single_product .detalhe-info .ctrl-button{position:relative!important;z-index:4!important;user-select:none!important;touch-action:manipulation!important}
.single_product .detalhe-info .detalhe-botoes [id*="btnCarrinho"]{pointer-events:auto!important}
}

/* Correção do fundo azul do botão de compra (inclusive quando há estilo inline) */
@media (max-width:767.98px) {
 .single_product .detalhe-info .detalhe-botoes {
   background:#0079e8 !important;
   background-color:#0079e8 !important;
   border:1px solid #0079e8 !important;
 }
 .single_product .detalhe-info .detalhe-botoes::before {
   content:""; position:absolute; inset:0; background:#0079e8;
   border-radius:9px; pointer-events:none; z-index:0;
 }
 .single_product .detalhe-info .detalhe-botoes::after {z-index:1}
}

/* Ajuste de galeria mobile: imagem principal maior e miniaturas centralizadas */
@media (max-width:767.98px) {
  .single_product .detalhe-hero .image_selected {height:245px!important;min-height:245px!important;padding:3px 8px!important;display:flex!important;align-items:center!important;justify-content:center!important;}
  .single_product .detalhe-hero .image_selected > a {height:100%!important;width:100%!important;display:flex!important;align-items:center!important;justify-content:center!important;}
  .single_product .detalhe-hero .image_selected img {height:232px!important;max-height:232px!important;max-width:100%!important;width:auto!important;object-fit:contain!important;margin:auto!important;}
  .single_product .detalhe-thumbs .image_list {display:flex!important;align-items:center!important;justify-content:center!important;gap:8px!important;padding:5px 6px!important;}
  .single_product .detalhe-thumbs .image_list li {display:flex!important;align-items:center!important;justify-content:center!important;flex:1 1 0!important;max-width:112px!important;height:66px!important;min-height:66px!important;padding:3px!important;margin:0!important;overflow:hidden!important;}
  .single_product .detalhe-thumbs .image_list li > a {display:flex!important;align-items:center!important;justify-content:center!important;width:100%!important;height:100%!important;margin:0!important;}
  .single_product .detalhe-thumbs .image_list li img {display:block!important;position:static!important;width:auto!important;max-width:100%!important;height:auto!important;max-height:58px!important;object-fit:contain!important;margin:auto!important;}
}

/* Banner da pagina de detalhes: mesmo principio usado no carrinho */
.detail-banner-hero { background:#087ed8; }
.detail-banner-inner { max-width:1140px; margin:0 auto; }
.detail-banner-breadcrumb { display:flex; align-items:center; gap:9px; padding:10px 15px 7px; color:#fff; font-size:13px; }
.detail-banner-breadcrumb a, .detail-banner-breadcrumb span { color:#fff !important; }
@media(max-width:767.98px) {
  .detail-banner-hero {
    min-height:150px;
    background-color:#087ed8;
    /* Envie a arte como images/banner-detalhes.png */
    background-image:url('../images/banner-detalhes.png');
    background-repeat:no-repeat;
    background-position:center top;
    background-size:cover;
  }
  .detail-banner-breadcrumb { position:relative; z-index:2; padding:8px 15px 0; text-shadow:0 1px 2px rgba(0,0,0,.18); }
  .single_product { position:relative; z-index:3; margin-top:-20px; }
  .single_product > .container-fluid { padding-top:0 !important; }
}
@media(min-width:768px) {
  .detail-banner-hero { background-image:none !important; }
}

/* Cartão único da área principal do produto, no padrão do carrinho */
@media (max-width:767.98px) {
  .single_product .detalhe-produto-grid {
    margin: 0 2px !important;
    padding: 12px 10px 14px !important;
    background: #fff !important;
    border: 1px solid #dceaf7 !important;
    border-radius: 16px !important;
    box-shadow: 0 3px 12px rgba(19, 96, 166, .10) !important;
    overflow: hidden;
  }
  .single_product .detalhe-hero .image_selected,
  .single_product .detalhe-thumbs .image_list,
  .single_product .detalhe-info .product_description {
    box-shadow: none !important;
    border: 0 !important;
  }
  .single_product .detalhe-info .product_description {
    padding: 12px 0 4px !important;
  }
  .single_product .detalhe-info .detalhe-descricao {
    margin: 14px 0 0 !important;
    border: 1px solid #e4f1fb !important;
    border-radius: 12px !important;
    box-shadow: none !important;
  }
}

/* Ajuste final: o cartão sobrepõe levemente o banner no mobile */
@media (max-width:767.98px) {
  .detail-banner-hero { position:relative; z-index:1; }
  .single_product { position:relative !important; z-index:3 !important; margin-top:0 !important; }
  .single_product > .container-fluid { overflow:visible !important; }
  .single_product .detalhe-produto-grid {
    position:relative !important;
    z-index:4 !important;
    margin:-20px 2px 0 !important;
    border-radius:17px !important;
    background:#fff !important;
    box-shadow:0 4px 14px rgba(13,75,131,.13) !important;
  }
}

/* Correção iPhone: sobreposição real do cartão sobre o banner */
@media (max-width:767.98px) {
  .detail-banner-hero { position:relative !important; z-index:1 !important; }
  .single_product {
    position:relative !important;
    z-index:5 !important;
    margin-top:-22px !important;
    background:transparent !important;
    overflow:visible !important;
  }
  .single_product > .container-fluid {
    background:transparent !important;
    overflow:visible !important;
    padding-top:0 !important;
  }
  .single_product .detalhe-produto-grid {
    margin:0 2px !important;
    position:relative !important;
    z-index:6 !important;
    background:#fff !important;
    border:1px solid #dceaf7 !important;
    border-radius:18px !important;
    box-shadow:0 4px 14px rgba(13,75,131,.13) !important;
    overflow:hidden !important;
  }
}

/* ============================================================
   DETALHES DO PRODUTO — DESKTOP (>= 768px)
   O layout mobile anterior permanece integralmente preservado.
   ============================================================ */
@media (min-width:768px) {
  .detail-banner-hero {
    position:relative;
    z-index:1;
    min-height:105px;
    background:#087ed8;
  }
  .detail-banner-breadcrumb {padding:16px 22px 12px;}
  .single_product {
    position:relative;
    z-index:2;
    margin-top:-24px;
    background:transparent;
    overflow:visible;
  }
  .single_product > .container-fluid {
    max-width:1360px;
    padding-top:0!important;
    padding-bottom:32px!important;
  }
  .single_product .detalhe-produto-grid {
    position:relative;
    margin:0!important;
    padding:25px 14px 24px;
    background:#fff;
    border:1px solid #dceaf7;
    border-radius:19px;
    box-shadow:0 6px 22px rgba(13,75,131,.12);
    overflow:visible;
    align-items:flex-start;
  }
  .single_product .detalhe-thumbs {padding:0 10px!important;}
  .single_product .detalhe-thumbs .image_list {margin:0!important;}
  .single_product .detalhe-thumbs .image_list li {
    min-height:95px!important;
    margin-bottom:12px!important;
    border:1px solid #e0ebf5!important;
    border-radius:11px!important;
    transition:border-color .15s ease;
  }
  .single_product .detalhe-thumbs .image_list li:hover {border-color:#58b5ed!important;}
  .single_product .detalhe-thumbs .image_list li img {max-height:88px;object-fit:contain;}
  .single_product .detalhe-hero {padding:0 10px!important;}
  .single_product .detalhe-hero .image_selected {
    min-height:420px!important;
    padding:20px!important;
    border:1px solid #edf2f8!important;
    border-radius:13px!important;
    box-shadow:none!important;
  }
  .single_product .detalhe-hero .image_selected img {max-height:390px!important;object-fit:contain;}
  .single_product .detalhe-info {padding:0 12px!important;}
  .single_product .detalhe-info .product_description {
    height:auto!important;
    padding:10px 12px 16px!important;
    border:0!important;
    border-radius:0!important;
    box-shadow:none!important;
  }
  .single_product .detalhe-info .product_name {margin-bottom:18px!important;}
  .single_product .detalhe-info .product_name [id*="lblNomeProduto"] {
    color:#082e69!important;
    font-size:clamp(23px,2.1vw,30px)!important;
    font-weight:800!important;
    line-height:1.22!important;
  }
  .single_product .detalhe-info .detalhe-preco {
    padding:17px 20px!important;
    margin-bottom:15px!important;
    background:#fff9cf!important;
    border-radius:12px!important;
  }
  .single_product .detalhe-info .detalhe-preco [id*="lblValor"] {
    color:#06285d!important;
    font-size:clamp(30px,2.8vw,40px)!important;
    font-weight:900!important;
    line-height:1.15!important;
  }
  .single_product .detalhe-info .detalhe-comprar {
    padding:16px!important;
    background:#f5faff!important;
    border:1px solid #e1eef8!important;
    border-radius:12px!important;
  }
  .single_product .detalhe-info .ctrl {border-radius:9px;overflow:hidden;}
  .single_product .detalhe-info .ctrl-button {cursor:pointer;user-select:none;touch-action:manipulation;}
  .single_product .detalhe-info .detalhe-botoes {border-radius:10px!important;overflow:hidden;}
  .single_product .detalhe-info .detalhe-descricao {
    margin:18px 0 0!important;
    padding:20px 22px!important;
    background:#fff!important;
    border:1px solid #e4f1fb!important;
    border-radius:14px!important;
    box-shadow:0 2px 9px rgba(19,118,191,.07)!important;
  }
  .single_product .detalhe-info .detalhe-desc-heading {
    color:#082e69;
    font-size:20px;
    font-weight:800;
    margin-bottom:9px;
  }
}
@media (min-width:768px) and (max-width:991.98px) {
  .single_product .detalhe-produto-grid {padding:20px 12px;}
  .single_product .detalhe-thumbs {flex:0 0 17%;max-width:17%;}
  .single_product .detalhe-hero {flex:0 0 38%;max-width:38%;}
  .single_product .detalhe-info {flex:0 0 45%;max-width:45%;}
  .single_product .detalhe-hero .image_selected {min-height:330px!important;}
  .single_product .detalhe-hero .image_selected img {max-height:300px!important;}
  .single_product .detalhe-info .detalhe-comprar {padding:12px!important;}
}

/* Correção do botão duplicado no desktop: mantém o ImageButton ASP.NET clicável */
@media (min-width:768px) {
  .single_product .detalhe-info .detalhe-botoes {
    position:relative!important;display:flex!important;align-items:center!important;
    justify-content:center!important;width:100%!important;height:54px!important;
    min-height:54px!important;background:#0079e8!important;
    border:0!important;border-radius:10px!important;overflow:hidden!important;
    box-shadow:0 3px 9px rgba(0,96,191,.16)!important;gap:0!important;
  }
  .single_product .detalhe-info .detalhe-botoes:has([id*="btnCarrinho"]:not([style*="display: none"]))::after {
    content:"Adicionar ao Carrinho"!important;position:absolute!important;inset:0!important;
    display:flex!important;align-items:center!important;justify-content:center!important;
    color:#fff!important;font-size:17px!important;font-weight:750!important;
    line-height:1.2!important;pointer-events:none!important;z-index:1!important;
  }
  .single_product .detalhe-info .detalhe-botoes [id*="btnCarrinho"] {
    position:absolute!important;inset:0!important;width:100%!important;max-width:none!important;
    height:100%!important;max-height:none!important;object-fit:fill!important;
    opacity:0!important;z-index:2!important;cursor:pointer!important;margin:0!important;
  }
  .single_product .detalhe-info .detalhe-botoes [id*="btnIndisponivel"] {
    position:relative!important;z-index:3!important;max-width:100%!important;max-height:100%!important;
  }
}
