﻿:root {
    --primary-color: #4a6bff;
    --secondary-color: #f8f9fa;
    --accent-color: #ff6b4a;
    --text-color: #333;
    --light-text: #777;
    --border-color: #e1e1e1;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f5f5;
    color: var(--text-color);
    line-height: 1.6;
}


.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.search-bar {
    display: flex;
    width: 50%;
}

/* heder.css */

header {
    background-color: #222;
    color: #fff;
    padding: 15px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.playtrade-logo {
    font-size: 24px;
    font-weight: bold;
    color: #fff;
}

.playtrade-logo span {
    color: #f0b400;
}

.user-actions a {
    color: #fff;
    margin-left: 15px;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 5px;
    transition: background 0.2s ease;
}

.user-actions a:hover {
    background-color: #444;
}


.search-bar input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 4px 0 0 4px;
    font-size: 1rem;
    outline: none;
}

.search-bar button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0 1rem;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

.user-actions a {
    margin-left: 1rem;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
}

.user-actions .become-seller {
    background-color: var(--accent-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-weight: bold;
}

.categories {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.category {
    padding: 0.8rem 1.5rem;
    margin: 0 0.5rem;
    background-color: white;
    border-radius: 4px;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.category:hover, .category.active {
    background-color: var(--primary-color);
    color: white;
}

.main-content {
    margin: 2rem 0;
}

.section-title {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: var(--text-color);
}

.ads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.ad-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.ad-card:hover {
    transform: translateY(-5px);
}

.ad-image {
    width: 100%;
    height: 180px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background-color: #f9f9f9; /* opcional, para fundo neutro */
    border-radius: 8px;
}

.ad-image img {
    width: 90%;
    height: 90%;
    object-fit: contain;
}


.ad-content {
    padding: 1rem;
}

.ad-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.ad-description {
    color: var(--light-text);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ad-price {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary-color);
}

.ad-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--light-text);
}

.filters {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    margin-right: 1rem;
}

.filter-group label {
    margin-right: 0.5rem;
    font-weight: 500;
}

.filter-group select {
    padding: 0.5rem;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

footer {
    background-color: white;
    padding: 2rem 0;
    margin-top: 3rem;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.footer-section {
    flex: 1;
    min-width: 200px;
    margin-bottom: 1rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    text-decoration: none;
    color: var(--light-text);
}

.copyright {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    color: var(--light-text);
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
    }

    .logo {
        margin-bottom: 1rem;
    }

    .search-bar {
        width: 100%;
        margin-bottom: 1rem;
    }

    .user-actions {
        width: 100%;
        display: flex;
        justify-content: space-between;
    }

    .user-actions a {
        margin: 0;
    }

    .categories {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 0.5rem;
        -webkit-overflow-scrolling: touch;
    }

    .category {
        white-space: nowrap;
        margin: 0 0.5rem 0 0;
    }

    .filters {
        flex-direction: column;
    }

    .filter-group {
        margin-bottom: 0.5rem;
    }
}

.ad-carousel {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 180px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f9f9f9;
    border-radius: 8px;
}

.carousel-image {
    width: 90%;
    height: 90%;
    object-fit: contain;
    border-radius: 6px;
    transition: opacity 0.3s ease;
}

.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.4);
    color: white;
    border: none;
    font-size: 1.2rem;
    padding: 6px 12px;
    cursor: pointer;
    z-index: 2;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.carousel-prev:hover,
.carousel-next:hover {
    background: rgba(0, 0, 0, 0.6);
}

.carousel-prev {
    left: 10px;
}

.carousel-next {
    right: 10px;
}
#lightbox-overlay {
    position: fixed;
    display: none;
    justify-content: center;
    align-items: center;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 1000;
}

#lightbox-overlay img {
    max-width: 90%;
    max-height: 90%;
    cursor: zoom-out;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

/* Modal corrigido */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    overflow: auto;
}

.modal-content {
    display: block;
    margin: 60px auto;
    max-width: 80%;
    max-height: 80vh;
    object-fit: contain;
    animation: zoom 0.3s;
}

@keyframes zoom {
    from {transform: scale(0.1)}
    to {transform: scale(1)}
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
}

/* Garantir que a imagem do carrossel seja clicável */
.carousel-image {
    cursor: pointer;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    z-index: 1001;
}

.modal-close:hover,
.modal-close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

/* Animações para o modal */
@keyframes fadeIn {
    from {opacity: 0}
    to {opacity: 1}
}

