/**
====================================================================
  Wishlist Styles - Custom Own Shop Pro Addons Wishlist
====================================================================
*/

/* Modern Wishlist Page Styles */
.ospa-wishlist-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.wishlist-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.wishlist-title {
    color: #333;
    font-size: 2.5em;
    font-weight: 700;
    margin: 0 0 10px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.wishlist-count {
    color: #888;
    font-size: 1.2em;
    font-weight: 400;
}

/* Table Container and Table Styles */
.wishlist-table-container {
    background: #fff;
    border: 1px solid #e1e8ed;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 30px;
}

.wishlist-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    line-height: 1.4;
}

/* Table Header */
.wishlist-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.wishlist-table thead th {
    padding: 20px 15px;
    text-align: left;
    font-weight: 600;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
}

.wishlist-table thead th:first-child {
    border-top-left-radius: 12px;
}

.wishlist-table thead th:last-child {
    border-top-right-radius: 12px;
}

/* Table Body */
.wishlist-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s ease;
}

.wishlist-table tbody tr:hover {
    background: #fafbfc;
}

.wishlist-table tbody tr:last-child {
    border-bottom: none;
}

.wishlist-table tbody td {
    padding: 20px 15px;
    vertical-align: top;
    border: none;
}

/* Product Image Cell */
.product-image-cell {
    width: 120px;
    text-align: center;
}

.wishlist-product-image {
    max-width: 80px;
    height: auto;
    border-radius: 8px;
}

/* Product Info Cell */
.product-info-cell {
    min-width: 250px;
}

.product-info-content {
    margin-left: 15px;
}

.product-title {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
}

.product-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.product-title a:hover {
    color: #667eea;
}

.product-rating {
    margin-bottom: 6px;
}

.star-rating {
    font-size: 14px;
}

.product-excerpt {
    color: #666;
    font-size: 13px;
    margin-bottom: 6px;
    line-height: 1.4;
}

