:root {
    --primary: #6c5ce7;
    --secondary: #a29bfe;
    --dark: #2d3436;
    --light: #dfe6e9;
    --white: #ffffff;
    --glass: rgba(255, 255, 255, 0.9);
    --shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

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

body {
    background-color: #f0f2f5;
    color: var(--dark);
}

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

/* Admin Header */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: var(--white);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    border-radius: 10px;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
    text-decoration: none;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: transform 0.2s ease;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    color: var(--white);
}

.btn-danger {
    background: #ff7675;
    color: white;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.9rem;
}

.btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

/* Forms */
.form-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    max-width: 600px;
    margin: 0 auto;
}

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

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.form-group textarea {
    height: 100px;
    resize: vertical;
}

/* Tables */
.table-container {
    background: var(--white);
    padding: 1rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    color: var(--primary);
}

tr:hover {
    background-color: #f9f9f9;
}

/* Grid for Public View */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.product-img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    padding: 10px 10px 0 10px;
    background: #fdfdfd;
}

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

.product-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--dark);
    font-weight: bold;
}

.product-desc {
    font-size: 0.9rem;
    color: #636e72;
    margin-bottom: 1rem;
    flex-grow: 1;
}

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

.btn-buy {
    display: block;
    text-align: center;
    background: #00b894;
    color: white;
    padding: 12px;
    border-radius: 8px;
    font-weight: bold;
    text-decoration: none;
}

.btn-buy:hover {
    background: #00a884;
}

/* Responsive */
@media (max-width: 768px) {
    .admin-header {
        flex-direction: column;
        gap: 1rem;
    }

    .table-container {
        padding: 0.5rem;
    }

    th,
    td {
        padding: 0.5rem;
        font-size: 0.9rem;
    }
}

/* Gallery */
.gallery-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.main-image {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    background: #fff;
    transition: opacity 0.3s ease;
}

.thumbnails {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 5px;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) transparent;
}

.thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    opacity: 0.7;
}

.thumb:hover,
.thumb.active {
    border-color: var(--primary);
    opacity: 1;
    transform: scale(1.05);
}

/* Mercado Livre Style Layout */
.product-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-bottom: 2rem;
}

.product-gallery-wrapper {
    flex: 2;
    min-width: 300px;
}

.product-info-wrapper {
    flex: 1;
    min-width: 280px;
    border: 1px solid #eee;
    padding: 1.5rem;
    border-radius: 8px;
    height: fit-content;
}

.product-header-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--dark);
    line-height: 1.3;
    margin-bottom: 1rem;
}

.product-header-price {
    font-size: 2.2rem;
    font-weight: 300;
    color: var(--dark);
    margin-bottom: 2rem;
}

.product-description-section {
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-top: 2rem;
}

.product-description-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: 400;
    color: var(--dark);
}

.product-description-text {
    font-size: 1.1rem;
    color: #000;
    line-height: 1.6;
    white-space: pre-line;
}