.title {
    text-align: center;
    font-size: 1.3rem;
    font-weight: 700;
    margin-left: 20px;
    color: #333;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Martian Mono';
}

.catalog {
    margin-top: 10px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.filters {
    border: 1px solid #ddd;
    padding: 15px;
    background: #fff3f8;
    border-radius: 8px;
    flex: 0 0 auto;
    min-width: 200px;
}

.filters-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 15px;
    display: block;
}

.filters form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filters label {
    display: flex;
    flex-direction: column;
    font-size: 13px;
    gap: 4px;
}

.filters input, .filters select {
    padding: 6px 8px;
    border: 1px solid #e5a8c2;
    border-radius: 4px;
    font-size: 13px;
}

.price-range {
    display: flex;
    gap: 8px;
    align-items: center;
}

.price-range input {
    width: 70px;
}

.filters button {
    background: #f8c8dc;
    border: 1px solid #e5a8c2;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    margin-top: 5px;
}

.filters button:hover {
    background: #e5a8c2;
}

.sorting-panel {
    background: #fff3f8;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    flex: 1;
    min-width: 300px;
}

.sorting-panel label {
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 8px;
    display: block;
}

.sort-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sort-btn {
    background: #f8c8dc;
    border: 1px solid #e5a8c2;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    white-space: nowrap;
}

.sort-btn:hover {
    background: #e5a8c2;
}

.sort-btn.active {
    background: #d48aac;
    color: white;
    border-color: #c46b96;
}

.products {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
}

.product:hover{
    color: black;
}

.image-wrapper {
    position: relative;
    width: 100%;
    height: 150px;
    overflow: hidden;
    border-radius: 6px;
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

.cake {
    width: 250px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 8px;
    text-align: center;
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
    position: relative;
    height: 460px; /* фиксированная высота карточки */
}

.cake .product {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: inherit;
}


.cake-title {
    position: relative;
    font-size: 16px;
    font-weight: bold;
    min-height: 40px;
    margin-top: 10px;
    margin-bottom: 5px;
}

.cake-desc {
    font-size: 14px;
    color: #444;
    min-height: 38px; /* фиксированная высота описания */
    margin-bottom: 10px;
}

.cake-price {
    font-weight: bold;
    font-size: 15px;
    margin-bottom: 15px;
    margin-top: auto;
}


.price-old {
    text-decoration: line-through;
    color: #999;
    font-size: 14px;
    margin-right: 5px;
}

.price-new {
    color: #ff6b6b;
    font-weight: bold;
    font-size: 16px;
}

.product-with-discount {
    position: relative;
}

/* Лента скидки поверх картинки */
.discount-ribbon {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #ff6b6b;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: bold;
}

.cake button {
    background: #f8c8dc;
    border: 1px solid #e5a8c2;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin-top: auto;
    transition: 0.2s;
}

.cake button:hover {
    background: #e5a8c2;
}

.load-more-wrapper {
    display: flex;
    justify-content: center;
    margin: 20px 0 40px 0;
    width: 100%;
}

.load-more-btn {
    margin-top: 5px;
    background: #f8c8dc;
    border: 1px solid #e5a8c2;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: 0.2s;
}

/* Стили для галереи товара */
.product-image {
    text-align: center;
    margin-bottom: 10px;
}

.product-image img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}

.gallery {
    display: flex;
    gap: 5px;
    justify-content: center;
    margin-top: 10px;
}

.thumb {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.thumb:hover {
    border-color: #e5a8c2;
}

.thumb.active {
    border-color: #d48aac;
}

.zoom-container {
    position: relative;
    overflow: hidden;
    cursor: zoom-in;
}

.zoom-container img {
    width: 100%;
    transition: transform 0.2s ease;
    transform-origin: center;
}

.zoom-container.active img {
    transform: scale(2.3); /* степень увеличения */
    cursor: zoom;
}

