/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

.t888-wishlist-frontend-wrap {
    font-family: 'Roboto', sans-serif;
    max-width: 1200px;
    margin: 50px auto;
    padding: 0 20px;
}

.t888-wishlist-header h1 {
    font-size: 42px;
    font-weight: 300;
    color: #000;
    margin-bottom: 40px;
    text-align: center;
}

.t888-wishlist-header h2 {
    font-size: 24px;
    font-weight: 400;
    color: #333;
    margin-bottom: 20px;
}

/* Table Design */
.t888-wishlist-table-container {
    background: #fff;
    border: 1px solid #f0f0f0;
}

.t888-wishlist-table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
}

.t888-wishlist-table th {
    background-color: #f7f7f7;
    color: #333;
    font-weight: 600;
    text-align: left;
    padding: 15px 20px;
    font-size: 14px;
    border-bottom: 1px solid #eee;
}

.t888-wishlist-table td {
    padding: 20px;
    vertical-align: middle;
    border-bottom: 1px solid #eee;
}

/* Columns */
.t888-product-remove {
    width: 60px;
    text-align: center;
}

.remove-wishlist {
    color: #cc0000;
    font-size: 24px;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}

.remove-wishlist:hover {
    color: #ff0000;
}

.t888-product-thumbnail {
    width: 100px;
}

.t888-product-thumbnail img {
    max-width: 80px;
    height: auto;
    display: block;
    border-radius: 4px;
    border: 1px solid #eee;
}

.t888-product-name a {
    color: #666;
    text-decoration: none;
    font-size: 16px;
    border-bottom: 1px solid #999;
    transition: all 0.2s;
}

.t888-product-name a:hover {
    color: #000;
    border-bottom-color: #000;
}

.t888-product-price {
    font-size: 14px;
}

.t888-product-price del {
    display: block;
    color: #999;
    font-size: 13px;
    margin-bottom: 4px;
}

.t888-product-price ins {
    text-decoration: none;
    color: #999;
    font-weight: 500;
    border-bottom: 1px solid #ccc;
}

.t888-product-stock .stock-status {
    color: #8fae1b;
    font-weight: 500;
}

/* Add to Cart Button */
.t888-product-add-to-cart {
    text-align: right;
    width: 100px;
}

.btn-add-to-cart,
.btn-buy-product,
.btn-select-options,
.btn-view-product {
    background: #000;
    color: #fff;
    padding: 10px 15px;
    text-decoration: none;
    font-size: 13px;
    text-transform: uppercase;
    font-weight: 600;
    display: inline-block;
    text-align: center;
    line-height: 1.2;
    transition: background 0.3s;
}

.btn-add-to-cart:hover,
.btn-buy-product:hover,
.btn-select-options:hover,
.btn-view-product:hover {
    background: #333;
    color: #fff;
}

/* Floating Socials */
.t888-floating-socials {
    position: fixed;
    right: 20px;
    bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 999;
}

.social-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    font-size: 24px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.social-icon:hover {
    transform: scale(1.1);
}

