/**
 * Wishlist Modal Styles for Furni Theme
 * Additional styles for wishlist modals
 *
 * @author    PrestaShop SA and Contributors <contact@prestashop.com>
 * @copyright Since 2007 PrestaShop SA and Contributors
 * @license   https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
 */

/* Wishlist modal message content */
.frn-cart__message {
    padding: 1rem 0;
    font-size: var(--fz-14);
    line-height: 1.5;
    color: var(--cText, #333);
}

.frn-page-header {
    display:flex;
    flex-wrap:wrap;
    justify-content:space-between;
    align-items:center;
    gap:8px;
    margin-bottom:8px;
}

/* Logged-in header: .account-content__title (custom.css) draws the type and the
   underline; the heading inherits it so it matches the other account pages. */
.wishlist-account-title {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.wishlist-account-title__heading {
    margin: 0;
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
}

/* The ~41px button is taller than the title line; without the pull-in it would
   push the underline below where the other account pages draw it. */
.wishlist-account-title .wishlist-clear-all-btn {
    margin-block: -8px;
}

.wishlist-guest-info {
    background: #D3F0E6;
    padding: 13px 13px;
    margin: 15px 0 15px 0;
    display: flex;
    align-items: center;
    font-size: var(--fz-14);
    color: #1a1b1a;
}

/* Info message variant */
.frn-message--info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background-color: #e3f2fd;
    border-radius: 4px;
    color: #1976d2;
    font-weight: 500;
}

.frn-message--info img {
    width: 24px;
    height: 24px;
}

/* Ensure wishlist modals start hidden */
#wishlistSuccessModal,
#wishlistLoginModal {
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    min-height: auto !important;
}

/* Active state */
#wishlistSuccessModal.frn-modal__content--active,
#wishlistLoginModal.frn-modal__content--active {
    visibility: visible;
    opacity: 1;
}

/* Increase content padding for better spacing */
#wishlistSuccessModal .frn-cart__content,
#wishlistLoginModal .frn-cart__content {
    padding: 1.5rem 1rem;
    min-height: 100px;
}

/* Add more spacing to message */
#wishlistSuccessModal .frn-cart__message,
#wishlistLoginModal .frn-cart__message {
    padding: 0.75rem 0;
    font-size: var(--fz-14);
    line-height: 1.6;
}

/* Add spacing to action buttons container */
#wishlistSuccessModal .frn-cart__actions,
#wishlistLoginModal .frn-cart__actions {
    padding: 1rem 0;
    margin-top: 0.5rem;
}

/* Modal overlay for wishlist */
#wishlistModalOverlay {
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#wishlistModalOverlay.frn-modal__content-overlay--active {
    visibility: visible;
    opacity: 1;
}

/* Wishlist icon state styles */
.frn-product-item__add-to-favorite img {
    transition: opacity 0.2s ease;
}

.frn-product-item__add-to-favorite:hover img {
    opacity: 0.7;
}

.frn-product-item__add-to-favorite--in-wishlist img {
    opacity: 1;
}

.frn-product-item__add-to-favorite--in-wishlist:hover img {
    opacity: 0.8;
}

/* ===================================
   Wishlist Page Styles (Refined)
   =================================== */

/* Container and Header */
.wishlist-products-container-header {
    margin-bottom: 2.5rem;
    padding: 0 1rem;
}

.wishlist-products-container-header h1 {
    font-size: var(--fz-h1); /* Figma 32/28/24 -> 28/24/22 (was 36px) */
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.wishlist-products-count {
    color: #FF6B35 !important;
}

.material-icons {
    font-weight: normal;
    font-style: normal;
    font-size: var(--fz-24);
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: 'liga';
}

/* Transform UL to Grid Layout - Matching frn-product-item-list */
.wishlist-products-list {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2.5rem;
    padding: 1rem !important;
    margin: 0 !important;
    list-style: none;
}

.wishlist-products-item {
    margin: 0 !important;
    width: 100%;
}

/* Transform wishlist-product to frn-product-item style */
.wishlist-product {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid #f0f0f0;
}

.wishlist-product:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    border-color: #e0e0e0;
}

/* Product Image Container */
.wishlist-product-image {
    width: 100%;
    height: 320px;
    position: relative;
    overflow: hidden;
    background: #fbfbfb;
}

