/* ==========================================
   assets/css/style.css
   ========================================== */

:root {
    /* Paleta Corporativa (Estructura e-commerce) */
    --corp-blue: #2b2b2b;        /* Azul corporativo oscuro/gris para el Header */
    --action-blue: #3483FA;      /* Azul brillante para botones y enlaces */
    --ml-green: #00A650;         /* Verde para éxito, envíos, detalles positivos */
    --ml-bg: #EBEBEB;            /* Fondo gris característico para resaltar tarjetas */
    
    --text-main: #333333;        /* Textos principales y precios */
    --text-muted: #666666;       /* Textos secundarios */
    --white: #ffffff;
    
    /* Diseño de tarjetas e-commerce */
    --border-radius: 4px;
    --card-shadow: 0 1px 2px 0 rgba(0,0,0,.12);
    --card-shadow-hover: 0 8px 24px 0 rgba(0,0,0,.1);
}

/* ==========================================
   RESETS E REGRAS GLOBAIS
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--ml-bg); 
    color: var(--text-main);
    line-height: 1.5;
    font-size: 14px; 
    -webkit-font-smoothing: antialiased;
    /* MAGIA: Todo a minúsculas para el look brutalista/moderno */
    text-transform: lowercase;
}

img, video, canvas, svg {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Evitamos que el texto de los inputs se fuerce a minúsculas al escribir */
input, textarea, select {
    text-transform: none; 
    font-size: 16px !important; 
    font-family: inherit;
    border-radius: var(--border-radius);
}

/* ==========================================
   NAVBAR SUPERIOR
   ========================================== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 5%;
    background-color: var(--corp-blue); 
}

.search-bar-mock {
    flex-grow: 1;
    max-width: 600px;
    margin: 0 2rem;
    position: relative;
    display: flex;
}

.search-bar-mock input {
    width: 100%;
    padding: 0.7rem 1rem;
    border: none;
    border-radius: 2px;
    box-shadow: 0 1px 2px 0 rgba(0,0,0,.2);
    outline: none;
    font-size: 15px !important;
}

.logo a {
    text-decoration: none;
    display: flex;
    align-items: center;
    color: var(--white); 
}

.logo-img {
    height: 35px; 
    width: auto;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--white); 
    font-weight: 500;
    font-size: 0.9rem;
    transition: opacity 0.2s;
}

.nav-links a:hover {
    opacity: 0.8;
}

/* ==========================================
   BOTÕES PRINCIPAIS
   ========================================== */
.btn-primary {
    background-color: var(--action-blue);
    color: var(--white) !important;
    padding: 0.7rem 1.2rem;
    border-radius: var(--border-radius);
    border: none;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-primary:hover {
    background-color: #2968c8; 
}

.btn-block {
    width: 100%;
}

.btn-logout {
    color: #ffcccc !important; 
}

/* ==========================================
   HERO / BANNER
   ========================================== */
.container {
    min-height: 80vh;
}

.hero {
    text-align: center;
    padding: 3rem 1rem;
    background: linear-gradient(135deg, #1f1f1f, #333333);
    color: var(--white);
    margin: 0 auto 2rem;
    max-width: 1200px;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
}

.hero h1 {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

/* ==========================================
   FORMULÁRIOS
   ========================================== */
.auth-forms {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    padding: 2rem 5%;
    flex-wrap: wrap;
}

.form-card {
    background: var(--white);
    padding: 2.5rem 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    width: 100%;
    max-width: 450px;
}

.form-card h2 {
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-main);
}

.form-group {
    margin-bottom: 1.2rem;
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.4rem;
    color: var(--text-muted);
}

.form-group input, .form-group textarea, .form-group select {
    padding: 0.8rem;
    border: 1px solid #ccc;
    font-size: 0.95rem;
    background: var(--white);
    outline: none;
    transition: border-color 0.2s;
    border-radius: 4px;
}

.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    border-color: var(--action-blue);
    box-shadow: 0 0 0 1px var(--action-blue);
}

.form-card button {
    width: 100%;
    margin-top: 1rem;
    padding: 0.9rem;
    background-color: var(--action-blue);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s ease;
}

.form-card button:hover {
    background-color: #2968c8;
}

/* ==========================================
   CATÁLOGO E CARDS DE PRODUTOS
   ========================================== */
.catalog-section {
    padding: 1rem 5% 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

.catalog-section h2 {
    font-size: 1.4rem;
    font-weight: 300;
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

.items-grid {
    display: grid;
    /* Ajustado al ancho de tarjeta de ML (224px) */
    grid-template-columns: repeat(auto-fill, minmax(224px, 1fr));
    gap: 16px;
}

.item-card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s ease;
    border: none; 
    text-decoration: none; /* Fundamental para que el enlace no tenga raya debajo */
    color: inherit;
}

.item-card:hover {
    box-shadow: var(--card-shadow-hover);
}

/* El wrapper evita que la imagen rompa la caja blanca */
.item-image-wrapper {
    width: 100%;
    height: 224px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #ebebeb;
}

.item-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; 
}

.item-info {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.item-price {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--text-main);
    margin-bottom: 4px;
    line-height: 1.2;
}

.item-status-green {
    font-size: 0.85rem;
    color: var(--ml-green);
    font-weight: 600;
    margin-bottom: 8px;
}

.item-title {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 300;
    line-height: 1.3;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Corta en la línea 2 */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.item-owner {
    font-size: 0.75rem;
    color: #999;
    margin-top: auto;
}

/* Filtros minimalistas */
.category-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    overflow-x: auto; 
    white-space: nowrap; 
    padding-bottom: 5px;
}
.filter-btn {
    padding: 0.5rem 1rem;
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    text-decoration: none;
    color: var(--text-main);
    font-size: 0.85rem; 
    transition: background 0.2s;
}
.filter-btn:hover { background: #f5f5f5; }
.filter-btn.active {
    background: var(--action-blue);
    color: var(--white);
}

/* ==========================================
   VISTA DE DETALHES DO ITEM
   ========================================== */
.item-detail-section {
    padding: 2rem 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.item-detail-grid {
    display: grid;
    grid-template-columns: 1fr 350px; 
    gap: 2rem;
    background: var(--white);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
}

.item-detail-img {
    width: 100%;
    object-fit: contain;
    max-height: 500px;
}

.item-title-large {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
    font-weight: 600;
    line-height: 1.2;
}

.item-price-large {
    font-size: 2.4rem;
    font-weight: 300;
    color: var(--text-main);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
}

.item-description {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.item-description h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    font-weight: 400;
}

.item-description p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
}

/* Panel lateral de reserva */
.booking-box {
    border: 1px solid #e0e0e0;
    padding: 1.5rem;
    border-radius: 8px;
    height: fit-content;
}

.booking-box h3 {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.row-dates {
    display: grid;
    grid-template-columns: 1fr; 
    gap: 1rem;
}

.row-dates label {
    font-size: 0.85rem;
    color: var(--text-main);
    margin-bottom: 0.3rem;
    display: block;
}

.row-dates input {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* ==========================================
   PAINEL DO USUÁRIO (DASHBOARD)
   ========================================== */
.dashboard-section {
    padding: 2rem 5%;
    max-width: 1000px;
    margin: 0 auto;
}

.dashboard-header {
    margin-bottom: 2rem;
}

.dashboard-header h1 {
    font-size: 1.5rem;
    color: var(--text-main);
    font-weight: 600;
}

.dashboard-header p {
    color: var(--text-muted);
}

.block-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #ddd;
}

.list-card {
    display: flex;
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 1.2rem;
    box-shadow: var(--card-shadow);
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
    transition: box-shadow 0.2s ease;
}

.list-card:hover {
    box-shadow: var(--card-shadow-hover);
}

.list-card img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 4px;
}

.list-info {
    flex-grow: 1;
}

.list-info h4 {
    font-size: 1rem;
    font-weight: 400;
    margin-bottom: 0.3rem;
    color: var(--text-main);
}

.list-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.list-status {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.status-badge {
    padding: 0.3rem 0.6rem;
    border-radius: 2px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

/* Badges estilo corporativo */
.status-pending { background: #fff3cd; color: #856404; }
.status-confirmed { background: #e6f6ec; color: var(--ml-green); }
.status-completed { background: #e0f0ff; color: var(--corp-blue); }
.status-cancelled { background: #fee2e5; color: #cc0000; }
.status-available { background: #f2f2f2; color: #333333; }

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    color: var(--text-muted);
}

/* ==========================================
   NAVEGAÇÃO MÓVEL E MEDIA QUERIES
   ========================================== */
.mobile-nav { display: none; }

@media (max-width: 768px) {
    .nav-links { display: none; }
    
    .navbar {
        flex-direction: column;
        gap: 10px;
        padding: 1rem;
    }
    
    .search-bar-mock {
        margin: 0;
        width: 100%;
    }

    .hero { margin: 1rem; padding: 2rem 1rem; }
    
    .item-detail-grid { 
        grid-template-columns: 1fr; 
        padding: 1.5rem;
    }
    
    .items-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }

    .mobile-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: var(--white);
        box-shadow: 0 -1px 4px rgba(0,0,0,.1);
        z-index: 9999;
        justify-content: space-around;
        padding: 0.6rem 0;
    }

    .mobile-nav-item {
        text-decoration: none;
        color: var(--text-muted);
        font-size: 0.65rem; 
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
    }
    
    .mobile-nav-item.active { color: var(--action-blue); }
    .mobile-nav-svg { width: 22px; height: 22px; }
    
    .container { padding-bottom: 70px !important; }
    
    .list-card {
        flex-direction: column;
        align-items: flex-start;
    }
    .list-status {
        align-items: flex-start;
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
    }
}

/* ==========================================
   SITE FOOTER
   ========================================== */
.site-footer {
    text-align: center;
    padding: 1.5rem;
    background-color: var(--white);
    margin-top: auto;
    font-size: 0.8rem;
    color: var(--text-muted);
    border-top: 1px solid #ddd;
}