/* Общие стили */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
max-width: 100%;
}
body {
font-family: 'Arial', sans-serif;
line-height: 1.2;
color: #333;
background-color: #f8f9fa;
overflow-x: hidden;
}
img, video {
height: auto;
max-width: 100%;
}
input, textarea, select {
max-width: 100%;
}
.container {
width: 100%;
max-width: 1200px;
margin: 0 auto;
padding: 0 15px;
}
/* Шапка */
header {
background-color: #007bff;
color: white;
padding: 15px 0;
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
header .container {
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
}
.logo img {
height: 70px;
/max-width: 100%;/
}
nav ul {
display: flex;
list-style: none;
flex-wrap: wrap;
}
nav ul li {
margin-left: 20px;
}
nav ul li a {
color: white;
text-decoration: none;
font-weight: 500;
transition: color 0.3s;
display: block;
padding: 5px 0;
}
nav ul li a:hover {
color: #e0e0e0;
}
/* Основной контент */
main {
min-height: calc(100vh - 160px);
padding: 20px 0;
}
/* Герой-секция */
.hero {
text-align: center;
padding: 40px 15px;
background-color: white;
margin-bottom: 30px;
border-radius: 8px;
box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.hero h1 {
font-size: 2rem;
margin-bottom: 15px;
color: #007bff;
}
.hero p {
font-size: 1.1rem;
margin-bottom: 25px;
color: #666;
}
.cta-buttons {
display: flex;
justify-content: center;
gap: 15px;
flex-wrap: wrap;
}
/* Преимущества */
.features {
padding: 30px 0;
}
.features h2 {
text-align: center;
margin-bottom: 30px;
font-size: 1.8rem;
color: #007bff;
}
.feature-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 20px;
}
.feature-item {
background: white;
padding: 20px;
border-radius: 8px;
box-shadow: 0 2px 10px rgba(0,0,0,0.05);
text-align: center;
transition: transform 0.3s;
}
.feature-item:hover {
transform: translateY(-3px);
}
.feature-item h3 {
color: #007bff;
margin-bottom: 12px;
font-size: 1.3rem;
}
/* Кнопки */
.btn {
display: inline-block;
padding: 10px 10px;
text-decoration: none;
border-radius: 5px;
font-weight: 500;
text-align: center;
cursor: pointer;
border: none;
transition: all 0.3s;
font-size: 0.95rem;
min-width: 100px;
}
.btn-primary {
background-color: #007bff;
color: white;
}
.btn-primary:hover {
background-color: #0069d9;
}
.btn-secondary {
background-color: #007bff;
color: white;
}
.btn-secondary:hover {
background-color: #5a6268;
}
.btn-success {
background-color: #28a745;
color: white;
padding: 6px 6px;
font-size: 0.85rem;
min-width: 120px;
}
.btn-success:hover {
background-color: #218838;
}
.btn-warning {
background-color: #ffc107;
color: #212529;
padding: 6px 6px;
font-size: 0.85rem;
min-width: 120px;
}
.btn-warning:hover {
background-color: #e0a800;
}
.btn-small {
padding: 4px 4px;
font-size: 0.8rem;
margin: 1px;
min-width: auto;
}
/* Формы */
.registration-form, .login-form, .profile-form {
background: white;
padding: 30px 20px;
border-radius: 8px;
box-shadow: 0 2px 10px rgba(0,0,0,0.05);
max-width: 600px;
margin: 0 auto;
}
.registration-form h1, .login-form h1, .profile-form h1 {
text-align: center;
margin-bottom: 25px;
color: #007bff;
font-size: 1.8rem;
}
.form-group {
margin-bottom: 15px;
}
.form-group label {
display: block;
margin-bottom: 5px;
font-weight: 500;
}
.form-group input, .form-group select, .form-group textarea {
width: 100%;
padding: 10px;
border: 1px solid #ddd;
border-radius: 5px;
font-size: 1rem;
transition: border-color 0.3s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
border-color: #007bff;
outline: none;
}
.form-footer {
text-align: center;
margin-top: 20px;
}
.form-footer a {
color: #007bff;
text-decoration: none;
}
.form-footer a:hover {
text-decoration: underline;
}
/* Алерты */
.alert {
padding: 12px;
margin-bottom: 15px;
border-radius: 5px;
}
.alert-error {
background-color: #f8d7da;
color: #721c24;
border: 1px solid #f5c6cb;
}
.alert-success {
background-color: #d4edda;
color: #155724;
border: 1px solid #c3e6cb;
}
.alert-info {
background-color: #d1ecf1;
color: #0c5460;
border: 1px solid #bee5eb;
}
/* Личный кабинет */
.dashboard {
background: white;
padding: 30px 20px;
border-radius: 8px;
box-shadow: 0 2px 10px rgba(0,0,0,0.05);
max-width: 800px;
margin: 0 auto;
}
.dashboard h1 {
text-align: center;
margin-bottom: 25px;
color: #007bff;
font-size: 1.8rem;
}
.user-info, .profile-status {
margin-bottom: 25px;
padding: 15px;
border: 1px solid #eee;
border-radius: 5px;
}
.user-info h2, .profile-status h2 {
margin-bottom: 12px;
color: #007bff;
font-size: 1.4rem;
}
.status-active {
color: #28a745;
font-weight: 500;
}
.status-pending {
color: #ffc107;
font-weight: 500;
}
/* Админ-панель */
.admin-panel {
background: white;
padding: 30px 20px;
border-radius: 8px;
box-shadow: 0 2px 10px rgba(0,0,0,0.05);
margin: 0 auto;
max-width: 100%;
}
.admin-panel h1 {
text-align: center;
margin-bottom: 25px;
color: #007bff;
font-size: 1.8rem;
}
.admin-panel h2 {
margin-bottom: 20px;
color: #007bff;
font-size: 1.5rem;
}
.table-responsive {
overflow-x: auto;
margin-bottom: 20px;
width: 100%;
}
.users-table {
width: 100%;
border-collapse: collapse;
background: white;
border-radius: 5px;
overflow: hidden;
box-shadow: 0 2px 5px rgba(0,0,0,0.05);
font-size: 0.9rem;
table-layout: auto;
min-width: 650px;
}
.users-table th, .users-table td {
padding: 6px 5px;
text-align: left;
border-bottom: 1px solid #eee;
white-space: normal;
}
.users-table th {
background-color: #007bff;
color: white;
font-weight: 500;
}
.users-table tr:hover {
background-color: #f8f9fa;
}
.users-table small {
font-size: 0.8rem;
}
/* Подсветка строк заказов по статусам */
.order-row {
transition: background-color 0.2s;
}
.order-status-new {
background-color: #fff9c4;
}
.order-status-new:hover {
background-color: #fff59d;
}
.order-status-processing {
background-color: #e1f5fe;
}
.order-status-processing:hover {
background-color: #b3e5fc;
}
.order-status-agreed {
background-color: #e1f5fe;
}
.order-status-agreed:hover {
background-color: #b3e5fc;
}
.order-status-paid {
background-color: #e8f5e9;
}
.order-status-paid:hover {
background-color: #c8e6c9;
}
.order-status-shipped {
background-color: #e1f5fe;
}
.order-status-shipped:hover {
background-color: #b3e5fc;
}
.order-status-delivered {
background-color: #e8f5e9;
}
.order-status-delivered:hover {
background-color: #c8e6c9;
}
.order-status-cancelled {
background-color: #ffebee;
}
.order-status-cancelled:hover {
background-color: #ffcdd2;
}
/* Админ-заказы */
.admin-orders {
padding: 30px 0;
}
.admin-orders h1 {
text-align: center;
margin-bottom: 30px;
color: #007bff;
}
.orders-filter {
background: white;
padding: 20px;
border-radius: 8px;
box-shadow: 0 2px 10px rgba(0,0,0,0.05);
margin-bottom: 30px;
}
.filter-form {
display: flex;
flex-wrap: wrap;
gap: 15px;
align-items: end;
}
.filter-group {
display: flex;
flex-direction: column;
}
.filter-group label {
font-weight: 500;
margin-bottom: 5px;
}
.filter-group select {
padding: 8px 12px;
border: 1px solid #ddd;
border-radius: 5px;
font-size: 1rem;
}
.status-select {
padding: 3px 5px;
border: 1px solid #ddd;
border-radius: 3px;
font-size: 0.85rem;
}
.action-buttons {
display: flex;
flex-direction: column;
gap: 5px;
}
.small {
font-size: 0.85rem;
color: #666;
}
.text-muted {
color: #999;
font-style: italic;
}
.btn-disabled {
background-color: #ccc !important;
cursor: not-allowed;
opacity: 0.6;
}
/* Подвал */
footer {
background-color: #343a40;
color: white;
text-align: center;
padding: 15px 0;
margin-top: 30px;
}
/* Дополнительные функции */
.additional-functions {
margin-top: 25px;
padding: 15px;
border: 1px solid #eee;
border-radius: 5px;
}
.additional-functions h2 {
margin-bottom: 12px;
color: #007bff;
font-size: 1.4rem;
}
.additional-functions ul {
list-style-type: none;
padding-left: 0;
}
.additional-functions ul li {
padding: 6px 0;
padding-left: 20px;
position: relative;
font-size: 0.95rem;
}
.additional-functions ul li:before {
content: "✓";
color: #28a745;
position: absolute;
left: 0;
font-weight: bold;
}
/* Стили для ролей */
.role-superadmin {
color: #dc3545;
font-weight: bold;
}
.role-admin {
color: #007bff;
font-weight: 500;
}
.role-user {
color: #28a745;
}
.btn-disabled {
background-color: #6c757d;
color: white;
padding: 4px 4px;
font-size: 0.8rem;
cursor: not-allowed;
opacity: 0.6;
min-width: auto;
}
/* Каталог */
.catalog-layout {
display: flex;
gap: 20px;
margin-top: 15px;
flex-wrap: wrap;
}
.catalog-sidebar {
width: 220px;
flex-shrink: 0;
}
.catalog-content {
flex: 1;
min-width: 0;
}
.filters {
background: white;
padding: 15px;
border-radius: 8px;
box-shadow: 0 2px 10px rgba(0,0,0,0.05);
margin-bottom: 15px;
}
.filters h3 {
margin-top: 0;
color: #007bff;
cursor: pointer;
position: relative;
padding-right: 25px;
font-size: 1.1rem;
}
.filters h3:after {
content: "▼";
position: absolute;
right: 5px;
font-size: 10px;
top: 50%;
transform: translateY(-50%);
}
.filters.active h3:after {
content: "▲";
}
.filters form {
display: none;
}
.filters.active form {
display: block;
}
.categories {
background: white;
padding: 15px;
border-radius: 8px;
box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.categories h3 {
margin-top: 0;
color: #007bff;
font-size: 1.1rem;
}
.category-tree {
list-style: none;
padding: 0;
}
.category-tree ul {
list-style: none;
padding-left: 12px;
}
.category-tree li {
margin: 4px 0;
}
.category-tree li a {
text-decoration: none;
color: #333;
display: block;
padding: 4px 0;
transition: color 0.3s;
font-size: 0.9rem;
}
.category-tree li a:hover {
color: #007bff;
}
.category-tree li.active > a {
color: #007bff;
font-weight: bold;
}
/* Мобильный селект категорий */
.mobile-category-select {
display: none;
margin-bottom: 15px;
background: white;
padding: 12px;
border-radius: 8px;
box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.mobile-category-select label {
display: block;
margin-bottom: 5px;
font-weight: 500;
color: #007bff;
font-size: 0.9rem;
}
.mobile-category-select select {
width: 100%;
padding: 8px;
border: 1px solid #ddd;
border-radius: 4px;
font-size: 14px;
}
.catalog-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 15px;
padding-bottom: 8px;
border-bottom: 1px solid #eee;
flex-wrap: wrap;
gap: 10px;
}
.catalog-header h2 {
font-size: 1.2rem;
margin: 0;
color: #007bff;
}
.user-discount {
background-color: #27ae60;
color: white;
padding: 4px 8px;
border-radius: 3px;
font-weight: bold;
display: inline-block;
margin-bottom: 8px;
font-size: 0.8rem;
}
.catalog-info {
color: #666;
font-size: 0.9rem;
}
.products-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
gap: 15px;
margin-bottom: 25px;
}
.product-card {
background: white;
border-radius: 8px;
overflow: hidden;
box-shadow: 0 2px 10px rgba(0,0,0,0.05);
transition: transform 0.3s, box-shadow 0.3s;
display: flex;
flex-direction: column;
height: 100%;
}
.product-card:hover {
transform: translateY(-3px);
box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.product-image {
height: 160px;
display: flex;
align-items: center;
justify-content: center;
background: #f8f9fa;
padding: 15px;
}
.product-image img {
max-width: 100%;
max-height: 140px;
object-fit: contain;
}
.product-info {
padding: 12px;
display: flex;
flex-direction: column;
flex-grow: 1;
}
.product-name {
font-size: 0.9rem;
margin: 0 0 8px 0;
/* Фиксированная высота только для названия - примерно 3 строки /
height: 54px; / Примерно 3 строки по 18px */
overflow: hidden;
color: #007bff;
}
.product-name a {
text-decoration: none;
}
.product-code {
font-size: 0.75rem;
color: #666;
margin-bottom: 8px;
}
.product-prices, .product-price {
margin-bottom: 8px;
}
.original-price {
text-decoration: line-through;
color: #999;
font-size: 0.8rem;
}
.discounted-price .price-value.discounted {
color: #e74c3c;
font-weight: bold;
font-size: 1rem;
}
.price-value {
font-weight: bold;
}
.in-stock {
color: #28a745;
font-size: 0.8rem;
}
.out-of-stock {
color: #dc3545;
font-size: 0.8rem;
}
.product-actions {
margin-top: auto;
padding-top: 8px;
border-top: 1px solid #eee;
text-align: right;
}
.add-to-cart-form {
margin-top: 8px;
}
.quantity-selector {
margin-bottom: 8px;
}
.quantity-selector label {
display: block;
font-size: 0.8rem;
margin-bottom: 2px;
color: #666;
}
.quantity-input {
width: 100px;
padding: 4px;
border: 1px solid #ddd;
border-radius: 3px;
text-align: center;
font-size: 0.9rem;
}
.no-products {
text-align: center;
padding: 40px 15px;
background: white;
border-radius: 8px;
box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.no-products p {
margin: 8px 0;
color: #666;
}
/* Пагинация */
.pagination {
text-align: center;
margin-top: 25px;
}
.pagination ul {
display: inline-flex;
list-style: none;
padding: 0;
margin: 0;
border-radius: 5px;
overflow: hidden;
box-shadow: 0 2px 5px rgba(0,0,0,0.05);
flex-wrap: wrap;
justify-content: center;
}
.pagination li {
margin: 0;
}
.pagination li a {
display: block;
padding: 8px 12px;
text-decoration: none;
color: #007bff;
background: white;
border: 1px solid #dee2e6;
border-left: none;
transition: all 0.3s;
font-size: 0.9rem;
}
.pagination li:first-child a {
border-left: 1px solid #dee2e6;
border-top-left-radius: 5px;
border-bottom-left-radius: 5px;
}
.pagination li:last-child a {
border-top-right-radius: 5px;
border-bottom-right-radius: 5px;
}
.pagination li a:hover {
background: #e9ecef;
}
.pagination li.active a {
background: #007bff;
color: white;
border-color: #007bff;
}
/* Форма поиска в шапке */
.header-search {
margin-top: 8px;
width: 100%;
max-width: 300px;
}
.search-form-mini {
display: flex;
}
.search-input-mini {
flex: 1;
padding: 6px 10px;
border: 1px solid #fff;
border-radius: 7px 0 0 7px;
font-size: 0.85rem;
background: rgba(255,255,255,0.9);
}
.search-button-mini {
padding: 6px 12px;
background: rgba(255,255,255,0.9);
border: 1px solid #fff;
border-radius: 0 8px 8px 0;
cursor: pointer;
font-size: 1rem;
}


/* Адаптивность */
@media (max-width: 992px) {
.catalog-layout {
flex-direction: column;
}
.catalog-sidebar {
    width: 100%;
}

.products-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}
}
@media (max-width: 768px) {
header .container {
flex-direction: column;
text-align: center;
gap: 10px;
}
nav ul {
    margin-top: 10px;
    justify-content: center;
}

nav ul li {
    margin: 0 5px;
}

.hero h1 {
    font-size: 1.8rem;
}

.hero p {
    font-size: 1rem;
}

.cta-buttons {
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.btn {
    width: 100%;
    max-width: 280px;
    padding: 12px;
}

.registration-form, .login-form, .profile-form, .dashboard, .admin-panel {
    padding: 20px 15px;
}

.feature-grid {
    grid-template-columns: 1fr;
    gap: 15px;
}

.users-table {
    font-size: 0.7rem;
    min-width: 500px;
}

.users-table th, .users-table td {
    padding: 5px 3px;
}

.users-table th {
    font-size: 0.7rem;
}

.users-table small {
    font-size: 0.65rem;
}

.admin-panel {
    padding: 20px 10px;
}

.category-tree {
    display: none;
}

.mobile-category-select {
    display: block;
}

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

.pagination ul {
    flex-wrap: wrap;
}

.pagination li a {
    padding: 6px 10px;
    font-size: 0.85rem;
}

.product-image {
    height: 140px;
}

.product-image img {
    max-height: 120px;
}

.product-info {
    padding: 10px;
}

.product-name {
    font-size: 0.85rem;
    height: 51px; /* Примерно 3 строки по 17px на мобильных */
}

.header-search {
    max-width: 100%;
    margin: 8px 0;
}

nav ul {
    justify-content: center;
    flex-wrap: wrap;
}

nav ul li {
    margin: 3px;
}


/* Адаптивность для фильтров заказов */
.filter-form {
    flex-direction: column;
    align-items: stretch;
}

.filter-group {
    width: 100%;
}
}
@media (max-width: 480px) {
.container {
padding: 0 10px;
}
.hero {
    padding: 25px 10px;
}

.hero h1 {
    font-size: 1.5rem;
}

.features h2 {
    font-size: 1.5rem;
}

.feature-item {
    padding: 15px;
}

.btn {
    padding: 8px 15px;
    font-size: 0.9rem;
}

.btn-success, .btn-warning {
    padding: 5px 10px;
    font-size: 0.75rem;
    min-width: 100px;
}

.users-table {
    font-size: 0.65rem;
    min-width: 400px;
}

.users-table th, .users-table td {
    padding: 4px 2px;
}

.users-table small {
    font-size: 0.6rem;
}

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

.catalog-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.product-image {
    height: 120px;
}

.product-image img {
    max-height: 100px;
}

.product-name {
    font-size: 0.8rem;
    height: 48px; /* Примерно 3 строки по 16px на маленьких экранах */
}
}
.search-highlight {
background-color: #ffff00;
color: #000000;
font-weight: bold;
padding: 0 2px;
border-radius: 2px;
}
.btn-danger {
background-color: #dc3545;
color: white;
}
.btn-danger:hover {
background-color: #c82333;
color: white;
}
.sort-link {
color: inherit;
text-decoration: none;
cursor: pointer;
}
.sort-link:hover {
text-decoration: underline;
}
.sort-indicator {
margin-left: 5px;
font-size: 0.8em;
}
.pagination-info {
margin-top: 10px;
color: #666;
font-size: 0.9em;
text-align: center;
}
.status-badge {
display: inline-block;
padding: 3px 8px;
border-radius: 3px;
font-size: 0.85em;
font-weight: bold;
}
.status-new { background-color: #17a2b8; color: white; }
.status-processing { background-color: #ffc107; color: #000; }
.status-agreed { background-color: #138496; color: white; }
.status-paid { background-color: #28a745; color: white; }
.status-shipped { background-color: #007bff; color: white; }
.status-delivered { background-color: #6c757d; color: white; }
.status-cancelled { background-color: #dc3545; color: white; }
.filter-form {
display: flex;
flex-wrap: wrap;
gap: 15px;
align-items: flex-end;
}
.filter-group {
display: flex;
flex-direction: column;
gap: 5px;
}
.filter-group label {
font-size: 0.9em;
font-weight: bold;
}
.filter-group select,
.filter-group input {
padding: 5px;
min-width: 150px;
}
.action-buttons form {
display: flex;
gap: 5px;
align-items: center;
}
.action-buttons .status-select {
padding: 4px 6px;
font-size: 0.85rem;
border: 1px solid #ddd;
border-radius: 3px;
}
nav ul li a .badge {
background: #dc3545;
color: white;
border-radius: 50%;
padding: 2px 6px;
font-size: 0.7rem;
margin-left: 4px;
min-width: 18px;
display: inline-block;
text-align: center;
}
