/* Затемнение фона */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.overlay.active {
    display: block;
}

/* Панель категорий */
.categories-panel {
    position: fixed;
    top: 0;
    left: -350px;
    width: 320px;
    height: 100vh;
    background: white;
    box-shadow: 5px 0 30px rgba(0,0,0,0.1);
    z-index: 1001;
    transition: left 0.3s ease;
    display: flex;
    flex-direction: column;
    padding: 80px 20px 20px;
    overflow: hidden;
}

.categories-panel.open {
    left: 0;
}

.categories-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-shrink: 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.categories-title {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-categories {
    background: none;
    border: none;
    font-size: 30px;
    cursor: pointer;
    color: #666;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.close-categories:hover {
    background: #f0f0f0;
    color: #333;
}

.categories-list {
    flex: 1;
    overflow-y: auto;
    padding-right: 5px;
}

.categories-list::-webkit-scrollbar {
    width: 5px;
}

.categories-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.categories-list::-webkit-scrollbar-thumb {
    background: #8a2be2;
    border-radius: 10px;
}

.category-item {
    margin-bottom: 8px;
}

.category-link {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: 12px;
    color: #333;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 15px;
    cursor: pointer;
    gap: 12px;
    background: #fafafa;
    border: 1px solid #f0f0f0;
}

.category-link:hover {
    background: #f0e6ff;
    border-color: #8a2be2;
    transform: translateX(5px);
    box-shadow: 0 4px 10px rgba(138, 43, 226, 0.1);
}

.category-image {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    background: #fff;
    border: 1px solid #e0e0e0;
    flex-shrink: 0;
    display: block !important; /* Принудительно показываем */
}

.category-name {
    flex: 1;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.category-count {
    background: #8a2be2;
    color: white;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 30px;
    text-align: center;
}

.category-link:hover .category-count {
    background: #6b1fa0;
}

/* Панель корзины */
.cart-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 380px;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 30px rgba(0,0,0,0.1);
    z-index: 1001;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    padding: 80px 20px 20px;
    overflow: hidden;
}

.cart-panel.open {
    right: 0;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: bold;
    flex-shrink: 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.close-cart {
    background: none;
    border: none;
    font-size: 30px;
    cursor: pointer;
    color: #666;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.close-cart:hover {
    background: #f0f0f0;
    color: #333;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 15px;
    padding-right: 5px;
}

.cart-items::-webkit-scrollbar {
    width: 5px;
}

.cart-items::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.cart-items::-webkit-scrollbar-thumb {
    background: #8a2be2;
    border-radius: 10px;
}

.cart-footer {
    border-top: 2px solid #eee;
    padding-top: 15px;
    flex-shrink: 0;
    background: white;
}

.cart-total {
    font-size: 20px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    padding: 0 5px;
}
/* Заголовок корзины с иконкой */
.cart-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

.cart-title svg {
    width: 28px;
    height: 28px;
}

.cart-title svg path,
.cart-title svg circle {
    stroke: #8a2be2;
}

/* Заголовок формы заказа */
.form-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
}

.form-header svg {
    width: 32px;
    height: 32px;
}

.form-header svg path {
    stroke: #8a2be2;
}

.form-header h2 {
    margin: 0;
    font-size: 24px;
    color: #333;
}