/* Загальні стилі */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

/* Контейнер */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Шапка */
header {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.logo img {
    max-width: 80%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Інформаційна панель */
.info-bar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    font-size: 1.2em;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Сітка чашок */
.cup-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.cup-button {
    background: white;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.cup-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.cup-button.active {
    border: 3px solid #4A90E2;
    background: #f8f9ff;
    transform: scale(1.02);
}

.cup-button img {
    width: 100%;
    max-width: 250px;
    height: auto;
    border-radius: 10px;
    margin-bottom: 15px;
}

.cup-button p {
    font-size: 1.1em;
    font-weight: bold;
    color: #4A90E2;
    margin-top: 10px;
}

/* Кнопки */
.home-button, .btn-back, .btn-submit {
    display: inline-block;
    background: white;
    color: #4A90E2;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 25px;
    font-weight: bold;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1em;
    margin: 10px;
}

.home-button:hover, .btn-back:hover {
    background: #4A90E2;
    color: white;
    transform: translateY(-2px);
}

.btn-submit {
    background: #4A90E2;
    color: white;
    font-size: 1.1em;
    padding: 15px 40px;
}

.btn-submit:hover {
    background: #357abd;
    transform: translateY(-2px);
}

/* Форма замовлення */
.order-form {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="tel"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

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

.form-group input.error,
.form-group textarea.error {
    border-color: #E24A4A;
}

.error-message {
    color: #E24A4A;
    font-size: 0.9em;
    margin-top: 5px;
    display: none;
}

/* Інформація про товар */
.product-info {
    background: #f8f9ff;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.product-info img {
    width: 100px;
    height: auto;
    border-radius: 10px;
}

.product-details {
    flex: 1;
}

.product-details h3 {
    color: #4A90E2;
    margin-bottom: 10px;
}

/* Секція фото */
.photo-upload {
    border: 2px dashed #e0e0e0;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

.photo-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.photo-item {
    border: 1px solid #e0e0e0;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
}

.photo-preview {
    width: 100%;
    max-width: 150px;
    height: auto;
    margin: 10px auto;
    display: none;
}

.photo-preview.active {
    display: block;
}

/* Підсумок замовлення */
.order-summary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    margin-top: 30px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.summary-total {
    font-size: 1.3em;
    font-weight: bold;
    padding-top: 15px;
    margin-top: 10px;
    border-top: 2px solid white;
}

/* Сторінка успіху */
.success-container {
    background: white;
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    margin-top: 50px;
}

.success-icon {
    font-size: 80px;
    color: #4CAF50;
    margin-bottom: 20px;
}

.order-number {
    background: #f0f0f0;
    padding: 15px;
    border-radius: 10px;
    font-size: 1.2em;
    margin: 20px 0;
    font-family: monospace;
}

/* Адаптивність */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .cup-container {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
    }
    
    .order-form {
        padding: 20px;
    }
    
    .product-info {
        flex-direction: column;
        text-align: center;
    }
    
    .photo-inputs {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .cup-container {
        grid-template-columns: 1fr;
    }
    
    .btn-submit, .home-button {
        width: 100%;
        text-align: center;
    }
}