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

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

a {
    text-decoration: none;
    color: inherit;
}

/* Home Page */
.home-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #fef2f2 0%, #fce7f3 100%);
    padding: 20px;
}

.home-content {
    text-align: center;
    max-width: 600px;
}

.home-content h1 {
    font-size: 48px;
    color: #333;
    margin-bottom: 10px;
    font-weight: 700;
}

.home-content p {
    font-size: 18px;
    color: #666;
    margin-bottom: 40px;
}

.home-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 60px;
}

.btn-large {
    padding: 16px 32px !important;
    font-size: 18px !important;
}

.home-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.info-card {
    background: white;
    padding: 30px 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.info-card h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.info-card p {
    font-size: 14px;
    color: #666;
}

/* Login Modal */
.modal {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background: linear-gradient(135deg, #fef2f2 0%, #fce7f3 100%);
    z-index: 1000;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.modal-content h1 {
    font-size: 32px;
    margin-bottom: 10px;
    color: #333;
}

.modal-content p {
    color: #999;
    margin-bottom: 30px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.login-form label {
    text-align: left;
    font-weight: 500;
    font-size: 14px;
    color: #555;
}

.password-input {
    display: flex;
    align-items: center;
    border: 2px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.3s;
}

.password-input:focus-within {
    border-color: #e63946;
}

.password-input input {
    flex: 1;
    padding: 12px;
    border: none;
    font-size: 16px;
    outline: none;
}

.toggle-btn {
    padding: 12px 16px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 18px;
    color: #999;
    transition: color 0.3s;
}

.toggle-btn:hover {
    color: #333;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background-color: #e63946;
    color: white;
}

.btn-primary:hover {
    background-color: #d62828;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: #667eea;
    color: white;
}

.btn-secondary:hover {
    background-color: #5568d3;
    transform: translateY(-2px);
}

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

.btn-danger:hover {
    background-color: #d62828;
}

.btn-small {
    padding: 8px 16px !important;
    font-size: 14px !important;
}

.full-width {
    width: 100%;
}

/* Header */
.header {
    background: white;
    padding: 20px 40px;
    border-bottom: 1px solid #eee;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.header h1 {
    font-size: 24px;
    color: #333;
}

.logo {
    font-size: 18px;
    font-weight: 700;
    color: #e63946;
    cursor: pointer;
}

.logo:hover {
    color: #d62828;
}

.header-buttons {
    display: flex;
    gap: 10px;
}

.products-header {
    background: linear-gradient(135deg, #fef2f2 0%, #fce7f3 100%);
    padding: 40px 20px;
    text-align: center;
}

.products-header h1 {
    font-size: 36px;
    color: #333;
    margin-bottom: 10px;
}

.tagline {
    font-size: 16px;
    color: #666;
}

/* Admin Panel */
.admin-panel {
    display: block;
}

.admin-panel.hidden {
    display: none;
}

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

/* Form Section */
.form-section {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 40px;
}

.form-section h2 {
    font-size: 20px;
    margin-bottom: 25px;
    color: #333;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
    color: #555;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #e63946;
}

.form-group textarea {
    resize: vertical;
}

/* Products Section */
.products-section {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.products-section h2 {
    font-size: 20px;
    margin-bottom: 25px;
    color: #333;
}

.products-showcase {
    margin-bottom: 60px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

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

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

.product-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-name {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}

.product-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.4;
    flex: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-actions {
    display: flex;
    gap: 10px;
}

.btn-view {
    flex: 1;
    background-color: #e63946;
    color: white;
    padding: 10px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.3s;
    display: block;
}

.btn-view:hover {
    background-color: #d62828;
}

.btn-delete {
    padding: 10px 15px;
    background-color: #ddd;
    color: #333;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-delete:hover {
    background-color: #ccc;
}

.empty-state {
    text-align: center;
    color: #999;
    padding: 40px 20px;
    font-size: 16px;
}

.loading {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 16px;
}

/* Footer */
.footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 30px 20px;
    margin-top: 60px;
}

.footer p {
    margin-bottom: 10px;
}

.footer a {
    color: #667eea;
    hover: #5568d3;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }

    .header h1 {
        font-size: 20px;
    }

    .header-buttons {
        flex-direction: column;
        width: 100%;
    }

    .header-buttons .btn {
        width: 100%;
    }

    .container {
        padding: 20px;
    }

    .form-section,
    .products-section {
        padding: 20px;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .modal-content {
        padding: 30px 20px;
        margin: 20px;
    }

    .home-buttons {
        flex-direction: column;
    }

    .home-content h1 {
        font-size: 36px;
    }

    .products-header h1 {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }

    .btn {
        width: 100%;
    }

    .home-info {
        grid-template-columns: 1fr;
    }

    .modal-content {
        margin: 10px;
    }
}
