:root {
    --primary: #00274D;
    --secondary: #4CAF50;
    --accent: #FF8C42;
    --light: #F5F5F5;
    --white: #FFFFFF;
    --radius: 10px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--light);
    color: var(--primary);
    line-height: 1.6;
}

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

/* Шапка */
header {
    background-color: var(--primary);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.spring-logo {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.spring {
    width: 30px;
    height: 30px;
    border: 3px solid var(--accent);
    border-radius: 50%;
    position: relative;
}

.spring:before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 3px solid var(--accent);
    border-radius: 50%;
    top: 5px;
    left: 5px;
}

.spring:after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    border: 3px solid var(--accent);
    border-radius: 50%;
    top: 10px;
    left: 10px;
}

.logo h1 {
    color: var(--white);
    font-size: 24px;
    font-weight: 600;
}

.logo .dot {
    color: var(--accent);
}

.search-bar {
    flex: 1;
    max-width: 500px;
    margin: 0 20px;
    position: relative;
}

.search-bar input {
    width: 100%;
    padding: 12px 20px;
    border: none;
    border-radius: var(--radius);
    font-size: 16px;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

.search-bar input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-bar button {
    position: absolute;
    right: 5px;
    top: 5px;
    background: var(--accent);
    border: none;
    color: var(--white);
    padding: 7px 15px;
    border-radius: var(--radius);
    cursor: pointer;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

nav a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

nav a:hover {
    color: var(--accent);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info {
    color: var(--white);
    font-size: 14px;
}

.logout-btn {
    background: transparent;
    color: var(--white);
    border: 1px solid var(--white);
    padding: 5px 10px;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 12px;
}

.logout-btn:hover {
    background: var(--white);
    color: var(--primary);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--accent);
    color: var(--white);
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Главная страница */
.hero {
    background: linear-gradient(rgba(0, 39, 77, 0.8), rgba(0, 39, 77, 0.8)), 
                url('https://images.unsplash.com/photo-1494976388531-d1058494cdd8?ixlib=rb-4.0.3') center/cover;
    color: var(--white);
    padding: 100px 0;
    text-align: center;
}

.hero h2 {
    font-size: 48px;
    margin-bottom: 20px;
    font-weight: 700;
}

.hero p {
    font-size: 18px;
    max-width: 600px;
    margin: 0 auto 30px;
    color: rgba(255, 255, 255, 0.9);
}

.cta-button {
    display: inline-block;
    background-color: var(--accent);
    color: var(--white);
    padding: 14px 32px;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(255, 140, 66, 0.3);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 140, 66, 0.4);
}

.features {
    padding: 80px 0;
    background-color: var(--light);
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
    font-size: 36px;
    font-weight: 600;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature {
    background-color: var(--white);
    padding: 30px;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
}

.feature:hover {
    transform: translateY(-5px);
}

.feature i {
    font-size: 40px;
    color: var(--secondary);
    margin-bottom: 20px;
}

.categories {
    padding: 80px 0;
    background-color: var(--white);
}

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

.category {
    background-color: var(--light);
    padding: 25px;
    border-radius: var(--radius);
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
}

.category:hover {
    background-color: var(--primary);
    color: var(--white);
}

.category i {
    font-size: 32px;
    margin-bottom: 15px;
    color: var(--primary);
}

.category:hover i {
    color: var(--white);
}

.products {
    padding: 80px 0;
    background-color: var(--light);
}

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

.product-card {
    background-color: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.product-image {
    height: 200px;
    background: linear-gradient(135deg, #e9ecef, #dee2e6);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info {
    padding: 20px;
}

.product-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
}

.product-price {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 15px;
}

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

.btn-buy {
    flex: 2;
    background-color: var(--accent);
    color: var(--white);
    border: none;
    padding: 12px;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-buy:hover {
    background-color: #e67e22;
}

.btn-details {
    flex: 1;
    background-color: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
    padding: 12px;
    border-radius: var(--radius);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-details:hover {
    background-color: var(--primary);
    color: var(--white);
}

/* Страницы авторизации */
.auth-page {
    padding: 60px 0;
    min-height: 70vh;
    display: flex;
    align-items: center;
}

.auth-container {
    max-width: 400px;
    margin: 0 auto;
    width: 100%;
}

.auth-tabs {
    display: flex;
    margin-bottom: 30px;
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.auth-tab {
    flex: 1;
    padding: 15px;
    text-align: center;
    background: transparent;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.auth-tab.active {
    background: var(--primary);
    color: var(--white);
}

.auth-form {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

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

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--primary);
}

input, textarea, select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: var(--radius);
    font-size: 16px;
    transition: border-color 0.3s;
}

input:focus, textarea:focus, select:focus {
    border-color: var(--primary);
    outline: none;
}

.btn-primary {
    width: 100%;
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 12px;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary:hover {
    background: #001a33;
}

.auth-switch {
    text-align: center;
    margin-top: 20px;
    color: #666;
}

.auth-switch a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.alert {
    padding: 12px 15px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Кнопки действий */
.btn-danger {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 14px;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-warning {
    background: #ffc107;
    color: #212529;
    border: none;
    padding: 8px 15px;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 14px;
}

.btn-warning:hover {
    background: #e0a800;
}

.btn-info {
    background: #17a2b8;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 14px;
}

.btn-info:hover {
    background: #138496;
}

.btn-success {
    background: var(--secondary);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 14px;
}

.btn-success:hover {
    background: #45a049;
}

/* Страница каталога */
.catalog-page {
    padding: 40px 0;
}

.catalog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.catalog-content {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
}

.filters {
    background: var(--white);
    border-radius: var(--radius);
    padding: 25px;
    height: fit-content;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.filter-group {
    margin-bottom: 25px;
    border-bottom: 1px solid var(--light);
    padding-bottom: 20px;
}

.filter-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.filter-title {
    font-weight: 600;
    margin-bottom: 15px;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-option input {
    width: 18px;
    height: 18px;
}

.price-range {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.price-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: var(--radius);
}

.apply-filters {
    width: 100%;
    background: var(--accent);
    color: var(--white);
    border: none;
    padding: 12px;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
}

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

.sort-options {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.sort-select {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: var(--radius);
    background: var(--white);
}

/* Страница корзины */
.cart-page {
    padding: 40px 0;
}

.cart-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.cart-items {
    background: var(--white);
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.cart-item {
    display: grid;
    grid-template-columns: 100px 1fr auto auto;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid var(--light);
    align-items: center;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-image {
    width: 100px;
    height: 80px;
    background: var(--light);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-info h3 {
    margin-bottom: 5px;
}

.cart-item-price {
    font-weight: 600;
    color: var(--primary);
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-btn {
    width: 30px;
    height: 30px;
    border: 1px solid #ddd;
    background: var(--white);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.quantity-input {
    width: 50px;
    text-align: center;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: var(--radius);
}

.cart-item-total {
    font-weight: 700;
    font-size: 18px;
    color: var(--primary);
}

.remove-item {
    color: #ff4757;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
}

.cart-summary {
    background: var(--white);
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    height: fit-content;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.summary-total {
    font-weight: 700;
    font-size: 20px;
    border-top: 1px solid var(--light);
    padding-top: 15px;
    margin-top: 10px;
}

.checkout-btn {
    width: 100%;
    background: var(--accent);
    color: var(--white);
    border: none;
    padding: 15px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    margin-top: 20px;
}

.continue-shopping {
    display: block;
    text-align: center;
    margin-top: 15px;
    color: var(--primary);
    text-decoration: none;
}

.empty-cart {
    text-align: center;
    padding: 60px 0;
}

.empty-cart i {
    font-size: 80px;
    color: #ddd;
    margin-bottom: 20px;
}

/* Общие стили */
.cart-section, .order-form, .admin-panel, .login-form, .barcode-scanner, .pickup-orders { 
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius);
    margin: 30px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.order-item {
    background: var(--light);
    padding: 25px;
    margin: 20px 0;
    border-radius: var(--radius);
    border-left: 5px solid var(--primary);
}

.status-ordered {
    background: #3498db;
    color: var(--white);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
}

.status-ready {
    background: var(--accent);
    color: var(--white);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
}

.status-completed {
    background: var(--secondary);
    color: var(--white);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
}

.status-unconfirmed {
    background: #ffc107;
    color: #212529;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
}

.empty-message {
    text-align: center;
    color: #7f8c8d;
    padding: 50px;
    font-size: 18px;
}

.login-form {
    max-width: 450px;
    margin: 40px auto;
}

.admin-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--light);
}

.barcode-container {
    text-align: center;
    margin: 20px 0;
    padding: 20px;
    background: var(--white);
    border-radius: var(--radius);
    border: 2px dashed var(--primary);
}

.barcode-container img {
    max-width: 300px;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    background: white;
}

.pickup-info {
    background: var(--light);
    padding: 20px;
    border-radius: var(--radius);
    margin: 20px 0;
    border-left: 4px solid var(--secondary);
}

.scanner-container {
    text-align: center;
    padding: 40px;
}

.scanner-placeholder {
    width: 300px;
    height: 300px;
    background: var(--light);
    border: 2px dashed var(--primary);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    flex-direction: column;
}

.scanner-placeholder i {
    font-size: 60px;
    color: var(--primary);
    margin-bottom: 20px;
}

.order-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.btn-ready {
    background: var(--accent);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius);
    cursor: pointer;
}

.btn-complete {
    background: var(--secondary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius);
    cursor: pointer;
}

.pickup-point-card {
    background: var(--light);
    padding: 20px;
    border-radius: var(--radius);
    margin: 10px 0;
    border-left: 4px solid var(--primary);
    position: relative;
}

.point-actions {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    gap: 10px;
}

.owner-badge {
    background: var(--secondary);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    margin-left: 10px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.stat-card {
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-left: 4px solid var(--accent);
}

.stat-card h4 {
    margin-bottom: 10px;
    color: var(--primary);
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 10px;
}

.admin-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

/* Чекбокс согласия */
.terms-checkbox {
    margin: 20px 0;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.terms-checkbox input[type="checkbox"] {
    margin-top: 3px;
}

.terms-text {
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

/* Информация о залоге */
.deposit-info {
    background: #e7f3ff;
    border: 1px solid #b3d9ff;
    border-radius: var(--radius);
    padding: 15px;
    margin: 15px 0;
}

.deposit-amount {
    font-size: 18px;
    font-weight: bold;
    color: #0066cc;
}

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

/* Подвал */
footer {
    background-color: var(--primary);
    color: var(--white);
    padding: 60px 0 20px;
}

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

.footer-section h3 {
    margin-bottom: 20px;
    font-size: 18px;
}

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

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--accent);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
    color: #ccc;
}

/* Адаптивность */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 20px;
    }
    
    .search-bar {
        order: 3;
        width: 100%;
        max-width: 100%;
        margin: 10px 0;
    }
    
    nav ul {
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .user-menu {
        flex-direction: column;
        gap: 10px;
    }
    
    .catalog-content {
        grid-template-columns: 1fr;
    }
    
    .filters {
        order: 2;
    }
    
    .cart-container {
        grid-template-columns: 1fr;
    }
    
    .cart-item {
        grid-template-columns: 80px 1fr;
        gap: 15px;
    }
    
    .cart-item-quantity, .cart-item-total {
        grid-column: 1 / -1;
        justify-self: start;
    }
    
    .hero h2 {
        font-size: 36px;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .point-actions {
        position: static;
        margin-top: 15px;
        justify-content: flex-start;
    }
    
    .admin-actions {
        flex-direction: column;
    }
}