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

body {
    background-color: #f5f5f5;
    color: #333;
    overflow-x: hidden;
}

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

header {
    color: #fff;
    height: 340px;
    padding: 15px 0;
    text-align: center;
    margin-bottom: 20px;
    border-radius: 8px;
    background-color: #ff9022;
    background-image: linear-gradient(to right, #f35b00, #ff9022);
    background-image: url('../img/cat_bg.png');
    background-position-x: center;
    background-size: cover;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

h1 {
    text-transform: uppercase;
    font-size: 1.3rem;
    text-shadow: 1px 1px #555;
}

.menu-container {
    display: flex;
    gap: 30px;
}

.categories {
    flex: 1;
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.category-list {
    list-style: none;
}

.category-item {
    font-weight: 500;
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    transition: all 0.3s;
}

.category-item:hover {
    background-color: #f9f9f9;
}

.category-item.active {
    color: #fff;
    background-color: #ff8512;
    background-image: linear-gradient(to right, #f35b00, #ff9022);
    border-radius: 4px;
    font-weight: 500;
}

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

.product-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

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

.product-image {
    background-color: #dadada;
    height: 180px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

.product-info {
    padding: 15px;
}

.product-title {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.product-description {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 12px;
    height: 40px;
    overflow: hidden;
}

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

.product-price {
    font-weight: bold;
    font-size: 1.8rem;
}

.product-price span {
    color: #e53935;
}

.add-to-cart {
    background-color: #3c3c3c;
    color: #fff;
    border: none;
    font-size: 1rem;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.add-to-cart:hover {
    background-color: #e3822a;
}

.add-to-cart.added-to-cart {
    background-color: #4CAF50;
}

.add-to-cart.added-to-cart:hover {
    background-color: #45a049;
}

.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100%;
    background: #fff;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    transition: right 0.3s;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.open {
    right: 0;
}

.cart-header {
    padding: 20px;
    border-bottom: 1px dashed #ccc;
    color: #333333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-cart {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
}

.cart-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

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

.cart-item-title {
    font-weight: 500;
}

.cart-item-price {
    font-weight: bold;
}

.cart-item-price span {
    color: #e53935;
}

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

.quantity-control {
    display: flex;
    align-items: center;
    margin: 0 10px;
}

.quantity-btn {
    width: 35px;
    height: 35px;
    background: #4CAF50;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-value {
    margin: 0 10px;
    min-width: 20px;
    text-align: center;
}

.remove-item {
    background: #ff3333;
    color: #fff;
    border: none;
    width: 35px;
    height: 35px;
    margin-left: 10px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid #eee;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 20px;
}

.checkout-btn {
    width: 100%;
    padding: 12px;
    background-color: #f35b00;
    background-image: linear-gradient(to left, #f35b00, #ff9022);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.checkout-btn:hover {
    background: #A0522D;
}

.cart-toggle {
    position: fixed;
    bottom: 70px;
    right: 60px;
    width: 60px;
    height: 60px;
    background: #ff7a00;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 999;
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4d4d;
    color: #fff;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.empty-cart {
    text-align: center;
    padding: 40px 0;
    color: #666;
}

/* ÐœÐ¾Ð´Ð°Ð»ÑŒÐ½Ð¾Ðµ Ð¾ÐºÐ½Ð¾ Ð¾Ñ„Ð¾Ñ€Ð¼Ð»ÐµÐ½Ð¸Ñ Ð·Ð°ÐºÐ°Ð·Ð° */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    /* display: flex; */
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: #fff;
    /*border-radius: 8px;*/
    padding: 30px;
    width: 90%;
    max-width: 600px;
    max-height: 100vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}

.modal-content h2 {
    margin-bottom: 20px;
    color: #8B4513;
}

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

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

.form-group input, .form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.submit-order {
    width: 100%;
    padding: 12px;
    background-color: #f35b00;
    background-image: linear-gradient(to right, #f35b00, #ff9022);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 20px;
}

.submit-order:hover {
    background: #A0522D;
}

.order-summary {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.order-summary h3 {
    margin-bottom: 15px;
    color: #f35b00;
}

.order-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.order-total {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.product-card {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s forwards;
    animation-delay: calc(var(--order) * 0.1s);
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.add-to-cart.added-to-cart {
    animation: bounce 0.5s;
}

@keyframes bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.cart-badge {
    transition: all 0.3s;
}

.cart-badge.added {
    transform: scale(1.3);
    background-color: #4CAF50;
}

.continue-shopping {
    width: 100%;
    padding: 12px;
    background: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-top: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.continue-shopping:hover {
    background: #e0e0e0;
}

/* Ð£Ð²ÐµÐ´Ð¾Ð¼Ð»ÐµÐ½Ð¸Ñ */
.notification {
    position: fixed;
    width: 90%;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #4CAF50;
    color: #fff;
    padding: 15px 25px;
    border-radius: 50px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 3000;
    opacity: 0;
    transition: all 0.3s;
}

.notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.notification.error {
    background: #ff4d4d;
}

.notification i {
    font-size: 1.2rem;
}

/* Ð›Ð¾Ð°Ð´ÐµÑ€ */
.loader {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.submit-order.loading {
    pointer-events: none;
    opacity: 0.8;
}

/* ÐŸÐ¾Ð¸ÑÐº Ð¸ ÑÐ¾Ñ€Ñ‚Ð¸Ñ€Ð¾Ð²ÐºÐ° */
.product-controls {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 15px;
}

.search-box {
    position: relative;
    flex: 1;
}

.search-box input {
    width: 100%;
    padding: 10px 15px 10px 35px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Montserrat', sans-serif;
}

.search-box i {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
}

.sort-select {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
}

@media (max-width: 768px) {
    header {
        height: 140px;
        /*background-size: contain;*/
    }

    .menu-container {
        flex-direction: column;
    }
    
    .products {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
    
    .cart-sidebar.open {
        right: 0;
    }
    
    .modal-content {
        width: 100%;
        height: 100%;
        padding: 20px;
    }
}