/* IMPORTAÇÕES */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:wght@400;700&family=Roboto:wght@400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@500&display=swap');

/* REGRAS GERAIS */
* {
    margin: 0; padding: 0; box-sizing: border-box; outline: none; font-family: "Roboto", sans-serif;
}

:root {
    --blue: #2F54A3;
    --gray: #ededed;
    --hoover: #FF6B00;
    --black: #000;
    --blue_hoover: #1e3c82;
    --cars_desc: #333;
    --blue_dark: #0056b3;
    --blue_claro: #4A72C4;
    --rent_orange: #e67e22;
}

body { background-color: #f9f9f9; overflow-x: hidden; }

/* HEADER */
header { width: 100%; background-color: var(--blue_claro); padding: 20px 0; }
.content { max-width: 1500px; margin: 0 auto; padding: 0 20px; }

nav { display: flex; align-items: center; justify-content: space-between; height: 80px; }
.brand { font-size: 28px; font-weight: bold; color: var(--gray); }
nav ul { display: flex; list-style: none; }
nav ul li a {
    font-size: 14px; font-weight: 500; color: var(--gray);
    margin-left: 25px; text-decoration: none; text-transform: uppercase;
    transition: 0.3s;
}
nav ul li a:hover { color: var(--hoover); }

/* TÍTULO DA PÁGINA */
.title-wrapper-catalog h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--blue);
    margin-top: 30px;
}

/* GRELHA (GRID) - O contentor pai */
.motos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); /* Grelha inteligente */
    grid-gap: 30px;
    padding: 40px 0 100px 0;
}

/* CARTÃO DA MOTA (moto-card) - O que o JS cria */
.moto-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.moto-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.moto-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.moto-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Faz com que todos os cards tenham a mesma altura */
}

.badge-disponivel {
    background-color: #27ae60;
    color: white;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 20px;
    align-self: flex-start;
    margin-bottom: 10px;
    text-transform: uppercase;
    font-weight: bold;
}

.moto-card h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.25rem;
    color: var(--black);
    margin-bottom: 8px;
}

.moto-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--rent_orange);
    margin: 15px 0;
}

/* BOTÃO RESERVAR */
.btn-reservar {
    display: block;
    text-align: center;
    background-color: var(--blue);
    color: white;
    text-decoration: none;
    padding: 12px;
    border-radius: 6px;
    font-weight: bold;
    margin-top: auto; /* Empurra o botão para a base do card */
    transition: 0.3s;
}

.btn-reservar:hover {
    background-color: var(--hoover);
}

/* FOOTER */
footer { background: var(--blue); color: white; margin-top: 50px; }
footer .main { padding: 40px 0; text-align: center; }
footer .last {
    background: var(--blue_dark);
    padding: 15px 0;
    text-align: center;
    font-size: 0.85rem;
}

/* RESPONSIVIDADE */
@media (max-width: 768px) {
    nav { flex-direction: column; height: auto; padding: 20px 0; }
    nav ul { margin-top: 20px; }
    nav ul li a { margin: 0 10px; }
    .motos-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); padding: 20px; }
}

/* LAYOUT DE DUAS COLUNAS */
.body {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    margin-top: 20px;
}

/* COLUNA DE FILTROS (ESQUERDA) */
.filters {
    flex: 0 0 300px; /* Largura fixa de 300px */
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    position: sticky;
    top: 20px; /* Fixa o filtro ao fazer scroll */
}

.filters h3 {
    margin-bottom: 20px;
    color: var(--blue);
    font-size: 1.2rem;
    border-bottom: 2px solid var(--gray);
    padding-bottom: 10px;
}

.filter-group {
    margin-bottom: 20px;
}

.filter-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 8px;
    color: var(--cars_desc);
}

.filter-group input[type="date"],
.filter-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #fdfdfd;
}

/* ESTILO DA BARRA DE PREÇO (RANGE) */
input[type="range"] {
    width: 100%;
    accent-color: var(--blue);
}

.range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #888;
    margin-top: 5px;
}