.wishlist-product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1.5rem;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    max-width: 100% !important;
    max-height: 100% !important;
}

.wishlist-product:hover .wishlist-product-image img {
    transform: translate(-50%, -50%) scale(1.08) !important;
}

/* Product Info Container */
.wishlist-product-right {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Link area covering image and info */
.wishlist-product-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Product Title */
.wishlist-product-title {
    font-size: var(--fz-tile-title); /* 18/16/16, matches catalog tiles */
    font-weight: 600;
    color: #2d2d2d;
    margin: 0 0 0.75rem 0 !important;
    line-height: 1.4;
    min-height: 3.1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Product Price */
.wishlist-product-price {
    font-size: var(--fz-price) !important; /* 22/20/20, matches catalog tiles (was fixed 22) */
    font-weight: 700;
    color: #1a1a1a !important;
    margin: 0 !important;
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    line-height: 1.2 !important;
}

.wishlist-product-price-promo {
    font-size: 1rem;
    color: #b0b0b0 !important;
    text-decoration: line-through;
    font-weight: 500;
    display: inline-block;
}

/* Details/Attributes */
.wishlist-product-combinations {
    margin: 1.25rem 0;
    font-size: 0.875rem;
    color: #6c6c6c;
    flex: 1;
    border-top: 1px solid #f5f5f5;
    padding-top: 1.25rem;
}

.wishlist-product-combinations-text {
    margin: 0;
    line-height: 1.6;
    min-height: auto !important;
    font-style: normal;
}

/* Hide clutter in combinations */
.wishlist-product-combinations a {
    display: none !important;
}

/* Product Actions Bottom */
.wishlist-product-bottom {
    display: flex;
    gap: 0.75rem;
    padding: 0 1.5rem 1.5rem 1.5rem;
    align-items: center;
}

/* Add to Cart Button Style */
.wishlist-product-addtocart {
    flex: 1;
    background: #007bff !important;
    color: #fff !important;
    border: none;
    padding: 1rem 1.5rem !important;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    text-transform: none !important;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
}

.wishlist-product-addtocart:hover {
    background: #0056b3 !important;
    box-shadow: 0 6px 16px rgba(0, 123, 255, 0.3);
    transform: translateY(-2px);
}

.wishlist-product-addtocart:active {
    transform: translateY(0);
}

/* Replace shopping_cart text with icon if font fails */
.wishlist-product-addtocart i {
    font-size: 1.5rem;
}

.wishlist-product-addtocart i.material-icons {
    color: transparent;
    position: relative;
    width: 24px;
}

.wishlist-product-addtocart i.material-icons::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    background-image: url('../img/icons/cart-plus.svg');
    background-size: contain;
    background-repeat: no-repeat;
    filter: invert(1);
    display: block;
}

/* Action: Favorite/Remove button - circle on top of image */
.wishlist-button-add {
    position: absolute !important;
    top: 1.25rem !important;
    right: 1.25rem !important;
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    background: #fff !important;
    border: none !important;
    border-radius: 50% !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 10;
    padding: 0 !important;
}

.wishlist-button-add:hover {
    background: #ff4757 !important;
    transform: scale(1.1) rotate(5deg);
}

.wishlist-button-add i {
    color: transparent !important;
    position: relative !important;
    width: 24px;
    height: 24px;
    font-size: 0 !important;
}

.wishlist-button-add i::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    background-image: url('../img/icons/trash-can.svg');
    background-size: contain;
    background-repeat: no-repeat;
    filter: brightness(0) saturate(100%) invert(53%) sepia(3%) grayscale(1) opacity(0.6);
    transition: filter 0.3s ease;
}

.wishlist-button-add:hover i::after {
    filter: invert(1) brightness(100%);
}

/* Availability Badge Style */
.wishlist-product-availability {
    position: absolute;
    top: 1.25rem;
    left: 1.25rem;
    background: #ffffff;
    padding: 0.5rem 1.25rem;
    border-radius: 30px;
    font-size: 0.8125rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 0 !important;
    min-width: auto !important;
    z-index: 5;
    color: #2ecc71;
    border: 1px solid #f0f0f0;
}

.wishlist-product-availability i {
    font-size: 1.125rem;
    color: #2ecc71;
}

.wishlist-product-availability-responsive {
    display: none !important;
}

