/* Lightweight favorites UI for product cards, search results, cart rows, and PDP hearts. */
.eg-heart {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none !important;
    background-color: transparent !important;
    border: none;
    border-radius: 0;
    padding: 0 !important;
    position: absolute;
    top: 8px;
    right: 8px;
    min-width: 0;
    min-height: 0;
    z-index: 10;
    transition: transform 0.2s ease;
    --eg-heart-transform: translate3d(0, 0, 0);
    transform: var(--eg-heart-transform);
}

.eg-heart:not(:focus-visible) {
    box-shadow: none !important;
}

.woocommerce ul.products li.product {
    position: relative;
    overflow: visible;
}

.woocommerce ul.products li.product .eg-heart {
    top: 0;
    right: 0;
    --eg-heart-transform: translate3d(50%, -50%, 0);
}

.eg-heart.eg-heart--inline,
.eg-heart-single .eg-heart {
    position: relative;
    top: 0;
    right: 0;
    min-width: 36px;
    min-height: 36px;
    padding: 6px !important;
}

.eg-heart.eg-heart--inline {
    margin: 0;
}

.eg-heart-single {
    pointer-events: none;
}

.eg-heart-single .eg-heart {
    pointer-events: auto;
}

.single-product .woocommerce-product-gallery {
    position: relative;
}

.single-product .woocommerce-product-gallery .eg-heart-single {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 25;
}

.eg-heart-emoji {
    font-family: "Brandon Grotesque", "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Segoe UI Symbol", sans-serif;
    font-size: 1.85em;
    line-height: 1;
    vertical-align: middle;
    display: inline-block;
    transition: filter 0.2s ease;
}

.eg-cart-item-wrapper {
    position: relative;
}

.eg-cart-heart-container {
    display: flex;
    justify-content: center;
    margin-top: 8px;
}

.eg-cart-heart-container .eg-heart {
    position: relative;
    top: 0;
    right: 0;
    transform: none;
}

.woocommerce-cart-form .eg-cart-heart-container {
    position: relative;
    overflow: visible !important;
}

.woocommerce-cart-form__contents .product-info {
    position: relative !important;
}

.eg-heart--none .eg-heart-emoji {
    text-shadow:
        -1px 0 0 rgba(45, 52, 54, 0.6),
        1px 0 0 rgba(45, 52, 54, 0.6),
        0 -1px 0 rgba(45, 52, 54, 0.6),
        0 1px 0 rgba(45, 52, 54, 0.6),
        0 0 3px rgba(45, 52, 54, 0.35);
    filter: drop-shadow(0 0 1px rgba(45, 52, 54, 0.45));
}

.eg-heart:hover {
    transform: var(--eg-heart-transform) scale(1.18);
}

.eg-heart.eg-heart--inline:hover {
    transform: var(--eg-heart-transform) scale(1.12);
}

.eg-heart--none:hover .eg-heart-emoji {
    filter: drop-shadow(0 2px 5px rgba(16, 19, 38, 0.35));
}

.eg-heart:active {
    transform: var(--eg-heart-transform) scale(0.98);
}

.eg-heart:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(135, 206, 235, 0.45);
}

.eg-heart--loading {
    opacity: 0.6;
    cursor: pointer !important;
    animation: eg-heart-pulse 1s infinite;
    pointer-events: none;
}

@keyframes eg-heart-pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.eg-heart--none,
.eg-heart--now,
.eg-heart--later,
.eg-heart.eg-heart--variation {
    background: transparent;
    border: none;
}

.eg-heart-tooltip {
    position: absolute;
    top: 2.4rem;
    right: 0.5rem;
    transform: translateY(-6px);
    background: rgba(16, 19, 38, 0.88);
    color: #ffffff;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-family: brandon-grotesque, sans-serif;
    letter-spacing: 0.02em;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    white-space: nowrap;
    z-index: 15;
}

.eg-heart-tooltip.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.eg-variation-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1.5rem;
}

.eg-variation-modal.is-visible {
    display: flex;
}

.eg-variation-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(16, 19, 38, 0.55);
}

