/* =============================================
   HJ Theme — Product Loop Styles
   (hj-loop-inline.css merged, এই একটাই রাখুন)
   ============================================= */

/* ── Section ── */
.hj-section {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    padding: 20px 0;
}

/* ── Grid ── */
.hj-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 10px 0;
}
.hj-grid--archive {
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

/* ── Card ── */
.hj-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    transition:
        transform 0.22s,
        box-shadow 0.22s;
    position: relative;
    border: 1px solid rgba(232, 84, 122, 0.08);
}
.hj-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(232, 84, 122, 0.18);
}

/* ── Thumbnail ── */
.hj-card__thumb {
    position: relative;
    display: block;
    width: 100%;
    padding-top: 78%;
    overflow: hidden;
    background: #fdf0f3;
    text-decoration: none;
}
.hj-card__thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s;
    display: block;
}
.hj-card:hover .hj-card__thumb img {
    transform: scale(1.06);
}

.hj-card__thumb-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

/* ── Badge ── */
.hj-card__badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #e8577a;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 9px;
    border-radius: 20px;
    letter-spacing: 0.4px;
    z-index: 2;
}

/* ── Body ── */
.hj-card__body {
    padding: 12px 14px 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 8px;
    min-width: 0;
}

.hj-card__title-link {
    text-decoration: none;
    display: block;
}
.hj-card__title-link:hover .hj-card__title {
    color: #e8577a;
}

.hj-card__title {
    font-size: 15px;
    font-weight: 700;
    color: #2d1b2e;
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.15s;
}

/* ── Prices ── */
.hj-card__prices {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.hj-price-now {
    font-size: 17px;
    font-weight: 800;
    color: #e8577a;
}
.hj-price--free {
    color: #2e7d32;
}
.hj-price-old {
    font-size: 12px;
    color: #bbb;
    text-decoration: line-through;
}

/* ── Footer (Buttons) ── */
.hj-card__footer {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    padding-top: 4px;
    flex-wrap: wrap;
    width: 100%;
    min-width: 0;
}

/* ── Buttons ── */
.hj-btn {
    flex: 1 1 0;
    min-width: 0;
    max-width: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 9px 9px;
    font-size: 12.5px;
    font-weight: 700;
    border-radius: 18px;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
    text-align: center;
    line-height: 1;
    font-family: inherit;
    box-sizing: border-box;
    transition:
        background 0.18s,
        transform 0.15s,
        box-shadow 0.18s;
}
.hj-btn:active {
    transform: scale(0.97);
}

.hj-btn--cart {
    background: #e8577a;
    color: #fff;
    border: 1.5px solid #e8577a;
    box-shadow: 0 2px 8px rgba(232, 87, 122, 0.25);
}
.hj-btn--cart:hover {
    background: #d43f64;
    border-color: #d43f64;
    box-shadow: 0 4px 14px rgba(232, 87, 122, 0.38);
}
.hj-btn--cart.hj-added {
    background: #2e7d32 !important;
    border-color: #2e7d32 !important;
    box-shadow: 0 3px 10px rgba(46, 125, 50, 0.3) !important;
}

.hj-btn--buynow {
    background: #fff;
    color: #2d1b2e;
    border: 1.5px solid #e6dde2;
}
.hj-btn--buynow:hover {
    background: #fdf4f6;
    border-color: #e8577a;
    color: #e8577a;
}

/* ── Load More ── */
.hj-loadmore-wrap {
    text-align: center;
    margin-top: 36px;
}
.hj-loadmore-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #e8577a;
    color: #fff;
    border: none;
    border-radius: 30px;
    padding: 12px 40px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition:
        background 0.18s,
        transform 0.15s;
    box-shadow: 0 4px 14px rgba(232, 87, 122, 0.3);
}
.hj-loadmore-btn:hover {
    background: #d43f64;
    transform: translateY(-2px);
}
.hj-loadmore-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.7;
}

/* ── Empty State ── */
.hj-no-products {
    grid-column: 1 / -1;
    text-align: center;
    color: #aaa;
    padding: 60px 0;
    font-size: 15px;
}

/* ── Toast ── */
.hj-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #222;
    color: #fff;
    padding: 12px 22px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    opacity: 0;
    transition:
        opacity 0.3s,
        transform 0.3s;
    z-index: 99999;
    white-space: nowrap;
    pointer-events: none;
}
.hj-toast--show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ── Fade-in Animation ── */
@keyframes hjFadeIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.hj-card.hj-is-new {
    animation: hjFadeIn 0.4s ease both;
}

/* ================================
   RESPONSIVE
================================ */
@media (max-width: 1200px) {
    .hj-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
}
@media (max-width: 900px) {
    .hj-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}
@media (max-width: 680px) {
    .hj-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
    .hj-btn {
        font-size: 11.5px;
        padding: 8px 7px;
    }
    .hj-price-now {
        font-size: 15px;
    }
}
@media (max-width: 400px) {
    .hj-grid {
        grid-template-columns: 1fr;
    }
    .hj-btn {
        max-width: 100%;
    }
}
