/* =========================================================
   MYPROT SMART WISHLIST — v2.0
   ========================================================= */

:root {
    --myprot-red: #df0101;
    --myprot-black: #050505;
    --myprot-text: #171717;
    --myprot-muted: #747474;
    --myprot-border: #ededed;
    --myprot-green: #18b85a;
}

/* Product loop wishlist heart */
.swishlist {
    position: absolute;
    top: 0px;
    right: 0px;
    min-width: 0;
    background: none !important;
    padding: 0;
}

.swishlist .heart {
    color: #222;
    font-size: 25px;
    line-height: 1;
    transition: .2s ease;
}

.swishlist.active .heart {
    color: var(--myprot-red);
    transform: scale(1.08);
}

/* Shortcode add-to-wishlist */
.smart-add-wishlist {
    position: relative;
    width: 100%;
    min-height: 42px;
    background: var(--myprot-black);
    color: #fff;
    padding: 0;
    border: 0;
    cursor: pointer;
    border-radius: 25px;
    font-size: 0.75rem;
    overflow: hidden;
    transition: .25s ease;
}

.smart-add-wishlist:hover {
    background: var(--myprot-red);
}

.smart-add-wishlist.loading::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 0;
    background: var(--myprot-red);
    z-index: 0;
    animation: myprotWishlistLoad .5s linear forwards;
}

.smart-add-wishlist span {
    position: relative;
    z-index: 2;
}

.smart-add-wishlist.active {
    background: var(--myprot-red);
}

@keyframes myprotWishlistLoad {
    from { width: 0; }
    to { width: 100%; }
}

/* =========================================================
   Wishlist page
   ========================================================= */

.myprot-wishlist-page {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    color: var(--myprot-text);
    font-family: inherit;
}

.myprot-wishlist-head {
    margin: 0 0 28px;
}

