/* ===================================================
   Brand Products Grid - bpg.css v1.0.0
   =================================================== */

.bpg-wrap { margin: 0 0 40px; }

.bpg-heading {
    font-size: 1.5em;
    font-weight: 700;
    margin-bottom: 20px;
    color: #111;
}

/* ---- GRID ---- */
.bpg-grid {
    display: grid;
    grid-template-columns: repeat(var(--bpg-cols, 4), 1fr);
    gap: 20px;
}

@media (max-width: 1024px) {
    .bpg-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    .bpg-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .bpg-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
}

/* ---- CARD ---- */
.bpg-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    overflow: hidden;
    transition: border-color .2s, box-shadow .2s;
    display: flex;
    flex-direction: column;
}
.bpg-card:hover {
    border-color: #e63946;
    box-shadow: 0 4px 16px rgba(230,57,70,.12);
}
.bpg-card.bpg-out-of-stock { opacity: .65; }

.bpg-img-wrap {
    display: block;
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f5f5f5;
}
.bpg-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s;
    display: block;
}
.bpg-card:hover .bpg-img-wrap img { transform: scale(1.04); }

.bpg-badge-stock {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #555;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.bpg-card-body {
    padding: 12px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 5px;
}

.bpg-title {
    font-size: 13px;
    font-weight: 600;
    color: #111;
    text-decoration: none;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.bpg-title:hover { color: #e63946; }

.bpg-rating { font-size: 12px; line-height: 1; }
.bpg-rating .star-rating { font-size: .8em; }

.bpg-price {
    font-size: 15px;
    font-weight: 700;
    color: #111;
    margin-top: auto;
    padding-top: 4px;
}
.bpg-price del { color: #999; font-weight: 400; font-size: 12px; margin-right: 4px; }
.bpg-price ins { text-decoration: none; color: #e63946; }

.bpg-btn {
    display: block;
    text-align: center;
    background: #e63946;
    color: #111 !important;
    font-size: 12px;
    font-weight: 700;
    padding: 8px 10px;
    border-radius: 4px;
    text-decoration: none !important;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-top: 8px;
    transition: background .2s;
}
.bpg-btn:hover { background: #c1121f; color: #fff !important; }

/* ---- SLIDER ---- */
.bpg-style-slider .bpg-slider-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bpg-style-slider .bpg-slider-track {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex: 1;
    padding: 4px 0 8px;
}
.bpg-style-slider .bpg-slider-track::-webkit-scrollbar { display: none; }

.bpg-style-slider .bpg-card {
    flex: 0 0 calc((100% - 16px * (var(--bpg-cols,4) - 1)) / var(--bpg-cols,4));
    scroll-snap-align: start;
    min-width: 160px;
}

@media (max-width: 768px) {
    .bpg-style-slider .bpg-card {
        flex: 0 0 calc(50% - 8px);
    }
}
@media (max-width: 480px) {
    .bpg-style-slider .bpg-card {
        flex: 0 0 calc(50% - 8px);
    }
}

.bpg-arrow {
    background: #fff;
    border: 2px solid #e8e8e8;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color .2s, background .2s;
    color: #111;
    padding: 0;
}
.bpg-arrow:hover { border-color: #e63946; background: #e63946; color: #fff; }
.bpg-arrow:disabled { opacity: .3; cursor: default; }

.bpg-empty { color: #888; font-style: italic; }