.btn-filter {
    width: 100%;
    padding: 12px;
    background-color: var(--rent_orange);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.btn-filter:hover {
    background-color: #d35400;
}

/* Ajuste na coluna de filtros para suportar mais campos */
.filters {
    flex: 0 0 300px;
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px); /* Evita que os filtros saiam do ecrã */
    overflow-y: auto; /* Adiciona scroll se os filtros forem muitos */
}

/* Estilo para os Selects e Inputs */
.filter-group select, 
.filter-group input[type="date"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #f8f9fa;
    font-size: 0.9rem;
    color: var(--cars_desc);
    transition: border-color 0.3s;
}

.filter-group select:focus, 
.filter-group input[type="date"]:focus {
    border-color: var(--blue);
    background-color: #fff;
}

/* Scrollbar personalizada para a zona de filtros (opcional, para estética) */
.filters::-webkit-scrollbar {
    width: 5px;
}
.filters::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

/* COLUNA DA GRELHA (DIREITA) */
.motos-grid {
    flex: 1; /* Ocupa o resto do espaço */
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    grid-gap: 25px;
}

/* RESPONSIVIDADE */
@media (max-width: 992px) {
    .body {
        flex-direction: column; /* Filtros passam para cima em tablets/phones */
    }
    .filters {
        flex: none;
        width: 100%;
        position: static;
    }
}

.btn-clear {
    width: 100%;
    padding: 10px;
    background-color: transparent;
    color: #666;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: 0.3s;
}

.btn-clear:hover {
    background-color: #f0f0f0;
    color: var(--black);
    border-color: #999;
}

.ajuda {
    margin-top: 25px;
    padding-top: 20px;
    text-align: center;
    border-top: 1px solid var(--gray);
}

.ajuda p {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 5px;
    line-height: 1.4;
}

.ajuda i {
    color: var(--blue);
    margin-right: 5px;
}

.phone-highlight {
    display: inline-block;
    margin-top: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--rent_orange); /* Laranja para destacar */
    text-decoration: none;
    transition: 0.3s;
}

.phone-highlight:hover {
    color: var(--blue);
    transform: scale(1.05);
}

/* Layout Detalhes */
.detalhes-container {
    display: flex;
    gap: 40px;
    margin-top: 40px;
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.detalhes-media { flex: 1; }
.detalhes-media img { width: 100%; border-radius: 8px; object-fit: cover; max-height: 450px; }

.detalhes-info { flex: 1; display: flex; flex-direction: column; }

.moto-meta { color: #666; font-size: 1.1rem; margin-bottom: 10px; }

.aluguer-card-regras {
    background: var(--gray);
    padding: 20px;
    border-radius: 6px;
    margin: 20px 0;
}

.aluguer-card-regras h3 { margin-bottom: 15px; color: var(--blue); }
.aluguer-card-regras ul { list-style: none; }
.aluguer-card-regras li { 
    margin-bottom: 10px; 
    display: flex; 
    align-items: center; 
    gap: 12px;
}

.aluguer-card-regras i { color: var(--blue); width: 20px; }

/* Botão de Reserva Destaque */
.btn-grande-reserva {
    width: 100% !important;
    height: 70px !important;
    font-size: 1.4rem !important;
    background-color: #25D366 !important; /* Cor Oficial WhatsApp */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    border-radius: 8px !important;
    text-transform: uppercase;
}

.btn-grande-reserva:hover { background-color: #128C7E !important; }

.aviso-reserva {
    text-align: center;
    font-size: 0.8rem;
    color: #888;
    margin-top: 10px;
}

/* Responsivo para Detalhes */
@media (max-width: 850px) {
    .detalhes-container { flex-direction: column; }
}

/* --- NOVOS ESTILOS PARA OPÇÕES DE ALUGUER (PÁGINA DETALHES) --- */

.aluguer-opcoes {
    margin: 25px 0;
    padding: 20px;
    background: #fdfdfd;
    border: 1px solid #eee;
    border-radius: 12px;
}

.aluguer-opcoes h3 {
    font-size: 1.1rem;
    color: var(--blue);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.extra-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 8px;
    transition: background 0.3s;
    cursor: pointer;
}

.extra-item:hover {
    background: #f0f4ff;
}

/* Custom Checkbox */
.extra-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 3px;
    cursor: pointer;
    accent-color: var(--blue);
}

.extra-item label {
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--cars_desc);
    line-height: 1.4;
}

.extra-item label strong {
    color: var(--black);
}

.extra-item label span {
    font-size: 0.85rem;
    color: #777;
}

/* RESUMO DE PREÇOS */
.resumo-aluguer {
    background: #fff;
    border: 2px solid var(--blue);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
}

.resumo-linha {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 1rem;
    color: #555;
}

.resumo-linha.total {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #ccc;
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--black);
}

