/* Favorites and comparison — shared storefront features */
.product-card__actions {
    position: absolute;
    z-index: 4;
    inset-block-start: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.product-card__actions form {
    margin: 0;
}

.product-action-button {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid var(--ava-neutral-200, #e2e8f0);
    border-radius: 12px;
    color: var(--ava-neutral-500, #62748e);
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 8px 20px rgba(20, 27, 52, .08);
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: color .16s ease, border-color .16s ease, background-color .16s ease, transform .16s ease;
}

.product-action-button:hover,
.product-action-button:focus-visible {
    color: var(--ava-primary-1000, #32348f);
    border-color: rgba(50, 52, 143, .3);
    transform: translateY(-1px);
}

.product-action-button.is-active {
    color: #fff;
    border-color: var(--ava-secondary-900, #5fa8ab);
    background: var(--ava-secondary-900, #5fa8ab);
}

.product-action-button:disabled {
    cursor: wait;
    opacity: .6;
}

.product-action-button svg,
.compare-dock svg,
.compare-empty svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.product-card__actions [data-action="favorite"] .product-action-button.is-active svg {
    fill: currentColor;
}

.compare-dock {
    position: fixed;
    z-index: 1050;
    inset-inline-end: 24px;
    inset-block-end: 24px;
    min-width: 245px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 13px;
    border: 1px solid rgba(50, 52, 143, .16);
    border-radius: 18px;
    color: var(--ava-neutral-800, #1d293d);
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 18px 44px rgba(20, 27, 52, .16);
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
    backdrop-filter: blur(10px);
}

.compare-dock.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.page-compare .compare-dock {
    display: none;
}

.compare-dock:hover {
    color: var(--ava-primary-1000, #32348f);
}

.compare-dock__icon {
    position: relative;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    flex: 0 0 42px;
    border-radius: 14px;
    color: #fff;
    background: var(--ava-primary-1000, #32348f);
}

.compare-dock__icon b {
    position: absolute;
    inset-block-start: -6px;
    inset-inline-start: -6px;
    min-width: 20px;
    height: 20px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1px 4px 0;
    border: 2px solid #fff;
    border-radius: 10px;
    color: #fff;
    background: var(--ava-secondary-900, #5fa8ab);
    font-size: 10px;
    line-height: 1;
    text-align: center;
}

.compare-dock > span:nth-child(2) {
    display: grid;
    flex: 1;
}

.compare-dock strong {
    font-size: 13px;
    line-height: 22px;
}

.compare-dock small {
    color: var(--ava-neutral-400, #90a1b9);
    font-size: 10px;
    line-height: 18px;
}

.compare-dock__arrow {
    width: 18px !important;
    height: 18px !important;
}

.page-product .pd-gallery__actions form {
    margin: 0;
}

.page-product .pd-gallery__actions > a,
.page-product .pd-gallery__actions .pd-gallery__compare {
    width: 49.619px;
    height: 49.619px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1.034px solid var(--pd-n200);
    border-radius: 12.405px;
    color: var(--pd-secondary);
    background: var(--pd-n0);
}

.page-product .pd-gallery__actions .pd-gallery__compare svg {
    width: 25px;
    height: 25px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.page-product .pd-gallery__actions button.is-active,
.page-product .pd-gallery__actions button[aria-pressed="true"] {
    color: #fff;
    border-color: var(--pd-secondary);
    background: var(--pd-secondary);
}

.page-product .pd-gallery__actions .js-wishlist.is-active img {
    filter: brightness(0) invert(1);
}

/* Favorites */
.profile-favorites__count {
    padding: 6px 11px;
    border-radius: 12px;
    color: var(--ava-primary-1000);
    background: var(--ava-primary-50, #f1f1fb);
    font-size: 12px;
    font-weight: 700;
}

.profile-favorites__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    padding: 24px;
}

.profile-favorite-item {
    min-width: 0;
}

.profile-favorite-item .product-card {
    width: 100%;
    height: 100%;
    min-height: 350px;
}

.profile-favorites__empty {
    min-height: 380px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 40px 24px;
    text-align: center;
}

.profile-favorites__empty[hidden] {
    display: none;
}

.profile-favorites__empty svg {
    width: 54px;
    height: 54px;
    margin-block-end: 8px;
    color: var(--ava-secondary-900);
}

.profile-favorites__empty strong {
    color: var(--ava-neutral-800);
    font-size: 17px;
}

.profile-favorites__empty span {
    max-width: 390px;
    color: var(--ava-neutral-500);
    font-size: 13px;
    line-height: 26px;
}

.profile-favorites__empty a {
    margin-block-start: 10px;
    padding: 10px 18px;
    border-radius: 14px;
    color: #fff;
    background: var(--ava-secondary-900);
    font-size: 13px;
    font-weight: 700;
}

/* Comparison */
.page-compare #main-content {
    min-width: 0;
    background: linear-gradient(180deg, #fff, var(--ava-neutral-0, #f8fafc) 38%, #fff);
}

.compare-page {
    min-height: 720px;
    padding: 24px 0 110px;
}

.compare-page__container {
    width: 1200px;
    max-width: calc(100% - 40px);
}

.compare-page .breadcrumbs {
    margin-block-end: 18px;
}

.compare-hero {
    min-height: 190px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding: 38px 46px;
    overflow: hidden;
    border-radius: 38px;
    color: #fff;
    background:
        radial-gradient(circle at 8% 130%, rgba(95, 168, 171, .8) 0 18%, transparent 18.5%),
        linear-gradient(118deg, var(--ava-primary-1000, #32348f), #25276f);
    box-shadow: 0 24px 56px rgba(50, 52, 143, .16);
}

.compare-hero span {
    color: rgba(255, 255, 255, .65);
    font-size: 12px;
    font-weight: 600;
}

.compare-hero h1 {
    margin: 2px 0 0;
    color: #fff;
    font-size: 29px;
    line-height: 46px;
    font-weight: 800;
}

.compare-hero p {
    margin: 2px 0 0;
    color: rgba(255, 255, 255, .72);
    font-size: 14px;
}

.compare-hero button {
    min-height: 44px;
    padding: 8px 16px;
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: 14px;
    color: #fff;
    background: rgba(255, 255, 255, .1);
    cursor: pointer;
}

.compare-page__hint {
    display: none;
    margin: 20px 2px 8px;
    color: var(--ava-neutral-500, #62748e);
    font-size: 11px;
}

.compare-table-wrap {
    margin-block-start: -28px;
    overflow-x: auto;
    border: 1px solid var(--ava-neutral-200, #e2e8f0);
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 20px 48px rgba(20, 27, 52, .07);
}

.compare-table {
    width: 100%;
    min-width: 760px;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
}

.compare-table th,
.compare-table td {
    padding: 17px 18px;
    border-block-end: 1px solid var(--ava-neutral-100, #f1f5f9);
    border-inline-start: 1px solid var(--ava-neutral-100, #f1f5f9);
    color: var(--ava-neutral-600, #45556c);
    font-size: 13px;
    line-height: 24px;
    text-align: center;
    vertical-align: middle;
}

.compare-table tr > :first-child {
    width: 170px;
    position: sticky;
    z-index: 2;
    right: 0;
    border-inline-start: 0;
    color: var(--ava-neutral-800, #1d293d);
    background: #fbfcfe;
    font-weight: 700;
}

.compare-table thead th {
    padding-block: 22px;
    vertical-align: top;
}

.compare-table thead tr > :first-child {
    z-index: 3;
    padding-block-start: 40px;
}

.compare-product {
    position: relative;
    min-width: 0;
}

.compare-product__remove {
    position: absolute;
    z-index: 2;
    inset-block-start: -10px;
    inset-inline-start: -6px;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid #fee4e2;
    border-radius: 10px;
    color: #b42318;
    background: #fff5f4;
    cursor: pointer;
    font-size: 20px;
}

.compare-product__image {
    height: 130px;
    display: grid;
    place-items: center;
    margin-block-end: 10px;
    border-radius: 20px;
    background: var(--ava-neutral-0, #f8fafc);
}

.compare-product__image img {
    width: 110px;
    height: 110px;
    object-fit: contain;
}

.compare-product strong {
    display: block;
    overflow: hidden;
    color: var(--ava-neutral-900, #0f172b);
    font-size: 14px;
    line-height: 25px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.compare-table__price {
    color: var(--ava-primary-1000, #32348f) !important;
    font-size: 15px !important;
    font-weight: 800;
}

.compare-table__price small {
    font-size: 10px;
}

.compare-status {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
}

.compare-status.is-available {
    color: #367d80;
    background: rgba(95, 168, 171, .12);
}

.compare-status.is-unavailable {
    color: #b42318;
    background: #fff5f4;
}

.compare-table__actions a,
.compare-empty a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 8px 16px;
    border-radius: 13px;
    color: #fff;
    background: var(--ava-secondary-900, #5fa8ab);
    font-size: 12px;
    font-weight: 700;
}

.compare-empty {
    min-height: 390px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-block-start: -28px;
    padding: 44px;
    border: 1px solid var(--ava-neutral-200, #e2e8f0);
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 20px 48px rgba(20, 27, 52, .07);
    text-align: center;
}

.compare-empty > span {
    width: 66px;
    height: 66px;
    display: grid;
    place-items: center;
    margin-block-end: 8px;
    border-radius: 22px;
    color: var(--ava-primary-1000, #32348f);
    background: rgba(50, 52, 143, .08);
}

.compare-empty h2 {
    margin: 0;
    color: var(--ava-neutral-900, #0f172b);
    font-size: 21px;
}

.compare-empty p {
    max-width: 500px;
    margin: 0 0 10px;
    color: var(--ava-neutral-500, #62748e);
    font-size: 13px;
    line-height: 27px;
}

@media (max-width: 991px) {
    .profile-favorites__grid {
        grid-template-columns: 1fr;
    }

    .compare-dock {
        inset-inline: 16px;
        inset-block-end: 86px;
        min-width: 0;
    }

    .compare-page__hint {
        display: block;
    }

    .compare-table-wrap {
        margin-block-start: 0;
    }
}

@media (max-width: 575px) {
    .product-card__actions {
        inset-block-start: 8px;
        left: 8px;
        gap: 5px;
    }

    .product-action-button {
        width: 32px;
        height: 32px;
        border-radius: 10px;
    }

    .product-action-button svg {
        width: 17px;
        height: 17px;
    }

    .compare-dock {
        padding: 9px 11px;
        border-radius: 16px;
    }

    .compare-dock__icon {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
    }

    .compare-page {
        padding-block-start: 16px;
    }

    .compare-page__container {
        max-width: calc(100% - 24px);
    }

    .compare-hero {
        min-height: 176px;
        display: block;
        padding: 28px 24px 46px;
        border-radius: 28px;
    }

    .compare-hero h1 {
        font-size: 24px;
        line-height: 40px;
    }

    .compare-hero form {
        margin-block-start: 14px;
    }

    .compare-hero button {
        min-height: 38px;
    }

    .compare-table {
        min-width: 650px;
    }

    .compare-table tr > :first-child {
        width: 124px;
    }

    .compare-table th,
    .compare-table td {
        padding: 13px 12px;
        font-size: 12px;
    }

    .compare-product__image {
        height: 110px;
    }

    .compare-product__image img {
        width: 92px;
        height: 92px;
    }

    .compare-empty {
        min-height: 340px;
        margin-block-start: -22px;
        padding: 34px 22px;
    }

    .profile-favorites__grid {
        padding: 16px;
    }
}
