/* ===========================================
   XPC — WooCommerce Product Card
   =========================================== */

ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.1rem;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
@media (max-width: 1199px) { ul.products { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 767px)  { ul.products { grid-template-columns: repeat(2, 1fr); gap: .7rem; } }
@media (max-width: 400px)  { ul.products { grid-template-columns: 1fr; } }

li.xpc-col {
    width: 100% !important;
    float: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.xpc {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: box-shadow .22s ease, transform .22s ease;
}
.xpc:hover {
    box-shadow: 0 8px 28px rgba(0,0,0,.10);
    transform: translateY(-3px);
}

/* ── Image wrap ── */
.xpc__img-wrap {
    position: relative;
    background: #f5f5f5;
    overflow: hidden;
    aspect-ratio: 1 / 1;
}
.xpc__img-link {
    display: block;
    width: 100%;
    height: 100%;
}
.xpc__img-link img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 14px;
    transition: transform .32s ease;
    display: block;
}
.xpc:hover .xpc__img-link img { transform: scale(1.05); }

/* ── Badge top-left ── */
.xpc__badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    font-size: .62rem;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
    padding: 4px 11px;
    border-radius: 50px;
    color: #fff;
    line-height: 1.3;
    pointer-events: none;
}
.xbadge--sale { background: #111; }
.xbadge--new  { background: #111; }

/* ── 3 icons top-right ── */
.xpc__icons {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 6px;
    opacity: 0;
    transform: translateX(10px);
    transition: opacity .22s ease, transform .22s ease;
}
.xpc:hover .xpc__icons { opacity: 1; transform: translateX(0); }

.xpc__icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #e0e0e0;
    color: #444;
    font-size: .8rem;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(0,0,0,.07);
    transition: background .18s, color .18s, border-color .18s;
}
.xpc__icon-btn:hover { background: #111; color: #fff; border-color: #111; }

/* ── Card body ── */
.xpc__body {
    padding: 12px 14px 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* ── Title ── */
.xpc__title {
    font-weight: 600;
    text-transform: capitalize;
    letter-spacing: .04em;
    line-height: 1.45;
    color: #111;
    margin: 0 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.xpc__title a { color: inherit; text-decoration: none;font-size: 14px; }
.xpc__title a:hover { color: #555; }

/* ── Price ── */
.xpc__price { margin-bottom: 12px; }
.xpc__price .price {
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
}
.xpc__price ins {
    font-size: 1.05rem;
    font-weight: 700;
    color: #e65100;
    text-decoration: none;
}
.xpc__price del { font-size: .8rem; color: #bbb; }
.xpc__price .amount { font-size: 1.05rem; font-weight: 700; color: #e65100; }

/* ── ATC wrapper ── */
.xpc__atc { margin-top: auto; position: relative; }

/* ── Add To Cart — default black ── */
.xpc__atc .button,
.xpc__atc .add_to_cart_button {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 11px 14px;
    background: #111 !important;
    color: #fff !important;
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    border: none !important;
    border-radius: 7px;
    text-decoration: none !important;
    cursor: pointer;
    transition: background .25s, opacity .25s;
    line-height: 1;
    outline: none;
}
.xpc__atc .button::before,
.xpc__atc .add_to_cart_button::before {
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    content: '\f07a';
    font-size: .8rem;
}
.xpc__atc .button:hover,
.xpc__atc .add_to_cart_button:hover {
    background: #333 !important;
}
.xpc__atc .button.loading { opacity: .65; pointer-events: none; }

/* ── Hide ATC button once added ── */
.xpc__atc.is-added .button,
.xpc__atc.is-added .add_to_cart_button {
    display: none !important;
}

/* ── Hide WooCommerce default added_to_cart link (we use our own) ── */
.xpc__atc .added_to_cart {
    display: none !important;
}

/* ── Custom View Cart button — hidden by default ── */
.xpc__view-cart {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 11px 14px;
    background: #1b5e20;
    color: #fff !important;
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    border: none;
    border-radius: 7px;
    text-decoration: none !important;
    cursor: pointer;
    transition: background .2s;
    line-height: 1;
}
.xpc__view-cart::before {
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    content: '\f07a';
    font-size: .8rem;
}
.xpc__view-cart:hover { background: #2e7d32; color: #fff !important; }

/* ── Show View Cart when added ── */
.xpc__atc.is-added .xpc__view-cart {
    display: flex;
}