/* ==========================================================================
   PNEU (ficha de produto) — estilo da pagina /pneu/[slug]
   ==========================================================================
   Estava num <style> dentro do pneu.php. Saiu para aqui quando a pagina
   passou a ser instancia do master_template.dwt: o template so tem uma
   regiao editavel no <head> para ligacoes, e assim o CSS entra na cache do
   browser e no versionamento do versionar_assets.py.
   ========================================================================== */

/* Estilos de Refinamento Gráfico para o PDP */
.btn-voltar {
    transition: all 0.2s ease-in-out;
    border-radius: 8px;
}
.btn-voltar:hover {
    background-color: #FF7900 !important;
    border-color: #FF7900 !important;
    color: #fff !important;
    transform: translateX(-4px);
}

/* Otimização Estética do Seletor de Quantidade */
.quantity-selector-clean {
    display: inline-flex;
    align-items: center;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    height: 48px;
    background: #fff;
    overflow: hidden;
}
.quantity-selector-clean .qty-btn {
    border: none;
    background: none;
    width: 45px;
    height: 100%;
    font-size: 1.25rem;
    font-weight: bold;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    cursor: pointer;
}
.quantity-selector-clean .qty-btn:hover {
    background-color: #f5f5f5;
    color: var(--primary-color);
}
.quantity-selector-clean .quantity-value {
    width: 40px;
    text-align: center;
    font-weight: 800;
    font-size: 1.1rem;
    color: #000;
    user-select: none;
}

.link-ficha-eprel {
    transition: color 0.2s;
}
.link-ficha-eprel:hover {
    color: #FF7900 !important;
    text-decoration: underline !important;
}

/* Imagem Principal do Produto - Redesign */
.pdp-imagem-link {
    display: block;
    text-decoration: none;
}
.pdp-imagem-container {
    position: relative;
    height: 460px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    background: radial-gradient(circle at center, #ffffff 0%, #f7f8fa 70%, #f0f1f4 100%);
    border: 1px solid #eee;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    overflow: hidden;
}
.pdp-imagem-principal {
    max-height: 100%;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.35s ease;
}
.pdp-imagem-link:hover .pdp-imagem-principal {
    transform: scale(1.06);
}
.pdp-imagem-categoria-badge {
    position: absolute;
    top: 18px;
    left: 18px;
    background: #fff;
    border: 1px solid #eee;
    color: #555;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 6px 14px;
    border-radius: 50px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    z-index: 2;
}
.pdp-imagem-zoom-hint {
    position: absolute;
    bottom: 16px;
    right: 18px;
    background: rgba(0,0,0,0.65);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 50px;
    opacity: 0;
    transition: opacity 0.25s ease;
    z-index: 2;
}
.pdp-imagem-link:hover .pdp-imagem-zoom-hint {
    opacity: 1;
}
@media (max-width: 767.98px) {
    .pdp-imagem-container { height: 320px; padding: 18px; }
    .pdp-imagem-zoom-hint { display: none; }
}

/* Barra fixa de compra (mobile) - substitui a barra genérica de
   contactos nesta página, mostrando preço total e compra direta sempre
   visíveis ao fazer scroll. */
.pdp-buy-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #fff;
    box-shadow: 0 -4px 16px rgba(0,0,0,0.12);
    padding: 10px 14px;
    z-index: 1001;
    align-items: center;
    gap: 12px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}
.pdp-buy-bar.visible {
    transform: translateY(0);
}
.pdp-buy-bar .pdp-buy-bar-info {
    flex: 1;
    min-width: 0;
}
.pdp-buy-bar .pdp-buy-bar-nome {
    font-size: 0.7rem;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pdp-buy-bar .pdp-buy-bar-preco {
    font-size: 1.1rem;
    font-weight: 800;
    color: #000;
}
@media (max-width: 767.98px) {
    body.page-produto-pneu .sticky-bottom-bar { display: none !important; }
    .pdp-buy-bar { display: flex; }
}

.pneu-preco-base {
	font-size: 1.6rem;
	font-weight: 800;
	color: #000;
	margin-bottom: 0;
}
.per-pneu {
	font-size: 0.9rem;
	color: #666;
	font-weight: 400;
}
.pneu-detalhe-imposto {
	font-size: 0.75rem;
	color: #888;
	margin-top: -2px;
}
.rating-item-rect {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	padding: 2px 10px;
	border-radius: 4px;
	font-size: 0.7rem;
	font-weight: 800;
	min-width: 45px;
	height: 24px;
	white-space: nowrap;
}
.rating-item-rect i {
	font-size: 0.75rem;
}
.rating-item-rect span {
	line-height: 1;
}
.energy-A { background-color: #008000; color: #fff; border: 1px solid #006400; }
.energy-B { background-color: #32cd32; color: #fff; border: 1px solid #228b22; }
.energy-C { background-color: #ffff00; color: #000; border: 1px solid #cccc00; }
.energy-D { background-color: #ffa500; color: #fff; border: 1px solid #cc8400; }
.energy-E { background-color: #ff0000; color: #fff; border: 1px solid #cc0000; }
.energy-unknown { background-color: #eee; color: #999; border: 1px solid #ddd; }

/* Estilos do Carrossel de Produtos Semelhantes */
.product-slider-container {
    position: relative;
}
.product-slider {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}
.product-slider::-webkit-scrollbar {
    display: none;
}
.product-slider {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.product-slider-item {
    flex: 0 0 320px;
    scroll-snap-align: start;
}
@media (max-width: 576px) {
    .product-slider-item {
        flex: 0 0 280px;
    }
}
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
}
.slider-arrow:hover {
    background-color: #f8f9fa;
    border-color: #ced4da;
    color: #FF7900;
}
.slider-arrow-left { left: -15px; }
.slider-arrow-right { right: -15px; }

@media (max-width: 768px) {
    .slider-arrow {
        display: none;
    }
}

/* Barra Dinâmica Mobile */
@media (max-width: 991.98px) {
    .sticky-bottom-bar {
        display: block !important;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        z-index: 10000;
        transform: translateY(100%); 
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .sticky-bottom-bar.active {
        transform: translateY(0) !important;
    }
}
