/* ============================================
   Product Card — bumlavka.ru design
   ============================================ */

.product-card {
    inline-size: 100%;
    background-color: #fff;
    border-radius: 40px;
    padding: 25px 30px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    position: relative;
}

.product-card__badge {
    position: absolute;
    top: 20px;
    left: 20px;
    display: inline-flex;
    height: 28px;
    padding: 0 14px;
    justify-content: center;
    align-items: center;
    gap: 6px;
    z-index: 2;
    border-radius: 14px;
    border: none;
    background: var(--color-primary);
    color: #fff;
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: .02em;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(100, 125, 25, .25);
    box-sizing: border-box;
}

.product-card__media {
    margin: 5px auto 0;
    inline-size: 100%;
    aspect-ratio: 391 / 380;
    block-size: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.product-card__media--empty {
    background-color: #c9c9c9;
}

.product-card__media img {
    inline-size: 100%;
    block-size: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 30px;
}

.product-card__footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding-right: 60px;
}

.product-card__name {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 400;
    line-height: 1.2;
    color: #333;
    margin: 15px 0 6px;
}

.product-card__name a {
    color: inherit;
    text-decoration: none;
}

.product-card__props {
    list-style: none;
    margin: 6px 0 10px;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2px;
}
.product-card__prop {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 13px;
    line-height: 1.4;
    color: var(--color-text-muted, #6e6a63);
}
.product-card__prop-label {
    flex: 0 0 auto;
}
.product-card__prop-value {
    color: var(--color-text, #2a261f);
    font-weight: 500;
    text-align: right;
}

.product-card__price-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.product-card__price {
    font-family: var(--font-display);
    font-size: 23px;
    font-weight: 600;
    line-height: 140%;
    color: #1d1d1b;
    margin: 0;
}

.product-card__old-price {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 400;
    line-height: 140%;
    color: var(--color-text-muted);
    margin: 0;
    text-decoration: line-through;
}

/* Color swatches */
.product-card__swatches {
    display: flex;
    gap: 6px;
    margin-top: 4px;
    overflow: visible;
    padding: 4px 0;
    flex-wrap: wrap;
}

.product-card__swatch {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1.5px solid rgba(0, 0, 0, 0.12);
    flex-shrink: 0;
}

.product-card__swatch--active {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 1.5px #fff, 0 0 0 3px var(--color-primary);
}

/* Favorite + Compare action buttons (горизонтально, в островке) */
.product-card__actions {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    flex-direction: row;
    gap: 6px;
    z-index: 4;
}

.product-card__action-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, .9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #555;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .2s ease, color .2s ease, box-shadow .2s ease;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
}

.product-card__action-btn:hover {
    background: #fff;
}

.product-card__action-btn svg {
    width: 18px;
    height: 18px;
}

.product-card__action-btn.is-fav {
    color: #d32f2f;
}

.product-card__action-btn.is-fav svg path {
    fill: #d32f2f;
}

.product-card__action-btn.is-compared {
    color: var(--color-primary);
    background: var(--color-accent);
}

.product-card__cart {
    position: absolute;
    right: 24px;
    bottom: 22px;
    inline-size: 48px;
    block-size: 48px;
    border-radius: 50%;
    border: none;
    background-color: var(--color-accent);
    color: var(--color-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color .2s ease;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(100, 125, 25, .18);
}

.product-card__cart svg {
    width: 22px;
    height: 22px;
}

.product-card__cart::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, .25) 50%, transparent 100%);
    transform: translate(-140%);
    opacity: 0;
    pointer-events: none;
}

.product-card__cart:hover,
.product-card__cart:focus-visible {
    background-color: var(--color-accent-hover);
}

.product-card__cart--added::after {
    animation: cart-sheen .52s ease;
}

@keyframes cart-sheen {
    0% { transform: translate(-140%); opacity: 0; }
    35% { opacity: .7; }
    100% { transform: translate(140%); opacity: 0; }
}

/* CTA Button */
.cta-button {
    inline-size: min(310px, 100%);
    block-size: 60px;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-inline: 24px 22px;
    border-radius: 35px;
    border: 2px solid var(--cta-button-accent);
    background-color: var(--cta-button-bg-default);
    color: var(--cta-button-text-default);
    font-family: var(--font-display);
    font-size: 23px;
    font-weight: 400;
    line-height: 1;
    letter-spacing: -.02em;
    text-decoration: none;
    cursor: pointer;
    appearance: none;
    transition: background-color .22s ease, color .22s ease, border-color .22s ease;
}

.cta-button:focus-visible {
    outline: 3px solid rgba(100, 125, 25, .35);
    outline-offset: 4px;
}

.cta-button__label {
    flex: 1;
    text-align: left;
}

