/* =====================================================
   Wishlist page — custom_wishlist.css
   Restyled to match reference design (ui-medusa.veldev.com/wishlist)
   ===================================================== */

/* ── PAGE WRAPPER ────────────────────────────────── */
.main-page-content {
    padding: 24px 15px 64px !important;
    min-height: 420px;
}

/* ── BREADCRUMB ──────────────────────────────────── */
.wl-breadcrumb {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.wl-breadcrumb a {
    color: #6b7280;
    text-decoration: none;
}
.wl-breadcrumb a:hover {
    color: #122d64;
    text-decoration: underline;
}
.wl-breadcrumb__sep {
    color: #9ca3af;
}

/* ── PAGE HEADING ────────────────────────────────── */
.main-page-content .main-page-content-header {
    border: none !important;
    padding: 0 !important;
    margin: 0 0 28px !important;
}
.main-page-content .heading-area h1 {
    font-size: 28px !important;
    font-weight: 800 !important;
    color: #111 !important;
    text-transform: none !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    font-family: var(--font-family) !important;
    margin: 0 !important;
}
.main-page-content .heading-area .user-options {
    display: none !important;
}
.main-page-content .header-bottom-hr {
    display: none !important;
}
.wl-heart {
    color: #c41e3a;
    font-size: 26px;
    line-height: 1;
}

/* ── FLASH MESSAGES ──────────────────────────────── */
.wl-flash {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
}
.wl-flash--success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

/* ── EMPTY STATE ─────────────────────────────────── */
.wl-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px 100px;
    text-align: center;
}
.wl-empty__icon {
    width: 64px;
    height: 64px;
    color: #9ca3af;
    margin-bottom: 24px;
    flex-shrink: 0;
}
.wl-empty__title {
    font-size: 20px;
    font-weight: 700;
    color: #111;
    margin: 0 0 12px;
    font-family: var(--font-family);
}
.wl-empty__subtitle {
    font-size: 15px;
    color: #6b7280;
    margin: 0 0 28px;
    max-width: 400px;
    line-height: 1.6;
    font-family: var(--font-family);
}
.wl-browse-btn {
    display: inline-block;
    background: #122d64;
    color: #fff !important;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none !important;
    border-radius: 50px;
    padding: 14px 36px;
    border: none;
    cursor: pointer;
    font-family: var(--font-family);
    transition: background 0.15s;
}
.wl-browse-btn:hover {
    background: #0d1f4a;
    color: #fff !important;
}

/* ── CREATE-WISHLIST DIALOG ──────────────────────── */
/* BOC: Dialog and overlay must stack above the sticky header (z-index:999999). BY: naveen das ON: 2026-06-05 */
.ui-widget-overlay {
    z-index: 1000000 !important;
    background: #000 !important;
    opacity: 0.5 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
}
.ui-dialog {
    z-index: 1000001 !important;
    border-radius: 10px !important;
    border: none !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18) !important;
    overflow: hidden;
    font-family: var(--font-family) !important;
}
/* Navy titlebar */
.ui-dialog .ui-dialog-titlebar {
    background: #0c2146 !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 14px 16px !important;
}
.ui-dialog .ui-dialog-title {
    color: #fff !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    font-family: var(--font-family) !important;
}
.ui-dialog .ui-dialog-titlebar-close {
    background: transparent !important;
    border: none !important;
    color: #fff !important;
    opacity: 0.7;
    top: 50% !important;
    margin-top: -0.7em !important;
}
.ui-dialog .ui-dialog-titlebar-close:hover { opacity: 1; }
.ui-dialog .ui-dialog-titlebar-close .ui-icon-closethick {
    background-image: none !important;
    text-indent: 0 !important;
    overflow: visible !important;
    width: auto !important;
    height: auto !important;
}
.ui-dialog .ui-dialog-titlebar-close .ui-icon-closethick::before {
    content: '✕';
    color: #fff;
    font-size: 14px;
    font-style: normal;
}
/* Content area */
.ui-dialog .ui-dialog-content {
    padding: 16px !important;
    overflow-y: auto !important;
    font-family: var(--font-family) !important;
}
/* Button row — pill buttons */
.ui-dialog .ui-dialog-buttonpane {
    background: #f9fafb !important;
    border-top: 1px solid #e5e7eb !important;
    padding: 12px 16px !important;
    margin: 0 !important;
}
.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset {
    float: none !important;
    display: flex !important;
    gap: 10px !important;
    justify-content: flex-end !important;
}
.ui-dialog .ui-dialog-buttonpane button {
    height: 38px !important;
    padding: 0 22px !important;
    border-radius: 9999px !important;
    border: none !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    font-family: var(--font-family) !important;
    transition: background 0.15s !important;
}
.ui-dialog .ui-dialog-buttonpane button:first-child {
    background: #0c2146 !important;
    color: #fff !important;
}
.ui-dialog .ui-dialog-buttonpane button:first-child:hover {
    background: #1e4da9 !important;
}
.ui-dialog .ui-dialog-buttonpane button:last-child {
    background: transparent !important;
    color: #374151 !important;
    border: 1.5px solid #d1d5db !important;
}
.ui-dialog .ui-dialog-buttonpane button:last-child:hover {
    background: #f3f4f6 !important;
}
/* Table inside dialog */
.ui-dialog-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.ui-dialog-content table th {
    background: #f3f4f6;
    padding: 8px 10px;
    text-align: left;
    font-weight: 600;
    border-bottom: 1px solid #e5e7eb;
}
.ui-dialog-content table td {
    padding: 8px 10px;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
}
.ui-dialog-content table td img {
    width: 56px !important;
    height: 56px !important;
    object-fit: contain;
}
/* EOC: wishlist dialog styling */

