/* Reset e estilos gerais */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    min-height: 100vh;
    color: #333;
}

/* Cabeçalho */
header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1.2rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    font-size: 2.2rem;
    font-weight: 800;
    background: linear-gradient(45deg, #1e3c72, #2a5298);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -1px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2.5rem;
}

nav ul li a {
    color: #333;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

nav ul li a:hover {
    color: #1e3c72;
}

nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: 0;
    left: 0;
    background: linear-gradient(45deg, #1e3c72, #2a5298);
    transition: width 0.3s ease;
    border-radius: 2px;
}

nav ul li a:hover::after {
    width: 100%;
}

.search-filter {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.search-filter input,
.search-filter select {
    padding: 0.8rem 1.2rem;
    border: 2px solid #e8ecf0;
    border-radius: 12px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.search-filter input:focus,
.search-filter select:focus {
    outline: none;
    border-color: #1e3c72;
    box-shadow: 0 0 0 4px rgba(30, 60, 114, 0.1);
    transform: translateY(-1px);
}

/* Main Content */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

#product-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.product-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    position: relative;
    height: 480px;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
}

.product-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.product-card:hover img {
    transform: scale(1.05);
}

.product-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-card h3,
.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 0.8rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-card p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: auto;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 4.5rem;
}

.product-card button {
    width: 100%;

    padding: 1rem;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-card button.add-spacing {
    margin-bottom: 2rem; /* Adds extra space below the button for two-line titles in mobile */



}

.product-card button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.product-card button:hover::before {
    left: 100%;
}

.product-card button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(30, 60, 114, 0.4);
}

.product-card button:active {
    transform: translateY(0);
}

/* Paginação */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.pagination button {
    padding: 0.8rem 1.2rem;
    border: 2px solid #e8ecf0;
    background: white;
    color: #666;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    min-width: 44px;
}

.pagination button:hover {
    border-color: #1e3c72;
    color: #1e3c72;
    transform: translateY(-1px);
}

.pagination button.active {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    border-color: #1e3c72;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.pagination .page-info {
    color: #fff;
    font-weight: 500;
    margin: 0 1rem;
}

/* Rodapé */
footer {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    text-align: center;
    padding: 2.5rem;
    margin-top: 4rem;
    color: #666;
    font-weight: 500;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* Estado vazio */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    color: #666;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.empty-state p {
    font-size: 1rem;
    opacity: 0.8;
}

/* Responsividade */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
        padding: 0 1rem;
    }

    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1.5rem;
    }

    .search-filter {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
    }

    .search-filter input,
    .search-filter select {
        width: 100%;
        max-width: 320px;
    }

    main {
        padding: 2rem 1rem;
    }

    #product-list {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .logo {
        font-size: 1.8rem;
    }

    .product-card {
        height: 460px;
    }

    .pagination {
        gap: 0.3rem;
    }

    .pagination button {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    #product-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1025px) {
    #product-list {
        grid-template-columns: repeat(3, 1fr);
    }
}