.social-icon.whatsapp { background: #25D366; }
.social-icon.zalo { background: #0068FF; font-size: 12px; font-weight: bold; }
.social-icon.facebook { background: #1877F2; }

/* Add to Wishlist Button (Single Product & Loop) */
.t888-wishlist-button-container {
    display: inline-block;
    vertical-align: middle;
    margin-left: 0; 
    margin-top: 0; 
    margin-bottom: 0;
    line-height: 1; 
}

/* Wrapper for Shop Loop to force side-by-side */
.t888-loop-btn-wrapper {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: nowrap !important;
}

/* Override theme styles for buttons inside our wrapper */
.t888-loop-btn-wrapper .add_to_cart_button,
.t888-loop-btn-wrapper .button,
.t888-loop-btn-wrapper .t888-wishlist-button-container {
    display: inline-block !important;
    width: auto !important;
    margin: 0 !important;
    float: none !important;
}

/* Single Product Wrapper */
.t888-single-btn-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap; /* Safe wrapping on small screens */
}

/* Ensure single product wishlist button doesn't have weird margins */
.t888-single-btn-wrapper .t888-wishlist-button-container,
.t888-single-btn-wrapper .quantity {
    margin: 0 !important;
    display: inline-block !important;
}

/* Specific fix for Single Product Page to force inline next to cart button */
form.cart .t888-wishlist-button-container {
    margin-top: 0;
    margin-bottom: 0;
    margin-left: 10px;
}

/* Grouped Product Wishlist Button (appears after entire form) */
.t888-grouped-wishlist {
    margin-top: 15px;
    display: block;
    text-align: left;
}

.t888-grouped-wishlist .t888-add-to-wishlist,
.t888-grouped-wishlist .t888-added-link {
    width: 45px !important;
    height: 45px !important;
    padding: 0 !important;
    font-size: 20px !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
}

.t888-grouped-wishlist .t888-added-link {
    width: auto !important;
    height: auto !important;
    padding: 12px 20px !important;
    font-size: 14px !important;
}

.t888-grouped-wishlist .t888-add-to-wishlist i {
    font-size: 20px;
}

/* Shared styles for Add and View buttons */
.t888-add-to-wishlist,
.t888-view-wishlist {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px; /* Match standard input height */
    border: 1px solid #ddd;
    border-radius: 0; /* Sharp corners for block look */
    color: #333;
    text-decoration: none;
    font-size: 20px; /* Slightly larger icon */
    background: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.t888-add-to-wishlist i,
.t888-view-wishlist i {
    color: #333;     
    transition: color 0.3s ease;
}

.t888-add-to-wishlist:hover,
.t888-view-wishlist:hover {
    border-color: #000;
}

.t888-add-to-wishlist:hover i,
.t888-view-wishlist:hover i {
    color: #000; 
}

/* Active State (Added) */
.t888-add-to-wishlist.active,
.t888-view-wishlist.active {
    border-color: #ddd;
}

.t888-add-to-wishlist.active i {
    color: #000; /* Black heart for active state */
}

/* Text Link styles (for View wishlist / Remove from list) */
.t888-wishlist-button-container .t888-added-link {
    display: inline-block;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    text-decoration: underline;
    margin-top: 10px;
    padding: 5px 0;
    line-height: 1.5;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    width: auto !important;
    height: auto !important;
}

.t888-wishlist-button-container .t888-added-link:hover {
    color: #000;
}

/* Loading State */
.t888-add-to-wishlist.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Share Wishlist */
.t888-share-wishlist {
    margin-top: 30px;
    text-align: left;
}
.t888-share-wishlist h4 {
    margin-bottom: 10px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}
.t888-social-icons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.t888-social-icons .social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 4px; /* Square with rounded corners */
    color: #fff !important;
    font-size: 16px;
    text-decoration: none !important;
    transition: opacity 0.3s, transform 0.2s;
    box-shadow: none; 
    line-height: 1;
}
.t888-social-icons .social-icon:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}
.t888-social-icons .social-icon.facebook { background-color: #3b5998; }
.t888-social-icons .social-icon.twitter { background-color: #55acee; }
.t888-social-icons .social-icon.pinterest { background-color: #bd081c; }
.t888-social-icons .social-icon.email { background-color: #f39c12; } /* Orange/Gold */
.t888-social-icons .social-icon.whatsapp { background-color: #25d366; }

/* Responsive Table */
@media (max-width: 768px) {
    .t888-wishlist-table, 
    .t888-wishlist-table tbody, 
    .t888-wishlist-table tr, 
    .t888-wishlist-table td {
        display: block;
        width: 100%;
    }
    .t888-wishlist-table thead {
        display: none;
    }
    .t888-wishlist-table tr {
        margin-bottom: 20px;
        border: 1px solid #eee;
    }
    .t888-wishlist-table td {
        text-align: right;
        padding-left: 50%;
        position: relative;
        border-bottom: 1px solid #eee;
    }
    .t888-wishlist-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        font-weight: bold;
    }
}