/* ── PRODUCT GRID ────────────────────────────────── */
.wl-grid-wrapper {
    margin-top: 8px;
}

/* Grid layout — matches reference 3-col / 24px gap.
   Scoped to #wishlist_products (the section id) so it only
   fires on wishlist pages regardless of which bundle is loaded. */
#wishlist_products.prod-listing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
/* ── WISHLIST CARD OVERRIDES ─────────────────────── */
/* Suppress old top-row × and the btn inside the card link */
.prod-listing-item.wl-card .ukss-prod-top { display: none !important; }
.prod-listing-item.wl-card .ukss-prod-card .ukss-prod-btn { display: none !important; }

/* Remove item-level padding so card fills the full grid column */
.prod-listing-item.wl-card {
    padding: 0 !important;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 0 1px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    position: relative;
}

/* Remove all outer padding from card so image spans full width, flush to edges */
.prod-listing-item.wl-card .ukss-prod-card {
    padding: 0 0 4px;
}

/* Re-add horizontal padding only to the text/content area */
.prod-listing-item.wl-card .ukss-prod-content {
    padding-left: 16px;
    padding-right: 16px;
}

/* ── CARD FOOTER ACTION ROW ──────────────────────── */
.wl-card-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 16px 16px;
}

/* Add to cart — pill button matching reference navy */
.wl-add-btn {
    flex: 1;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0c2146;
    color: #fff !important;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;
    border-radius: 9999px;
    cursor: pointer;
    font-family: var(--font-family);
    transition: background 0.15s;
}
.wl-add-btn:hover {
    background: #1e4da9;
    color: #fff !important;
}

/* Trash button — 40×40 circular ghost button with gray border */
.wl-trash-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    background: transparent;
    border: 1px solid #d1d5db;
    border-radius: 9999px;
    color: #9ca3af;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
    padding: 0;
}
.wl-trash-btn:hover {
    color: #ef4444;
    border-color: #fca5a5;
}
.wl-trash-btn svg {
    pointer-events: none;
}

/* ── CREATE WISHLIST / SOCIAL SHARE SECTION ──────── */
/* Full-width so icons reach the true right edge; flex centering instead of padding-top hack */
.create-wishlist-section {
    align-items: center;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    gap: 20px;
}
.create-wishlist-section .share-wishlist-option {
    align-items: center;
    padding-top: 0;
}

/* ── ADD PRODUCTS / DELETE WISHLIST BUTTONS ──────── */
/* displaybuttons() sets display:block via inline style; !important overrides that inline style */
.delete_wishlist {
    display: flex !important;
    align-items: center;
    gap: 12px;
    padding: 8px 0 16px;
    flex-wrap: nowrap;
}
#add_product_to_wishlist,
#delete_wishlist_button {
    height: 40px;
    padding: 0 20px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 9999px;
    cursor: pointer;
    font-family: var(--font-family);
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}
#add_product_to_wishlist {
    background: #0c2146;
    color: #fff;
}
#add_product_to_wishlist:hover {
    background: #1e4da9;
}
#delete_wishlist_button {
    background: transparent;
    color: #dc2626;
    border: 1.5px solid #dc2626;
}
#delete_wishlist_button:hover {
    background: #fef2f2;
}

