/* css/style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f0f4f8;
    color: #2c3e50;
}

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

/* Header */
header {
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    background: #1a3a5c;
    color: white;
    padding: 8px 0;
    font-size: 14px;
}

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

.header-contact a {
    color: white;
    text-decoration: none;
}

.header-currency select {
    background: transparent;
    color: white;
    border: 1px solid #4a7a9c;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
}

.header-main .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo {
    font-size: 28px;
    font-weight: bold;
}

.logo a {
    color: #1a3a5c;
    text-decoration: none;
}

.logo span {
    color: #3498db;
}

.cart-icon {
    background: #3498db;
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s;
}

.cart-icon:hover {
    background: #2980b9;
}

.header-nav {
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.header-nav ul {
    display: flex;
    list-style: none;
    flex-wrap: wrap;
    gap: 5px;
}

.header-nav ul li a {
    display: block;
    padding: 12px 20px;
    color: #2c3e50;
    text-decoration: none;
    transition: all 0.3s;
    border-radius: 4px;
}

.header-nav ul li a:hover {
    background: #3498db;
    color: white;
}

/* Main */
main {
    padding: 30px 0;
}

h2 {
    color: #1a3a5c;
    margin: 30px 0 20px;
    border-bottom: 3px solid #3498db;
    padding-bottom: 10px;
}

/* Products */
.products-grid, .promo-grid, .news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

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

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

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

.product-card h3, .promo-card h3 {
    padding: 15px 15px 5px;
    font-size: 16px;
}

.price {
    padding: 0 15px;
    font-size: 20px;
    font-weight: bold;
    color: #1a3a5c;
}

.description {
    padding: 0 15px;
    color: #666;
    font-size: 14px;
    min-height: 40px;
}

.product-card form {
    padding: 15px;
}

.product-card button {
    width: 100%;
    padding: 12px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

.product-card button:hover {
    background: #2980b9;
}

/* Promotions */
.promo-card {
    position: relative;
    border: 2px solid #e74c3c;
}

.old-price {
    padding: 0 15px;
    text-decoration: line-through;
    color: #999;
}

.new-price {
    padding: 0 15px 10px;
    font-size: 22px;
    font-weight: bold;
    color: #e74c3c;
}

.discount {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #e74c3c;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: bold;
}

/* Cart */
.cart table {
    width: 100%;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    border-collapse: collapse;
}

.cart th, .cart td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.cart th {
    background: #1a3a5c;
    color: white;
}

.cart form {
    display: inline;
}

.cart button {
    padding: 5px 12px;
    background: #e9ecef;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.cart .clear-cart {
    color: #e74c3c;
    text-decoration: none;
}

#orderForm {
    margin-top: 30px;
    padding: 25px;
    background: white;
    border-radius: 12px;
}

#orderForm input, #orderForm textarea {
    display: block;
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
}

#orderForm button {
    padding: 15px 30px;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.3s;
}

#orderForm button:hover {
    background: #219a52;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    margin: 10% auto;
    padding: 30px;
    width: 90%;
    max-width: 500px;
    border-radius: 16px;
    position: relative;
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    cursor: pointer;
}

.contact-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #3498db;
    color: white;
    border: none;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
    transition: transform 0.3s;
    z-index: 1500;
}

.contact-btn:hover {
    transform: scale(1.1);
}

/* Footer */
footer {
    background: #1a3a5c;
    color: white;
    padding: 40px 0 20px;
    margin-top: 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-grid ul {
    list-style: none;
}

.footer-grid ul li a {
    color: #a0c4e8;
    text-decoration: none;
    line-height: 2;
}

.footer-grid ul li a:hover {
    color: white;
}

.social a {
    display: inline-block;
    margin-right: 15px;
    font-size: 24px;
    color: #a0c4e8;
    text-decoration: none;
}

.social a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #2a5a7a;
    padding-top: 20px;
    text-align: center;
    color: #7a9ab8;
}

/* Admin */
.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

.admin-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0 30px;
}

.admin-nav a {
    padding: 10px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    text-decoration: none;
    color: #2c3e50;
    transition: background 0.3s;
}

