/* Product detail only: existing guards, forms, gallery and prices remain authoritative. */
.product-detail-page {--product-section-gap:20px;--product-info-surface:#dce3e9;--product-commercial-surface:#c8d6e2;--product-gallery-surface:#f0f2f4;color:var(--kinas-graphite,#202c36);}
.product-detail-page .col-md-6,.product-detail-info {min-width:0;}
.product-detail-info {padding:12px;background:var(--product-info-surface);border:1px solid #9eafbd;border-radius:6px;}
.product-detail-title {font-size:clamp(1.25rem,2.1vw,1.8rem);font-weight:700;line-height:1.3;overflow-wrap:anywhere;margin:0 0 8px;}
.product-detail-meta {color:#52616d;flex-wrap:wrap;gap:6px;padding-bottom:8px;}
.product-specifications {background:#fff;border:1px solid #c6d0d8;border-radius:6px;padding:12px;margin:12px 0;}
.product-specifications h2,.product-detail-page .product-references-title {font-size:1.1rem;color:var(--kinas-primary,#245475);font-weight:700;margin:0 0 8px;}
.product-specifications-table {margin:0;table-layout:fixed;--bs-table-bg:#fff;--bs-table-color:#202c36;border-color:#e3e8ec;font-size:.95rem;}
.product-specifications-table thead {display:none;}
.product-specifications-table th {width:25%;font-weight:600;color:#52616d;background:#fff;--bs-table-bg:#fff;}
.product-specifications-table :is(th,td) {overflow-wrap:anywhere;vertical-align:middle;padding:8px 5px;}
.product-specifications-table a {color:#245475;}
.product-stock {display:inline-block;padding:2px 7px;border-radius:5px;font-weight:700;}
.product-stock-positive {background:#d6ebdf;color:#17643c;}
.product-stock-empty {background:#f5d9dd;color:#a12638;}
.product-detail-page .imagem-principal-box {border-color:#9eafbd;border-radius:6px;box-shadow:0 2px 5px #202c360a;}
.product-detail-page .imagem-principal-frame {border-radius:6px;box-shadow:none;}
.product-detail-page .galeria-box {background:var(--product-gallery-surface);border-color:#9eafbd;border-radius:6px;box-shadow:none;}
.product-detail-page .galeria-thumb {border-color:#c6d0d8;border-radius:6px;box-shadow:none;}
.product-detail-page .galeria-thumb:hover {border-color:#245475;box-shadow:0 2px 5px #202c3610;}
.product-detail-page .galeria-thumb.active {border-color:#245475;box-shadow:0 0 0 1px #245475;}
.product-detail-page .imagem-galeria-toggle {background:#fff;color:#245475;border:1px solid #9eafbd;border-radius:6px;}
.product-detail-page .imagem-galeria-toggle:hover {background:#eaf1f6;}
.product-detail-page .aviso-importante {background:#fff3cd;color:#55451c;border:1px solid #e4d69d;padding:10px 12px;text-align:left;font-size:.85rem;font-weight:400;line-height:1.5;margin-top:8px;}
.product-detail-page .aviso-importante strong {display:block;margin-bottom:4px;}
.product-detail-page .aviso-importante img {width:24px;height:auto;vertical-align:middle;}
.product-detail-page .produto-visitante-carrito {flex:1 1 140px;}
.product-detail-page .produto-visitante-acoes>a {background:#18734b;border-color:#18734b;}
.product-detail-page :is(.produto-visitante-carrito,.produto-preco-carrito) button {background:#245475;border-color:#245475;color:#fff;min-height:44px;}
.product-detail-page :is(.produto-visitante-carrito,.produto-preco-carrito) button:hover {background:#1a405d;}
.product-detail-page :is(.produto-precos,.produto-precos-internos) {display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px;background:var(--product-commercial-surface);border:1px solid #c6d0d8;border-radius:6px;padding:10px;}
.product-detail-page :is(.produto-normal-acoes,.produto-precos-grupo) {display:contents;}
.product-detail-page .produto-preco {grid-column:span 2;order:0;background:#fff;border:1px solid #c6d0d8;color:#202c36;padding:10px;min-width:0;}
.product-detail-page .produto-preco-credito {background:#fff1e2;color:#92500a;}
.product-detail-page .produto-preco-contado {background:#d6ebdf;color:#17643c;}
.product-detail-page .produto-preco strong {font-size:clamp(1rem,1.5vw,1.25rem);}
.product-detail-page :is(.produto-preco-carrito,.produto-presupuesto-acao) {order:1;grid-column:1/-1;border-top:1px solid #b8c4ce;padding-top:8px;display:flex;min-width:0;}
.product-detail-page .produto-presupuesto-acao button {background:#fff3cd;border:1px solid #d8b66e;color:#77501b;min-height:48px;flex-direction:row;gap:6px;}
.product-detail-page :is(.produto-preco-carrito,.produto-visitante-carrito) .carrito-botao-linhas {flex-direction:row;gap:6px;}
.product-detail-page :is(.carrito-botao-legenda,.produto-presupuesto-acao button span) {font-size:.85rem;}
/* Real spaces in shared labels allow natural wrapping here; other views keep their breaks. */
.product-detail-page :is(.carrito-botao-legenda,.produto-presupuesto-acao button span) {display:inline;}
.product-detail-page :is(.carrito-botao-legenda,.produto-presupuesto-acao button span) br {display:none;}
.product-detail-page .produto-preco-carrito form {display:flex;flex:1;}
.product-detail-page .produto-preco-carrito button {min-height:48px;height:100%;}
.product-detail-page :is(.produto-precos,.produto-precos-internos):not(:has(.produto-preco-credito)) .produto-preco {grid-column:span 3;}
.product-detail-page .produto-precos-internos:has(.produto-preco-carrito):has(.produto-presupuesto-acao) :is(.produto-preco-carrito,.produto-presupuesto-acao) {grid-column:span 3;}
.product-detail-page .quantity-preview {background:#fff;color:#202c36;border-color:#9eafbd;border-radius:6px;min-width:0;}
.product-detail-page .quantity-preview-heading {background:#fff;color:#245475;border-bottom:1px solid #dce3e9;}
.product-detail-page .quantity-preview-heading h4 {font-weight:700;font-size:1.1rem;}
.product-detail-page .quantity-preview th {background:#dce3e9;}
.product-detail-page .quantity-preview :is(th,td) {border-color:#dce3e9;}
.product-detail-page .quantity-preview-neutral,.product-detail-page .quantity-preview-tier {background:#fff;border-color:#c6d0d8;}
.product-detail-page .quantity-preview-alternate {background:#f5f6f8;}
.product-detail-page .quantity-preview-best {background:#e0eee5;border-color:#a5cbb5;}
.product-detail-page .quantity-preview-cash {color:#17643c;}
.product-detail-page .quantity-preview-credit {color:#92500a;}
.product-detail-page .quantity-preview-saving {background:#d6ebdf;color:#17643c;min-width:5.5ch;text-align:center;font-variant-numeric:tabular-nums;}
.product-detail-page .quantity-preview-credit .quantity-preview-saving {background:#fff1e2;color:#92500a;}
.product-detail-page .quantity-preview-best-label {background:#fff3cd;border-color:#d8b66e;color:#77501b;box-shadow:none;}
.product-detail-page .quantity-preview-note {background:#eaf1f6;color:#52616d;border-color:#c6d0d8;}
.product-detail-page .quantity-preview-tier-heading small {color:#52616d;}
.product-detail-page .product-references {padding:12px;margin-top:12px;background:#fff;border:1px solid #c6d0d8;border-radius:6px;color:#202c36;}
.product-detail-page .product-reference-list li {background:#f5f6f8;border-color:#c6d0d8;color:#202c36;padding:5px 8px;}
.product-detail-page .product-reference-oem .product-reference-list li {background:#eaf1f6;border-color:#9eafbd;}
.product-detail-page :is(.product-reference-label,.product-reference-brand) {color:#52616d;}
.product-detail-page .product-references-toggle {color:#245475;min-height:32px;}
.product-history {background:#fff;color:#202c36;border-color:#9eafbd;border-radius:6px;}
.product-history-heading {background:#fff;color:#245475;padding:12px;border-bottom:1px solid #c6d0d8;}
.product-history-heading>span {color:#52616d;}
.product-history-table th {background:#dce3e9;color:#202c36;}
.product-history-table td {border-color:#dce3e9;}
.product-history .product-history-sale {background:#f0f7f2;}
.product-history .product-history-purchase {background:#e6eff7;}
.product-history .product-history-table tbody tr:hover {background:#f5f6f8;}
.product-history .product-history-open {background:#245475;border-color:#245475;}
.product-observations-title {font-size:1.25rem;font-weight:700;color:#245475;margin:0;padding:12px 16px;border-bottom:1px solid #c6d0d8;}
.product-observations {margin-top:24px;background:#fff;border:1px solid #9eafbd;border-radius:6px;color:#202c36;}
.product-observations-content {padding:16px;overflow-wrap:anywhere;line-height:1.6;}
.product-detail-page :is(a,button):focus-visible {outline:2px solid #245475;outline-offset:3px;}
@media(max-width:767.98px) {
 .product-detail-info {padding:10px;}
 .product-specifications {padding:8px;}
 .product-detail-page .quantity-preview-tier-price strong {white-space:normal;overflow-wrap:anywhere;}
 .product-detail-page .quantity-preview-tier-price {grid-template-columns:minmax(0,1fr) minmax(0,1fr);}
 .product-history-scroll {max-width:100%;}
}

/* Narrow phones and the narrower half-column on tablets need more room per value. */
@media(max-width:479.98px),(min-width:768px) and (max-width:991.98px) {
 .product-detail-page :is(.produto-precos,.produto-precos-internos) .produto-preco {grid-column:span 3;}
 .product-detail-page :is(.produto-precos,.produto-precos-internos):has(.produto-preco-credito) .produto-preco-contado {grid-column:1/-1;}
 .product-detail-page .produto-precos-internos:has(.produto-preco-carrito):has(.produto-presupuesto-acao) :is(.produto-preco-carrito,.produto-presupuesto-acao) {grid-column:1/-1;}
}

/* Full-width sections follow the main gallery/information row. */
.product-detail-lower > .product-references {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 20px;margin-top:24px;}
.product-detail-lower > .product-references .product-references-title {grid-column:1/-1;margin-bottom:0;}
.product-detail-lower > .product-references .product-reference-group {min-width:0;margin-top:0;}
.product-detail-lower > .product-references .product-reference-group:only-of-type {grid-column:1/-1;}

@media(max-width:767.98px) {
 .product-detail-lower > .product-references {grid-template-columns:minmax(0,1fr);}
}

/* Outer panels use the container's gutter, without nested row/card-body offsets.
   Retain the existing vertical breathing room above the main panel. */
.product-detail-upper-content {padding-top:16px;}
.product-detail-lower-row {margin-top:var(--product-section-gap);}
.product-detail-lower {--product-panel-padding:16px;display:flex;flex-direction:column;gap:var(--product-section-gap);min-width:0;padding-top:0;padding-bottom:0;}
.product-detail-lower > .col-12 {padding:0!important;min-width:0;}
.product-detail-lower :is(.quantity-preview,.product-history,.product-observations),
.product-detail-lower > .product-references {margin:0!important;border:1px solid #9eafbd;border-radius:6px;min-width:0;}
.product-detail-lower :is(.quantity-preview-heading,.product-history-heading,.product-observations-title) {padding:12px var(--product-panel-padding);background:#fff;border-bottom:1px solid #c6d0d8;color:#245475;}
.product-detail-lower :is(.quantity-preview-heading h4,.product-history-heading h2,.product-observations-title,.product-references-title) {font-size:1.25rem;line-height:1.35;font-weight:700;}
.product-detail-lower .product-observations-content {padding:var(--product-panel-padding);}
.product-detail-lower > .product-references {padding:0;gap:0 20px;overflow:hidden;}
.product-detail-lower .product-references-title {padding:12px var(--product-panel-padding);border-bottom:1px solid #c6d0d8;}
.product-detail-lower .product-reference-group {padding:var(--product-panel-padding);}
.product-detail-lower .quantity-preview-intro {font-size:.95rem;line-height:1.5;padding:12px var(--product-panel-padding);}
.product-detail-lower .quantity-preview table {font-size:1rem;font-variant-numeric:tabular-nums;}
.product-detail-lower .quantity-preview :is(th,td) {padding:12px var(--product-panel-padding);}
.product-detail-lower .quantity-preview th {font-size:.95rem;}
.product-detail-lower .quantity-preview th small {font-size:.8rem;}
.product-detail-lower .quantity-preview-desktop tbody td {font-size:1.1rem;}
.product-detail-lower .quantity-preview-desktop tbody td:first-of-type {font-weight:500;}
.product-detail-lower .quantity-preview-normal {gap:8px;flex-wrap:wrap;}
.product-detail-lower .quantity-preview-saving {font-size:.78rem;padding:3px 5px;flex-shrink:0;}
.product-detail-lower .quantity-preview-best-label {font-size:.75rem;}
.product-detail-lower .quantity-preview-note {font-size:.85rem;line-height:1.5;padding:12px var(--product-panel-padding);margin:12px var(--product-panel-padding);}
.product-detail-lower .quantity-preview-desktop .quantity-preview-best > :is(th,td) {padding-bottom:20px;}
.product-detail-lower .product-history-table th,
.product-detail-lower .product-history-table td {padding-left:var(--product-panel-padding);padding-right:var(--product-panel-padding);}
@media(max-width:767.98px) {
 .product-detail-page {--product-section-gap:16px;}
 .product-detail-lower {--product-panel-padding:12px;}
 .product-detail-lower :is(.quantity-preview-heading h4,.product-history-heading h2,.product-observations-title,.product-references-title) {font-size:1.15rem;}
 .product-detail-lower .quantity-preview-mobile {padding:0 var(--product-panel-padding) 4px;}
 .product-detail-lower .quantity-preview-tier-price {font-size:.95rem;gap:4px 8px;padding:4px 0;}
 .product-detail-lower .quantity-preview-tier-price strong {font-size:1.05rem;}
 .product-detail-lower .quantity-preview-tier-heading h5 {font-size:1rem;}
 .product-detail-lower .product-history-table tr {padding:8px var(--product-panel-padding);}
 .product-detail-lower .product-history-table td {padding-left:0;padding-right:0;}
}

/* Round the header itself; do not clip long notes or interactive content. */
.product-detail-lower .product-observations-title {border-radius:5px 5px 0 0;}
@media(min-width:992px) {
 .product-detail-main > .product-detail-gallery-column {width:45%;}
 .product-detail-main > .product-detail-info-column {width:55%;}
}

/* One natural-height panel; the image retains its existing aspect ratio. */
.product-detail-main {--bs-gutter-x:0;--bs-gutter-y:0;margin:0;padding:0;background:#fff;border:1px solid #9eafbd;border-radius:6px;}
.product-detail-main > .product-detail-gallery-column {padding:12px;}
.product-detail-main > .product-detail-info-column {padding:12px;border-left:1px solid #e1e7ec;background:var(--product-info-surface);border-radius:0 5px 5px 0;}
.product-detail-main .imagem-principal-box,
.product-detail-main .product-detail-info {padding:0;border:0;border-radius:0;box-shadow:none;}
.product-detail-main .imagem-principal-box {background:#fff;}
.product-detail-main .product-detail-info {background:transparent;}
@media(max-width:767.98px) {
 .product-detail-main > .product-detail-gallery-column {padding:12px;}
 .product-detail-main > .product-detail-info-column {padding:12px;border-left:0;border-top:1px solid #e1e7ec;border-radius:0 0 5px 5px;}
}

/* Shared stack for specifications, commercial content and shipping, at every width. */
.product-detail-panels {display:flex;flex-direction:column;gap:16px;min-width:0;margin-top:12px;}
.product-detail-panels > .product-specifications {margin:0;}
.product-detail-panels > .container {width:100%;max-width:none;margin:0;padding:0;}
.product-detail-panels > .container > .row {display:flex;flex-direction:column;--bs-gutter-x:0;--bs-gutter-y:0;margin:0;gap:16px;}
.product-detail-panels > .container > .row > * {width:100%;min-width:0;margin:0!important;padding:0!important;}
/* PHP may leave whitespace in these optional wrappers; do not reserve a gap for them. */
.product-detail-panels > .container > .row > :is(.d-flex,.w-100):not(:has(*)) {display:none!important;}
.product-detail-panels > .container :is(.produto-precos,.produto-precos-internos,.aviso-importante) {width:100%;margin:0;box-sizing:border-box;border-radius:6px;}
.product-detail-panels > .container .w-100 > span + :is(.produto-precos,.produto-precos-internos) {margin-top:8px;}
.product-detail-panels > .container .produto-visitante-acoes > * {min-width:0;max-width:100%;}
.product-detail-panels > .container .produto-visitante-acoes > a {overflow-wrap:anywhere;}

/* Light brand selector, scoped to product details; the native select remains intact. */
.product-detail-page .form-select.producto-marca-select {
    color:var(--kinas-primary,#245475);
    font-weight:600;
    background-color:#e9f0f5;
    border-color:#9eafbd;
    color-scheme:light;
    background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23245475' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}
.product-detail-page .form-select.producto-marca-select:focus {border-color:var(--kinas-primary,#245475);box-shadow:0 0 0 .15rem rgba(36,84,117,.18);}
.product-detail-page .producto-marca-select option {background:#fff;color:#202c36;}
@media (hover:hover) and (pointer:fine) {
 .product-detail-page .form-select.producto-marca-select:hover {border-color:var(--kinas-primary,#245475);}
}

/* A light technical sheet, with long fields stacked only on small screens. */
.product-specifications h2 {padding-bottom:10px;border-bottom:1px solid #e3e8ec;}
.product-specifications h2::before {content:"\f0ae";font-family:FontAwesome;font-weight:400;margin-right:7px;}
.product-specifications-table td {color:#202c36;}
.product-specifications-table tbody tr:last-child > :is(th,td) {border-bottom:0;}
.product-specifications-table td > .container {padding:0;max-width:none;}
.product-specifications-table td > .container > .row {--bs-gutter-x:0;margin:0;align-items:center;gap:6px;}
.product-specifications-table td > .container > .row > .p-1 {padding:0!important;max-width:100%;}
.product-specifications-table tr:has(th[id="marca"]) td > .container > .row > .p-1 {width:auto!important;flex:1 1 120px;min-width:0;}
.product-specifications-table tr:has(th[id="marca"]) center {text-align:left;}
.product-specifications-table .producto-marca-select {width:auto;min-width:min(130px,100%);max-width:100%;}
@media(max-width:767.98px) {
 .product-specifications-table .producto-marca-select {min-height:40px;}
}
@media(max-width:767.98px) {
 .product-specifications-table, .product-specifications-table tbody {display:block;width:100%;}
 .product-specifications-table tbody tr {display:flex;flex-wrap:wrap;border-bottom:1px solid #e3e8ec;padding-block:6px;}
 .product-specifications-table tbody tr:last-child {border-bottom:0;}
 .product-specifications-table tbody :is(th,td) {display:block;border:0;padding:3px 0;min-width:0;}
 .product-specifications-table tbody th {flex:1 1 30%;width:auto;padding-right:8px;}
 .product-specifications-table tbody td {flex:1 1 65%;}
 .product-specifications-table tr:has(th:is([id="codigo original"],[id="codigo fabrica"],[id="descricao do produto"],[id="medidas"])) > :is(th,td) {flex-basis:100%;}
 /* Category rows share a legacy id with measurements; keep them horizontal. */
 .product-specifications-table tr:has(td a[href*="inc=productos"]) > th {flex-basis:30%;}
 .product-specifications-table tr:has(td a[href*="inc=productos"]) > td {flex-basis:65%;}
}
