.shop-grid,
.shop-grid *,
.shop-grid *::before,
.shop-grid *::after {
    box-sizing: border-box;
}

.cubes.shop-grid {
    --shop-paper: #fffdf9;
    --shop-red: #8b1a1a;
    --shop-gold: #c9a84c;
    --shop-brown: #493429;
    --shop-muted: #806f62;
    --shop-line: #e5d9c8;
    color: var(--shop-brown);
    line-height: 1.6;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px 20px;
    align-items: stretch;
}

.cubes.shop-grid>.shop-grid-item {
    width: auto;
    min-width: 0;
}

.shop-grid .shop-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0;
    border: 1px solid var(--shop-line);
    background: var(--shop-paper);
    transition: border-color .2s, box-shadow .2s;
}

.shop-card:hover {
    border-color: var(--shop-gold);
    box-shadow: 0 8px 24px #4934290c;
}

.shop-card .image {
    background: #eee5d8;
}

.shop-card .image a {
    display: block;
    aspect-ratio: 1;
    overflow: hidden;
}

.shop-card .image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform .4s;
}

.shop-card:hover .image img {
    transform: scale(1.025);
}

.shop-grid .shop-card .info {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 18px 18px 16px;
}

.shop-grid .shop-card .title {
    padding: 0;
    margin: 0 0 12px;
    color: var(--shop-brown);
    font-size: 16px;
    font-weight: 500;
    line-height: 1.65;
    overflow-wrap: anywhere;
}

.shop-grid .shop-card .title a:hover {
    color: var(--shop-red);
}

.shop-card-prices {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 5px 10px;
    margin-top: auto;
    margin-bottom: 16px;
}

.shop-grid .shop-card .price {
    color: var(--shop-red);
    font-size: 18px;
    font-weight: 600;
}

.shop-grid .shop-card .old_price {
    color: #8b8075;
    font-size: 12px;
}

.shop-card-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid var(--shop-line);
    color: var(--shop-muted);
    font-size: 12px;
    letter-spacing: 1px;
}

.shop-card-link:hover {
    color: var(--shop-red);
}

.shop-image-placeholder {
    display: flex;
    height: 100%;
    align-items: center;
    justify-content: center;
    color: #ae9e8c;
    font-size: 48px;
}

.cubes.shop-grid.home-recommendations {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin-bottom: 72px;
}

.shop-grid a:focus-visible {
    outline: 2px solid var(--shop-red);
    outline-offset: 4px;
}

@media (max-width: 1023px) {
    .cubes.shop-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px 16px;
    }

    .cubes.shop-grid.home-recommendations {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .cubes.shop-grid {
        gap: 16px 12px;
    }

    .shop-card .image {
        padding: 6px;
    }

    .shop-grid .shop-card .info {
        padding: 12px 10px;
    }

    .shop-grid .shop-card .title {
        font-size: 14px;
        margin-bottom: 10px;
    }

    .shop-card-prices {
        gap: 4px 6px;
        margin-bottom: 12px;
    }

    .shop-grid .shop-card .price {
        font-size: 16px;
    }

    .shop-grid .shop-card .old_price {
        font-size: 11px;
    }

    .shop-card-link {
        letter-spacing: 0;
    }

    .cubes.shop-grid.home-recommendations {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin-bottom: 48px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .shop-card,
    .shop-card .image img {
        transition: none;
    }

    .shop-card:hover .image img {
        transform: none;
    }
}
