/* Дополнительные стили для публичной части */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

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

/* Header */
header {
    background: #2c3e50;
    color: white;
    padding: 20px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

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

header h1 a {
    color: white;
    text-decoration: none;
    font-size: 24px;
}

.cart-link a {
    color: white;
    text-decoration: none;
    background: #e67e22;
    padding: 8px 15px;
    border-radius: 5px;
    transition: background 0.3s;
}

.cart-link a:hover {
    background: #d35400;
}

/* Breadcrumbs */
.breadcrumbs {
    margin: 20px 0;
    font-size: 14px;
    color: #7f8c8d;
}

.breadcrumbs a {
    color: #3498db;
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

/* Категории и товары */
.categories, .products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin: 30px 0;
}

.category-card, .product-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
}

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

.product-card img, .product-detail-image img {
    max-width: 100%;
    height: 200px;
    object-fit: contain;
    margin-bottom: 15px;
}

.product-card h3 {
    font-size: 16px;
    margin: 10px 0;
    height: 40px;
    overflow: hidden;
}

.price {
    font-size: 20px;
    color: #e67e22;
    font-weight: bold;
    margin: 10px 0;
}

/* Детальная страница товара */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin: 30px 0;
    background: white;
    padding: 30px;
    border-radius: 10px;
}

.product-detail-image img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.price-large {
    font-size: 32px;
    color: #e67e22;
    font-weight: bold;
    margin: 20px 0;
}

.stock-info {
    margin: 15px 0;
}

.in-stock {
    color: #27ae60;
    font-weight: bold;
}

.out-of-stock {
    color: #e74c3c;
    font-weight: bold;
}

.qty-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
}

.qty-selector input {
    width: 80px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background: #3498db;
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn:hover {
    background: #2980b9;
}

.btn-primary {
    background: #e67e22;
}

.btn-primary:hover {
    background: #d35400;
}

.btn-secondary {
    background: #95a5a6;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-large {
    padding: 12px 30px;
    font-size: 16px;
}

/* Корзина */
.cart-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    margin: 20px 0;
}

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

.cart-table th {
    background: #f8f9fa;
    font-weight: bold;
}

.cart-qty {
    width: 70px;
    padding: 5px;
}

.remove-btn {
    background: #e74c3c;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
}

.cart-actions {
    display: flex;
    justify-content: space-between;
    margin: 20px 0;
}

.empty-cart {
    text-align: center;
    padding: 50px;
    background: white;
    border-radius: 10px;
}

/* Оформление заказа */
.checkout-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin: 30px 0;
}

.checkout-form {
    background: white;
    padding: 30px;
    border-radius: 10px;
}

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

.form-row label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-row input, .form-row textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.order-summary {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 5px;
    margin: 20px 0;
}

.checkout-table {
    width: 100%;
}

.checkout-table td {
    padding: 8px 0;
}

.text-right {
    text-align: right;
}

.total-row {
    font-size: 18px;
    border-top: 2px solid #ddd;
    margin-top: 10px;
}

.total-row td {
    padding-top: 15px;
}

.payment-info {
    background: #e8f4fd;
    padding: 15px;
    border-radius: 5px;
    margin: 20px 0;
}

.form-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

.error-messages {
    background: #fee;
    border-left: 4px solid #e74c3c;
    padding: 15px;
    margin-bottom: 20px;
}

.error {
    color: #e74c3c;
    margin: 5px 0;
}

.success-page {
    text-align: center;
    padding: 50px;
    background: white;
    border-radius: 10px;
}

.success-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

/* Футер */
footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 30px 0;
    margin-top: 50px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .product-detail {
        grid-template-columns: 1fr;
    }
    
    .cart-table {
        font-size: 14px;
    }
    
    .cart-table th, .cart-table td {
        padding: 10px;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .categories, .products {
        grid-template-columns: 1fr;
    }
}