/* === Reset === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* === Grid Layout === */
.container {
    display: grid;
    grid-template-areas:
        "header header"
        "sidebar main"
        "footer footer";
    grid-template-columns: 250px 1fr;
    grid-template-rows: 80px 1fr 60px;
    min-height: 100vh;
}

/* === Header === */
.header {
    grid-area: header;
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    color: white;
    padding: 0 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.mainmenu {
    display: flex;
    align-items: center;
    height: 80px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.mainmenu li {
    margin-right: 30px;
}

.mainmenu li.last {
    margin-left: auto;
    margin-right: 20px;
}

.mainmenu li.logo {
    margin-right: 50px;
    display: flex;
    align-items: center;
    height: 80px;
}

.mainmenu li.logo a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

/* Лого */
.logo {
    width: 40px;
    height: 40px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><rect width="100" height="100" fill="%23fff"/><circle cx="50" cy="50" r="30" fill="%232c3e50"/><circle cx="50" cy="50" r="15" fill="%23fff"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border-radius: 50%;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.logo:hover {
    transform: scale(1.1);
}

.mainmenu a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 10px 15px;
    border-radius: 5px;
    transition: all 0.3s ease;
    position: relative;
}

.mainmenu a:hover {
    background-color: rgba(255,255,255,0.1);
    transform: translateY(-2px);
}

.mainmenu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: #ecf0f1;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.mainmenu a:hover::after {
    width: 80%;
}

/* === Sidebar === */
.sidebar {
    grid-area: sidebar;
    background: white;
    padding: 20px;
    border-right: 1px solid #e0e0e0;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}

.sidebar h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 18px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 8px;
}

.sidebar ul {
    list-style: none;
    margin-bottom: 25px;
}

.sidebar li {
    margin-bottom: 8px;
}

.sidebar a {
    color: #555;
    text-decoration: none;
    padding: 8px 12px;
    display: block;
    border-radius: 5px;
    transition: all 0.3s ease;
    position: relative;
}

.sidebar a:hover {
    background-color: #f8f9fa;
    color: #2c3e50;
    padding-left: 20px;
}

.sidebar a::before {
    content: '▶';
    position: absolute;
    left: 5px;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: #3498db;
}

.sidebar a:hover::before {
    opacity: 1;
}

/* === Main Content === */
.main-content {
    grid-area: main;
    padding: 30px;
    background: white;
    margin: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: auto;
}

/* === Footer === */
.footer {
    grid-area: footer;
    background: #2c3e50;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    color: #bdc3c7;
    font-size: 18px;
    transition: all 0.3s ease;
}

.social-links a:hover {
    color: #3498db;
    transform: translateY(-2px);
}

/* === Responsive === */
@media (max-width: 768px) {
    .container {
        grid-template-areas:
            "header"
            "main"
            "sidebar"
            "footer";
        grid-template-columns: 1fr;
        grid-template-rows: 80px 1fr auto 60px;
    }

    .mainmenu {
        flex-wrap: wrap;
        height: auto;
        padding: 10px 0;
    }

    .mainmenu li {
        margin-right: 15px;
        margin-bottom: 10px;
    }

    .sidebar {
        border-right: none;
        border-top: 1px solid #e0e0e0;
        padding: 15px;
    }

    .main-content {
        margin: 10px;
        padding: 20px;
    }

    .footer {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

/* ===== Стили для страницы поиска товаров (index.html) ===== */

.search-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: 20px;
}

.search-wrapper {
    text-align: center;
    max-width: 600px;
    width: 100%;
}

.search-title {
    color: #2c3e50;
    font-size: 32px;
    margin-bottom: 30px;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.search-form {
    width: 100%;
}

.search-input-group {
    position: relative;
    display: flex;
    align-items: center;
    background: white;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.search-input-group:hover {
    box-shadow: 0 6px 25px rgba(0,0,0,0.15);
}

.search-input-group:focus-within {
    border-color: #3498db;
    box-shadow: 0 6px 25px rgba(52, 152, 219, 0.3);
}

.search-input {
    width: 100%;
    padding: 20px 25px;
    font-size: 16px;
    border: none;
    outline: none;
    background: transparent;
    color: #333;
    font-family: 'Arial', sans-serif;
}

.search-input::placeholder {
    color: #999;
    font-style: italic;
}

.search-button {
    padding: 20px 25px;
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
}

.search-button:hover {
    background: linear-gradient(135deg, #34495e 0%, #2980b9 100%);
    transform: scale(1.05);
}

.search-button:active {
    transform: scale(0.95);
}

.search-button i {
    transition: transform 0.3s ease;
}

.search-button:hover i {
    transform: scale(1.1);
}

/* ===== Адаптивность ===== */
@media (max-width: 768px) {
    .search-title {
        font-size: 24px;
        margin-bottom: 20px;
    }

    .search-input {
        padding: 15px 20px;
        font-size: 14px;
    }

    .search-button {
        padding: 15px 20px;
        font-size: 16px;
        min-width: 50px;
    }

    .search-container {
        min-height: 50vh;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .search-title {
        font-size: 20px;
    }

    .search-input {
        padding: 12px 15px;
        font-size: 14px;
    }

    .search-button {
        padding: 12px 15px;
        font-size: 14px;
        min-width: 45px;
    }
}

.order-detail {
    max-width: 700px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.order-detail h1 {
    font-size: 24px;
    margin-bottom: 10px;
}

.order-detail p {
    font-size: 16px;
    margin: 5px 0;
}

.order-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    margin-bottom: 15px;
}

.order-table th, .order-table td {
    padding: 8px;
    text-align: center;
    border-bottom: 1px solid #ddd;
}

.order-table th {
    background: #f5f5f5;
}

.total {
    font-size: 18px;
    text-align: right;
    margin-top: 10px;
}

.order-actions {
    text-align: center;
    margin-top: 20px;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s;
}

.btn:hover {
    background: #2980b9;
}

.product-detail-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.product-detail-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* Хлебные крошки */
.breadcrumb {
    background: #f8f9fa;
    padding: 15px 30px;
    font-size: 14px;
    border-bottom: 1px solid #e9ecef;
}

.breadcrumb a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: #2980b9;
}

.breadcrumb-separator {
    margin: 0 10px;
    color: #6c757d;
}

.current-page {
    color: #6c757d;
}

/* Основная информация */
.product-main-info {
    padding: 30px;
}

.product-header {
    margin-bottom: 25px;
}

.product-title {
    font-size: 28px;
    color: #2c3e50;
    margin-bottom: 15px;
    font-weight: 600;
    line-height: 1.3;
}

.product-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.product-category,
.product-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    background: #ecf0f1;
    border-radius: 20px;
    font-size: 14px;
    color: #2c3e50;
    font-weight: 500;
}

.product-category i,
.product-brand i {
    color: #3498db;
}

/* Цена и наличие */
.product-pricing {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 30px;
    align-items: center;
    padding: 25px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    margin-bottom: 30px;
}

.current-price {
    font-size: 32px;
    font-weight: bold;
    color: #27ae60;
    margin-bottom: 10px;
}

.availability {
    font-size: 16px;
    font-weight: 500;
}

.in-stock {
    color: #27ae60;
    display: flex;
    align-items: center;
    gap: 8px;
}

.out-of-stock {
    color: #e74c3c;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Кнопки действий */
.product-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 200px;
}

.btn-primary,
.btn-secondary,
.btn-disabled {
    padding: 15px 25px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #229954 0%, #27ae60 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #3498db 0%, #5dade2 100%);
    color: white;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #2980b9 0%, #3498db 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.3);
}

.btn-disabled {
    background: #95a5a6;
    color: white;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Описание товара */
.product-description {
    padding: 30px;
    border-top: 1px solid #e9ecef;
}

.product-description h3 {
    color: #2c3e50;
    font-size: 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.product-description h3 i {
    color: #3498db;
}

.description-content {
    color: #555;
    line-height: 1.8;
    font-size: 16px;
}

/* Характеристики */
.product-specifications {
    padding: 30px;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
}

.product-specifications h3 {
    color: #2c3e50;
    font-size: 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.product-specifications h3 i {
    color: #3498db;
}

.specs-grid {
    display: grid;
    gap: 15px;
}

.spec-item {
    display: grid;
    grid-template-columns: 200px 1fr;
    padding: 15px 0;
    border-bottom: 1px solid #e9ecef;
}

.spec-item:last-child {
    border-bottom: none;
}

.spec-label {
    font-weight: 600;
    color: #2c3e50;
}

.spec-value {
    color: #555;
}

/* Responsive Design */
@media (max-width: 768px) {
    .product-pricing {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .product-actions {
        min-width: auto;
        width: 100%;
    }

    .product-title {
        font-size: 24px;
    }

    .current-price {
        font-size: 28px;
    }

    .spec-item {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .breadcrumb {
        padding: 15px 20px;
    }

    .product-main-info,
    .product-description,
    .product-specifications {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .product-detail-container {
        padding: 10px;
    }

    .product-title {
        font-size: 20px;
    }

    .current-price {
        font-size: 24px;
    }

    .btn-primary,
    .btn-secondary,
    .btn-disabled {
        padding: 12px 20px;
        font-size: 14px;
    }
}

.search-results-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.search-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px 0;
    border-bottom: 2px solid #e0e0e0;
}

.search-title {
    color: #2c3e50;
    font-size: 28px;
    margin-bottom: 15px;
    font-weight: 600;
}

.results-count {
    color: #7f8c8d;
    font-size: 14px;
    font-style: italic;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.product-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 150px;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    border-color: #3498db;
}

.product-info {
    flex-grow: 1;
    margin-bottom: 15px;
}

.product-name {
    margin-bottom: 10px;
    font-size: 18px;
    line-height: 1.4;
}

.product-name a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.product-name a:hover {
    color: #3498db;
}

.product-type {
    color: #7f8c8d;
    font-size: 14px;
    margin-bottom: 15px;
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.product-price {
    font-size: 20px;
    font-weight: bold;
    color: #27ae60;
    margin-bottom: 15px;
}

.product-actions {
    text-align: center;
}

.view-product-btn {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.view-product-btn:hover {
    background: linear-gradient(135deg, #34495e 0%, #2980b9 100%);
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.view-product-btn i {
    font-size: 12px;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #7f8c8d;
}

.no-results-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.no-results h3 {
    color: #2c3e50;
    font-size: 24px;
    margin-bottom: 15px;
}

.no-results p {
    font-size: 16px;
    margin-bottom: 30px;
}

.back-to-search-btn {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    color: white;
    text-decoration: none;
    padding: 12px 25px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.back-to-search-btn:hover {
    background: linear-gradient(135deg, #7f8c8d 0%, #6c7b7f 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .search-title {
        font-size: 24px;
    }

    .product-card {
        padding: 15px;
    }

    .product-name {
        font-size: 16px;
    }

    .product-price {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .search-results-container {
        padding: 0 15px;
    }

    .search-title {
        font-size: 20px;
    }

    .view-product-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
}

.profile-container {
        max-width: 800px;
        margin: 0 auto;
    }

    .profile-header {
        text-align: center;
        margin-bottom: 30px;
        padding-bottom: 20px;
        border-bottom: 2px solid #3498db;
    }

    .profile-header h1 {
        color: #2c3e50;
        font-size: 28px;
        margin-bottom: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
    }

    .profile-header .subtitle {
        color: #7f8c8d;
        font-size: 16px;
    }

    .profile-form {
        background: #f8f9fa;
        padding: 30px;
        border-radius: 10px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }

    .form-row {
        display: flex;
        gap: 20px;
        margin-bottom: 20px;
    }

    .form-group {
        flex: 1;
        margin-bottom: 20px;
    }

    .form-group.full-width {
        flex: 100%;
    }

    .form-group label {
        display: block;
        margin-bottom: 8px;
        color: #2c3e50;
        font-weight: 500;
        font-size: 14px;
    }

    .form-input,
    .form-select {
        width: 100%;
        padding: 12px 15px;
        border: 2px solid #e0e0e0;
        border-radius: 8px;
        font-size: 14px;
        transition: all 0.3s ease;
        background: white;
    }

    .form-error ul {
        list-style: none;
        padding: 0;
        color: #CC0000;
    }

    .form-input:focus,
    .form-select:focus {
        outline: none;
        border-color: #3498db;
        box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    }

    .form-input:disabled {
        background-color: #ecf0f1;
        color: #7f8c8d;
        cursor: not-allowed;
    }

    .photo-section {
        text-align: center;
        margin-bottom: 25px;
        padding: 20px;
        background: white;
        border-radius: 10px;
        border: 2px dashed #bdc3c7;
    }

    .photo-preview {
        width: 120px;
        height: 120px;
        border-radius: 50%;
        object-fit: cover;
        margin-bottom: 15px;
        border: 4px solid #3498db;
    }

    .photo-placeholder {
        width: 120px;
        height: 120px;
        border-radius: 50%;
        background: linear-gradient(135deg, #3498db, #2c3e50);
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 auto 15px;
        color: white;
        font-size: 48px;
    }

    .date-selects {
        display: flex;
        gap: 10px;
    }

    .date-selects select {
        flex: 1;
        padding: 12px 10px;
        border: 2px solid #e0e0e0;
        border-radius: 8px;
        font-size: 14px;
        background: white;
    }

    .btn-container {
        text-align: center;
        margin-top: 30px;
        padding-top: 20px;
        border-top: 1px solid #e0e0e0;
    }

    .btn-save {
        background: linear-gradient(135deg, #3498db, #2980b9);
        color: white;
        border: none;
        padding: 15px 40px;
        border-radius: 8px;
        font-size: 16px;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.3s ease;
        position: relative;
        overflow: hidden;
    }

    .btn-save:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
    }

    .btn-save:active {
        transform: translateY(0);
    }

    .btn-save i {
        margin-right: 8px;
    }

    .alert {
        padding: 15px 20px;
        margin-bottom: 20px;
        border-radius: 8px;
        font-size: 14px;
    }

    .alert-success {
        background-color: #d4edda;
        border: 1px solid #c3e6cb;
        color: #155724;
    }

    .alert-error {
        background-color: #f8d7da;
        border: 1px solid #f5c6cb;
        color: #721c24;
    }

    /* Responsive */
    @media (max-width: 768px) {
        .form-row {
            flex-direction: column;
            gap: 0;
        }

        .date-selects {
            flex-direction: column;
        }

        .profile-form {
            padding: 20px;
        }
    }