/* --- БАЗА --- */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

body {
    font-family: 'Manrope', sans-serif;
    background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
    color: #1e293b;
    line-height: 1.6;
    min-height: 100vh;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

/* --- ШАПКА --- */
.header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container { 
    max-width: 1280px; 
    margin: 0 auto; 
    padding: 18px 32px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}

.logo-area { 
    display: flex; 
    align-items: center; 
    gap: 16px; 
}

.logo-icon {
    width: 48px; 
    height: 48px;
    background: linear-gradient(135deg, #1e293b, #334155);
    color: #fff; 
    border-radius: 14px; 
    font-size: 22px;
    display: flex; 
    align-items: center; 
    justify-content: center;
    box-shadow: 0 6px 16px rgba(30, 41, 59, 0.25);
}

.brand-title { 
    font-size: 20px; 
    font-weight: 800; 
    letter-spacing: 0.5px; 
    display: block; 
    color: #0f172a;
}

.brand-subtitle { 
    font-size: 11px; 
    color: #64748b; 
    font-weight: 700; 
    letter-spacing: 1.5px; 
    text-transform: uppercase; 
}

.admin-btn {
    background: #f1f5f9; 
    border: none; 
    width: 44px; 
    height: 44px;
    border-radius: 50%; 
    font-size: 20px; 
    cursor: pointer; 
    color: #64748b;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
    display: flex; 
    align-items: center; 
    justify-content: center;
}

.admin-btn:hover { 
    background: #e2e8f0; 
    color: #0f172a; 
    transform: rotate(90deg); 
}

/* --- КАТАЛОГ --- */
.main-content { 
    max-width: 1280px; 
    margin: 48px auto; 
    padding: 0 32px; 
}

.product-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); 
    gap: 32px; 
}

.product-card {
    background: #fff; 
    border-radius: 24px; 
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); 
    box-shadow: 0 4px 24px rgba(0,0,0,0.04);
    display: flex; 
    flex-direction: column; 
    position: relative; 
    border: 1px solid rgba(0,0,0,0.03);
}

.product-card:hover { 
    transform: translateY(-8px); 
    box-shadow: 0 20px 40px rgba(0,0,0,0.08); 
}

.product-image-container { 
    width: 100%; 
    height: 340px; 
    background: #f8fafc; 
    overflow: hidden; 
}

.product-image { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    transition: transform 0.6s ease; 
}

.product-card:hover .product-image { 
    transform: scale(1.06); 
}

.product-info { 
    padding: 24px; 
    display: flex; 
    flex-direction: column; 
    flex-grow: 1; 
}

.product-name { 
    font-size: 18px; 
    font-weight: 800; 
    margin-bottom: 8px; 
    color: #0f172a; 
    line-height: 1.3;
}

.product-desc { 
    font-size: 14px; 
    color: #64748b; 
    margin-bottom: 16px; 
    line-height: 1.5; 
}

.product-sizes { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 8px; 
    margin-bottom: 20px; 
}

.size-badge { 
    font-size: 12px; 
    color: #334155; 
    background: #f1f5f9; 
    padding: 6px 12px; 
    border-radius: 8px; 
    font-weight: 700; 
    letter-spacing: 0.5px;
}

.product-price { 
    font-size: 22px; 
    font-weight: 800; 
    color: #0f172a; 
    margin-top: auto; 
}

/* --- ПУСТОЕ СОСТОЯНИЕ --- */
.empty-state { 
    text-align: center; 
    padding: 120px 20px; 
    background: #fff; 
    border-radius: 24px; 
    box-shadow: 0 4px 24px rgba(0,0,0,0.03); 
    border: 1px solid rgba(0,0,0,0.03);
}

.empty-icon { 
    font-size: 64px; 
    margin-bottom: 24px; 
    opacity: 0.8;
}

.empty-state h2 { 
    font-size: 26px; 
    font-weight: 800; 
    color: #0f172a; 
    margin-bottom: 12px; 
}

.empty-state p {
    color: #64748b;
}

/* --- МОДАЛЬНОЕ ОКНО --- */
.modal-overlay { 
    position: fixed; 
    inset: 0; 
    background: rgba(15, 23, 42, 0.4); 
    backdrop-filter: blur(12px); 
    -webkit-backdrop-filter: blur(12px);
    display: none; 
    align-items: center; 
    justify-content: center; 
    z-index: 1000; 
    padding: 20px; 
}

.modal-overlay.active { 
    display: flex; 
}

.modal-content { 
    background: #fff; 
    width: 100%; 
    max-width: 500px; 
    border-radius: 28px; 
    padding: 40px; 
    position: relative; 
    box-shadow: 0 32px 64px -12px rgba(0,0,0,0.2); 
    max-height: 90vh; 
    overflow-y: auto; 
}

.close-btn { 
    position: absolute; 
    top: 24px; 
    right: 24px; 
    background: #f1f5f9; 
    border: none; 
    width: 36px; 
    height: 36px; 
    border-radius: 50%; 
    font-size: 22px; 
    color: #64748b; 
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    transition: all 0.2s; 
}

.close-btn:hover { 
    background: #e2e8f0; 
    color: #0f172a; 
    transform: rotate(90deg);
}

.login-icon { 
    font-size: 48px; 
    text-align: center; 
    margin-bottom: 20px; 
}