/* Out of stock badge */
.wl-out-of-stock {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 5px 10px;
    background: rgba(255,255,255,0.9);
    color: #333;
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
    white-space: nowrap;
    z-index: 2;
}


/* ── MOBILE ──────────────────────────────────────── */
@media (max-width: 767px) {
    .wl-page {
        padding: 16px 12px 48px;
    }
    .wl-heading {
        font-size: 22px !important;
    }
    .wl-empty {
        padding: 48px 16px 64px;
    }
    .wl-empty__icon {
        width: 52px;
        height: 52px;
    }
    .wl-empty__title {
        font-size: 18px;
    }

    /* BOC: Mobile wishlist card — 2-col vertical layout matching category product cards. BY: naveen das ON: 2026-06-05 */
    /* user_options.css sets width:82% for the sidebar desktop layout; override to full width on mobile */
    .main-page-content {
        width: 100% !important;
    }

    /* user_options.css sets align-items:center on .create-wishlist-section for mobile (column direction),
       which horizontally centres all children including .delete_wishlist. Override to left-align. */
    .create-wishlist-section {
        align-items: flex-start !important;
    }

    #wishlist_products.prod-listing-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    /* Float the trash button as a circular overlay on the image top-right so the
       footer row is fully available for the "Add to cart" pill button */
    .prod-listing-item.wl-card .wl-trash-btn {
        position: absolute;
        top: 8px;
        right: 8px;
        width: 28px;
        height: 28px;
        background: rgba(255, 255, 255, 0.88);
        border: none;
        border-radius: 50%;
        box-shadow: 0 1px 3px rgba(0,0,0,0.18);
        z-index: 3;
        padding: 0;
    }

    .prod-listing-item.wl-card .wl-trash-btn svg {
        width: 13px;
        height: 13px;
    }

    /* Footer: full-width Add to cart with reduced horizontal padding for narrow cards */
    .prod-listing-item.wl-card .wl-card-footer {
        padding: 0 10px 10px;
        gap: 0;
    }

    .prod-listing-item.wl-card .wl-add-btn {
        font-size: 12px;
        height: 34px;
    }

    /* Tighten content padding for narrow 2-col cards */
    .prod-listing-item.wl-card .ukss-prod-card .ukss-prod-content {
        padding-left: 10px;
        padding-right: 10px;
    }

    /* BOC: Mobile create-wishlist dialog polish. BY: naveen das ON: 2026-06-05 */
    /* jQuery UI writes top/left as inline px styles; override with CSS transform centering */
    .ui-dialog {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        margin: 0 !important;
        max-width: calc(100vw - 24px) !important;
        width: calc(100vw - 24px) !important;
        max-height: 90vh !important;
        border-radius: 10px !important;
        box-shadow: 0 8px 32px rgba(0,0,0,0.18) !important;
    }
    .ui-dialog .ui-dialog-titlebar {
        padding: 12px 16px !important;
        font-size: 15px !important;
    }
    .ui-dialog .ui-dialog-content {
        padding: 12px 16px !important;
        overflow-y: auto !important;
        max-height: calc(90vh - 130px) !important;
    }
    /* Save/Cancel buttons: equal height pill buttons side by side */
    .ui-dialog .ui-dialog-buttonpane {
        padding: 10px 12px !important;
    }
    .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset {
        float: none !important;
        display: flex !important;
        gap: 8px !important;
    }
    .ui-dialog .ui-dialog-buttonpane button {
        flex: 1 !important;
        margin: 0 !important;
        height: 42px !important;
        padding: 0 !important;
        font-size: 14px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 9999px !important;
    }
    /* EOC */

    /* Add Products / Delete buttons: left-aligned, natural width on mobile */
    .delete_wishlist {
        justify-content: flex-start !important;
        flex-wrap: wrap;
        gap: 10px;
        padding: 6px 0 14px;
    }
    #add_product_to_wishlist,
    #delete_wishlist_button {
        font-size: 13px;
        height: 38px;
        padding: 0 16px;
    }
}
