/* =============================================================
   HPCo V7 — Lightweight wishlist, scoped to the HPCo interface
   ============================================================= */

/* Product detail: WooCommerce inserts this next to Add to Cart. */
body.single-product button.hpco-wishlist-toggle,
body.single-product .hpco-v6-pdp button.hpco-wishlist-toggle {
    -webkit-appearance: none !important;
    appearance: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;
    flex: 0 0 auto !important;
    box-sizing: border-box !important;
    min-height: 54px !important;
    margin: 0 !important;
    padding: 0 21px !important;
    border: 1px solid #173e30 !important;
    border-radius: 999px !important;
    clip-path: none !important;
    background: #173e30 !important;
    color: #fff !important;
    font: 700 11px/1.2 'Manrope',sans-serif !important;
    letter-spacing: .1em !important;
    text-transform: uppercase !important;
    text-decoration: none !important;
    cursor: pointer !important;
    opacity: 1 !important;
    transform: none !important;
    transition: background-color .22s, border-color .22s, color .22s !important;
}
body.single-product button.hpco-wishlist-toggle::before,
body.single-product button.hpco-wishlist-toggle::after {
    content: none !important;
    display: none !important;
}
body.single-product button.hpco-wishlist-toggle svg {
    display: block !important;
    flex: 0 0 19px !important;
    width: 19px !important;
    height: 19px !important;
    fill: none !important;
    stroke: #fff !important;
    stroke-width: 1.8 !important;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: stroke .2s, fill .2s;
}
body.single-product button.hpco-wishlist-toggle:hover,
body.single-product button.hpco-wishlist-toggle:focus-visible {
    background: #173e30 !important;
    border-color: #b65b36 !important;
    color: #fff !important;
}
body.single-product button.hpco-wishlist-toggle:hover svg,
body.single-product button.hpco-wishlist-toggle:focus-visible svg {
    stroke: #b65b36 !important;
}
body.single-product button.hpco-wishlist-toggle[aria-pressed="true"] {
    background: #285647 !important;
    border-color: #285647 !important;
}
body.single-product button.hpco-wishlist-toggle[aria-pressed="true"] svg {
    fill: #b65b36 !important;
    stroke: #b65b36 !important;
}
body.single-product .woocommerce-variation-add-to-cart button.hpco-wishlist-toggle {
    margin: 0 !important;
}
/* Prevent conflicts with disabled Add to Cart button styles. */
body.single-product .woocommerce-variation-add-to-cart-disabled button.hpco-wishlist-toggle {
    pointer-events: auto !important;
    cursor: pointer !important;
}

/* Header: keep the existing V6 heart SVG, append only a count badge. */
.v6-head .v6-actions a.hpco-wishlist-link {
    position: relative !important;
    overflow: visible !important;
}
.v6-head .v6-actions a.hpco-wishlist-link .hpco-wishlist-count {
    position: absolute !important;
    top: -8px !important;
    right: -10px !important;
    z-index: 25 !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 19px !important;
    width: auto !important;
    height: 19px !important;
    padding: 0 4px !important;
    border: 1px solid #fff !important;
    border-radius: 999px !important;
    background: #b65b36 !important;
    color: #fff !important;
    font: 700 10px/1 'Manrope',sans-serif !important;
    letter-spacing: 0 !important;
    opacity: 1 !important;
    text-indent: 0 !important;
    pointer-events: none !important;
}
.v6-head .v6-actions a.hpco-wishlist-link .hpco-wishlist-count[hidden] {
    display: none !important;
}
@keyframes hpco-wishlist-heart-pop {
    0% {transform: scale(1)}
    45% {transform: scale(1.25)}
    100% {transform: scale(1)}
}
.v6-head a.hpco-wishlist-pulse svg {
    animation: hpco-wishlist-heart-pop .55s ease !important;
}