.cta-button__icon {
    inline-size: 40px;
    block-size: 40px;
    border-radius: 50%;
    background-color: var(--cta-button-accent);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color .22s ease, color .22s ease, transform .22s ease;
}

.cta-button__arrow {
    inline-size: 17px;
    block-size: 17px;
    stroke: currentColor;
    stroke-width: 2px;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

.cta-button:hover,
.cta-button:focus-visible,
.cta-button:active {
    background-color: var(--cta-button-accent);
    border-color: var(--cta-button-accent);
    color: var(--cta-button-text-hover);
}

/* Product grid (for card sections) */
.products-grid {
    width: 100%;
    max-width: 1780px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    justify-content: center;
    gap: 20px;
    margin: 0 auto;
}

/* Horizontal scroll for cards with shadows */
.products-scroll {
    width: 100%;
    max-width: 1780px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    justify-content: center;
    gap: 20px;
    margin: 0 auto;
}

/* ---- Tablet / Medium desktop (1000–1399px) ---- */
@media (max-width: 1399px) {
    .product-card {
        border-radius: 24px;
        padding: 18px 20px;
    }

    .product-card__media {
        margin-top: 10px;
    }

    .product-card__media img {
        border-radius: 18px;
    }

    .product-card__name {
        font-size: 17px;
        margin: 10px 0 4px;
    }

    .product-card__price {
        font-size: 19px;
    }

    .product-card__badge {
        min-width: 80px;
        height: 26px;
        padding: 0 12px;
        font-size: 14px;
    }

    .product-card__cart {
        width: 42px;
        height: 42px;
        right: 20px;
        bottom: 18px;
    }

    .product-card__footer {
        padding-right: 50px;
    }

    .products-grid,
    .products-scroll {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 16px;
    }

    .cta-button {
        font-size: 19px;
        block-size: 52px;
        padding-inline: 20px 18px;
    }
}

/* ---- Mobile (< 1000px) ---- */
@media (max-width: 999px) {
    .product-card {
        border-radius: 16px;
        padding: 12px;
    }

    .product-card__media {
        margin-top: 36px;
        aspect-ratio: 1 / 1;
    }

    .product-card__media img {
        border-radius: 10px;
    }

    .product-card__name {
        font-size: 15px;
        margin: 8px 0 4px;
    }

    .product-card__price {
        font-size: 15px;
    }

    .product-card__old-price {
        font-size: 13px;
    }

    .product-card__cart {
        width: 34px;
        height: 34px;
        right: 12px;
        bottom: 12px;
    }

    .product-card__cart svg {
        width: 16px;
        height: 16px;
    }

    .product-card__footer {
        padding-right: 40px;
    }

    .product-card__actions {
        top: 12px;
        right: 12px;
        gap: 6px;
    }

    .product-card__action-btn {
        width: 32px;
        height: 32px;
    }

    .product-card__action-btn svg {
        width: 16px;
        height: 16px;
    }

    /* На узких экранах (грид 2 колонки) скрываем «Сравнить», оставляем только избранное */
    .product-card__action-btn[data-compare-toggle] {
        display: none;
    }

    .product-card__badge {
        top: 12px;
        left: 12px;
        min-width: 63px;
        height: 23px;
        padding: 0 10px;
        font-size: 12px;
    }

    .products-grid,
    .products-scroll {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .cta-button {
        font-size: 17px;
        block-size: 48px;
        padding-inline: 18px 16px;
    }

    .cta-button__icon {
        width: 34px;
        height: 34px;
    }
}

/* ---- Small mobile (< 480px) ---- */
@media (max-width: 479px) {
    .product-card {
        border-radius: 12px;
        padding: 10px;
    }

    .product-card__media {
        margin-top: 32px;
    }

    .product-card__media img {
        border-radius: 8px;
    }

    .product-card__name {
        font-size: 14px;
    }

    .product-card__price {
        font-size: 14px;
    }

    .product-card__swatches {
        gap: 4px;
        margin-top: 6px;
    }

    .product-card__swatch {
        width: 14px;
        height: 14px;
    }
}

/* ---- Filter Button (shared component) ---- */
.filter-button {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 26px;
    block-size: 50px;
    border-radius: 35px;
    border: 1px solid var(--color-primary);
    background-color: transparent;
    color: var(--color-primary);
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.2;
    text-transform: none;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
    white-space: nowrap;
}

.filter-button > span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.filter-button:hover,
.filter-button:focus-visible {
    background-color: rgba(100, 125, 25, 0.08);
    outline: none;
}

.filter-button--active {
    background-color: var(--color-primary);
    color: #fff;
}

@media (max-width: 1000px) {
    .filter-button {
        padding: 0 16px;
        block-size: 40px;
        font-size: 14px;
    }
}