@keyframes zoomIn {
    from {transform: translate(-50%, -50%) scale(0.9)}
    to {transform: translate(-50%, -50%) scale(1)}
}

/* Carrossel de imagens - Estilos corrigidos */
.ad-carousel {
    position: relative;
    width: 100%;
    height: 180px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f9f9f9;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
}

.carousel-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 6px;
    transition: transform 0.3s ease;
}

.carousel-image:hover {
    transform: scale(1.02);
}

.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 1.2rem;
    padding: 8px 12px;
    cursor: pointer;
    z-index: 10;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.carousel-prev:hover,
.carousel-next:hover {
    background: rgba(0, 0, 0, 0.8);
}

.carousel-prev {
    left: 10px;
}

.carousel-next {
    right: 10px;
}

#homeSection, #adDetails {
    margin-top: 2rem;
}
.ad-card {
    border: 1px solid var(--border-color);
    padding: 1rem;
    border-radius: 10px;
    background-color: white;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.ad-thumb {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}
.ad-card {
    background-color: #fff;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 400px; /* força todos a terem a mesma altura */
}

.ad-thumb {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.ad-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.btn-voltar {
    background-color: #f5f5f5;
    border: 1px solid #ccc;
    color: #333;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    margin-bottom: 1rem;
    transition: background-color 0.3s, border-color 0.3s;
}

.btn-voltar:hover {
    background-color: #e0e0e0;
    border-color: #999;
}


.ad-card p {
    flex-grow: 1;
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 1rem;
}
.ad-card button {
    padding: 0.6rem 1.2rem;
    background-color: #0088cc;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.ad-card button:hover {
    background-color: #006699;
}
.glide__arrow {
    background-color: #ddd;
    border: none;
    padding: 0.5rem 1rem;
    font-size: 1.2rem;
    color: #333;
    border-radius: 5px;
    cursor: pointer;
    margin: 1rem 0.5rem;
    transition: background 0.3s ease;
}

.glide__arrow:hover {
    background-color: #bbb;
}

.glide {
    position: relative;
    padding-bottom: 60px; /* espaço reservado para os botões */
}

.glide__arrows {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 10px;
}

/*I*/
.submenus-fixos {
    position: sticky;
    top: 65px;
    background-color: #fff;
    z-index: 10;
    padding: 0.5rem 0;
    border-bottom: 1px solid #ddd;
    overflow-x: auto;
}

.submenus-wrapper {
    display: flex;
    gap: 0.5rem;
    padding: 0 1rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
}

.submenus-wrapper::-webkit-scrollbar {
    display: none;
}

.submenu-btn {
    flex: 0 0 auto;
    padding: 0.4rem 1rem;
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.submenu-btn:hover {
    background-color: #0088cc;
    color: #fff;
    border-color: #0072aa;
}

.ad-card {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    max-width: 100%;
    min-height: 340px;
}

.ad-card img.ad-thumb {
    max-height: 180px;
    object-fit: contain;
    margin-bottom: 0.5rem;
}

.btn-vermais {
    background-color: #0088cc;
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    margin-top: auto;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-vermais:hover {
    background-color: #005f88;
}

.btn-voltar {
    margin-top: 1.5rem;
    background-color: #ccc;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
}

.btn-voltar:hover {
    background-color: #aaa;
}

.submenu-btn {
    padding: 0.5rem 1rem;
    margin: 0.3rem;
    border: none;
    background-color: #ececec;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
    font-weight: bold;
}

.submenu-btn:hover,
.submenu-btn.active {
    background-color: #0088cc;
    color: white;
}

/* Container das categorias */
.categories {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 30px 0;
    flex-wrap: wrap;
}

/* Estilo dos botões de categoria */
.category {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 16px;
    text-transform: uppercase;
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 6px;
    color: #193c78;
    background-color: #f0f4f8;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.category:hover {
    background-color: #dbe9ff;
    color: #0d2e65;
    border-color: #1976d2;
    transform: translateY(-2px);
}

/* Categoria ativa */
.category.active {
    background-color: #7c5f26;
    color: white;
    border-color: #c5900a;
    font-weight: bold;
    box-shadow: 0 3px 8px rgb(122, 86, 2);
}
.glide {
    margin-bottom: 80px; /* Garante espaço abaixo do carrossel */
}

.glide__arrows {
    display: flex !important;
    justify-content: center !important;
    position: static !important;
    margin-top: 40px !important;
    gap: 10px;
}