.myprot-wishlist-heading {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.myprot-wishlist-main-icon {
    color: var(--myprot-red);
    font-size: 42px;
    line-height: 1;
    margin-top: 4px;
}

.myprot-wishlist-heading h1 {
    margin: 0 0 8px;
    font-size: clamp(28px, 3vw, 42px);
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: -.7px;
}

.myprot-wishlist-heading p {
    margin: 0;
    max-width: 650px;
    color: var(--myprot-muted);
    font-size: 16px;
    line-height: 1.55;
}

.myprot-wishlist-topbar {
    margin-top: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.myprot-wishlist-count {
    font-size: 17px;
}

.myprot-wishlist-continue {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 46px;
    padding: 0 20px;
    border: 1px solid #cfcfcf;
    border-radius: 9px;
    color: #111;
    text-decoration: none !important;
    font-weight: 600;
    transition: .2s ease;
}

.myprot-wishlist-continue:hover {
    border-color: var(--myprot-black);
    background: #fafafa;
}

/* Desktop: two cards per row */
.wishlist-container {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

/* Card */
.wishlist-item {
    position: relative;
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(150px, 42%) 1fr;
    gap: 18px;
    padding: 18px;
    background: #fff;
    border: 1px solid var(--myprot-border);
    border-radius: 14px;
    text-align: start;
    box-sizing: border-box;
    transition: .2s ease;
}

.wishlist-item:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,.07);
    border-color: #e4e4e4;
}

.myprot-wishlist-media {
    position: relative;
    min-width: 0;
    min-height: 220px;
    border-radius: 10px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.myprot-wishlist-media > a {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.myprot-wishlist-media img {
    width: 100%;
    max-width: 230px;
    height: 220px;
    object-fit: contain;
    display: block;
    margin: 0 !important;
}

.myprot-wishlist-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 3;
    min-height: 30px;
    padding: 5px 10px;
    border-radius: 7px;
    background: var(--myprot-red);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.myprot-wishlist-badge:empty {
    display: none;
}

.myprot-remove-heart {
    position: absolute;
    min-width: 0;
    top: 8px;
    right: 8px;
    z-index: 4;
    width: 38px;
    height: 38px;
    border: 0;
    background: none !important;
    color: #df0101;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    transition: .2s ease;
    padding: 0;
}

.myprot-remove-heart:hover {
    transform: scale(1.06);
}

.wishlist-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.myprot-wishlist-product-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #101010;
    text-decoration: none !important;
    font-size: 20px;
    line-height: 1.25;
    font-weight: 750;
}

.myprot-wishlist-brand {
    margin-top: 5px;
    color: var(--myprot-muted);
    font-size: 14px;
}

.wishlist-rating {
    margin-top: 10px;
    color: #111;
    font-size: 14px;
}

.wishlist-rating > span {
    color: #ffab24;
    font-size: 17px;
}

.wishlist-rating small {
    color: var(--myprot-muted);
    font-size: 12px;
}

.myprot-stock {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 8px;
    font-size: 14px;
    font-weight: 600;
}

.myprot-stock i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block;
    background: var(--myprot-green);
}

.myprot-stock--out {
    color: var(--myprot-red);
}

.myprot-stock--out i {
    background: var(--myprot-red);
}

.myprot-wishlist-price {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 12px;
}

.myprot-wishlist-price strong {
    color: var(--myprot-black);
    font-size: 27px;
    line-height: 1;
    font-weight: 800;
}

.myprot-wishlist-price del {
    color: #929292;
    font-size: 16px;
}

.myprot-wishlist-actions {
    margin-top: 15px;
}

.myprot-wishlist-action {
    width: 100%;
    min-height: 46px;
    padding: 10px 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 8px;
    background: var(--myprot-black);
    color: #fff !important;
    text-decoration: none !important;
    cursor: pointer;
    font-size: 14px;
    font-weight: 650;
    transition: .2s ease;
    box-sizing: border-box;
}

.myprot-wishlist-action:hover {
    background: var(--myprot-red);
}

.myprot-wishlist-action--disabled {
    opacity: .65;
    cursor: not-allowed;
}

.myprot-add-cart.is-loading {
    opacity: .65;
    pointer-events: none;
}

.myprot-add-cart.is-added {
    background: var(--myprot-green);
}

.myprot-cart-icon {
    font-size: 16px;
}

/* Empty / discovery banner */
.myprot-wishlist-empty-promo {
    display: none;
    align-items: center;
    gap: 18px;
    margin-top: 24px;
    padding: 20px 22px;
    border-radius: 14px;
    background: linear-gradient(100deg, #fff3f3, #fffafa);
}

.myprot-wishlist-promo-icon {
    flex: 0 0 58px;
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--myprot-red);
    color: #fff;
    font-size: 28px;
}

.myprot-wishlist-promo-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.myprot-wishlist-promo-content strong {
    font-size: 17px;
}

.myprot-wishlist-promo-content span {
    color: var(--myprot-muted);
    font-size: 14px;
    line-height: 1.45;
}

.myprot-wishlist-empty-promo > a {
    flex: 0 0 auto;
    padding: 13px 20px;
    border-radius: 8px;
    background: var(--myprot-red);
    color: #fff !important;
    text-decoration: none !important;
    font-weight: 700;
}

.myprot-wishlist-error {
    grid-column: 1 / -1;
    padding: 20px;
    border: 1px solid #eee;
    border-radius: 10px;
    color: var(--myprot-red);
    text-align: center;
}

/* =========================================================
   MOBILE — ONE PRODUCT PER ROW
   ========================================================= */

@media (max-width: 768px) {

    .myprot-wishlist-page {
        padding: 0 10px;
        box-sizing: border-box;
    }

    .myprot-wishlist-head {
        margin-bottom: 20px;
    }

    .myprot-wishlist-heading {
        gap: 11px;
    }

    .myprot-wishlist-main-icon {
        font-size: 31px;
    }

    .myprot-wishlist-heading h1 {
        font-size: 27px;
        letter-spacing: -.4px;
    }

    .myprot-wishlist-heading p {
        font-size: 14px;
        line-height: 1.45;
    }

    .myprot-wishlist-topbar {
        margin-top: 17px;
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
    }

    .myprot-wishlist-count {
        font-size: 15px;
    }

    .myprot-wishlist-continue {
        width: 100%;
        min-height: 43px;
        box-sizing: border-box;
    }

    /* EXACTLY ONE PRODUCT PER ROW */
    .wishlist-container {
        grid-template-columns: 1fr !important;
        gap: 14px;
    }

    .wishlist-item {
        grid-template-columns: 42% 1fr;
        gap: 12px;
        padding: 12px;
        border-radius: 12px;
    }

    .myprot-wishlist-media {
        min-height: 190px;
    }

    .myprot-wishlist-media img {
        height: 190px;
        max-width: 100%;
    }

    .myprot-wishlist-product-title {
        font-size: 16px;
        line-height: 1.2;
    }

    .myprot-wishlist-brand {
        font-size: 12px;
    }

    .wishlist-rating {
        margin-top: 7px;
        font-size: 12px;
    }

    .wishlist-rating > span {
        font-size: 15px;
    }

    .myprot-stock {
        margin-top: 6px;
        font-size: 12px;
    }

    .myprot-wishlist-price {
        margin-top: 9px;
        gap: 6px;
    }

    .myprot-wishlist-price strong {
        font-size: 22px;
    }

    .myprot-wishlist-price del {
        font-size: 13px;
    }

    .myprot-wishlist-actions {
        margin-top: 10px;
    }

    .myprot-wishlist-action {
        min-height: 42px;
        padding: 8px 7px;
        font-size: 12px;
    }

    .myprot-wishlist-badge {
        top: 6px;
        left: 6px;
        min-height: 25px;
        padding: 4px 7px;
        font-size: 10px;
    }

    .myprot-remove-heart {
        top: 6px;
        right: 6px;
        width: 34px;
        height: 34px;
        font-size: 30px;
    }

    .myprot-wishlist-empty-promo {
        align-items: flex-start;
        flex-wrap: wrap;
        padding: 16px;
        gap: 12px;
    }

    .myprot-wishlist-promo-icon {
        flex-basis: 46px;
        width: 46px;
        height: 46px;
        font-size: 22px;
    }

    .myprot-wishlist-promo-content {
        flex: 1 1 calc(100% - 60px);
    }

    .myprot-wishlist-promo-content strong {
        font-size: 15px;
    }

    .myprot-wishlist-promo-content span {
        font-size: 12px;
    }

    .myprot-wishlist-empty-promo > a {
        width: 100%;
        text-align: center;
        box-sizing: border-box;
    }
}

/* Very small phones */
@media (max-width: 380px) {
    .wishlist-item {
        grid-template-columns: 40% 1fr;
        gap: 9px;
        padding: 9px;
    }

    .myprot-wishlist-media {
        min-height: 165px;
    }

    .myprot-wishlist-media img {
        height: 165px;
    }

    .myprot-wishlist-product-title {
        font-size: 14px;
    }

    .myprot-wishlist-price strong {
        font-size: 19px;
    }

    .myprot-wishlist-action {
        font-size: 11px;
    }
}
