/* style.css */
:root {
    --primary-color: #ee4d2d; /* Shopee Orange */
    --secondary-color: #fff159; /* Mercado Livre Yellow */
    --text-color: #333;
    --bg-color: #f5f5f5;
    --card-bg: #fff;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* Header */
header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: bold;
}

.search-bar {
    flex: 1;
    margin: 0 2rem;
    display: flex;
}

.search-bar input {
    width: 100%;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px 0 0 4px;
    outline: none;
}

.search-bar button {
    padding: 0.5rem 1rem;
    background-color: #d73211;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

/* Navigation */
nav {
    background-color: white;
    border-bottom: 1px solid #ddd;
    padding: 0.5rem 0;
}

nav ul {
    display: flex;
    list-style: none;
    justify-content: center;
    gap: 2rem;
}

nav ul li a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: var(--primary-color);
}

/* Hero Carousel */
.hero-carousel {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.carousel-container {
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-slide.active {
    opacity: 1;
    z-index: 1;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7);
}

.carousel-caption {
    position: absolute;
    color: white;
    text-align: center;
    z-index: 2;
    padding: 0 20px;
}

.carousel-caption h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.carousel-caption p {
    font-size: 1.2rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 3;
}

.dot {
    width: 12px;
    height: 12px;
    background-color: rgba(255,255,255,0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s;
}

.dot.active {
    background-color: white;
}

/* Categories */
.categories {
    margin-bottom: 2rem;
}

.category-list {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.category-item {
    background: white;
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: transform 0.2s;
}

.category-item:hover {
    transform: translateY(-3px);
    background-color: var(--primary-color);
    color: white;
}

/* Product Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 3rem;
}

.product-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-info {
    padding: 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    height: 2.4rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-price {
    color: var(--primary-color);
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.product-platform {
    font-size: 0.75rem;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.platform-shopee {
    background-color: #ffefe5;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.platform-ml {
    background-color: #fffbe5;
    color: #333;
    border: 1px solid var(--secondary-color);
}

.buy-button {
    display: block;
    text-align: center;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    padding: 0.75rem;
    border-radius: 4px;
    font-weight: bold;
    margin-top: auto;
    transition: opacity 0.3s;
}

.buy-button:hover {
    opacity: 0.9;
}

/* Admin Section (Cadastro) */
.admin-section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 3rem;
    display: none; /* Escondido por padrão */
}

.admin-section.active {
    display: block;
}

.admin-section h3 {
    margin-bottom: 1.5rem;
    text-align: center;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    outline: none;
}

.submit-btn {
    width: 100%;
    padding: 1rem;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.submit-btn:hover {
    background-color: #218838;
}

/* Footer */
footer {
    background-color: #333;
    color: white;
    padding: 3rem 0;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
}

.footer-links a:hover {
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .search-bar {
        margin: 0;
        width: 100%;
    }
    
    nav ul {
        gap: 1rem;
        font-size: 0.9rem;
    }
}