.resumo-linha strong {
    color: var(--rent_orange);
}

#display-total {
    font-size: 1.6rem;
}

/* AJUSTE NOS INPUTS DE DATA EM DETALHES */
.input-data {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--gray);
    border-radius: 8px;
    font-size: 1rem;
    margin-top: 5px;
    transition: border-color 0.3s;
}

.input-data:focus {
    border-color: var(--blue);
}

/* BADGE DE PREÇO NA PÁGINA DE DETALHES */
.price-rent {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--rent_orange);
    margin: 10px 0 20px 0;
}

/* ANIMAÇÃO NO BOTÃO WHATSAPP */
.btn-grande-reserva {
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
    border: none;
    cursor: pointer;
}

.btn-grande-reserva:active {
    transform: scale(0.98);
}

/* Melhoria visual para mobile nos Detalhes */
@media (max-width: 600px) {
    .detalhes-container {
        padding: 15px;
    }
    
    .price-rent {
        font-size: 1.8rem;
    }
}

.back-button-wrapper {
    margin-top: 20px;
    margin-bottom: -20px; /* Aproxima o botão do contentor de detalhes */
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--blue);
    font-weight: bold;
    font-size: 1rem;
    transition: 0.3s;
    padding: 8px 0;
}

.btn-back i {
    font-size: 0.9rem;
    transition: transform 0.3s;
}

.btn-back:hover {
    color: var(--hoover);
}

.btn-back:hover i {
    transform: translateX(-5px); /* Pequena animação da seta a ir para a esquerda */
}

/* Ajuste para mobile */
@media (max-width: 768px) {
    .back-button-wrapper {
        margin-left: 10px;
    }
}

hr {
    border: none;
    height: 2px;
    background-color: #000;
    opacity: 0.2;
}

.categoria {
    grid-column: 1 / -1;
}

.categoria h2 {
    font-size: 1.6rem;
    color: var(--blue);
    margin-bottom: 5px;
}

/* --- SEO CONTENT (TEXTO PARA GOOGLE) --- */
.seo-content {
    max-width: 1450px;
    margin: 60px auto 40px auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
    line-height: 1.7;
}

/* Título principal SEO */
.seo-content h2 {
    font-size: 1.8rem;
    color: var(--blue);
    margin-bottom: 15px;
    font-weight: 700;
}

/* Subtítulos */
.seo-content h3 {
    font-size: 1.3rem;
    color: var(--blue_claro);
    margin-top: 25px;
    margin-bottom: 10px;
}

/* Parágrafos */
.seo-content p {
    font-size: 0.95rem;
    color: var(--cars_desc);
    margin-bottom: 12px;
}

/* Lista */
.seo-content ul {
    padding-left: 20px;
    margin: 15px 0;
}

.seo-content ul li {
    margin-bottom: 8px;
    font-size: 0.95rem;
    color: var(--cars_desc);
}

/* Destaques (palavras importantes SEO) */
.seo-content strong {
    color: var(--black);
    font-weight: 700;
}

/* Links internos SEO */
.seo-content a {
    color: var(--rent_orange);
    text-decoration: none;
    font-weight: 500;
}

.seo-content a:hover {
    text-decoration: underline;
    color: var(--hoover);
}

/* Responsivo */
@media (max-width: 768px) {
    .seo-content {
        margin: 30px 15px;
        padding: 20px;
    }

    .seo-content h2 {
        font-size: 1.4rem;
    }

    .seo-content h3 {
        font-size: 1.1rem;
    }
}