/* One compact confirmation, no checkout/cart logic changes. */
.hpco-wishlist-toast {
    position: fixed;
    right: clamp(16px,3vw,40px);
    bottom: 25px;
    z-index: 99999;
    max-width: calc(100vw - 32px);
    padding: 15px 22px;
    border-radius: 999px;
    background: #173e30;
    color: #fff;
    font: 600 13px/1.4 'Manrope',sans-serif;
    box-shadow: 0 10px 25px rgba(0,0,0,.15);
}

/* =============================================================
   HPCo V7 — Wishlist page hero | ONE canonical definition
   Uses page-wishlist.php with .hpco-wishlist-hero-media markup.
   ============================================================= */
main.hpco-wishlist-page {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    background: #ffffff !important;
}

body main.hpco-wishlist-page > section.page-hero.hpco-wishlist-hero {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    height: 82vh !important;
    height: 82svh !important;
    min-height: 82vh !important;
    min-height: 82svh !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    isolation: isolate !important;
    background: #173e30 !important;
    color: #ffffff !important;
}

/* Remove the generic page-hero shading. Our gradient below replaces it. */
body main.hpco-wishlist-page > .hpco-wishlist-hero::after {
    content: none !important;
    display: none !important;
}

body main.hpco-wishlist-page .hpco-wishlist-hero-media {
    position: absolute !important;
    inset: 0 !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
}

body main.hpco-wishlist-page .hpco-wishlist-hero-media > img {
    position: absolute !important;
    inset: 0 !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    object-fit: cover !important;
    object-position: center 48% !important;
    opacity: 1 !important;
    z-index: 0 !important;
}

/* Darker behind left-hand copy; gentle towards the product. */
body main.hpco-wishlist-page .hpco-wishlist-hero-overlay {
    position: absolute !important;
    inset: 0 !important;
    z-index: 1 !important;
    background: linear-gradient(90deg,
        rgba(12, 35, 28, .70) 0%,
        rgba(12, 35, 28, .48) 42%,
        rgba(12, 35, 28, .12) 100%) !important;
    pointer-events: none !important;
}

body main.hpco-wishlist-page .hpco-wishlist-hero-inner {
    position: relative !important;
    z-index: 3 !important;
    display: flex !important;
    align-items: flex-end !important;
    width: min(1320px, calc(100% - 10vw)) !important;
    max-width: none !important;
    height: 100% !important;
    min-height: 0 !important;
    box-sizing: border-box !important;
    margin: 0 auto !important;
    padding: 115px 0 clamp(56px, 8vh, 110px) !important;
}

body main.hpco-wishlist-page .hpco-wishlist-hero .page-hero-copy {
    position: relative !important;
    z-index: 4 !important;
    width: 100% !important;
    max-width: 620px !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #ffffff !important;
    text-shadow: none !important;
}