/* Empty View State */
.wishlist-list-empty {
    text-align: center;
    grid-column: 1 / -1;
    padding: 6rem 2rem !important;
    font-size: 1.5rem !important;
    color: #8c8c8c;
    font-weight: 600 !important;
    background: #fdfdfd;
    border-radius: 16px;
    border: 2px dashed #e5e5e5;
    margin: 2rem 0;
}

/* Responsive Handling */
@media (max-width: 1200px) {
    .wishlist-products-list {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 2rem;
    }
}

@media (max-width: 991px) {
    .wishlist-products-list {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }

    .wishlist-product-image {
        height: 260px;
    }
}

@media (max-width: 767px) {
    .wishlist-products-list {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .wishlist-product {
        flex-direction: row;
        height: auto;
        min-height: 180px;
    }

    .wishlist-product-image {
        width: 160px;
        min-width: 160px;
        height: auto;
    }

    .wishlist-product-right {
        padding: 1rem 1.25rem;
    }

    .wishlist-product-bottom {
        padding: 0 1.25rem 1rem 0;
        margin-left: auto;
    }

    .wishlist-product-addtocart {
        padding: 0.75rem 1rem !important;
        font-size: 0.875rem;
    }

    .wishlist-product-combinations {
        display: none;
    }
}

@media (max-width: 480px) {
    .wishlist-product {
        flex-direction: column;
    }

    .wishlist-product-image {
        width: 100%;
        height: 240px;
    }

    .wishlist-product-bottom {
        width: 100%;
        padding: 0 1rem 1rem 1rem;
        margin: 0;
    }
}

/* ===================================
   Wishlist Page Header with Clear All
   =================================== */

.wishlist-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 1rem 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.wishlist-page-header__title h1 {
    font-family: 'Outfit', 'Roboto', sans-serif;
    font-size: var(--fz-h1); /* Figma 32/28/24 -> 28/24/22 (was 32px) */
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.wishlist-clear-all-btn {
    border: 1px solid #1a1b1a !important;
    background: #fff !important;
    color: #1a1b1a !important;
    padding: 9px 13px !important;
    font-size: var(--fz-14) !important;
    border-radius: 100px !important;
    transition: all 0.2s ease !important;
}

.wishlist-clear-all-btn:hover {
    border-color: #1a1b1a !important;
    color: #fff !important;
    background: #1a1b1a !important;
}

/* ===================================
   Empty Wishlist State
   =================================== */

.wishlist-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
    min-height: 400px;
}

.wishlist-empty-state__illustration {
    margin-bottom: 2rem;
}

.wishlist-empty-state__illustration img {
    max-width: 100%;
    height: auto;
    max-height: 300px;
}

.wishlist-empty-state__actions {
    margin-top: 1rem;
}

.wishlist-empty-state__actions .frn-button {
    padding: 1rem 2.5rem !important;
    font-size: 1rem !important;
    border-radius: 50px !important;
}

/* ===================================
   Recently Viewed Products Section
   =================================== */

.wishlist-recently-viewed {
    padding: 2rem 0;
    margin-top: 2rem;
}

.frn-recently-viewed__header {
    margin-bottom: 1.5rem;
}

.frn-recently-viewed__header h2 {
    font-size: var(--fz-h2); /* "Neseniai žiūrėtos prekės" is a Figma 32 section heading */
}

.wishlist-newsletter-section .frn-discount {
    max-width: 100%;
    margin: 0 auto;
}

/* ===================================
   Wishlist Footer Navigation Links
   =================================== */

.wishlist-footer-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 1.5rem 1rem;
    border-top: 1px solid #f0f0f0;
    margin-top: 1rem;
}

.wishlist-footer-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #555;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.wishlist-footer-link:hover {
    color: #FF6B35;
}

.wishlist-footer-link svg {
    flex-shrink: 0;
}

@media (max-width: 767px) {
    .wishlist-page-header {
        padding: 1rem;
    }

    .wishlist-page-header__title h1 {
        font-size: var(--fz-h1); /* token is responsive; 22 on mobile */
    }

    .wishlist-footer-links {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .wishlist-empty-state {
        padding: 2rem 1rem;
        min-height: 300px;
    }

    .wishlist-empty-state__illustration img {
        max-height: 200px;
    }
}

/* ===================================
   Toast Notifications
   =================================== */

/* Not .wishlist-toast: blockwishlist's own Vue Toast injects a later
   `.wishlist-toast { opacity: 0; top: … }` that would hide and stretch this one. */
.frn-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: #fff;
    padding: 14px 24px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    z-index: 10000;
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
        opacity 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
}

