/*
 * Wishlist List frontend styles
 * Visual values are driven by Elementor/global CSS variables.
 * !important is used only where WordPress, WooCommerce or theme button rules
 * commonly override the component.
 */

:root {
    --wll-global-primary: var(--e-global-color-primary, #111111);
    --wll-global-secondary: var(--e-global-color-secondary, #ffffff);
    --wll-global-text: var(--e-global-color-text, #111111);
    --wll-global-accent: var(--e-global-color-accent, #111111);
    --wll-global-muted: #777777;
    --wll-global-line: #e9e9e9;
    --wll-global-soft: #f6f5f2;
}

.wll-toggle,
.wll-header-link,
.wll-empty__button,
.wll-card__cart,
.wll-card__remove {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

/* Product wishlist button */
button.wll-toggle,
[type="button"].wll-toggle,
.elementor button.wll-toggle,
.woocommerce button.wll-toggle,
.woocommerce-page button.wll-toggle {
    position: relative;
    z-index: 3;
    display: inline-flex !important;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: var(--wll-button-size, 44px) !important;
    height: var(--wll-button-size, 44px) !important;
    min-width: var(--wll-button-size, 44px) !important;
    min-height: var(--wll-button-size, 44px) !important;
    padding: 0 !important;
    margin: 0;
    color: var(--wll-button-color, var(--wll-global-text)) !important;
    background-color: var(--wll-button-bg, var(--wll-global-secondary)) !important;
    background-image: none !important;
    border: 0 !important;
    border-radius: var(--wll-button-radius, 50%) !important;
    box-shadow: 0 5px 20px rgb(0 0 0 / 8%);
    font-family: inherit;
    line-height: 1;
    cursor: pointer;
    outline: 0;
    overflow: hidden;
    appearance: none;
    -webkit-appearance: none;
    transform: none;
    transition: color .25s ease, background-color .25s ease, transform .25s ease, box-shadow .25s ease;
}

button.wll-toggle:hover,
button.wll-toggle:focus-visible,
[type="button"].wll-toggle:hover,
[type="button"].wll-toggle:focus-visible,
.elementor button.wll-toggle:hover,
.elementor button.wll-toggle:focus-visible,
.woocommerce button.wll-toggle:hover,
.woocommerce button.wll-toggle:focus-visible {
    color: var(--wll-button-hover-color, var(--wll-global-secondary)) !important;
    background-color: var(--wll-button-hover-bg, var(--wll-global-primary)) !important;
    background-image: none !important;
    border-color: transparent !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgb(0 0 0 / 16%);
}

button.wll-toggle.is-active,
[type="button"].wll-toggle.is-active,
.elementor button.wll-toggle.is-active,
.woocommerce button.wll-toggle.is-active {
    color: var(--wll-button-active-color, var(--wll-global-secondary)) !important;
    background-color: var(--wll-button-active-bg, var(--wll-global-accent)) !important;
    background-image: none !important;
    border-color: transparent !important;
}

button.wll-toggle:focus,
[type="button"].wll-toggle:focus,
.elementor button.wll-toggle:focus {
    outline: 0;
}

button.wll-toggle.has-text,
[type="button"].wll-toggle.has-text,
.elementor button.wll-toggle.has-text {
    width: auto !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: var(--wll-button-size, 44px) !important;
    padding-top: var(--wll-button-padding-top, 0) !important;
    padding-right: var(--wll-button-padding-right, 18px) !important;
    padding-bottom: var(--wll-button-padding-bottom, 0) !important;
    padding-left: var(--wll-button-padding-left, 18px) !important;
    gap: var(--wll-button-gap, 9px);
}

.wll-toggle__icons {
    position: relative;
    display: inline-flex;
    flex: 0 0 var(--wll-button-icon-size, 20px);
    width: var(--wll-button-icon-size, 20px);
    height: var(--wll-button-icon-size, 20px);
    color: inherit;
}

.wll-toggle__icon {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    color: inherit;
    overflow: visible;
    transition: opacity .2s ease, transform .2s ease;
}

.wll-toggle__icon--outline path {
    fill: none;
    stroke: currentColor;
}

.wll-toggle__icon--filled path {
    fill: currentColor;
    stroke: none;
}

.wll-toggle__icon--filled {
    opacity: 0;
    transform: scale(.75);
}

.wll-toggle.is-active .wll-toggle__icon--outline {
    opacity: 0;
    transform: scale(.75);
}

.wll-toggle.is-active .wll-toggle__icon--filled {
    opacity: 1;
    transform: scale(1);
}

.wll-toggle__text {
    color: inherit;
    font-family: inherit;
    white-space: nowrap;
}

.wll-toggle__loader {
    position: absolute;
    width: 18px;
    height: 18px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    opacity: 0;
    animation: wll-spin .65s linear infinite;
}

.wll-toggle.is-loading .wll-toggle__icons,
.wll-toggle.is-loading .wll-toggle__text {
    opacity: 0;
}

.wll-toggle.is-loading .wll-toggle__loader {
    opacity: 1;
}

@keyframes wll-spin {
    to { transform: rotate(360deg); }
}

/* Automatic placement on WooCommerce product cards */
.wll-auto-loop {
    position: absolute;
    top: 14px;
    z-index: 15;
    pointer-events: auto;
}

.wll-auto-loop.wll-position-top-left {
    right: auto;
    left: 14px;
}

.wll-auto-loop.wll-position-top-right {
    right: 14px;
    left: auto;
}

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product,
.woocommerce .products .product {
    position: relative;
}

button.wll-toggle--single,
[type="button"].wll-toggle--single {
    margin-inline-start: 12px;
    vertical-align: middle;
}

/* Header link */
.wll-header-link,
a.wll-header-link,
.elementor a.wll-header-link {
    position: relative;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: var(--wll-header-gap, 8px);
    padding: 0 !important;
    margin: 0;
    color: var(--wll-header-color, var(--wll-global-text)) !important;
    background: transparent !important;
    border: 0 !important;
    font-family: inherit;
    line-height: 1;
    text-decoration: none !important;
    transition: color .2s ease, opacity .2s ease;
}

.wll-header-link:hover,
a.wll-header-link:hover,
.elementor a.wll-header-link:hover {
    color: var(--wll-header-hover-color, var(--wll-global-primary)) !important;
    background: transparent !important;
}

.wll-header-link__icon-wrap {
    position: relative;
    display: inline-flex;
    color: inherit;
}

.wll-header-link__icon {
    display: block;
    width: var(--wll-header-icon-size, 24px);
    height: var(--wll-header-icon-size, 24px);
    color: inherit;
}

.wll-header-link__icon path {
    fill: none;
    stroke: currentColor;
}

.wll-header-link__count {
    position: absolute;
    top: -8px;
    inset-inline-end: -10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: var(--wll-count-size, 18px);
    height: var(--wll-count-size, 18px);
    padding: 0 4px;
    color: var(--wll-count-color, var(--wll-global-secondary)) !important;
    background-color: var(--wll-count-bg, var(--wll-global-accent)) !important;
    border: 2px solid var(--wll-count-border-color, var(--wll-global-secondary)) !important;
    border-radius: 999px;
    font-family: inherit;
    font-size: 10px;
    font-weight: 600;
    line-height: 1;
}

.wll-header-link__text {
    color: inherit;
    font-family: inherit;
    white-space: nowrap;
}

/* Wishlist page */
.wll-wishlist-page .entry-content,
.wll-wishlist-page .page-content,
.wll-wishlist-page .site-main,
.wll-wishlist-page main {
    overflow: visible;
}

.wll-page {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    color: var(--wll-global-text);
    direction: rtl;
    box-sizing: border-box;
    font-family: var(--e-global-typography-text-font-family, inherit);
}

.wll-page *,
.wll-page *::before,
.wll-page *::after {
    box-sizing: border-box;
}

.wll-grid {
    display: grid;
    grid-template-columns: repeat(var(--wll-cols-desktop, 4), minmax(0, 1fr));
    gap: 32px 24px;
    width: 100%;
    margin: 0;
    padding: 0;
}

.wll-card {
    position: relative;
    display: block;
    min-width: 0;
    margin: 0;
    padding: 0;
    color: var(--wll-global-text);
    background: transparent;
    border: 0;
    box-shadow: none;
    transition: opacity .2s ease, transform .2s ease;
}

.wll-card.is-removing {
    opacity: .45;
    pointer-events: none;
    transform: scale(.98);
}

.wll-card__media {
    position: relative;
    display: block;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 1 / 1.08;
    margin: 0;
    padding: 0;
    background: var(--wll-global-soft);
    border: 0;
    border-radius: 8px;
}

.wll-card__image {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    background: transparent;
}

.wll-card__image img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    margin: 0;
    padding: 0;
    object-fit: cover;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    transition: transform .55s cubic-bezier(.2, .7, .2, 1);
}

.wll-card:hover .wll-card__image img {
    transform: scale(1.035);
}

.wll-card__sale {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    min-height: 27px;
    padding: 4px 10px;
    color: var(--wll-global-secondary);
    background: var(--wll-global-accent);
    border: 0;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
}

button.wll-card__remove,
[type="button"].wll-card__remove,
.elementor button.wll-card__remove,
.woocommerce button.wll-card__remove {
    position: absolute;
    top: 14px;
    right: auto;
    left: 14px;
    z-index: 3;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    padding: 0 !important;
    margin: 0;
    color: var(--wll-global-text) !important;
    background-color: var(--wll-global-secondary) !important;
    background-image: none !important;
    border: 0 !important;
    border-radius: 50% !important;
    box-shadow: 0 5px 18px rgb(0 0 0 / 8%);
    line-height: 1;
    cursor: pointer;
    outline: 0;
    appearance: none;
    -webkit-appearance: none;
    transition: color .2s ease, background-color .2s ease, transform .2s ease;
}

button.wll-card__remove:hover,
[type="button"].wll-card__remove:hover,
.elementor button.wll-card__remove:hover,
.woocommerce button.wll-card__remove:hover {
    color: var(--wll-global-secondary) !important;
    background-color: var(--wll-global-primary) !important;
    transform: rotate(90deg);
}

.wll-card__remove-icon {
    display: block;
    width: 18px;
    height: 18px;
    color: inherit;
}

.wll-card__remove-icon path {
    fill: none;
    stroke: currentColor;
}

.wll-card__body {
    display: block;
    padding: 15px 2px 0;
    margin: 0;
    text-align: right;
}

.wll-card__rating {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 18px;
    margin: 0 0 8px;
    padding: 0;
}

.wll-card__rating .star-rating {
    float: none;
    width: 5.4em;
    margin: 0;
    color: #f3a63b;
    font-size: 12px;
}

.wll-card__review-count {
    color: var(--wll-global-muted);
    font-size: 12px;
}

.wll-card__title {
    margin: 0 0 8px;
    padding: 0;
    color: var(--wll-global-text);
    font-family: var(--e-global-typography-primary-font-family, inherit);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.7;
}

.wll-card__title a,
.elementor .wll-card__title a {
    color: inherit !important;
    background: transparent;
    text-decoration: none !important;
}

.wll-card__title a:hover {
    color: var(--wll-global-primary) !important;
}

.wll-card__price {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 28px;
    margin: 0 0 7px;
    padding: 0;
    color: var(--wll-global-text);
    font-size: 15px;
    font-weight: 500;
}

.wll-card__price del {
    color: var(--wll-global-muted);
    opacity: 1;
    font-weight: 400;
}

.wll-card__price ins {
    color: var(--wll-global-text);
    background: transparent;
    text-decoration: none;
    font-weight: 600;
}

.wll-card__stock {
    margin: 0 0 14px;
    padding: 0;
    color: #2e8b57;
    font-size: 12px;
}

.wll-card__stock.is-out-of-stock {
    color: #b42318;
}

.wll-card__cart,
a.wll-card__cart,
a.wll-card__cart.button,
.elementor a.wll-card__cart,
.woocommerce a.wll-card__cart.button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100% !important;
    min-height: 45px;
    padding: 10px 18px !important;
    margin: 0;
    color: var(--wll-global-secondary) !important;
    background-color: var(--wll-global-primary) !important;
    background-image: none !important;
    border: 1px solid var(--wll-global-primary) !important;
    border-radius: 4px;
    box-shadow: none;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
    text-decoration: none !important;
    transition: color .25s ease, background-color .25s ease;
}

.wll-card__cart:hover,
a.wll-card__cart:hover,
a.wll-card__cart.button:hover,
.elementor a.wll-card__cart:hover,
.woocommerce a.wll-card__cart.button:hover {
    color: var(--wll-global-primary) !important;
    background-color: transparent !important;
    border-color: var(--wll-global-primary) !important;
}

.wll-card__cart-icon {
    width: 18px;
    height: 18px;
    color: inherit;
}

.wll-card__cart-icon path {
    fill: none;
    stroke: currentColor;
}

.wll-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 310px;
    padding: 50px 20px;
    margin: 0;
    text-align: center;
}

.wll-empty__icon {
    display: flex;
    margin: 0 0 20px;
    color: var(--wll-global-primary);
}

.wll-empty__svg {
    display: block;
    width: 58px;
    height: 58px;
    color: inherit;
}

.wll-empty__svg path {
    fill: none;
    stroke: currentColor;
}

.wll-empty__title {
    margin: 0 0 22px;
    padding: 0;
    color: var(--wll-global-text);
    font-family: var(--e-global-typography-primary-font-family, inherit);
    font-size: 18px;
    font-weight: 500;
    line-height: 1.8;
}

.wll-empty__button,
a.wll-empty__button,
.elementor a.wll-empty__button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 25px !important;
    margin: 0;
    color: var(--wll-global-secondary) !important;
    background-color: var(--wll-global-primary) !important;
    background-image: none !important;
    border: 1px solid var(--wll-global-primary) !important;
    border-radius: 4px;
    font-family: inherit;
    text-decoration: none !important;
    transition: color .2s ease, background-color .2s ease;
}

.wll-empty__button:hover,
a.wll-empty__button:hover,
.elementor a.wll-empty__button:hover {
    color: var(--wll-global-primary) !important;
    background-color: transparent !important;
}

/* Notification */
.wll-toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 999999;
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: min(430px, calc(100vw - 32px));
    padding: 14px 17px;
    color: var(--wll-global-secondary);
    background: var(--wll-global-primary);
    border: 0;
    border-radius: 6px;
    box-shadow: 0 12px 35px rgb(0 0 0 / 20%);
    font-family: var(--e-global-typography-text-font-family, inherit);
    font-size: 13px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(18px);
    transition: opacity .25s ease, visibility .25s ease, transform .25s ease;
}

.wll-toast.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.wll-toast__link {
    color: inherit !important;
    text-decoration: underline !important;
    white-space: nowrap;
}

@media (max-width: 1024px) {
    .wll-grid {
        grid-template-columns: repeat(var(--wll-cols-tablet, 2), minmax(0, 1fr));
        gap: 26px 18px;
    }
}

@media (max-width: 767px) {
    .wll-grid {
        grid-template-columns: repeat(var(--wll-cols-mobile, 1), minmax(0, 1fr));
        gap: 24px 14px;
    }

    .wll-card__media {
        aspect-ratio: 1 / 1.02;
    }

    .wll-toast {
        right: 16px;
        bottom: 16px;
    }

    button.wll-toggle--single,
    [type="button"].wll-toggle--single {
        width: 100% !important;
        margin: 12px 0 0;
    }
}
