// Modern Responsive Wishlist Styles
// Modern Responsive Wishlist Styles
.wcps-wishlist-products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    padding: 20px 0;
    max-width: 1200px;
    margin: 0 auto;
    justify-content: start;

    @media (max-width: 768px) {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 16px;
        padding: 16px 0;
    }

    @media (max-width: 600px) {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    @media (max-width: 480px) {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    @media (max-width: 380px) {
        grid-template-columns: 1fr;
    }
}

.wcps-wishlist-product {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    width: 100%;
    max-width: 280px;
    justify-self: start;

    &:hover {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        transform: translateY(-1px);
    }

    @media (max-width: 768px) {
        border-radius: 10px;
        max-width: 100%;
        justify-self: stretch;
    }
}

.wcps-wishlist-product-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
    background: #f8f9fa;

    a {
        display: block;
        width: 100%;
        height: 100%;

        img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.3s ease;
        }
    }

    &:hover img {
        transform: scale(1.03);
    }

    .wcps-wishlist-remove-item {
        position: absolute;
        top: 8px;
        right: 8px;
        width: 28px;
        height: 28px;
        background: rgba(0, 0, 0, 0.7);
        border: none;
        border-radius: 6px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
        z-index: 2;
        opacity: 0;

        .wcps-wishlist-product:hover & {
            opacity: 1;
        }

        &:hover {
            background: #dc3545;
            transform: scale(1.05);
        }

        .wcps-icon {
            font-size: 12px;
            line-height: 1;
            color: white;
        }

        @media (max-width: 768px) {
            opacity: 1;
            background: rgba(0, 0, 0, 0.6);
            width: 26px;
            height: 26px;
            top: 6px;
            right: 6px;

            .wcps-icon {
                font-size: 11px;
            }
        }
    }
}

.wcps-wishlist-product-content {
    padding: 16px;

    @media (max-width: 768px) {
        padding: 14px;
    }

    @media (max-width: 480px) {
        padding: 12px;
    }
}

.wcps-wishlist-product-title {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;

    a {
        color: #2d3748;
        text-decoration: none;
        transition: color 0.3s ease;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;

        &:hover {
            color: #3182ce;
        }
    }

    @media (max-width: 768px) {
        font-size: 15px;
        margin-bottom: 8px;
    }

    @media (max-width: 480px) {
        font-size: 14px;
    }
}

.wcps-wishlist-product-price {
    margin-bottom: 12px;
    font-size: 17px;
    font-weight: 700;
    color: #2d3748;

    .woocommerce-Price-amount {
        color: #3182ce;
    }

    del {
        color: #a0aec0;
        font-weight: 400;
        font-size: 14px;
        margin-right: 6px;
    }

    ins {
        text-decoration: none;
        color: #e53e3e;
    }

    @media (max-width: 768px) {
        font-size: 16px;
        margin-bottom: 10px;

        del {
            font-size: 13px;
        }
    }

    @media (max-width: 480px) {
        font-size: 15px;
        margin-bottom: 8px;
    }
}

.wcps-wishlist-product-stock {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 16px;
    font-size: 13px;
    font-weight: 500;

    &.in-stock {
        color: #38a169;
    }

    &.out-of-stock {
        color: #e53e3e;
    }

    .wcps-stock-icon {
        width: 6px;
        height: 6px;
        border-radius: 50%;
        display: inline-block;

        .in-stock & {
            background: #38a169;
        }

        .out-of-stock & {
            background: #e53e3e;
        }
    }

    @media (max-width: 768px) {
        margin-bottom: 14px;
        font-size: 12px;
    }

    @media (max-width: 480px) {
        margin-bottom: 12px;
    }
}

.wcps-wishlist-product-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;

    .wcps-wishlist-add-to-cart,
    .added_to_cart {
        padding: 10px 16px;
        border: none;
        border-radius: 6px;
        font-size: 13px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        text-decoration: none;
        min-height: 38px;

        &:focus {
            outline: none;
            box-shadow: 0 0 0 2px rgba(49, 130, 206, 0.3);
        }
    }

    .wcps-wishlist-add-to-cart {
        background: #3182ce;
        color: white;

        &:hover {
            background: #2c5aa0;
            transform: translateY(-1px);
        }

        &.added {
            background: #38a169;
            color: white;

            &:hover {
                background: #2f855a;
            }
        }
    }

    .added_to_cart {
        background: #e2e8f0;
        color: #4a5568;

        &:hover {
            background: #cbd5e0;
            color: #2d3748;
        }
    }

    .wcps-wishlist-remove-item {
        padding: 6px 12px;
        background: transparent;
        border: 1px solid #e2e8f0;
        border-radius: 4px;
        color: #718096;
        font-size: 12px;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
        min-height: 32px;

        &:hover {
            background: #fed7d7;
            border-color: #fc8181;
            color: #e53e3e;
        }

        &:focus {
            outline: none;
            box-shadow: 0 0 0 2px rgba(229, 62, 62, 0.3);
        }
    }

    @media (max-width: 768px) {
        gap: 8px;

        .wcps-wishlist-add-to-cart,
        .added_to_cart {
            padding: 8px 14px;
            font-size: 12px;
            min-height: 36px;
        }

        .wcps-wishlist-remove-item {
            padding: 5px 10px;
            font-size: 11px;
            min-height: 30px;
        }
    }

    @media (max-width: 480px) {
        gap: 6px;

        .wcps-wishlist-add-to-cart,
        .added_to_cart {
            padding: 7px 12px;
            min-height: 34px;
        }

        .wcps-wishlist-remove-item {
            padding: 4px 8px;
            min-height: 28px;
        }
    }
}

