/**
 * BSMC Product Grid — Component Styles
 * Dark background, Bebas Neue headlines, Proxima Nova body
 */

/* ── Section wrapper ───────────────────────────────────────────────────── */
.bsmc-product-grid {
    width: 100%;
    background: #0e0e0e;
    border-radius: 20px;
	margin: 20px;
	padding: 36px 40px;
    box-sizing: border-box;
}

/* ── Header ────────────────────────────────────────────────────────────── */
.bsmc-product-grid__header {
    padding: 0 4px 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bsmc-product-grid__headline {
    font-family: 'Bebas Neue', sans-serif;
    font-weight: 400;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1;
    color: #edeadf;
    text-transform: uppercase;
    margin: 0;
    letter-spacing: 1.8px;
}

.bsmc-product-grid__shop-all {
    font-family: 'Proxima Nova', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #edeadf;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding-bottom: 4px;
    border-bottom: 1.5px solid #edeadf;
    width: fit-content;
    transition: opacity 0.2s;
}

.bsmc-product-grid__shop-all:hover {
    opacity: 0.75;
}

/* ── Grid ──────────────────────────────────────────────────────────────── */
.bsmc-product-grid__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* 3 products → still 3 cols on desktop */
.bsmc-product-grid__grid:has(.bsmc-product-card:nth-child(3):last-child) {
    grid-template-columns: repeat(3, 1fr);
}

/* 2 products → 2 cols */
.bsmc-product-grid__grid:has(.bsmc-product-card:nth-child(2):last-child) {
    grid-template-columns: repeat(2, 1fr);
}

/* ── Product card ──────────────────────────────────────────────────────── */
.bsmc-product-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    text-decoration: none;
    cursor: pointer;
}

/* ── Image wrapper ─────────────────────────────────────────────────────── */
.bsmc-product-card__img-wrap {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: #1a1a1a;
}

.bsmc-product-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.bsmc-product-card:hover .bsmc-product-card__img {
    transform: scale(1.05);
}

.bsmc-product-card__img--placeholder {
    width: 100%;
    height: 100%;
    background: #1e1e1e;
}

/* ── Cart badge ────────────────────────────────────────────────────────── */
.bsmc-product-card__cart {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #FFFFFF;
    color: #111111;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    transition: transform 0.2s, background 0.2s;
    flex-shrink: 0;
}

.bsmc-product-card:hover .bsmc-product-card__cart {
    transform: scale(1.1);
    background: #edeadf;
    color: #edeadf;
}

/* ── Info ──────────────────────────────────────────────────────────────── */
.bsmc-product-card__info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0 2px;
}

.bsmc-product-card__title {
    font-family: 'Bebas Neue', sans-serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 1.1;
    color: #edeadf;
    text-transform: uppercase;
    letter-spacing: 1.8px;
    margin: 0;
}

.bsmc-product-card__price {
    font-family: 'Proxima Nova', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #edeadf;
    margin: 0;
}

/* ── Responsive ────────────────────────────────────────────────────────── */

/* Tablet: 2 columns */
@media ( max-width: 900px ) {
    .bsmc-product-grid__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    /* Override the :has() column rules at tablet — always 2 col */
    .bsmc-product-grid__grid:has(.bsmc-product-card:nth-child(3):last-child),
    .bsmc-product-grid__grid:has(.bsmc-product-card:nth-child(2):last-child) {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile: 2 columns (matches design), tighter padding */
@media ( max-width: 768px ) {
    .bsmc-product-grid {
        width: auto;
        margin-left: 8px;
        margin-right: 8px;
    }
}

@media ( max-width: 600px ) {
    .bsmc-product-grid {
        padding: 24px 16px;
        border-radius: 16px;
    }

    .bsmc-product-grid__header {
        padding-bottom: 20px;
    }

    .bsmc-product-grid__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .bsmc-product-card__img-wrap {
        border-radius: 10px;
    }

    .bsmc-product-card__title {
        font-size: 15px;
    }

    .bsmc-product-card__price {
        font-size: 13px;
    }

    .bsmc-product-card__cart {
        width: 34px;
        height: 34px;
        bottom: 8px;
        right: 8px;
    }

    .bsmc-product-card__cart svg {
        width: 15px;
        height: 15px;
    }
}