body main.hpco-wishlist-page .hpco-wishlist-hero .page-hero-copy .eyebrow,
body main.hpco-wishlist-page .hpco-wishlist-hero .page-hero-copy h1,
body main.hpco-wishlist-page .hpco-wishlist-hero .page-hero-copy p {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

body main.hpco-wishlist-page .hpco-wishlist-hero .page-hero-copy h1 {
    margin: 0 0 18px !important;
}
body main.hpco-wishlist-page .hpco-wishlist-hero .page-hero-copy p {
    max-width: 560px !important;
    margin: 0 !important;
    font-size: 16px !important;
    line-height: 1.75 !important;
}

@media (max-width: 767px) {
    body main.hpco-wishlist-page > section.page-hero.hpco-wishlist-hero {
        height: 70vh !important;
        height: 70svh !important;
        min-height: 70vh !important;
        min-height: 70svh !important;
    }
    body main.hpco-wishlist-page .hpco-wishlist-hero-inner {
        width: calc(100% - 42px) !important;
        padding: 110px 0 55px !important;
    }
    body main.hpco-wishlist-page .hpco-wishlist-hero-media > img {
        object-position: 54% center !important;
    }
    body main.hpco-wishlist-page .hpco-wishlist-hero .page-hero-copy {
        max-width: 100% !important;
    }
}

.hpco-wishlist-page .hpco-wishlist-content {
    padding: clamp(48px,7vw,100px) 0;
    min-height: 42vh;
}
.hpco-wishlist-page .hpco-wishlist-grid {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: clamp(20px,3vw,36px);
}
.hpco-wishlist-page .hpco-wishlist-grid:empty {
    display: none;
}
.hpco-wishlist-page .hpco-wishlist-card {
    min-width: 0;
}
.hpco-wishlist-page .hpco-wishlist-image {
    display: block;
    width: 100%;
    overflow: hidden;
    background: #f4f3ee;
    aspect-ratio: 1/1;
}
.hpco-wishlist-page .hpco-wishlist-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform .4s ease;
}
.hpco-wishlist-page .hpco-wishlist-image:hover img {
    transform: scale(1.035);
}
.hpco-wishlist-page .hpco-wishlist-category {
    margin: 18px 0 7px;
    font: 600 10px/1.5 'Manrope',sans-serif;
    color: #8b5538;
    text-transform: uppercase;
    letter-spacing: .16em;
}
.hpco-wishlist-page .hpco-wishlist-card-title {
    font: 600 clamp(22px,2.2vw,30px)/1.2 'Manrope',sans-serif !important;
    letter-spacing: -.035em;
    margin: 0 0 10px !important;
}
.hpco-wishlist-page .hpco-wishlist-card-title a {
    text-decoration: none !important;
    color: #173e30 !important;
}
.hpco-wishlist-page .hpco-wishlist-variant,
.hpco-wishlist-page .hpco-wishlist-stock {
    color: #526259;
    font-size: 13px;
    line-height: 1.5;
    margin: 6px 0 10px;
}
.hpco-wishlist-page .hpco-wishlist-price {
    font: 600 18px/1.4 'Manrope',sans-serif;
    color: #173e30;
    margin: 12px 0;
}
.hpco-wishlist-page .hpco-wishlist-price .amount,
.hpco-wishlist-page .hpco-wishlist-price bdi {
    color: #173e30;
}
.hpco-wishlist-page .hpco-wishlist-card-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 20px;
}
.hpco-wishlist-page .hpco-wishlist-view {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 999px;
    background: #173e30;
    border: 1px solid #173e30;
    text-decoration: none !important;
    color: white !important;
    font: 700 10px/1.2 'Manrope',sans-serif;
    text-transform: uppercase;
    letter-spacing: .1em;
}
.hpco-wishlist-page .hpco-wishlist-view:hover {
    background: #b65b36;
    border-color: #b65b36;
}
.hpco-wishlist-page button.hpco-wishlist-remove {
    appearance: none !important;
    margin: 0 !important;
    padding: 10px 4px !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    color: #b65b36 !important;
    font: 600 12px/1.3 'Manrope',sans-serif !important;
    text-transform: none;
    letter-spacing: 0;
    cursor: pointer;
}
.hpco-wishlist-page button.hpco-wishlist-remove:hover {
    color: #173e30 !important;
}
.hpco-wishlist-page .hpco-wishlist-empty {
    padding: 42px 0;
}
.hpco-wishlist-page .hpco-wishlist-empty h2 {
    font: 500 clamp(30px,4vw,46px)/1.2 'Manrope',sans-serif;
    color: #173e30;
    margin: 0 0 18px;
}
.hpco-wishlist-page .hpco-wishlist-empty p {
    max-width: 600px;
    margin: 0 0 24px;
    color: #425048;
    font-size: 16px;
    line-height: 1.8;
}
.hpco-wishlist-page .hpco-wishlist-status {
    font: 500 14px/1.6 'Manrope',sans-serif;
    color: #526259;
    margin-bottom: 18px;
}
.hpco-wishlist-page [hidden] {
    display: none !important;
}
@media (max-width: 980px) {
    .hpco-wishlist-page .hpco-wishlist-grid {
        grid-template-columns: repeat(2,minmax(0,1fr));
    }
}
@media (max-width: 600px) {
    .hpco-wishlist-page .hpco-wishlist-grid {
        grid-template-columns: minmax(0,1fr);
    }
    .hpco-wishlist-page .hpco-wishlist-content {
        padding-top: 48px;
    }
    body.single-product button.hpco-wishlist-toggle {
        min-height: 50px !important;
    }
}
@media (prefers-reduced-motion:reduce) {
    .v6-head a.hpco-wishlist-pulse svg {
        animation: none !important;
    }
    .hpco-wishlist-page .hpco-wishlist-image img {
        transition: none;
    }
}



