        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: #f5f0e8;
            color: #3e2a27;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
        }

        .wrapper {
            flex: 1;
            display: flex;
            flex-direction: column;
        }

        .header {
            background: linear-gradient(135deg, #8b5a2b, #5c3a1e);
            color: white;
            padding: 20px;
            text-align: center;
            box-shadow: 0 4px 12px rgba(0,0,0,0.2);
        }

        .header h1 {
            font-size: 28px;
            margin-bottom: 5px;
        }

        .header p {
            font-size: 14px;
            opacity: 0.9;
        }

        .container {
            max-width: 1400px;
            margin: 0 auto;
            padding: 20px;
            width: 100%;
            flex: 1;
        }

        /* Вкладки */
        .nav-tabs {
            display: flex;
            gap: 0;
            margin-bottom: 25px;
            border-bottom: 2px solid #e0d6cc;
            background: #fff;
            border-radius: 40px 40px 0 0;
            overflow: hidden;
            box-shadow: 0 2px 6px rgba(0,0,0,0.05);
        }

        .nav-tab {
            flex: 1 1 0;
            min-width: 120px;
            padding: 14px 10px;
            background: #fefcf8;
            border: none;
            font-size: 16px;
            font-weight: bold;
            cursor: pointer;
            color: #8b5a2b;
            transition: all 0.2s ease;
            position: relative;
            text-align: center;
            letter-spacing: 0.3px;
            border-bottom: 2px solid transparent;
        }

        .nav-tab.active {
            color: #5c3a1e;
            background: #fff;
            border-bottom-color: #8b5a2b;
        }

        .nav-tab:hover:not(.active) {
            background: #f5efe7;
            color: #6b4320;
        }

        /* Фильтры */
        .filters {
            background: white;
            border-radius: 20px;
            padding: 20px;
            margin-bottom: 30px;
            box-shadow: 0 4px 14px rgba(0,0,0,0.06);
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 18px 24px;
            align-items: end;
        }

        .filter-group {
            display: flex;
            flex-direction: column;
            min-width: 0;
        }

        .filter-group label {
            display: block;
            font-size: 12px;
            font-weight: bold;
            color: #8b5a2b;
            margin-bottom: 6px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .filter-group select, 
        .filter-group input {
            width: 100%;
            padding: 10px 12px;
            border: 2px solid #e0d6cc;
            border-radius: 12px;
            font-size: 14px;
            transition: 0.2s;
            background: white;
            font-family: inherit;
        }

        .filter-group select:focus, 
        .filter-group input:focus {
            outline: none;
            border-color: #8b5a2b;
            box-shadow: 0 0 0 2px rgba(139,90,43,0.1);
        }

        /* Кнопки */
        .btn {
            padding: 10px 20px;
            border: none;
            border-radius: 10px;
            cursor: pointer;
            font-weight: bold;
            transition: 0.2s;
            font-size: 14px;
        }

        .btn-primary {
            background: #8b5a2b;
            color: white;
        }

        .btn-primary:hover {
            background: #6b4320;
            transform: translateY(-1px);
        }

        .btn-secondary {
            background: #e0d6cc;
            color: #3e2a27;
        }

        .btn-secondary:hover {
            background: #cdbfb0;
        }

        .btn-danger {
            background: #c0392b;
            color: white;
        }

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

        .btn-success {
            background: #27ae60;
            color: white;
        }

        .btn-success:hover {
            background: #219a52;
        }

        /* Карточки товаров */
        .catalog-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
            gap: 25px;
            margin-top: 20px;
        }

        .product-card {
            background: white;
            border-radius: 24px;
            overflow: hidden;
            box-shadow: 0 6px 14px rgba(0,0,0,0.08);
            transition: transform 0.25s ease, box-shadow 0.25s;
            cursor: pointer;
            display: flex;
            flex-direction: column;
            height: 100%;
        }

        .product-card:hover {
            transform: translateY(-6px);
            box-shadow: 0 14px 28px rgba(0,0,0,0.12);
        }

        .product-image {
            width: 100%;
            height: 220px;
            object-fit: contain;
            background: #fefaf5;
            padding: 18px;
            transition: transform 0.3s;
        }

        .product-info {
            padding: 18px 16px 20px;
            border-top: 1px solid #efe4d8;
            display: flex;
            flex-direction: column;
            flex: 1;
        }

        .product-details-block {
            flex: 1;
            display: flex;
            flex-direction: column;
        }

        .product-name {
            font-size: 18px;
            font-weight: 700;
            margin-bottom: 8px;
            line-height: 1.3;
            color: #2d241f;
            word-break: break-word;
        }

        .product-details {
            font-size: 13px;
            color: #7a6a62;
            margin-bottom: 12px;
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
        }

        .product-price {
            font-size: 22px;
            font-weight: 800;
            color: #8b5a2b;
            margin: 12px 0 8px 0;
            margin-top: auto;
        }

        .add-to-cart-btn {
            width: 100%;
            padding: 12px;
            background: #8b5a2b;
            color: white;
            border: none;
            border-radius: 40px;
            font-weight: bold;
            cursor: pointer;
            transition: all 0.2s;
            font-size: 15px;
            margin-top: 4px;
        }

        .add-to-cart-btn:hover {
            background: #6b4320;
            transform: scale(0.98);
        }

        .add-to-cart-btn:disabled {
            background: #cbbfa7;
            cursor: not-allowed;
            transform: none;
        }

        /* Корзина */
        .cart-section {
            background: white;
            border-radius: 24px;
            padding: 24px;
            box-shadow: 0 6px 14px rgba(0,0,0,0.05);
        }

        .cart-items {
            list-style: none;
            margin-bottom: 20px;
        }

        .cart-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 16px;
            border-bottom: 1px solid #eee6dd;
            flex-wrap: wrap;
            gap: 12px;
        }

        .cart-item-info {
            flex: 2;
        }

        .cart-item-name {
            font-weight: bold;
            font-size: 16px;
        }

        .cart-item-details {
            font-size: 12px;
            color: #8e7a6e;
        }

        .cart-item-price {
            font-weight: bold;
            color: #8b5a2b;
            font-size: 18px;
        }

        .cart-item-actions {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .quantity-control {
            display: flex;
            align-items: center;
            gap: 8px;
            background: #f8f4ef;
            padding: 4px 10px;
            border-radius: 40px;
        }

        .quantity-btn {
            width: 30px;
            height: 30px;
            border-radius: 30px;
            border: 1px solid #ddd2c4;
            background: white;
            cursor: pointer;
            font-weight: bold;
            font-size: 16px;
            transition: 0.1s;
        }

        .quantity-btn:hover {
            background: #e7ddd2;
        }

        .cart-summary {
            text-align: right;
            padding-top: 20px;
            border-top: 2px solid #e0d6cc;
            font-size: 18px;
        }

        .cart-total {
            font-size: 28px;
            font-weight: bold;
            color: #8b5a2b;
        }

        .cart-actions {
            display: flex;
            gap: 15px;
            justify-content: flex-end;
            margin-top: 20px;
        }

        /* Детальный просмотр */
        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.75);
            backdrop-filter: blur(4px);
            z-index: 1000;
            justify-content: center;
            align-items: center;
        }

        .modal-content {
            background: white;
            border-radius: 32px;
            max-width: 520px;
            width: 90%;
            padding: 28px;
            position: relative;
            max-height: 90vh;
            overflow-y: auto;
        }

        .modal-close {
            position: absolute;
            top: 18px;
            right: 24px;
            font-size: 32px;
            cursor: pointer;
            color: #b9a58e;
        }

        .modal-close:hover {
            color: #4a3528;
        }

        .modal-image {
            width: 100%;
            max-height: 280px;
            object-fit: contain;
            margin-bottom: 18px;
            background: #faf6f0;
            border-radius: 20px;
            padding: 12px;
        }

        .toast {
            position: fixed;
            bottom: 25px;
            right: 25px;
            background: #2c2a27;
            color: #f0e7dc;
            padding: 12px 24px;
            border-radius: 60px;
            font-weight: 500;
            z-index: 1100;
            animation: fadeInOut 2.2s ease;
            box-shadow: 0 5px 15px rgba(0,0,0,0.2);
            font-size: 14px;
        }

        @keyframes fadeInOut {
            0% { opacity: 0; transform: translateY(25px); }
            15% { opacity: 1; transform: translateY(0); }
            85% { opacity: 1; transform: translateY(0); }
            100% { opacity: 0; transform: translateY(25px); }
        }

        .empty-message {
            text-align: center;
            padding: 60px 20px;
            color: #aa988b;
            font-size: 18px;
        }

        .hidden {
            display: none;
        }

        .badge {
            display: inline-block;
            background: #f0e7de;
            color: #8b5a2b;
            padding: 4px 12px;
            border-radius: 40px;
            font-size: 11px;
            font-weight: 600;
        }

        .footer {
            background: #26221e;
            color: #dbcfc2;
            padding: 32px 20px 28px;
            margin-top: 50px;
            font-size: 14px;
        }

        .footer-container {
            max-width: 1400px;
            margin: 0 auto;
            display: flex;
            flex-wrap: wrap;
            justify-content: space-between;
            align-items: center;
            gap: 20px;
        }

        .footer-copyright {
            opacity: 0.8;
            letter-spacing: 0.3px;
        }

        .footer-contacts {
            display: flex;
            gap: 28px;
            flex-wrap: wrap;
        }

        .footer-contacts a {
            color: #e6ccb3;
            text-decoration: none;
            transition: 0.2s;
            display: inline-flex;
            align-items: center;
            gap: 6px;
        }

        .footer-contacts a:hover {
            color: #fff;
            text-decoration: underline;
        }

        /* Адаптивность */
        @media (max-width: 768px) {
            .filters {
                grid-template-columns: 1fr;  /* на совсем маленьких экранах каждый фильтр в строку */
                gap: 16px;
            }
            .catalog-grid {
                grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
                gap: 18px;
            }
            .cart-item {
                flex-direction: column;
                align-items: flex-start;
            }
            .cart-item-actions {
                width: 100%;
                justify-content: space-between;
            }
            .footer-container {
                flex-direction: column;
                text-align: center;
            }
            .nav-tab {
                min-width: 100px;
                font-size: 14px;
                padding: 12px 6px;
            }
            .product-price {
                font-size: 20px;
            }
        }

        @media (min-width: 769px) and (max-width: 1024px) {
            .filters {
                grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
            }
        }

        @keyframes loading {
            0% { background-position: 200% 0; }
            100% { background-position: -200% 0; }
        }
