.favorite2-layout .product .head {
    margin-bottom: 18px;
}

.favorite2-tabs {
    display: flex;
    gap: 2px;
    width: 100%;
    margin-top: 22px;
    border-bottom: 1px solid #dfddda;
}

.favorite2-tab {
    flex: 0 0 150px;
    min-height: 38px;
    padding: 7px 16px;
    border: 0;
    background: #efeeea;
    color: #000;
    font-family: inherit;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.favorite2-tab:hover {
    background: #d6d2c4;
}

.favorite2-tab.is-active {
    background: #d6d2c4;
    color: #000;
}

.favorite2-tab:focus-visible,
.favorite2-clear:focus-visible,
.favorite2-card a:focus-visible {
    outline: 2px solid #9b070c;
    outline-offset: 3px;
}

.favorite2-clear-row {
    margin-top: 12px;
}

.favorite2-clear {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    gap: 8px;
    padding: 6px 0;
    border: 0;
    background: transparent;
    color: #333;
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
}

.favorite2-clear:hover {
    text-decoration: underline;
}

.favorite2-clear img {
    width: 16px;
    height: 16px;
}

.favorite2-panel[hidden] {
    display: none;
}

.favorite2-controls {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 16px;
}

.favorite2-select {
    width: 180px;
    margin: 0;
}

.favorite2-select .form-control {
    width: 100%;
    height: 48px;
}

.favorite2-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 42px 20px;
    padding: 64px 0 80px;
}

.favorite2-card {
    position: relative;
    min-width: 0;
}

.favorite2-card__media {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    /* 商品画像は透過PNGのため背景は敷かない（現状版 .main-image と同じ） */
    background: transparent;
}

.favorite2-card__media:hover {
    opacity: 0.86;
}

.favorite2-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.favorite2-card__media:hover img {
    transform: scale(1.02);
}

.favorite2-card--charcoal .favorite2-card__media img { filter: saturate(0.5) brightness(0.55) contrast(1.25); }
.favorite2-card--stone .favorite2-card__media img { filter: saturate(0.35) brightness(1.12); }
.favorite2-card--silver .favorite2-card__media img { filter: saturate(0.2) hue-rotate(170deg) brightness(1.04); }
.favorite2-card--terrazzo .favorite2-card__media img { filter: saturate(0.75) sepia(0.12) brightness(1.1); }
.favorite2-card--blue .favorite2-card__media img { filter: saturate(1.25) hue-rotate(165deg) brightness(0.72); }
.favorite2-card--mint .favorite2-card__media img { filter: saturate(0.75) hue-rotate(125deg) brightness(1.15); }
.favorite2-card--navy .favorite2-card__media img { filter: saturate(1.4) hue-rotate(180deg) brightness(0.58); }
.favorite2-card--stripe .favorite2-card__media img { filter: saturate(0.55) hue-rotate(155deg) contrast(1.18); }

.favorite2-card.is-new::before {
    content: 'NEW';
    position: absolute;
    top: -18px;
    left: -2px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: #9b070c;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
}

.favorite2-card__body {
    padding-top: 14px;
}

.favorite2-card__subtitle,
.favorite2-card__price {
    margin: 0;
    font-size: 12px;
    font-weight: bold;
}

.favorite2-card__title-row {
    display: flex;
    align-items: center;
    min-width: 0;
    margin: 2px 0 3px;
    gap: 6px;
}

.favorite2-card__title {
    min-width: 0;
    color: #231f20;
    font-size: 18px;
    font-weight: bold;
    line-height: 1.25;
    overflow-wrap: anywhere;
    text-decoration: none;
}

.favorite2-card__title:hover {
    text-decoration: underline;
}

.favorite2-heart {
    display: inline-flex;
    flex: 0 0 44px;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: -10px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
}

/* カーソル・フォーカス時に枠（円形の背景・アウトライン）を出さない。
   代わりにハートをわずかに拡大して、操作対象であることは分かるようにする */
.favorite2-heart:hover,
.favorite2-heart:focus,
.favorite2-heart:focus-visible {
    background: transparent;
    outline: none;
    box-shadow: none;
}

.favorite2-heart:hover img,
.favorite2-heart:focus-visible img {
    transform: scale(1.15);
}

.favorite2-heart img {
    width: 18px;
    height: 18px;
    transition: transform 0.15s ease;
}

.favorite2-empty {
    padding: 88px 20px 140px;
    color: #666;
    font-size: 16px;
    text-align: center;
}

@media screen and (min-width: 768px) {
    .favorite2-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 60px 20px;
    }

    .favorite2-card__subtitle,
    .favorite2-card__price {
        font-size: 13px;
    }

    .favorite2-card__title {
        font-size: 20px;
    }
}

@media screen and (min-width: 1191px) {
    .favorite2-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media screen and (max-width: 767px) {
    .favorite2-tabs {
        margin-top: 14px;
    }

    .favorite2-tab {
        flex: 1 1 50%;
        min-height: 40px;
        padding: 7px 12px;
        font-size: 14px;
    }

    .favorite2-clear-row {
        margin-top: 8px;
    }

    .favorite2-clear {
        font-size: 13px;
    }

    .favorite2-controls {
        gap: 10px;
        margin-top: 12px;
    }

    .favorite2-select {
        width: calc(50% - 5px);
    }

    .favorite2-select .form-control {
        height: 46px;
        padding-right: 28px;
        font-size: 14px;
    }

    .favorite2-grid {
        gap: 44px 20px;
        padding: 52px 0 72px;
    }

    .favorite2-card.is-new::before {
        top: -13px;
        width: 42px;
        height: 42px;
        font-size: 10px;
    }

    .favorite2-card__body {
        padding-top: 10px;
    }

    .favorite2-card__subtitle,
    .favorite2-card__price {
        font-size: 10px;
    }

    .favorite2-card__title {
        font-size: 14px;
    }

    .favorite2-heart {
        flex-basis: 40px;
        width: 40px;
        height: 40px;
        margin: -9px;
    }

    .favorite2-heart img {
        width: 16px;
        height: 16px;
    }
}