.product-category {
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-category a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

/* Price Cell */
.product-price-cell {
    width: 120px;
    text-align: center;
}

.product-price {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
}

.product-price del {
    font-size: 14px;
    color: #999;
    margin-right: 8px;
}

.product-price ins {
    text-decoration: none;
}

/* Stock Status Cell */
.product-stock-cell {
    width: 140px;
    text-align: center;
}

.stock-status {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stock-status.in-stock {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.stock-status.out-of-stock {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Remove Button Cell */
.product-remove-cell {
    width: 80px;
    text-align: center;
    padding: 20px 10px;
}

.ospa-wishlist-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #64748b;
    font-weight: 600;
    position: relative;
}

.ospa-wishlist-remove:hover {
    background: #e74c3c;
    border-color: #e74c3c;
    color: white;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
    text-decoration: none;
}

.ospa-wishlist-remove:active {
    transform: scale(0.95);
}

.ospa-wishlist-remove .la {
    font-size: 16px;
    display: block;
}

/* Actions Cell */
.product-actions-cell {
    min-width: 180px;
    text-align: center;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.action-btn {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    min-width: 120px;
    cursor: pointer;
}

/* Empty Wishlist State */
.ospa-wishlist-empty {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 15px;
    margin: 40px 0;
}

.ospa-wishlist-empty h3 {
    color: #333;
    font-size: 2em;
    margin-bottom: 15px;
    font-weight: 600;
}

.ospa-wishlist-empty p {
    color: #666;
    font-size: 1.1em;
    margin-bottom: 30px;
}

.ospa-wishlist-empty .button {
    background: #667eea;
    color: white;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

.ospa-wishlist-empty .button:hover {
    background: #5a6fc8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Responsive Table for Tablets */
@media (max-width: 1024px) {
    .ospa-wishlist-page {
        padding: 15px;
    }

    .wishlist-table tbody td {
        padding: 15px 10px;
    }

    .product-info-content {
        margin-left: 10px;
    }

    .product-title {
        font-size: 16px;
    }
}

/* Mobile Responsive - 767px and below */
@media (max-width: 767px) {
    .ospa-wishlist-page {
        padding: 8px;
        margin: 0;
    }

    .wishlist-title {
        font-size: 1.8em;
        margin-bottom: 20px;
        text-align: center;
    }

    .wishlist-count {
        font-size: 1em;
        text-align: center;
    }

    .wishlist-table-container {
        border: none;
        border-radius: 6px;
        margin: 0;
    }

    .wishlist-table {
        margin: 0;
    }

    .wishlist-table thead {
        display: none; /* Hide header on mobile */
    }

    .wishlist-table tbody tr {
        display: block;
        border: 1px solid #e1e1e1;
        border-radius: 6px;
        margin-bottom: 12px;
        padding: 12px;
        background: #fff;
    }

    .wishlist-table tbody tr:last-child {
        margin-bottom: 0;
    }

    .wishlist-table tbody td {
        display: block;
        padding: 6px 0;
        text-align: center;
        border: none;
        width: 100% !important;
    }

    .product-image-cell {
        text-align: center;
        margin-bottom: 10px;
        padding-top: 0;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .wishlist-product-image {
        max-width: 120px;
        height: auto;
        border-radius: 4px;
        display: block;
        margin: 0 auto !important;
    }

    .product-info-cell {
        margin-bottom: 12px;
    }

    .product-info-content {
        margin-left: 0;
        margin-right: 0;
        text-align: center;
        width: 100%;
    }

    .product-title {
        font-size: 16px;
        margin: 0 0 6px 0;
        line-height: 1.2;
        text-align: center;
    }

    .product-rating,
    .product-excerpt,
    .product-category {
        font-size: 13px;
        margin-bottom: 4px;
        text-align: center;
        display: block;
    }

    .product-title a,
    .product-rating,
    .product-excerpt,
    .product-category,
    .product-category a {
        text-align: center;
        display: block;
        width: 100%;
    }

    .product-price-cell {
        padding: 8px 0;
        margin: 8px 0;
        border-top: 1px solid #f0f0f0;
        border-bottom: 1px solid #f0f0f0;
        text-align: center !important;
        display: block !important;
        width: 100% !important;
    }

    .product-price {
        font-size: 16px;
        font-weight: 600;
        color: #333;
        display: block;
        text-align: center !important;
        margin: 0 auto;
    }

    .product-stock-cell {
        padding: 8px 0;
        margin: 8px 0;
        text-align: center !important;
        display: block !important;
        width: 100% !important;
    }

    .stock-status {
        display: inline-block !important;
        padding: 4px 8px;
        border-radius: 12px;
        font-size: 11px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.3px;
        margin: 0 auto;
        text-align: center;
    }
    .stock-status.in-stock {
        background: #d4edda;
        color: #155724;
    }

    .stock-status.out-of-stock {
        background: #f8d7da;
        color: #721c24;
    }

    /* Force center alignment for all individual elements */
    .product-image-cell > a,
    .product-image-cell img,
    .wishlist-product-image {
        display: block !important;
        margin: 0 auto !important;
        text-align: center !important;
    }

    .stock-status {
        display: inline-block;
        padding: 4px 8px;
        border-radius: 12px;
        font-size: 11px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.3px;
    }

    .stock-status.in-stock {
        background: #d4edda;
        color: #155724;
    }

    .stock-status.out-of-stock {
        background: #f8d7da;
        color: #721c24;
    }

    .product-remove-cell {
        position: static;
        border: none !important;
        padding: 4px 0 !important;
        margin: 4px 0 !important;
        width: 100% !important;
        text-align: center !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
    }

    .ospa-wishlist-remove {
        width: auto;
        height: 40px;
        background: #e74c3c;
        color: white;
        border-radius: 4px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 8px 16px;
        font-size: 13px;
        font-weight: 500;
        text-transform: none;
        transition: all 0.2s ease;
        text-decoration: none;
        border: none;
        min-width: 200px;
        max-width: 240px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        position: relative;
    }

    .ospa-wishlist-remove:hover {
        background: #c0392b;
        transform: translateY(-1px);
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    }

    /* Hide original icon */
    .ospa-wishlist-remove .la {
        display: none !important;
    }

    /* Add cross icon and text using pseudo-elements */
    .ospa-wishlist-remove:before {
        content: "×";
        font-size: 16px;
        font-weight: bold;
        display: inline-block;
    }

    .ospa-wishlist-remove:after {
        content: "Remove from wishlist";
        display: inline-block;
    }

    .product-actions-cell {
        padding: 0;
        margin: 0;
        border-top: none;
    }

    .action-buttons {
        display: flex;
        flex-direction: column;
        gap: 8px;
        align-items: center;
        margin-top: 8px;
        margin-bottom: 8px; /* Added space between actions and remove */
    }

    .action-btn {
        min-width: 160px;
        width: auto;
        max-width: 200px;
        font-size: 13px;
        padding: 8px 16px;
        border-radius: 4px;
        text-transform: none;
        font-weight: 500;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        transition: all 0.2s ease;
    }

    .action-btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    }

    .add-to-cart-btn {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        border: none;
    }

    .select-options-btn {
        background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
        color: white;
        border: none;
    }

    .out-of-stock-btn {
        background: #95a5a6;
        color: #fff;
        pointer-events: none;
        box-shadow: none;
    }
}

/* Mobile Responsive - 768px */
@media (max-width: 768px) {
    .ospa-wishlist-page {
        padding: 10px;
    }

    .wishlist-title {
        font-size: 2em;
    }

    .wishlist-table-container {
        border-radius: 8px;
    }

    .wishlist-table thead {
        display: none; /* Hide header on mobile */
    }

    .wishlist-table tbody tr {
        display: block;
        border: 1px solid #e1e1e1;
        border-radius: 8px;
        margin-bottom: 15px;
        padding: 15px;
    }

    .wishlist-table tbody td {
        width: 100%;
        display: block;
        padding: 8px 0;
        text-align: center;
        border: none;
    }

    .product-image-cell {
        text-align: center;
        margin-bottom: 15px;
    }

    .product-info-content {
        margin-left: 0;
        text-align: center;
    }

    .product-price-cell,
    .product-stock-cell,
    .product-remove-cell,
    .product-actions-cell {
        text-align: center;
        border-top: 1px solid #f0f0f0;
        padding-top: 15px;
        margin-top: 15px;
    }

    .product-remove-cell {
        display: inline-block;
        width: auto;
        border-top: none !important;
        padding-top: 0 !important;
        margin-top: 0 !important;
        margin-right: 15px;
    }

    .action-buttons {
        flex-direction: row;
        justify-content: center;
        gap: 10px;
    }

    .action-btn {
        min-width: 100px;
        font-size: 12px;
        padding: 6px 12px;
    }

    .ospa-wishlist-remove {
        width: 40px;
        height: 40px;
        margin: 0;
    }
}

@media (max-width: 480px) {
    .wishlist-title {
        font-size: 1.8em;
    }

    .action-buttons {
        flex-direction: column;
        gap: 8px;
    }

    .action-btn {
        min-width: 140px;
    }

    .stock-info {
        flex-direction: column;
        gap: 8px;
    }
}

/* Legacy Styles for Product Pages */
.wishlist-title.wishlist-title-with-form h2:hover {
    background: none !important;
}

.wishlist-title .fa,
.yith_wcwl_wishlist_footer .fa {
    font-family: 'fontawesome';
    font-weight: 400;
}

/* Custom Wishlist Icon - positioned below quick view button on left side */
.products .product .ospa-wishlist-button {
    position: absolute !important;
    top: 38% !important;
    left: 10px !important;
    padding: 0 !important;
    font-size: 0 !important;
    height: 38px !important;
    width: 38px !important;
    border: none !important;
    margin: 0 !important;
    line-height: 38px !important;
    color: #373737 !important;
    vertical-align: top !important;
    display: none !important;
    border-radius: 45px !important;
    transition: .3s ease-in-out !important;
    outline: 0 !important;
    -webkit-appearance: none !important;
    background-position: center center !important;
    background-size: 16px !important;
    background-repeat: no-repeat !important;
    z-index: 10 !important;
}

.products .product:hover .ospa-wishlist-button {
    display: block !important;
}

.products .product:hover .own-shop-quick-view-btn {
    display: block !important;
}

/* Override quick view button positioning - add more spacing from top */
.products .product .own-shop-quick-view-btn {
    top: 25% !important;
}

.products .product.sale .own-shop-quick-view-btn {
    top: 16% !important;
}

.products .product.sale .ospa-wishlist-button {
    top: 21% !important;
    left: 10px !important;
}

.products .product.sale .ospa-wishlist-button.added {
    top: 30% !important;
    left: 10px !important;
}

/* CRITICAL FIX: Limit absolute positioning to desktop only (>991px) */
@media (max-width: 991px) {
    .products .product .ospa-wishlist-button {
        position: static !important;
        top: auto !important;
        left: auto !important;
        display: inline-block !important;
        margin: 0 8px 8px !important;
        vertical-align: top !important;
        transition: none !important;
        height: 32px !important;
        width: 32px !important;
        line-height: 32px !important;
        background-size: 18px !important;
    }
    
    .products .product.sale .ospa-wishlist-button {
        position: static !important;
        top: auto !important;
        left: auto !important;
    }
}

/* Wishlist Added States */

.ospa-wishlist-button i.la-heart {
    font-size: 18px;
    margin-top: 10px;
    display: inline-block;
}

.ospa-wishlist-button.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* In responsive mode, don't reduce opacity to prevent disappearance */
@media (max-width: 991px) {
    .ospa-wishlist-button.loading {
        opacity: 1 !important;
    }
}

/* Hide Old YITH Buttons */
.woocommerce ul.products li.product .add_to_wishlist,
.woocommerce ul.products li.product .add_to_wishlist>span {
    display: none;
}

.yith-wcwl-add-button i.fa {
    background: #fff;
    color: #000;
    padding: 10px;
    border-radius: 45px;
    font-size: 15px;
    font-weight: 600;
}

.woocommerce ul.products li.product:hover .add_to_wishlist {
    display: block;
    position: absolute;
    top: 3%;
    right: 12px;
    text-align: right;
}

.yith-wcwl-wishlistexistsbrowse {
    display: none;
}

.woocommerce ul.products li.product.sale:hover .add_to_wishlist {
    top: 15%;
}

/* Responsive adjustments for mobile and tablet */
@media (max-width: 1024px) {
    /* On tablets and smaller, show wishlist button always visible (no hover required) */
    .products .product .ospa-wishlist-button {
        display: block !important;
    }

    .products .product:hover .ospa-wishlist-button {
        display: block !important;
    }
}

@media (max-width: 991px) {
    /* Force all positioning static to prevent jumping to image */
    .products .product .ospa-wishlist-button {
        position: static !important;
        top: auto !important;
        left: auto !important;
        display: inline-block !important;
        margin: 0 8px 8px !important;
        vertical-align: top !important;
        transition: none !important;
        z-index: 10 !important;
        height: 32px !important;
        width: 32px !important;
        line-height: 32px !important;
        font-size: 0 !important;
        background-size: 18px !important;
        background: transparent !important;
    }

    .products .product .ospa-wishlist-button i.la-heart {
        font-size: 18px;
        margin-top: 5px;
        display: inline-block;
    }
    
    /* DEBUG: Add higher specificity to override dynamic CSS */
    .woocommerce ul.products li.product .ospa-wishlist-button,
    .woocommerce-page ul.products li.product .ospa-wishlist-button {
        position: static !important;
        top: auto !important;
        left: auto !important;
        background: transparent !important;
    }
    
    /* DEBUG: Create a container for the wishlist button */
    .products .product .ospa-wishlist-container {
        display: inline-block;
        margin: 0 4px;
        vertical-align: top;
    }
    
    /* Override dynamic CSS with maximum specificity */
    .woocommerce ul.products li.product:hover .ospa-wishlist-button:not(.added),
    .woocommerce-page ul.products li.product:hover .ospa-wishlist-button:not(.added),
    .woocommerce ul.products li.product.product-type-simple:hover .ospa-wishlist-button:not(.added),
    .woocommerce ul.products li.product.product-type-grouped:hover .ospa-wishlist-button:not(.added),
    .woocommerce ul.products li.product.product-type-external:hover .ospa-wishlist-button:not(.added),
    .woocommerce ul.products li.product.product-type-variable:hover .ospa-wishlist-button:not(.added) {
        position: static !important;
        top: auto !important;
        left: auto !important;
        background: transparent !important;
        color: #000 !important;
        border: none !important;
        display: inline-block !important;
        width: 32px !important;
        height: 32px !important;
        line-height: 32px !important;
        border-radius: 45px !important;
        transition: none !important;
        outline: 0 !important;
        -webkit-appearance: none !important;
        background-position: center center !important;
        background-size: 18px !important;
        background-repeat: no-repeat !important;
        z-index: 10 !important;
    }
    
    /* Override sale product positioning */
    .woocommerce ul.products li.product.product-type-simple.sale .ospa-wishlist-button,
    .woocommerce ul.products li.product.product-type-grouped.sale .ospa-wishlist-button,
    .woocommerce ul.products li.product.product-type-external.sale .ospa-wishlist-button,
    .woocommerce ul.products li.product.product-type-variable.sale .ospa-wishlist-button,
    .woocommerce ul.products li.product.product-type-simple.sale:hover .ospa-wishlist-button:not(.added),
    .woocommerce ul.products li.product.product-type-grouped.sale:hover .ospa-wishlist-button:not(.added),
    .woocommerce ul.products li.product.product-type-external.sale:hover .ospa-wishlist-button:not(.added),
    .woocommerce ul.products li.product.product-type-variable.sale:hover .ospa-wishlist-button:not(.added) {
        position: static !important;
        top: auto !important;
        left: auto !important;
        background: transparent !important;
        display: inline-block !important;
        visibility: visible !important;
    }
    
    /* Override added state background */
    .woocommerce ul.products li.product .ospa-wishlist-button.added,
    .woocommerce-page ul.products li.product .ospa-wishlist-button.added,
    .products .product .ospa-wishlist-button.added {
        background: transparent !important;
        border-color: transparent !important;
    }
    
    /* Header wishlist icon responsive styles */
    @media (max-width: 991px) {
        .top-menu-wrapper .wishlist-icon-container,
        .woo-menu-links .wishlist-icon-container,
        .wishlist-icon-container,
        .wishlist-icon-container-mobile {
            display: inline-block !important;
            visibility: visible !important;
            vertical-align: middle !important;
            float: none !important;
        }

        .top-menu-wrapper .wishlist-icon-container li,
        .woo-menu-links .wishlist-icon-container li,
        .wishlist-icon-container li,
        .wishlist-icon-container-mobile li {
            display: inline-block !important;
            margin: 0 !important;
            vertical-align: middle !important;
        }

        .top-menu-wrapper .wishlist-icon-container a,
        .woo-menu-links .wishlist-icon-container a,
        .wishlist-icon-container a,
        .wishlist-icon-container-mobile a {
            display: inline-block !important;
            visibility: visible !important;
            font-size: 18px !important;
        }

        .top-menu-wrapper .wishlist-icon-container a i,
        .woo-menu-links .wishlist-icon-container a i,
        .wishlist-icon-container a i,
        .wishlist-icon-container-mobile a i {
            display: inline-block !important;
            visibility: visible !important;
        }

        /* Ensure all header icons are aligned */
        .header-woo-links,
        .woo-menu-links,
        .site-header-cart,
        .wishlist-icon-container {
            display: inline-block !important;
            vertical-align: baseline !important;
            line-height: 1 !important;
            float: none !important;
            margin: 0 8px !important;
            position: relative !important;
            top: 0 !important;
        }

        /* Add extra gap to wishlist icon container */
        .wishlist-icon-container {
            margin: 0 12px !important;
        }

        .header-woo-links li,
        .woo-menu-links li,
        .site-header-cart li,
        .wishlist-icon-container li {
            display: inline-block !important;
            vertical-align: baseline !important;
            float: none !important;
            margin: 0 !important;
            line-height: 1 !important;
            position: static !important;
        }

        .header-woo-links a,
        .woo-menu-links a,
        .site-header-cart a,
        .wishlist-icon-container a {
            display: inline-block !important;
            vertical-align: baseline !important;
            line-height: 1 !important;
        }

        /* Fine-tune icon alignment with precise positioning */
        .site-header-cart .cart-content {
            vertical-align: text-top !important;
            margin-top: 0 !important;
            position: relative !important;
            top: -1px !important; /* Lift the shopping bag slightly */
        }

        .wishlist-icon-container a {
            vertical-align: baseline !important;
            margin-top: 0 !important;
            position: relative !important;
            top: 0 !important;
        }

        /* Center align all link elements */
        .site-header-cart .cart-content,
        .wishlist-icon-container a,
        .header-woo-links a {
            display: inline-block !important;
            text-align: center !important;
            padding-top: 0 !important;
            padding-bottom: 0 !important;
        }

        /* Ensure hamburger menu is also properly aligned */
        .navbar-toggle {
            vertical-align: baseline !important;
            line-height: 1 !important;
            margin-top: 0 !important;
            position: relative !important;
            top: 1px !important; /* Slight adjustment to match baseline */
        }

        /* Consistent icon sizing with larger shopping bag */
        .site-header-cart .cart-content i.la-shopping-bag {
            font-size: 22px !important;
            line-height: 1 !important;
            vertical-align: bottom !important;
        }

        .wishlist-icon-container a i.fa,
        .wishlist-icon-container a i.la-heart {
            font-size: 20px !important;
            line-height: 1 !important;
            vertical-align: bottom !important;
        }

        /* Hide menu text from toggle button while keeping icon */
        .custom-menu-wrapper .title.navbar-toggle {
            font-size: 0 !important;
        }

        .custom-menu-wrapper .title.navbar-toggle i.la-list {
            font-size: 18px !important;
            vertical-align: text-bottom !important;
        }

        /* Hide MENU text in responsive navigation but keep hamburger icon bars */
        .menu-header span:first-child {
            display: none !important;
        }

        /* Additional specificity to hide MENU text */
        .menu-header > span {
            display: none !important;
        }

        /* Make sure regular span isn't hidden in the hamburger menu */
        .navbar-toggle .icon-bar {
            display: block !important;
        }
    }

    @media only screen and (max-width: 768px) {
        .top-menu-wrapper .wishlist-icon-container,
        .woo-menu-links .wishlist-icon-container,
        .wishlist-icon-container,
        .wishlist-icon-container-mobile {
            display: inline-block !important;
            visibility: visible !important;
            vertical-align: middle !important;
            margin: 0 5px !important;
        }

        .top-menu-wrapper .wishlist-icon-container li,
        .woo-menu-links .wishlist-icon-container li,
        .wishlist-icon-container li,
        .wishlist-icon-container-mobile li {
            display: inline-block !important;
            margin: 0 !important;
            vertical-align: middle !important;
        }

        .top-menu-wrapper .wishlist-icon-container a,
        .woo-menu-links .wishlist-icon-container a,
        .wishlist-icon-container a,
        .wishlist-icon-container-mobile a {
            display: inline-block !important;
            visibility: visible !important;
            color: ' . $primary_color . ' !important;
            font-size: 16px !important;
        }

        /* Ensure responsive navigation row alignment */
        .header-woo-links,
        .woo-menu-links,
        .site-header-cart,
        .wishlist-icon-container,
        .custom-menu-wrapper,
        .navbar-toggle {
            display: inline-block !important;
            vertical-align: middle !important;
            float: none !important;
            margin: 0 4px !important;
        }

        /* Force flexbox layout for proper alignment */
        .woo-menu-links {
            display: flex !important;
            align-items: center !important;
            justify-content: flex-end !important;
            flex-wrap: nowrap !important;
        }

        .woo-menu-links > * {
            display: inline-block !important;
            vertical-align: middle !important;
            margin: 0 4px !important;
        }
    }
    
    /* Override hover state background */
    .woocommerce ul.products li.product .ospa-wishlist-button:not(.added):hover,
    .woocommerce-page ul.products li.product .ospa-wishlist-button:not(.added):hover,
    .products .product .ospa-wishlist-button:not(.added):hover {
        background: transparent !important;
        border-color: transparent !important;
    }
}

@media (max-width: 768px) {
    /* Additional mobile-specific adjustments */
    .products .product .ospa-wishlist-button {
        height: 28px !important;
        width: 28px !important;
        line-height: 28px !important;
        margin: 0 4px 4px !important;
    }

    .products .product .ospa-wishlist-button i.la-heart {
        font-size: 16px;
        margin-top: 6px;
    }
}

/* Style for added/disabled wishlist button */
.products .product .ospa-wishlist-button.added,
.woocommerce ul.products li.product .ospa-wishlist-button.added,
.woocommerce-page ul.products li.product .ospa-wishlist-button.added {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    background: transparent !important;
    border-color: transparent !important;
    /* Ensure button is properly disabled */
    disabled: true;
    /* Add grey filter for heart icon */
    filter: grayscale(100%) !important;
    -webkit-filter: grayscale(100%) !important;
    -moz-filter: grayscale(100%) !important;
    -ms-filter: grayscale(100%) !important;
    -o-filter: grayscale(100%) !important;
}

/* Override hover state for added button */
.products .product .ospa-wishlist-button.added:hover,
.woocommerce ul.products li.product .ospa-wishlist-button.added:hover,
.woocommerce-page ul.products li.product .ospa-wishlist-button.added:hover {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    background: transparent !important;
    border-color: transparent !important;
    color: #000 !important;
}

/* Responsive mode: ensure added button is greyed out */
@media (max-width: 991px) {
    .products .product .ospa-wishlist-button.added,
    .woocommerce ul.products li.product .ospa-wishlist-button.added,
    .woocommerce-page ul.products li.product .ospa-wishlist-button.added {
        opacity: 0.5 !important;
        cursor: not-allowed !important;
        pointer-events: none !important;
        background: transparent !important;
        /* Ensure button is properly disabled */
        disabled: true;
        /* Add grey filter for heart icon */
        filter: grayscale(100%) !important;
        -webkit-filter: grayscale(100%) !important;
        -moz-filter: grayscale(100%) !important;
        -ms-filter: grayscale(100%) !important;
        -o-filter: grayscale(100%) !important;
    }
}

/* Force wishlist button visibility for all products in responsive mode */
@media (max-width: 991px) {
    .products .product .ospa-wishlist-container,
    .woocommerce ul.products li.product .ospa-wishlist-container,
    .woocommerce-page ul.products li.product .ospa-wishlist-container {
        display: inline-block !important;
        visibility: visible !important;
    }

    .products .product .ospa-wishlist-button,
    .woocommerce ul.products li.product .ospa-wishlist-button,
    .woocommerce-page ul.products li.product .ospa-wishlist-button {
        position: static !important;
        top: auto !important;
        left: auto !important;
        display: inline-block !important;
        visibility: visible !important;
        opacity: 1 !important;
        margin: 0 8px 8px !important;
        vertical-align: top !important;
        transition: none !important;
        z-index: 10 !important;
        height: 32px !important;
        width: 32px !important;
        line-height: 32px !important;
        font-size: 0 !important;
        background: transparent !important;
        border: none !important;
        border-radius: 45px !important;
        outline: 0 !important;
        -webkit-appearance: none !important;
        background-position: center center !important;
        background-size: 18px !important;
        background-repeat: no-repeat !important;
    }

    .products .product .ospa-wishlist-button i.la-heart,
    .woocommerce ul.products li.product .ospa-wishlist-button i.la-heart,
    .woocommerce-page ul.products li.product .ospa-wishlist-button i.la-heart {
        font-size: 18px !important;
        display: inline-block !important;
    }
    
    /* CRITICAL FIX: Ensure non-sale products are also visible in responsive mode */
    .woocommerce ul.products li.product.product-type-simple:not(.sale) .ospa-wishlist-button,
    .woocommerce ul.products li.product.product-type-grouped:not(.sale) .ospa-wishlist-button,
    .woocommerce ul.products li.product.product-type-external:not(.sale) .ospa-wishlist-button,
    .woocommerce ul.products li.product.product-type-variable:not(.sale) .ospa-wishlist-button,
    .woocommerce-page ul.products li.product.product-type-simple:not(.sale) .ospa-wishlist-button,
    .woocommerce-page ul.products li.product.product-type-grouped:not(.sale) .ospa-wishlist-button,
    .woocommerce-page ul.products li.product.product-type-external:not(.sale) .ospa-wishlist-button,
    .woocommerce-page ul.products li.product.product-type-variable:not(.sale) .ospa-wishlist-button,
    .products .product:not(.sale) .ospa-wishlist-button {
        position: static !important;
        top: auto !important;
        left: auto !important;
        background: transparent !important;
        display: inline-block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
        
        /* Override ALL dynamic CSS for responsive mode */
        @media (max-width: 991px) {
            /* Target every possible combination to ensure visibility */
            .woocommerce ul.products li.product .ospa-wishlist-button,
            .woocommerce-page ul.products li.product .ospa-wishlist-button,
            .products .product .ospa-wishlist-button,
            .woocommerce ul.products li.product:not(.sale) .ospa-wishlist-button,
            .woocommerce-page ul.products li.product:not(.sale) .ospa-wishlist-button,
            .products .product:not(.sale) .ospa-wishlist-button,
            .woocommerce ul.products li.product.product-type-simple .ospa-wishlist-button,
            .woocommerce-page ul.products li.product.product-type-simple .ospa-wishlist-button,
            .woocommerce ul.products li.product.product-type-variable .ospa-wishlist-button,
            .woocommerce-page ul.products li.product.product-type-variable .ospa-wishlist-button,
            .woocommerce ul.products li.product.product-type-grouped .ospa-wishlist-button,
            .woocommerce-page ul.products li.product.product-type-grouped .ospa-wishlist-button,
            .woocommerce ul.products li.product.product-type-external .ospa-wishlist-button,
            .woocommerce-page ul.products li.product.product-type-external .ospa-wishlist-button {
                visibility: visible !important;
                display: inline-block !important;
                position: static !important;
                opacity: 1 !important;
                top: auto !important;
                left: auto !important;
                right: auto !important;
                bottom: auto !important;
                background: transparent !important;
                border: none !important;
                margin: 0 8px 8px !important;
                padding: 0 !important;
                width: 32px !important;
                height: 32px !important;
                line-height: 32px !important;
                text-align: center !important;
                float: none !important;
                clear: none !important;
                transform: none !important;
                clip: auto !important;
                clip-path: none !important;
                -webkit-clip-path: none !important;
                pointer-events: auto !important;
                cursor: pointer !important;
                z-index: 9999 !important;
            }
            
            /* Override hover states with maximum specificity */
            .woocommerce ul.products li.product:hover .ospa-wishlist-button,
            .woocommerce-page ul.products li.product:hover .ospa-wishlist-button,
            .products .product:hover .ospa-wishlist-button,
            .woocommerce ul.products li.product:not(.sale):hover .ospa-wishlist-button,
            .woocommerce-page ul.products li.product:not(.sale):hover .ospa-wishlist-button,
            .products .product:not(.sale):hover .ospa-wishlist-button {
                visibility: visible !important;
                display: inline-block !important;
                position: static !important;
                opacity: 1 !important;
                top: auto !important;
                left: auto !important;
                background: transparent !important;
            }
            
            /* Force container visibility */
            .woocommerce ul.products li.product .ospa-wishlist-container,
            .woocommerce-page ul.products li.product .ospa-wishlist-container,
            .products .product .ospa-wishlist-container {
                display: inline-block !important;
                visibility: visible !important;
                position: static !important;
                opacity: 1 !important;
            }

            .woocommerce ul.products li.product .ospa-wishlist-container {
                margin-top: 4px;
            }
            
            /* Override added state but keep visible */
            .woocommerce ul.products li.product .ospa-wishlist-button.added,
            .woocommerce-page ul.products li.product .ospa-wishlist-button.added,
            .products .product .ospa-wishlist-button.added {
                visibility: visible !important;
                display: inline-block !important;
                position: static !important;
                opacity: 0.5 !important;
                pointer-events: none !important;
                cursor: not-allowed !important;
                /* Ensure button is properly disabled */
                disabled: true;
                /* Add grey filter for heart icon */
                filter: grayscale(100%) !important;
                -webkit-filter: grayscale(100%) !important;
                -moz-filter: grayscale(100%) !important;
                -ms-filter: grayscale(100%) !important;
                -o-filter: grayscale(100%) !important;
            }
        }
    
    /* Override hover states for non-sale products in responsive mode */
    .woocommerce ul.products li.product.product-type-simple:not(.sale):hover .ospa-wishlist-button,
    .woocommerce ul.products li.product.product-type-grouped:not(.sale):hover .ospa-wishlist-button,
    .woocommerce ul.products li.product.product-type-external:not(.sale):hover .ospa-wishlist-button,
    .woocommerce ul.products li.product.product-type-variable:not(.sale):hover .ospa-wishlist-button,
    .woocommerce-page ul.products li.product.product-type-simple:not(.sale):hover .ospa-wishlist-button,
    .woocommerce-page ul.products li.product.product-type-grouped:not(.sale):hover .ospa-wishlist-button,
    .woocommerce-page ul.products li.product.product-type-external:not(.sale):hover .ospa-wishlist-button,
    .woocommerce-page ul.products li.product.product-type-variable:not(.sale):hover .ospa-wishlist-button,
    .products .product:not(.sale):hover .ospa-wishlist-button {
        position: static !important;
        top: auto !important;
        left: auto !important;
        background: transparent !important;
        display: inline-block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}