// Empty wishlist state
.wcps-wishlist-empty {
    text-align: center;
    padding: 60px 20px;
    color: #718096;

    .wcps-wishlist-empty-icon {
        margin-bottom: 24px;

        .wcps-icon {
            font-size: 64px;
            color: #e2e8f0;
        }
    }

    h3 {
        margin: 0 0 16px 0;
        font-size: 24px;
        font-weight: 600;
        color: #4a5568;
    }

    p {
        margin: 0;
        font-size: 16px;
        color: #718096;
    }

    @media (max-width: 768px) {
        padding: 40px 20px;

        .wcps-wishlist-empty-icon .wcps-icon {
            font-size: 48px;
        }

        h3 {
            font-size: 20px;
            margin-bottom: 12px;
        }

        p {
            font-size: 14px;
        }
    }

    @media (max-width: 480px) {
        padding: 30px 16px;

        .wcps-wishlist-empty-icon .wcps-icon {
            font-size: 40px;
        }

        h3 {
            font-size: 18px;
        }

        p {
            font-size: 13px;
        }
    }
}

// Additional responsive grid adjustments
@media (min-width: 1400px) {
    .wcps-wishlist-products {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 24px;

        .wcps-wishlist-product {
            max-width: 300px;
        }
    }
}

@media (min-width: 1200px) and (max-width: 1399px) {
    .wcps-wishlist-products {
        grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
        gap: 22px;

        .wcps-wishlist-product {
            max-width: 290px;
        }
    }
}

@media (min-width: 900px) and (max-width: 1199px) {
    .wcps-wishlist-products {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (min-width: 601px) and (max-width: 899px) {
    .wcps-wishlist-products {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }
}

// Animation for dynamic content
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wcps-wishlist-product {
    animation: fadeInUp 0.4s ease-out;
}

// Focus states for accessibility
.wcps-wishlist-product:focus-within {
    box-shadow: 0 0 0 2px rgba(49, 130, 206, 0.3);
}

// Screen reader only content
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

// Notification styles
.wcps-notification-cart {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 350px;
    min-width: 280px;
    z-index: 9999;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 4px solid #e2e8f0;

    &.show {
        transform: translateX(0);
        opacity: 1;
    }

    &.wcps-notification-cart-success {
        border-left-color: #38a169;

        &::before {
            content: "✓";
            display: flex;
            align-items: center;
            justify-content: center;
            width: 20px;
            height: 20px;
            background: #38a169;
            color: white;
            border-radius: 50%;
            font-size: 12px;
            font-weight: bold;
            flex-shrink: 0;
        }
    }

    &.wcps-notification-cart-error {
        border-left-color: #e53e3e;

        &::before {
            content: "!";
            display: flex;
            align-items: center;
            justify-content: center;
            width: 20px;
            height: 20px;
            background: #e53e3e;
            color: white;
            border-radius: 50%;
            font-size: 12px;
            font-weight: bold;
            flex-shrink: 0;
        }
    }

    &.wcps-notification-cart-info {
        border-left-color: #3182ce;

        &::before {
            content: "i";
            display: flex;
            align-items: center;
            justify-content: center;
            width: 20px;
            height: 20px;
            background: #3182ce;
            color: white;
            border-radius: 50%;
            font-size: 12px;
            font-weight: bold;
            flex-shrink: 0;
        }
    }

    @media (max-width: 768px) {
        bottom: 16px;
        right: 16px;
        left: 16px;
        max-width: none;
        min-width: auto;
        padding: 14px 16px;
        gap: 10px;

        &::before {
            width: 18px;
            height: 18px;
            font-size: 11px;
        }
    }

    @media (max-width: 480px) {
        bottom: 12px;
        right: 12px;
        left: 12px;
        padding: 12px 14px;
        border-radius: 6px;
    }
}

.wcps-notification-cart-message {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: #2d3748;
    line-height: 1.4;
    margin: 0;

    @media (max-width: 768px) {
        font-size: 13px;
    }

    @media (max-width: 480px) {
        font-size: 12px;
    }
}

.wcps-notification-cart-close {
    background: transparent;
    border: none;
    color: #718096;
    font-size: 18px;
    font-weight: bold;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
    flex-shrink: 0;
    line-height: 1;

    &:hover {
        background: #f7fafc;
        color: #2d3748;
    }

    &:focus {
        outline: none;
        box-shadow: 0 0 0 2px rgba(49, 130, 206, 0.3);
    }

    @media (max-width: 768px) {
        width: 22px;
        height: 22px;
        font-size: 16px;
    }

    @media (max-width: 480px) {
        width: 20px;
        height: 20px;
        font-size: 14px;
    }
}

// Notification animation
@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.wcps-notification-cart.show {
    animation: slideInRight 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.wcps-notification-cart.hide {
    animation: slideOutRight 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.wcps-icon-close::before {
    content: "×";
}