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

body {
    background: #f5f5f5;
    direction: rtl;
}

.header {
    background: white;
    padding: 15px 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    font-size: 24px;
}

.buttons-ul {
    display: flex;
    gap: 15px;
    position: relative;
}

.buttons-ul button {
    position: relative;
    background: black;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 18px;
}

.count {
    position: absolute;
    top: -6px;
    left: -6px;
    background: red;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 12px;
}

.layout {
    display: flex;
    max-width: 1200px;
    margin: 30px auto;
    gap: 20px;
}

.sidebar {
    width: 220px;
    background: white;
    padding: 15px;
    border-radius: 10px;
}

.sidebar h2 {
    margin-bottom: 10px;
    font-size: 18px;
}

.sidebar ul {
    list-style: none;
}

.sidebar li {
    padding: 10px;
    cursor: pointer;
    border-radius: 6px;
}

.sidebar li:hover {
    background: #eee;
}

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

.product {
    background: white;
    padding: 12px;
    border-radius: 10px;
    transition: transform 0.3s;
    position: relative;
}

.product img {
    width: 100%;
    height: 150px;
    object-fit: contain;
    background-color: rgba(128, 128, 128, 0.226);
    padding: 20px;
    border-radius: 8px;
}

.product p {
    padding-bottom: 30px;
}

.buttons {
    display: flex;
    gap: 10px;
    position: absolute;
    bottom: 10px;
}

.heart {
    padding: 5px 13px;
    border-radius: 20px;
    border: none;
    color: red;
    cursor: pointer;
}

.heart.active i {
    color: red;
}

.basket {
    padding: 6px 15px;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    background-color: #007bff;
    color: white;
}

#fav-sidebar {
    position: fixed;
    top: 0;
    left: -25%;
    width: 25%;
    height: 100vh;
    background: gray;
    transition: 0.3s;
    padding: 15px;
    overflow-y: auto;
    z-index: 1000;
}

#fav-sidebar.open {
    left: 0;
}

#fav-sidebar .container .product {
    margin-bottom: 15px;
}

#fav-sidebar .close {
    background: red;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-weight: bold;
    cursor: pointer;
}
