/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header styles */
.header {
    background: linear-gradient(135deg, #1e88e5 0%, #1565c0 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
}

.logo a {
    color: white;
    text-decoration: none;
}

.nav a {
    color: white;
    text-decoration: none;
    margin-left: 1.5rem;
    font-weight: 500;
}

.nav a:hover {
    text-decoration: underline;
}

/* Main content */
.main {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

/* Footer */
.footer {
    background: #1976d2;
    color: white;
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 2rem;
}

/* Product grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.product-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.product-thumbnail {
    height: 200px;
    overflow: hidden;
}

.product-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-thumbnail img {
    transform: scale(1.05);
}

.product-info {
    padding: 1.5rem;
}

.product-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: #1565c0;
}

.product-desc {
    color: #666;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.product-price {
    font-size: 1.3rem;
    font-weight: bold;
    color: #e53935;
    margin-bottom: 1rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.7rem 1.5rem;
    background: #1976d2;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s ease;
}

.btn:hover {
    background: #1565c0;
}

.btn-primary {
    background: #1976d2;
}

.btn-primary:hover {
    background: #1565c0;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Product detail page */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

.product-image {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.product-image img {
    width: 100%;
    height: auto;
    display: block;
}

.product-info h1 {
    font-size: 2rem;
    color: #1565c0;
    margin-bottom: 1rem;
}

.product-price {
    font-size: 1.8rem;
    font-weight: bold;
    color: #e53935;
    margin-bottom: 1.5rem;
}

.product-description {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.product-category {
    color: #666;
    margin-bottom: 2rem;
    font-style: italic;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #1976d2;
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

/* Checkout page */
.checkout-summary {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.checkout-summary h2 {
    color: #1565c0;
    margin-bottom: 1.5rem;
    text-align: center;
}

.order-details {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 6px;
    margin-bottom: 2rem;
}

.order-details p {
    margin-bottom: 0.5rem;
}

/* Success page */
.success-message {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    background: white;
    padding: 3rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.success-message h2 {
    color: #4caf50;
    margin-bottom: 1rem;
}

.download-section {
    margin: 2rem 0;
    padding: 2rem;
    background: #e8f5e9;
    border-radius: 6px;
}

.note {
    font-size: 0.9rem;
    color: #666;
    margin-top: 1rem;
}

.additional-info {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

/* Error page */
.error-message {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    background: white;
    padding: 3rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.error-message h2 {
    color: #e53935;
    margin-bottom: 1rem;
}

/* Admin styles */
.admin-container {
    max-width: 1000px;
    margin: 0 auto;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
}

.admin-table th,
.admin-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.admin-table th {
    background: #f8f9fa;
    font-weight: 600;
}

.admin-form {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.admin-form h2 {
    margin-bottom: 1.5rem;
    color: #1565c0;
}

/* Responsive design */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        text-align: center;
    }
    
    .nav {
        margin-top: 1rem;
    }
    
    .nav a {
        margin: 0 0.5rem;
    }
    
    .product-detail {
        grid-template-columns: 1fr;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-table {
        display: block;
        overflow-x: auto;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    .btn-large {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
    
    .checkout-summary,
    .success-message,
    .error-message {
        padding: 1.5rem;
    }
}