.admin-nav a:hover {
    background: #3498db;
    color: white;
}

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

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

.stat-card h3 {
    color: #7a9ab8;
    font-size: 14px;
    text-transform: uppercase;
}

.stat-card p {
    font-size: 32px;
    font-weight: bold;
    color: #1a3a5c;
}

.admin-container form {
    background: white;
    padding: 25px;
    border-radius: 12px;
    margin: 20px 0;
}

.admin-container input, .admin-container select, .admin-container textarea {
    display: block;
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
}

.admin-container button {
    padding: 12px 30px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
}

.admin-container button:hover {
    background: #2980b9;
}

.admin-container table {
    width: 100%;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    border-collapse: collapse;
}

.admin-container th, .admin-container td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.admin-container th {
    background: #1a3a5c;
    color: white;
}

.admin-actions {
    display: flex;
    gap: 20px;
    align-items: center;
    margin: 20px 0;
}

.admin-actions .btn {
    padding: 10px 20px;
    background: #27ae60;
    color: white;
    border-radius: 8px;
    text-decoration: none;
}

.login-form {
    max-width: 400px;
    margin: 100px auto;
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.1);
}

.login-form h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #1a3a5c;
}

/* Responsive */
@media (max-width: 768px) {
    .header-top .container {
        flex-direction: column;
        gap: 8px;
    }
    
    .header-main .container {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .header-nav ul {
        justify-content: center;
    }
    
    .products-grid, .promo-grid, .news-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .admin-nav {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .products-grid, .promo-grid, .news-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .cart table {
        font-size: 14px;
    }
	/* Увеличенное модальное окно */
.modal-large {
    max-width: 600px !important;
    padding: 40px !important;
}

.modal-subtitle {
    color: #7a9ab8;
    margin-bottom: 25px;
    font-size: 16px;
}

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

.large-form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #2c3e50;
}

.large-form .required {
    color: #e74c3c;
}

.large-form input,
.large-form textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.3s;
    background: #fafbfc;
}

.large-form input:focus,
.large-form textarea:focus {
    outline: none;
    border-color: #3498db;
    background: white;
}

.large-form textarea {
    resize: vertical;
    min-height: 150px;
}

.submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.3);
}

.submit-btn:active {
    transform: translateY(0);
}

.form-hint {
    margin-top: 12px;
    font-size: 13px;
    color: #7a9ab8;
    text-align: center;
}

/* Сообщения в админке */
.messages-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

.message-card {
    background: white;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    border-left: 4px solid #3498db;
    transition: box-shadow 0.3s;
}

.message-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.message-card.new {
    border-left-color: #e74c3c;
    background: #fff8f6;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.message-sender {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.message-sender strong {
    font-size: 18px;
    color: #2c3e50;
}

.message-email {
    color: #3498db;
    font-size: 14px;
}

.message-phone {
    color: #27ae60;
    font-size: 14px;
}

.message-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.message-date {
    color: #7a9ab8;
    font-size: 13px;
}

.badge-new {
    background: #e74c3c;
    color: white;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.delete-btn {
    color: #e74c3c;
    text-decoration: none;
    font-size: 18px;
    transition: transform 0.2s;
    display: inline-block;
}

.delete-btn:hover {
    transform: scale(1.2);
}

.message-body {
    padding: 10px 0;
}

.message-body p {
    color: #2c3e50;
    line-height: 1.8;
    font-size: 15px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.message-footer {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.message-ip {
    color: #7a9ab8;
    font-size: 13px;
}

.mark-read-btn {
    background: #e9ecef;
    color: #2c3e50;
    padding: 6px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 13px;
    transition: background 0.3s;
}

.mark-read-btn:hover {
    background: #3498db;
    color: white;
}

/* Анимация для новых сообщений */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-card.new {
    animation: slideIn 0.5s ease;
}

/* Адаптив для формы */
@media (max-width: 600px) {
    .modal-large {
        padding: 20px !important;
        margin: 5% auto !important;
        width: 95% !important;
    }
    
    .message-header {
        flex-direction: column;
    }
    
    .message-sender {
        flex-direction: column;
        align-items: flex-start;
    }
}
}