.frn-toast--visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.frn-toast--success {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
}

.frn-toast--success svg {
    color: #ff6b6b;
}

.frn-toast--error {
    background: var(--cError);
}

.frn-toast svg {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

@media (max-width: 575px) {
    .frn-toast {
        left: 16px;
        right: 16px;
        transform: translateX(0) translateY(100px);
        text-align: center;
        justify-content: center;
    }

    .frn-toast--visible {
        transform: translateX(0) translateY(0);
    }
}

/* ===================================
   Heart Pulse Animation
   =================================== */

@keyframes heartPulse {
    0% {
        transform: scale(1);
    }

    15% {
        transform: scale(1.25);
    }

    30% {
        transform: scale(0.95);
    }

    45% {
        transform: scale(1.15);
    }

    60% {
        transform: scale(1);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes heartGlow {
    0% {
        filter: drop-shadow(0 0 0 rgba(255, 107, 107, 0));
    }

    50% {
        filter: drop-shadow(0 0 12px rgba(255, 107, 107, 0.7));
    }

    100% {
        filter: drop-shadow(0 0 0 rgba(255, 107, 107, 0));
    }
}

.frn-product-item__add-to-favorite--animating {
    animation: heartPulse 0.6s ease-in-out;
}

.frn-product-item__add-to-favorite--animating img {
    animation: heartGlow 0.6s ease-in-out;
}

/* ===================================
   Touch & Mobile Optimizations
   =================================== */

/* Remove 300ms tap delay */
.frn-product-item__add-to-favorite {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    cursor: pointer;
}

/* Prevent double-tap zoom */
.frn-product-item__add-to-favorite:active {
    transform: scale(0.95);
    transition: transform 0.1s ease;
}

/* Loading state */
.frn-product-item__add-to-favorite[disabled] {
    pointer-events: none;
    opacity: 0.6;
}

/* ===================================
   Enhanced Wishlist Button States
   =================================== */

.frn-product-item__add-to-favorite {
    position: relative;
    overflow: visible;
    transition: border-color 0.3s ease;
}

/* Ripple effect container */
.frn-product-item__add-to-favorite::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    /* Cover the 1px border too, so the tint fills the whole bubble. */
    width: calc(100% + 2px);
    height: calc(100% + 2px);
    background: rgba(229, 57, 53, 0.15);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    pointer-events: none;
}

.frn-product-item__add-to-favorite:hover {
    border-color: transparent;
}

.frn-product-item__add-to-favorite:hover::before {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* Wishlist Page 4-Column Grid Layout */
@media (min-width: 992px) {
    .frn-wishlist-search-list .frn-product-item-list {
        margin-left: -10px !important;
        margin-right: -10px !important;
    }
    .frn-wishlist-search-list .frn-product-item-list__item {
        width: 25% !important;
        padding-left: 10px !important;
        padding-right: 10px !important;
        margin-top: var(--spaceTopM) !important;
    }
    .frn-wishlist-search-list .frn-product-item-list__item:nth-child(-n+4) {
        margin-top: 0 !important;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .frn-wishlist-search-list .frn-product-item-list {
        margin-left: -10px !important;
        margin-right: -10px !important;
    }
    .frn-wishlist-search-list .frn-product-item-list__item {
        width: 33.333% !important;
        padding-left: 10px !important;
        padding-right: 10px !important;
        margin-top: var(--spaceTopM) !important;
    }
    .frn-wishlist-search-list .frn-product-item-list__item:nth-child(-n+3) {
        margin-top: 0 !important;
    }
}

@media (max-width: 767.98px) {
    .frn-wishlist-search-list .frn-product-item-list {
        margin-left: -5px !important;
        margin-right: -5px !important;
    }
    .frn-wishlist-search-list .frn-product-item-list__item {
        width: 50% !important;
        padding-left: 5px !important;
        padding-right: 5px !important;
        margin-top: var(--spaceTopM) !important;
    }
    .frn-wishlist-search-list .frn-product-item-list__item:nth-child(-n+2) {
        margin-top: 0 !important;
    }
}