/* ═══════════════════════════════════════════════════════════
   ESLIN BEAUTY – Tag Product Grid  |  eslin-tag-products.css
   ═══════════════════════════════════════════════════════════ */

/* ─── GRID WRAPPER ─────────────────────────────────────── */
.eslin-tpg-wrap {
    width: 100%;
    margin: 0 auto;
    font-family: inherit;
}

.eslin-tpg-empty {
    padding: 24px 0;
    text-align: center;
    color: #565656;
}

/* ─── GRID LIST ─────────────────────────────────────────── */
.eslin-tpg-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);   /* Desktop: 4 */
    gap: 20px;
    list-style: none;
    margin: 0 0 36px;
    padding: 0;
}

/* Tablet: 3 columns */
@media (max-width: 1024px) and (min-width: 601px) {
    .eslin-tpg-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Mobile: 2 columns */
@media (max-width: 600px) {
    .eslin-tpg-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

/* ─── CARD ──────────────────────────────────────────────── */
.eslin-tpg-card {
    display: flex;
    flex-direction: column;
    border: 0.5px solid #ffdbfc;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
    transition: box-shadow 0.25s ease;
}

.eslin-tpg-card:hover {
    box-shadow: 0 4px 18px rgba(163, 20, 150, 0.10);
}

/* ─── IMAGE ─────────────────────────────────────────────── */
.eslin-tpg-img-wrap {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background: #fafafa;
}

.eslin-tpg-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.eslin-tpg-card:hover .eslin-tpg-img-wrap img {
    transform: scale(1.04);
}

/* ─── SALE BADGE (circular, top-right) ───────────────────── */
.eslin-badge-sale {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: #A31496;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.15;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4px;
    z-index: 10;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(163, 20, 150, 0.30);
}

/* ─── SOLD-OUT BADGE (rectangular, top-left) ─────────────── */
.eslin-badge-oos {
    position: absolute;
    top: 5px;
    left: 5px;
    background: #ED0031;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 3px;
    z-index: 10;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(237, 0, 49, 0.30);
    white-space: nowrap;
}

/* ─── CARD BODY ─────────────────────────────────────────── */
.eslin-tpg-body {
    padding: 12px 12px 4px;
    text-align: center;
    flex: 1;               /* pushes footer to bottom */
}

.eslin-tpg-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 8px;
    line-height: 1.35;
    color: #222222;
}

.eslin-tpg-title a {
    color: #222222;
    text-decoration: none;
    transition: color 0.2s;
}

.eslin-tpg-title a:hover {
    color: #A31496;
}

.eslin-tpg-price {
    font-size: 14px;
    color: #222222;
    margin-bottom: 4px;
    text-align: center;
}

.eslin-tpg-price .price {
    display: inline-block;
}

.eslin-tpg-price ins {
    text-decoration: none;
    font-weight: 700;
}

.eslin-tpg-price del {
    color: #999;
    font-size: 12px;
    margin-right: 4px;
}

/* ─── FOOTER / ADD-TO-CART ──────────────────────────────── */
.eslin-tpg-footer {
    padding: 10px 0 16px;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: flex-end;         /* equal baseline alignment */
}

.eslin-tpg-atc {
    display: inline-block;
    margin-left: 25px;
    margin-right: 25px;
    width: calc(100% - 50px);
    padding: 9px 10px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;

    /* Normal state: outlined */
    background: transparent;
    color: #222222;
    border: 1px solid #565656;

    box-sizing: border-box;
}

.eslin-tpg-atc:hover,
.eslin-tpg-atc:focus {
    background: #A31496;
    color: #fff !important;
    border-color: #A31496;
    outline: none;
}

.eslin-tpg-atc--disabled {
    opacity: 0.55;
    cursor: default;
    pointer-events: none;
}

/* Equal horizontal alignment — all ATC buttons at same height */
.eslin-tpg-card {
    display: flex;
    flex-direction: column;
}

.eslin-tpg-footer {
    margin-top: auto;
}

/* ─── PAGINATION ────────────────────────────────────────── */
.eslin-tpg-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0 32px;
}

.eslin-tpg-page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border: 1px solid #565656;
    border-radius: 4px;
    font-size: 14px;
    color: #565656;
    text-decoration: none;
    background: transparent;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    font-weight: 500;
    line-height: 1;
}

/* Arrows */
.eslin-tpg-arrow {
    font-size: 18px;
    font-weight: 400;
    padding: 0 10px;
}

/* Hover */
.eslin-tpg-page:hover:not(.eslin-active):not(.eslin-disabled):not(.eslin-ellipsis) {
    background: #A31496;
    color: #fff;
    border-color: #A31496;
}

/* Active / current */
.eslin-tpg-page.eslin-active {
    background: #A31496;
    color: #fff;
    border-color: #A31496;
    cursor: default;
    pointer-events: none;
}

/* Disabled arrow */
.eslin-tpg-page.eslin-disabled {
    opacity: 0.35;
    cursor: default;
    pointer-events: none;
}

/* Ellipsis */
.eslin-tpg-page.eslin-ellipsis {
    border: none;
    background: transparent;
    cursor: default;
    pointer-events: none;
    color: #565656;
    min-width: 20px;
    padding: 0 4px;
}

/* ─── RESPONSIVE PAGINATION ─────────────────────────────── */
@media (max-width: 480px) {
    .eslin-tpg-page {
        min-width: 32px;
        height: 32px;
        font-size: 13px;
    }
}
