:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --text-color: #333;
    --bg-color: #f5f7fa;
    --card-bg: #ffffff;
    --danger-color: #e74c3c;
    --success-color: #27ae60;
    --info-color: #3498db;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header & Banner */
header {
    background: var(--card-bg);
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    margin-bottom: 30px;
    overflow: hidden;
}

.banner-container {
    width: 100%;
    height: 300px;
    background-color: #ddd;
    position: relative;
    overflow: hidden;
}

.banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.store-info {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
    margin-top: -50px;
}

.profile-img-container {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 5px solid white;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    overflow: hidden;
    background: white;
    z-index: 10;
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.store-details h1 {
    font-size: 2rem;
    color: var(--text-color);
    margin-bottom: 5px;
}

/* Grid de Produtos */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

.product-card {
    background: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-info {
    padding: 15px;
}

.price {
    color: var(--primary-color);
    font-size: 1.25rem;
    font-weight: bold;
    margin: 10px 0;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.3s;
    font-size: 1rem;
}

.btn:hover {
    opacity: 0.9;
}

/* Admin Layout */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background: white;
    box-shadow: 2px 0 5px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
}

.sidebar-nav a {
    display: block;
    padding: 15px 20px;
    color: var(--text-color);
    text-decoration: none;
    transition: background 0.3s;
}

.sidebar-nav a:hover, .sidebar-nav a.active {
    background: #f8f9fa;
    color: var(--primary-color);
    border-right: 3px solid var(--primary-color);
}

.main-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

/* Cards */
.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-bottom: 20px;
    overflow: hidden;
}

.card-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    background: #fafafa;
}

.card-body {
    padding: 20px;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Upload Areas */
.upload-area {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #fcfcfc;
    position: relative;
    overflow: hidden;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-area:hover {
    border-color: var(--primary-color);
    background: #f0f4ff;
}

.banner-area {
    height: 200px;
    background-size: cover;
    background-position: center;
}

.profile-area {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin: 0 auto;
}

.profile-area img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.product-upload-preview {
    width: 200px;
    height: 200px;
    border: 2px dashed #ddd;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    background-size: cover;
    background-position: center;
}

/* Modals */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-container {
    background: white;
    width: 90%;
    max-width: 500px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    animation: slideDown 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes slideDown {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    text-align: right;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Utilities */
.text-right { text-align: right; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.row { display: flex; gap: 20px; flex-wrap: wrap; }
.col-6 { flex: 0 0 calc(50% - 10px); }
.col-12 { flex: 0 0 100%; }

/* Admin Styles */
.admin-panel {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.section-title {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.preview-container {
    margin-top: 10px;
    max-width: 300px;
    border: 2px dashed #ddd;
    padding: 10px;
    border-radius: 5px;
    display: none;
}

.preview-container.show {
    display: block;
}

.preview-container img {
    max-width: 100%;
    height: auto;
}

.product-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.item-details {
    display: flex;
    align-items: center;
    gap: 15px;
}

.item-details img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 5px;
}

.btn-danger {
    background: var(--danger-color);
}

.btn-success {
    background: var(--success-color);
}

/* Progress Bar Styles */
.progress-wrapper {
    margin-top: 10px;
    display: none;
}

.progress-container {
    width: 100%;
    background-color: #f0f0f0;
    border-radius: 4px;
    height: 20px;
    overflow: hidden;
    margin-bottom: 5px;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    transition: width 0.3s ease;
    text-align: center;
    line-height: 20px;
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.upload-status {
    font-size: 0.9em;
    margin-top: 5px;
}

.upload-status.success {
    color: var(--success-color);
}

.upload-status.error {
    color: var(--danger-color);
}

/* Toast Notifications */
.toast {
    visibility: hidden;
    min-width: 250px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 8px;
    padding: 16px;
    position: fixed;
    z-index: 1000;
    right: 30px;
    top: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    opacity: 0;
    transition: opacity 0.3s, top 0.3s;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.toast.show {
    visibility: visible;
    opacity: 1;
    top: 50px;
}

.toast.success {
    background-color: var(--success-color);
}

.toast.error {
    background-color: var(--danger-color);
}

.toast.info {
    background-color: var(--info-color);
}
