/* ============================================================
   boAt Products Widget — bpw-style.css
   Primary brand accent: #f73778
   ============================================================ */

/* ── Reset / base ─────────────────────────────────────────── */
.bpw-wrapper *,
.bpw-wrapper *::before,
.bpw-wrapper *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.bpw-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    width: 100%;
}

/* ── Category Tabs ────────────────────────────────────────── */
.bpw-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e8e8e8;
}

.bpw-tab {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    color: #555;
    padding: 7px 18px;
    border-radius: 999px;
    transition: background 0.2s ease, color 0.2s ease;
    white-space: nowrap;
    line-height: 1.4;
}

.bpw-tab:hover:not(.active) {
    color: #1a1a1a;
}

.bpw-tab.active {
    background-color: #1a1a1a;
    color: #ffffff;
}

/* Pink underline accent on the active tab bottom-edge */
.bpw-tab.active::after {
    content: '';
    display: block;
    height: 2px;
    width: 28px;
    background: #f73778;
    margin: 4px auto 0;
    border-radius: 2px;
}

/* ── Panel ────────────────────────────────────────────────── */
.bpw-panel {
    display: none;
}
.bpw-panel.active {
    display: block;
}

/* ── Grid ─────────────────────────────────────────────────── */
.bpw-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

/* ── Card ─────────────────────────────────────────────────── */
.bpw-card {
    background: #ffffff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
    position: relative;
}

.bpw-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(247, 55, 120, 0.13), 0 2px 10px rgba(0,0,0,0.06);
}

.bpw-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* ── Image Wrap ───────────────────────────────────────────── */
.bpw-image-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f5f5f5;
}

.bpw-product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.bpw-card:hover .bpw-product-img {
    transform: scale(1.04);
}

/* ── Badge ────────────────────────────────────────────────── */
.bpw-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #1a1a1a;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 9px;
    border-radius: 999px;
    letter-spacing: 0.2px;
    white-space: nowrap;
}

.bpw-badge-icon {
    font-size: 12px;
    line-height: 1;
}

/* ── Spec Strip ───────────────────────────────────────────── */
.bpw-spec-strip {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: #f8c400;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* Curved top corners only */
    border-radius: 22px 22px 0 0;
    z-index: 1;
}

.bpw-spec-label {
    font-size: 11px;
    font-weight: 700;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 65%;
}

/* ── Rating Pill ──────────────────────────────────────────── */
.bpw-rating-pill {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: #ffffff;
    border-radius: 999px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 700;
    color: #1a1a1a;
    flex-shrink: 0;
    box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}

.bpw-star {
    color: #f8c400;
    font-size: 12px;
    line-height: 1;
}

/* ── Card Body ────────────────────────────────────────────── */
.bpw-card-body {
    padding: 14px 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.bpw-product-name {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bpw-divider {
    border: none;
    border-top: 1px dashed #e0e0e0;
    margin: 2px 0;
}

/* ── Price Row ────────────────────────────────────────────── */
.bpw-price-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.bpw-price-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bpw-price-current {
    font-size: 18px;
    font-weight: 800;
    color: #1a1a1a;
    letter-spacing: -0.3px;
    line-height: 1.2;
}

/* WooCommerce injects <span class="woocommerce-Price-amount"> */
.bpw-price-current .woocommerce-Price-amount,
.bpw-price-current bdi {
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
}

.bpw-price-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.bpw-price-old {
    font-size: 12px;
    color: #999;
    text-decoration: line-through;
}

.bpw-price-old .woocommerce-Price-amount,
.bpw-price-old bdi {
    font-size: inherit;
    color: inherit;
    text-decoration: line-through;
}

/* Minimal green discount text — exact boAt style */
.bpw-discount-pct {
    font-size: 12px;
    font-weight: 700;
    color: #2e7d32;
}

/* ── Color Swatches ───────────────────────────────────────── */
.bpw-swatches {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.bpw-swatch {
    display: inline-block;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(0,0,0,0.12);
    flex-shrink: 0;
}

.bpw-swatch-more {
    font-size: 11px;
    font-weight: 600;
    color: #555;
    white-space: nowrap;
}

/* ── No products fallback ─────────────────────────────────── */
.bpw-no-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 0;
    color: #999;
    font-size: 14px;
}

/* ── Pink accent stripe at very top of widget ────────────── */
.bpw-wrapper::before {
    content: '';
    display: block;
    height: 3px;
    width: 60px;
    background: #f73778;
    border-radius: 2px;
    margin-bottom: 20px;
}

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

@media (max-width: 768px) {
    .bpw-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .bpw-product-name {
        font-size: 13px;
    }
    .bpw-price-current {
        font-size: 16px;
    }
    .bpw-tabs {
        gap: 6px 12px;
    }
    .bpw-tab {
        font-size: 13px;
        padding: 6px 14px;
    }
}

@media (max-width: 480px) {
    .bpw-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .bpw-card-body {
        padding: 10px 10px 12px;
    }
    .bpw-spec-strip {
        padding: 6px 10px;
    }
}
