* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

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

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

header h1 {
    font-size: 1.8rem;
    font-weight: 700;
}

header nav a {
    color: white;
    text-decoration: none;
    margin-left: 2rem;
    font-weight: 500;
    transition: opacity 0.3s;
}

header nav a:hover {
    opacity: 0.8;
}

main {
    padding: 3rem 0;
    min-height: calc(100vh - 200px);
}

.hero {
    text-align: center;
    padding: 3rem 0;
    background: white;
    border-radius: 10px;
    margin-bottom: 3rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #667eea;
}

.hero p {
    font-size: 1.2rem;
    color: #666;
}

.products {
    margin-top: 2rem;
}

.products h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #333;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.product-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

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

.product-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-placeholder span {
    font-size: 4rem;
    color: white;
    font-weight: 700;
}

.product-info {
    padding: 1.5rem;
}

.product-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.description {
    color: #666;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

.price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
}

.btn {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 500;
    transition: background 0.3s;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: #5568d3;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-primary {
    background: #667eea;
}

.btn-danger {
    background: #dc3545;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-block {
    width: 100%;
    display: block;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    background: white;
    padding: 3rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.product-image img {
    width: 100%;
    border-radius: 10px;
}

.product-placeholder-large {
    width: 100%;
    height: 400px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.product-placeholder-large span {
    font-size: 8rem;
    color: white;
    font-weight: 700;
}

.product-details h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.price-large {
    font-size: 2.5rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 2rem;
}

.description-full {
    margin-bottom: 2rem;
}

.description-full h3 {
    margin-bottom: 0.5rem;
}

.product-meta {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 5px;
    margin-bottom: 2rem;
}

.product-meta p {
    margin-bottom: 0.5rem;
}

.purchase-section {
    margin-bottom: 2rem;
}

.security-note {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    color: #666;
    font-size: 0.9rem;
}

.delivery-info {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 5px;
}

.delivery-info h3 {
    margin-bottom: 1rem;
}

.delivery-info ol {
    padding-left: 1.5rem;
}

.delivery-info li {
    margin-bottom: 0.5rem;
}

.success-page {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 3rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
}

.success-icon {
    margin-bottom: 2rem;
}

.success-page h1 {
    color: #4CAF50;
    margin-bottom: 1.5rem;
}

.success-message {
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.next-steps {
    text-align: left;
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 5px;
    margin-bottom: 2rem;
}

.next-steps h3 {
    margin-bottom: 1rem;
}

.next-steps ol {
    padding-left: 1.5rem;
}

.next-steps li {
    margin-bottom: 0.8rem;
}

.support-info {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #fff3cd;
    border-radius: 5px;
}

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box {
    background: white;
    padding: 3rem;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
}

.login-box h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: #333;
}

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

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

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group input[type="email"],
.form-group input[type="file"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.form-group textarea {
    resize: vertical;
}

.form-group small {
    display: block;
    margin-top: 0.3rem;
    color: #666;
    font-size: 0.85rem;
}

.login-footer {
    text-align: center;
    margin-top: 1.5rem;
}

.login-footer a {
    color: #667eea;
    text-decoration: none;
}

.flash-messages {
    margin-bottom: 1.5rem;
}

.alert {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-card h3 {
    color: #666;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #667eea;
}

.admin-section {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.admin-section h2 {
    margin-bottom: 1.5rem;
    color: #333;
}

.admin-form {
    max-width: 800px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

table thead {
    background: #f8f9fa;
}

table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #dee2e6;
}

table td {
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
}

table tbody tr:hover {
    background: #f8f9fa;
}

.badge {
    display: inline-block;
    padding: 0.3rem 0.6rem;
    border-radius: 3px;
    font-size: 0.85rem;
    font-weight: 500;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-danger {
    background: #f8d7da;
    color: #721c24;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.log-viewer {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 1.5rem;
    border-radius: 5px;
    overflow-x: auto;
}

.log-viewer pre {
    margin: 0;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.no-products {
    text-align: center;
    padding: 3rem;
    color: #666;
    font-size: 1.2rem;
}

footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
    
    .product-detail {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .admin-stats {
        grid-template-columns: 1fr;
    }
    
    header .container {
        flex-direction: column;
        text-align: center;
    }
    
    header nav a {
        margin: 0.5rem;
    }
}
