/* ─── WHC Grid ─────────────────────────────────────────────────────── */
.whc-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* ─── Card ─────────────────────────────────────────────────────────── */
.whc-card {
    position: relative;
    display: flex;
    flex-direction: column;
}

/* ─── Image Wrap ────────────────────────────────────────────────────── */
.whc-img-wrap {
    position: relative;
    overflow: hidden;
    display: block;
    aspect-ratio: 3/4;
    background: #f5f5f5;
}

.whc-img-wrap a {
    display: block;
    width: 100%;
    height: 100%;
}

/* ─── Images ────────────────────────────────────────────────────────── */
.whc-img-primary,
.whc-img-hover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition-property: opacity;
    transition-timing-function: ease;
    transition-duration: 400ms;
}

.whc-img-hover {
    opacity: 0;
}

.whc-card:hover .whc-img-hover {
    opacity: 1;
}

/* ─── Badge ─────────────────────────────────────────────────────────── */
.whc-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #111;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 4px 10px;
    pointer-events: none;
    z-index: 5;
}

/* ─── Wishlist ──────────────────────────────────────────────────────── */
.whc-wish {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.92);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.3s ease, background 0.2s ease;
    line-height: 1;
}

.whc-card:hover .whc-wish {
    opacity: 1;
}

.whc-wish:hover {
    background: #fff;
}

/* ─── Button Wrap ───────────────────────────────────────────────────── */
.whc-btn-wrap {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 10;
    display: flex;
    flex-direction: column;
}

/* ─── Button — slide (default) ──────────────────────────────────────── */
.whc-grid[data-anim="slide"] .whc-btn-wrap {
    transform: translateY(100%);
    transition: transform 0.3s ease;
}
.whc-grid[data-anim="slide"] .whc-card:hover .whc-btn-wrap {
    transform: translateY(0);
}

/* ─── Button — fade ────────────────────────────────────────────────── */
.whc-grid[data-anim="fade"] .whc-btn-wrap {
    opacity: 0;
    transition: opacity 0.3s ease;
}
.whc-grid[data-anim="fade"] .whc-card:hover .whc-btn-wrap {
    opacity: 1;
}

/* ─── Button — scale ───────────────────────────────────────────────── */
.whc-grid[data-anim="scale"] .whc-btn-wrap {
    transform: scale(0.9);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.whc-grid[data-anim="scale"] .whc-card:hover .whc-btn-wrap {
    transform: scale(1);
    opacity: 1;
}

/* ─── Button — none ────────────────────────────────────────────────── */
.whc-grid[data-anim="none"] .whc-btn-wrap {
    opacity: 0;
    transition: opacity 0.15s ease;
}
.whc-grid[data-anim="none"] .whc-card:hover .whc-btn-wrap {
    opacity: 1;
}

/* ─── Add to Cart Button ────────────────────────────────────────────── */
.whc-atc-btn {
    display: block;
    width: 100%;
    background-color: #111;
    color: #fff !important;
    text-align: center;
    padding: 12px 0;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-decoration: none !important;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
    line-height: 1.4;
}

.whc-atc-btn:hover {
    background-color: #333;
    color: #fff !important;
}

.whc-uppercase {
    text-transform: uppercase;
}

/* Adding to cart state */
.whc-atc-btn.loading {
    opacity: 0.7;
    pointer-events: none;
}

.whc-atc-btn.added {
    background-color: #28a745;
    color: #fff !important;
}

/* ─── Quick View ────────────────────────────────────────────────────── */
.whc-quick-view {
    display: block;
    width: 100%;
    text-align: center;
    padding: 8px 0;
    font-size: 12px;
    color: #fff !important;
    background: rgba(0, 0, 0, 0.55);
    text-decoration: none !important;
    letter-spacing: 0.5px;
    transition: background 0.2s ease;
}

.whc-quick-view:hover {
    background: rgba(0, 0, 0, 0.75);
}

/* ─── Product Info ──────────────────────────────────────────────────── */
.whc-info {
    padding: 8px 0 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.whc-title {
    font-size: 14px;
    color: #111;
    text-decoration: none;
    line-height: 1.4;
    display: block;
}

.whc-title:hover {
    text-decoration: underline;
}

.whc-price {
    font-size: 14px;
    font-weight: 500;
    color: #111;
}

.whc-price del {
    opacity: 0.5;
    font-weight: 400;
    margin-right: 4px;
}

.whc-price ins {
    text-decoration: none;
    color: #c0392b;
}

/* ─── Swatches ──────────────────────────────────────────────────────── */
.whc-swatches {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.whc-swatch {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1.5px solid #ddd;
    cursor: pointer;
    background-size: cover;
    background-position: center;
    transition: border-color 0.2s ease, transform 0.2s ease;
    display: inline-block;
}

.whc-swatch:hover,
.whc-swatch.active {
    border-color: #111;
    transform: scale(1.15);
}

/* ─── Pagination ────────────────────────────────────────────────────── */
.whc-pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 32px;
    flex-wrap: wrap;
}

.whc-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid #ddd;
    color: #111;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.2s ease;
}

.whc-pagination .page-numbers:hover,
.whc-pagination .page-numbers.current {
    background: #111;
    color: #fff;
    border-color: #111;
}

/* ─── Responsive ────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .whc-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 767px) {
    .whc-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .whc-atc-btn {
        padding: 10px 0;
        font-size: 11px;
    }
}