/* =============================================================
   HPCo V7 — Empty wishlist CTA | one rule for either PHP class
   Supports current .hpco-wishlist-explore and original .v6-button.
   ============================================================= */
body main.hpco-wishlist-page .hpco-wishlist-empty a[href],
body main.hpco-wishlist-page .hpco-wishlist-empty a[href]:visited {
    -webkit-appearance: none !important;
    appearance: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: fit-content !important;
    min-height: 52px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 0 28px !important;
    border: 1px solid #173e30 !important;
    border-radius: 9999px !important;
    clip-path: none !important;
    background: #173e30 !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    font: 700 11px/1.2 'Manrope', sans-serif !important;
    letter-spacing: .12em !important;
    text-transform: uppercase !important;
    text-decoration: none !important;
    box-shadow: none !important;
    opacity: 1 !important;
    transition: background-color .25s ease, border-color .25s ease, color .25s ease !important;
}

body main.hpco-wishlist-page .hpco-wishlist-empty a[href]:hover,
body main.hpco-wishlist-page .hpco-wishlist-empty a[href]:focus-visible {
    background: #b65b36 !important;
    border-color: #b65b36 !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    text-decoration: none !important;
}
body main.hpco-wishlist-page .hpco-wishlist-empty a[href]::before,
body main.hpco-wishlist-page .hpco-wishlist-empty a[href]::after {
    display: none !important;
    content: none !important;
}


/* HPCo Wishlist — two-column mobile layout */

@media (max-width: 600px) {

    body .hpco-wishlist-page .hpco-wishlist-grid {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 24px 12px !important;
        align-items: start !important;
    }

    body .hpco-wishlist-page .hpco-wishlist-card {
        min-width: 0 !important;
        width: 100% !important;
        text-align: center !important;
    }

    body .hpco-wishlist-page .hpco-wishlist-image {
        width: 100% !important;
        aspect-ratio: 1 / 1 !important;
    }

    body .hpco-wishlist-page .hpco-wishlist-image img {
        display: block !important;
        width: 100% !important;
        height: 100% !important;
        object-fit: contain !important;
    }

    body .hpco-wishlist-page .hpco-wishlist-category,
    body .hpco-wishlist-page .hpco-wishlist-card-title,
    body .hpco-wishlist-page .hpco-wishlist-variant,
    body .hpco-wishlist-page .hpco-wishlist-stock,
    body .hpco-wishlist-page .hpco-wishlist-price {
        text-align: center !important;
        overflow-wrap: anywhere;
    }

    body .hpco-wishlist-page .hpco-wishlist-card-title {
        font-size: clamp(14px, 3.8vw, 18px) !important;
        line-height: 1.35 !important;
        margin-top: 6px !important;
    }

    body .hpco-wishlist-page .hpco-wishlist-category {
        font-size: 9px !important;
        margin-top: 12px !important;
    }

    body .hpco-wishlist-page .hpco-wishlist-price {
        font-size: 15px !important;
    }

    body .hpco-wishlist-page .hpco-wishlist-card-actions {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        justify-content: center !important;
        gap: 8px !important;
        width: 100% !important;
        margin-top: 12px !important;
    }

    body .hpco-wishlist-page .hpco-wishlist-view {
        width: 100% !important;
        min-width: 0 !important;
        min-height: 40px !important;
        padding: 10px 6px !important;
        box-sizing: border-box !important;
        text-align: center !important;
        font-size: 9px !important;
        white-space: normal !important;
    }

    body .hpco-wishlist-page button.hpco-wishlist-remove {
        width: 100% !important;
        text-align: center !important;
    }
}