.modal-title { 
    font-size: 24px; 
    font-weight: 800; 
    margin-bottom: 8px; 
    color: #0f172a; 
    text-align: center; 
}

.modal-desc { 
    color: #64748b; 
    font-size: 14px; 
    margin-bottom: 32px; 
    text-align: center; 
}

/* --- ФОРМЫ --- */
.form-group { 
    margin-bottom: 20px; 
}

.form-row { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 16px; 
}

label { 
    display: block; 
    font-size: 12px; 
    font-weight: 800; 
    margin-bottom: 8px; 
    color: #475569; 
    text-transform: uppercase; 
    letter-spacing: 0.5px; 
}

.form-input { 
    width: 100%; 
    padding: 14px 16px; 
    border: 2px solid #e2e8f0; 
    border-radius: 14px; 
    font-size: 15px; 
    font-family: inherit; 
    transition: all 0.2s; 
    background: #f8fafc; 
    color: #0f172a; 
}

.form-input:focus { 
    outline: none; 
    border-color: #0f172a; 
    background: #fff; 
    box-shadow: 0 0 0 4px rgba(15, 23, 42, 0.1); 
}

.btn-primary { 
    width: 100%; 
    padding: 16px; 
    background: #0f172a; 
    color: #fff; 
    border: none; 
    border-radius: 14px; 
    font-size: 16px; 
    font-weight: 800; 
    cursor: pointer; 
    transition: all 0.3s; 
    margin-top: 12px; 
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.2); 
}

.btn-primary:hover { 
    transform: translateY(-2px); 
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.3); 
    background: #1e293b;
}

.form-header { 
    margin-bottom: 24px; 
    padding-bottom: 20px; 
    border-bottom: 1px solid #e2e8f0; 
}

.form-header h3 { 
    font-size: 20px; 
    font-weight: 800; 
    color: #0f172a; 
    margin-bottom: 6px; 
}

.form-header p { 
    font-size: 14px; 
    color: #64748b; 
}

/* --- ВКЛАДКИ --- */
.tabs { 
    display: flex; 
    gap: 8px; 
    margin-bottom: 28px; 
    background: #f1f5f9; 
    padding: 8px; 
    border-radius: 16px; 
}

.tab-btn { 
    flex: 1; 
    padding: 12px; 
    background: none; 
    border: none; 
    font-family: inherit; 
    font-size: 14px; 
    font-weight: 800; 
    color: #64748b; 
    cursor: pointer; 
    border-radius: 12px; 
    transition: all 0.2s; 
}

.tab-btn.active { 
    background: #fff; 
    color: #0f172a; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.05); 
}

.logout-style { 
    color: #ef4444; 
    flex: 0.6; 
}

.logout-style:hover { 
    background: #fee2e2; 
}

.tab-content { 
    display: none; 
}

.tab-content.active { 
    display: block; 
}

.hidden { 
    display: none !important; 
}

.delete-btn { 
    position: absolute; 
    top: 16px; 
    right: 16px; 
    background: rgba(255, 255, 255, 0.95); 
    border: none; 
    padding: 8px 14px; 
    border-radius: 10px; 
    cursor: pointer; 
    font-size: 13px; 
    font-weight: 800; 
    color: #ef4444; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.1); 
    transition: all 0.2s; 
    z-index: 10; 
}

.delete-btn:hover { 
    background: #ef4444; 
    color: white; 
}

.slider { 
    width: 100%; 
    margin: 20px 0; 
    accent-color: #0f172a; 
}

.slider-value { 
    text-align: center; 
    font-weight: 800; 
    color: #0f172a; 
    font-size: 18px; 
}

/* --- ЗАГРУЗКА ФАЙЛА --- */
.image-upload-group {
    background: #f8fafc;
    padding: 20px;
    border-radius: 16px;
    border: 2px dashed #cbd5e1;
}

.file-input {
    display: block;
    width: 100%;
    padding: 12px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-family: inherit;
    cursor: pointer;
    margin-top: 6px;
}

.file-input::-webkit-file-upload-button {
    background: #0f172a;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 800;
    margin-right: 12px;
    transition: background 0.2s;
}

.file-input::-webkit-file-upload-button:hover {
    background: #1e293b;
}

.divider {
    text-align: center;
    position: relative;
    margin: 20px 0;
}

.divider::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background: #cbd5e1;
    z-index: 1;
}

.divider span {
    background: #f8fafc;
    padding: 0 12px;
    position: relative;
    z-index: 2;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 800;
}

.preview-container {
    margin-top: 16px;
    text-align: center;
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid #e2e8f0;
    height: 180px;
    background: #fff;
}

.preview-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- ПОДВАЛ САЙТА --- */
.footer {
    background: #0f172a; /* Темный фон */
    color: #fff;
    padding: 60px 0;
    margin-top: 80px;
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 32px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.footer-title {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 24px;
    color: #fff;
    letter-spacing: 0.5px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
    font-size: 16px;
    color: #cbd5e1;
    line-height: 1.5;
}

.contact-icon {
    font-size: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.contact-link {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.2s;
    font-weight: 600;
}

.contact-link:hover {
    color: #fff;
    text-decoration: underline;
}

.map-container {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
}

.map-container iframe {
    display: block;
}

/* Адаптация для телефонов */
@media (max-width: 768px) {
    .footer-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .footer {
        padding: 40px 0;
    }
}