.eg-variation-modal__dialog {
    position: relative;
    background: #ffffff;
    border-radius: 14px;
    width: min(520px, 100%);
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 24px 48px rgba(16, 19, 38, 0.18);
    display: flex;
    flex-direction: column;
}

.eg-variation-modal__close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    border: none;
    background: transparent;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: #5a6a64;
}

.eg-variation-modal__close:hover {
    color: #25352f;
}

.eg-variation-modal__header {
    padding: 1.5rem 1.5rem 1rem;
    border-bottom: 1px solid rgba(165, 204, 188, 0.35);
}

.eg-variation-modal__header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #101326;
}

.eg-variation-modal__subtitle {
    margin: 0.5rem 0 0;
    color: #4f625b;
    font-size: 0.95rem;
}

.eg-variation-modal__content {
    padding: 0 1.5rem 1.5rem;
    overflow-y: auto;
}

.eg-variation-modal__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(165, 204, 188, 0.2);
}

.eg-variation-modal__row:last-child {
    border-bottom: none;
}

.eg-variation-modal__info {
    flex: 1 1 auto;
    min-width: 0;
}

.eg-variation-modal__title {
    font-weight: 600;
    color: #101326;
    margin: 0;
    font-size: 1rem;
}

.eg-variation-modal__price {
    margin-top: 0.35rem;
    color: #5a6a64;
    font-size: 0.9rem;
}

.eg-variation-modal__actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
}

body.eg-variation-modal-open {
    overflow: hidden;
}

.eg-first-time-tooltip {
    position: absolute;
    top: 3.5rem;
    right: 0.5rem;
    z-index: 9999;
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: all 0.3s ease;
    max-width: 280px;
}

.eg-first-time-tooltip--cart {
    right: auto;
    left: 100%;
    margin-left: 6px;
}

.eg-first-time-tooltip--visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.eg-first-time-tooltip__content {
    background: rgba(76, 175, 80, 0.95);
    color: #ffffff;
    border-radius: 6px;
    padding: 0.75rem 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.eg-first-time-tooltip__content p {
    margin: 0 0 0.4rem 0;
    font-size: 0.75rem;
    line-height: 1.4;
    color: #ffffff;
    font-family: brandon-grotesque, sans-serif;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.eg-first-time-tooltip__content p:last-of-type {
    margin-bottom: 0.6rem;
}

.eg-first-time-tooltip__dismiss {
    padding: 4px 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-family: brandon-grotesque, sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.02em;
}

.eg-first-time-tooltip__dismiss:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.eg-save-banner {
    position: fixed;
    top: 20px;
    right: 20px;
    transform: translateY(-10px);
    opacity: 0;
    z-index: 9998;
    transition: all 0.3s ease;
    max-width: 360px;
}

.eg-save-banner--visible {
    transform: translateY(0);
    opacity: 1;
}

.eg-save-banner__content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(135, 206, 235, 0.95);
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.eg-save-banner__icon {
    font-size: 18px;
    flex-shrink: 0;
}

.eg-save-banner__text {
    flex: 1;
    font-size: 0.75rem;
    font-weight: 600;
    color: #ffffff;
    font-family: brandon-grotesque, sans-serif;
    line-height: 1.4;
    letter-spacing: 0.02em;
}

.eg-save-banner__cta {
    padding: 4px 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-family: brandon-grotesque, sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: 0.02em;
}

.eg-save-banner__cta:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.eg-save-banner__dismiss {
    padding: 0;
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.eg-save-banner__dismiss:hover {
    background: rgba(255, 255, 255, 0.3);
}

@media (max-width: 767px) {
    .single-product .woocommerce-product-gallery .eg-heart-single {
        top: 8px;
        right: 8px;
    }
}

@media (max-width: 600px) {
    .eg-first-time-tooltip {
        right: 0;
        left: 0;
        max-width: none;
        margin: 0 0.5rem;
    }

    .eg-save-banner {
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .eg-save-banner__content {
        padding: 0.65rem 0.85rem;
        gap: 0.6rem;
    }
}
