/* =====================================================
   TW WISHLIST PAGE — Black & White Premium Branding
   Scoped entirely under .tw-wishlist-page so no other
   templates (shop, cart, checkout, etc.) are touched.
   Mirrors the cart/checkout page styling for a
   consistent look across the whole site.
===================================================== */

/* -----------------------------------------------------
   VARIABLES + RESET
----------------------------------------------------- */
.tw-wishlist-page {
    --tw-black: #111111;
    --tw-white: #ffffff;
    --tw-border: #e5e5e5;
    --tw-light-gray: #f5f5f5;
    --tw-text: #333333;
    --tw-muted: #777777;
    --tw-instock: #2e7d32;
    --tw-outofstock: #c0392b;

    padding-top: 60px;
    padding-bottom: 80px;
    background: var(--tw-white);
    color: var(--tw-text);
    width: 100%;
}

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

/* -----------------------------------------------------
   CONTAINER
   (unique class name — avoids colliding with any
   theme-defined ".container" utility class)
----------------------------------------------------- */
.tw-wishlist-page .tw-wishlist-container {
    max-width: 1280px !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
    float: none !important;
}

/* -----------------------------------------------------
   BREADCRUMB
----------------------------------------------------- */
.tw-wishlist-page .tw-breadcrumb {
    font-size: 14px;
    color: var(--tw-muted);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tw-wishlist-page .tw-breadcrumb a {
    color: var(--tw-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

.tw-wishlist-page .tw-breadcrumb a:hover {
    color: var(--tw-black);
}

.tw-wishlist-page .tw-breadcrumb span {
    color: var(--tw-muted);
}

/* -----------------------------------------------------
   PAGE TITLE
----------------------------------------------------- */
.tw-wishlist-page .tw-page-title {
    font-size: 42px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 45px;
    color: var(--tw-black);
    line-height: 1.1;
}

/* -----------------------------------------------------
   WISHLIST TABLE
----------------------------------------------------- */
.tw-wishlist-page .tw-wishlist-wrapper {
    width: 100%;
}

.tw-wishlist-page table.wishlist_table,
.tw-wishlist-page table.shop_table {
    width: 100% !important;
    border-collapse: collapse;
    background: var(--tw-white);
    border: 1px solid var(--tw-border);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.tw-wishlist-page table.wishlist_table thead tr {
    background: var(--tw-black) !important;
}

.tw-wishlist-page table.wishlist_table thead th {
    color: var(--tw-white) !important;
    font-size: 16px;
    font-weight: 600;
    padding: 20px;
    text-align: left;
    border: none;
    background: transparent;
}

.tw-wishlist-page table.wishlist_table tbody tr {
    border-bottom: 1px solid var(--tw-border);
    transition: background 0.3s ease;
}

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

.tw-wishlist-page table.wishlist_table tbody tr:hover {
    background: #fafafa;
}

.tw-wishlist-page table.wishlist_table td {
    padding: 20px;
    vertical-align: middle;
    border: none;
    font-size: 15px;
    color: var(--tw-text);
}

/* Remove button */
.tw-wishlist-page td.product-remove {
    width: 50px;
    text-align: center;
}

.tw-wishlist-page td.product-remove a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--tw-black);
    color: var(--tw-black) !important;
    background: transparent;
    font-size: 14px;
    line-height: 1;
    text-decoration: none;
    transition: all 0.3s ease;
}

.tw-wishlist-page td.product-remove a:hover {
    background: var(--tw-black);
    color: var(--tw-white) !important;
    border-color: var(--tw-black);
}

/* Thumbnail */
.tw-wishlist-page td.product-thumbnail {
    width: 100px;
}

.tw-wishlist-page td.product-thumbnail img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    background: var(--tw-white);
    border: 1px solid #eeeeee;
    border-radius: 6px;
    padding: 6px;
}

/* Product name */
.tw-wishlist-page td.product-name {
    font-size: 16px;
    font-weight: 600;
    vertical-align: middle !important;
}

.tw-wishlist-page td.product-name a {
    color: var(--tw-black);
    text-decoration: none;
}

.tw-wishlist-page td.product-name a:hover {
    text-decoration: underline;
}

/* Price
   WooCommerce wraps the number in its own markup
   (.woocommerce-Price-amount.amount, <bdi>, and for sale
   items <del>/<ins>), which carries its own color/weight
   that can override a color set only on the parent <td>.
   Targeting the actual inner elements with !important
   makes sure the price always renders bold and black.

   IMPORTANT: the <td> itself must stay display:table-cell
   (the default) so it lines up vertically with the other
   cells in the row via the table's own row height — putting
   display:flex directly on the <td> pulls it out of that
   and makes it float higher than Product Name / Stock
   Status. The flex/inline layout for del+ins instead goes
   on the elements *inside* the cell. */
.tw-wishlist-page td.product-price {
    white-space: nowrap !important;
}

.tw-wishlist-page td.product-price,
.tw-wishlist-page td.product-price .woocommerce-Price-amount,
.tw-wishlist-page td.product-price .amount,
.tw-wishlist-page td.product-price bdi {
    font-size: 17px !important;
    font-weight: 700 !important;
    color: var(--tw-black) !important;
    vertical-align: middle !important;
}

/* Sale price: original price struck through and muted,
   the active (lower) price stays bold black — both sit
   inline on the same line via inline-block, not flex,
   so the parent <td> can stay a normal table cell. */
.tw-wishlist-page td.product-price del {
    display: inline-block !important;
    vertical-align: middle !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    color: var(--tw-muted) !important;
    opacity: 1 !important;
    margin: 0 8px 0 0 !important;
}

.tw-wishlist-page td.product-price del .woocommerce-Price-amount,
.tw-wishlist-page td.product-price del .amount,
.tw-wishlist-page td.product-price del bdi {
    font-size: 14px !important;
    font-weight: 400 !important;
    color: var(--tw-muted) !important;
}

.tw-wishlist-page td.product-price ins {
    display: inline-block !important;
    vertical-align: middle !important;
    text-decoration: none !important;
    background: none !important;
    margin: 0 !important;
}

/* Stock status */
.tw-wishlist-page td.wishlist-name-stock,
.tw-wishlist-page td.product-stock-status {
    font-size: 14px;
    font-weight: 600;
    vertical-align: middle !important;
}

.tw-wishlist-page .wishlist-in-stock,
.tw-wishlist-page .stock.in-stock {
    color: var(--tw-instock);
}

.tw-wishlist-page .wishlist-out-of-stock,
.tw-wishlist-page .stock.out-of-stock {
    color: var(--tw-outofstock);
}

/* Add to cart / Select options button
   YITH's own button CSS wins the specificity fight on
   padding/display/border-radius even when background/color
   come through, leaving a cramped, unpadded-looking button.
   Forcing !important on every property here, plus an
   explicit line-height, prevents that collapse. */
.tw-wishlist-page td.product-add-to-cart {
    text-align: right;
    white-space: nowrap;
}

.tw-wishlist-page td.product-add-to-cart a,
.tw-wishlist-page td.product-add-to-cart a.button,
.tw-wishlist-page td.product-add-to-cart a.add_to_cart_button,
.tw-wishlist-page td.product-add-to-cart a.added_to_cart,
.tw-wishlist-page td.product-add-to-cart a.wc-forward {
    display: inline-block !important;
    background: var(--tw-black) !important;
    color: var(--tw-white) !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    padding: 12px 24px !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 6px !important;
    text-decoration: none !important;
    text-align: center !important;
    white-space: nowrap !important;
    transition: background 0.3s ease !important;
}

.tw-wishlist-page td.product-add-to-cart a:hover {
    background: #333333 !important;
    color: var(--tw-white) !important;
}

/* -----------------------------------------------------
   EMPTY WISHLIST STATE
----------------------------------------------------- */
.tw-wishlist-page .yith-wcwl-add-to-wishlist,
.tw-wishlist-page p.woocommerce-info,
.tw-wishlist-page .wishlist-titles-wrapper + p {
    background: var(--tw-light-gray);
    border: 1px solid var(--tw-border);
    border-radius: 6px;
    padding: 20px;
    font-size: 15px;
    color: var(--tw-text);
}

/* -----------------------------------------------------
   SHARE ON SECTION
----------------------------------------------------- */
.tw-wishlist-page .yith-wcwl-share,
.tw-wishlist-page .addtoany_share_save_container {
    margin-top: 20px;
}

.tw-wishlist-page .yith-wcwl-share-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--tw-black);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* -----------------------------------------------------
   RESPONSIVE
----------------------------------------------------- */
@media (max-width: 768px) {
    .tw-wishlist-page {
        padding-top: 40px;
        padding-bottom: 50px;
    }

    .tw-wishlist-page .tw-page-title {
        font-size: 30px;
        margin-bottom: 30px;
    }

    .tw-wishlist-page table.wishlist_table thead {
        display: none;
    }

    .tw-wishlist-page table.wishlist_table,
    .tw-wishlist-page table.wishlist_table tbody,
    .tw-wishlist-page table.wishlist_table tr,
    .tw-wishlist-page table.wishlist_table td {
        display: block;
        width: 100%;
    }

    .tw-wishlist-page table.wishlist_table tr {
        position: relative;
        padding: 16px;
        border-bottom: 1px solid var(--tw-border);
    }

    .tw-wishlist-page table.wishlist_table td {
        padding: 6px 0;
        border: none;
        text-align: left !important;
    }

    .tw-wishlist-page td.product-remove {
        position: absolute;
        top: 16px;
        right: 16px;
        width: auto;
    }

    .tw-wishlist-page td.product-add-to-cart {
        text-align: left;
        margin-top: 8px;
    }

    .tw-wishlist-page td.product-add-to-cart a {
        width: 100% !important;
        text-align: center !important;
    }
}