* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Genshin', sans-serif;
    background-image: url('/static/images/paral.gif');
    /* Замените на путь к вашему GIF */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* padding: 20px; */
}

h1 {
    text-align: center;
    margin-bottom: 30px;
}

.product-content p {
    margin-bottom: 30px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    /* max-width: 1280px; */
    margin: 0 auto;
}

.product-item {
    /* background-color: #fff; */
    border: #fff solid 4px;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.3s ease;
    position: relative;
}

.product-item:hover {
    transform: scale(1.05);
}

.product-icon {
    width: 100px;
    height: 100px;
    margin-bottom: 40px;
}

.product-content {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    flex-grow: 1;
}

.product-title {
    font-size: 1.4em;
    margin-bottom: 10px;
    z-index: 2;
    color: #fff;
    -webkit-text-stroke: 1px #00000066;
}

.product-description {
    font-size: 0.9em;
    color: #555;
    max-height: 60px;
    overflow: hidden;
    position: relative;
    margin-bottom: 10px;
    z-index: 2;
}

.product-description::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    left: 0;
    height: 1.5em;
    background: linear-gradient(to top, #EDE9E0, transparent);
}

.product-price {
    font-size: 1.2em;
    color: #27ae60;
    margin-bottom: 15px;
    z-index: 2;
}

.old-price {
    text-decoration: line-through;
    color: #999;
    margin-right: 10px;
    font-size: 0.8em;
    z-index: 2;
}

.product-button {
    padding: 10px 20px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.3s ease;
    z-index: 2;
}

.product-button:hover {
    background-color: #2980b9;
}

/* Лента "Рекомендуем" */
.ribbon-recommended::after {
    content: "Рекомендуем";
    position: absolute;
    top: 5px;
    left: 5px;
    background-color: #27ae60;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    /* transform: rotate(-45deg); */
    transform-origin: left top;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    font-size: 0.9em;
    z-index: 3;
}

/* Лента "Скидка 15%" */
.ribbon-discount::after {
    content: "Скидка 15%";
    position: absolute;
    top: 5px;
    left: 5px;
    background-color: #e74c3c;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    /* transform: rotate(45deg); */
    transform-origin: left top;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    font-size: 0.9em;
    z-index: 3;
}

/* Лента "Скидка 15%" */
.ribbon-discount30::after {
    content: "Скидка 30%";
    position: absolute;
    top: 5px;
    left: 5px;
    background-color: #e74c3c;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    /* transform: rotate(45deg); */
    transform-origin: left top;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    font-size: 0.9em;
    z-index: 3;
}

/* Градиент сверху для фона */
.product-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin-bottom: 10px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 40%, #EDE9E0 60%);
    z-index: 1;
}

.category-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    width: max-content;
    border-radius: 30px;
    align-self: center;
    padding: 8px 12px;
    background-color: #EDE9E0;
}

.category-buttons button {
    padding: 10px 20px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.category-buttons button:hover {
    background-color: #2980b9;
}

.category-buttons button.active {
    background-color: #2ecc71;
}