/* ============================================================
   BATTERY-PRODUCTS.CSS
   Standalone stylesheet for battery-products.html — self-contained,
   no dependency on the rest of the site's stylesheets.
   ============================================================ */

:root {
    --bp-ink: #0f172a;
    --bp-muted: #64748b;
    --bp-faint: #94a3b8;
    --bp-line: #e8ebf1;
    --bp-bg: #f6f8fb;
    --bp-card: #ffffff;
    --bp-radius: 16px;
    --bp-badge: #0f172a;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background: var(--bp-bg);
    color: var(--bp-ink);
    -webkit-font-smoothing: antialiased;
}

/* ---- Page header ---- */
.bp-header {
    background: #ffffff;
    border-bottom: 1px solid var(--bp-line);
    padding: 18px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.bp-header__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--bp-ink);
    text-decoration: none;
}

.bp-header__back {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--bp-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.bp-header__back:hover {
    color: var(--bp-ink);
}

/* ---- Page layout ---- */
.battery-page {
    max-width: 1440px;
    margin: 0 auto;
    padding: 32px 30px 90px;
    display: flex;
    align-items: flex-start;
    gap: 28px;
}

/* ============================================================
   FILTER SIDEBAR
   ============================================================ */
.filters-panel {
    flex: 0 0 270px;
    position: sticky;
    top: 24px;
    background: var(--bp-card);
    border-radius: 18px;
    box-shadow: 0 4px 22px rgba(15, 23, 42, 0.06);
    padding: 24px 20px;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
}

.filters-panel__title {
    font-size: 1.05rem;
    font-weight: 800;
    margin: 0 0 20px;
}

.filters-panel__section {
    padding-bottom: 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--bp-line);
}

.filters-panel__section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.filters-panel__heading {
    font-size: 0.85rem;
    font-weight: 700;
    margin: 0 0 12px;
    color: var(--bp-ink);
}

.filter-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-check {
    display: flex;
    align-items: center;
}

.filter-check input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 17px;
    height: 17px;
    border: 1.5px solid #cbd5e1;
    border-radius: 5px;
    margin: 0 10px 0 0;
    flex-shrink: 0;
    cursor: pointer;
    position: relative;
    transition: background 0.2s, border-color 0.2s;
}

.filter-check input[type="checkbox"]:checked {
    background: #1d4ed8;
    border-color: #1d4ed8;
}

.filter-check input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 4px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.filter-check label {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    color: #334155;
    cursor: pointer;
    user-select: none;
}

.filter-check__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
    flex-shrink: 0;
}

.filter-check--rating label {
    letter-spacing: 1px;
}

.filter-check--rating label {
    color: #f59e0b;
    font-size: 0.8rem;
}

/* ---- Price range slider (dual-thumb, native inputs overlaid) ---- */
.price-slider__labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--bp-ink);
    margin-bottom: 12px;
}

.price-slider__track-wrap {
    position: relative;
    height: 18px;
}

.price-slider__track,
.price-slider__track-active {
    position: absolute;
    top: 50%;
    height: 4px;
    transform: translateY(-50%);
    border-radius: 4px;
}

.price-slider__track {
    left: 0;
    right: 0;
    background: #e2e8f0;
}

.price-slider__track-active {
    background: #1d4ed8;
}

.price-slider__input {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    width: 100%;
    margin: 0;
    background: transparent;
    -webkit-appearance: none;
    appearance: none;
    pointer-events: none;
}

.price-slider__input::-webkit-slider-thumb {
    -webkit-appearance: none;
    pointer-events: auto;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid #1d4ed8;
    cursor: pointer;
    margin-top: 1px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.price-slider__input::-moz-range-thumb {
    pointer-events: auto;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid #1d4ed8;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.price-slider__input::-webkit-slider-runnable-track {
    background: transparent;
}

.price-slider__input::-moz-range-track {
    background: transparent;
}

/* ============================================================
   PRODUCT SECTION — toolbar, active filters, grid, pagination
   ============================================================ */
.battery-products {
    flex: 1;
    min-width: 0;
}

.products-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.capacity-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.capacity-filter-bar__btn {
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--bp-ink);
    background: #fff;
    border: 1px solid var(--bp-line);
    border-radius: 50px;
    padding: 7px 16px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.capacity-filter-bar__btn:hover {
    border-color: var(--bp-ink);
}

.capacity-filter-bar__btn.is-active {
    background: var(--bp-ink);
    border-color: var(--bp-ink);
    color: #fff;
}

.products-toolbar__count {
    font-size: 0.85rem;
    color: var(--bp-muted);
    margin: 0;
}

.products-toolbar__sort {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--bp-ink);
}

.products-toolbar__sort select {
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--bp-ink);
    background: #fff;
    border: 1px solid var(--bp-line);
    border-radius: 50px;
    padding: 8px 14px;
    cursor: pointer;
}

.active-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 22px;
    min-height: 20px;
}

.active-filters__label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--bp-muted);
}

.active-filters__pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.active-filters__pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #0f172a;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 6px 8px 6px 12px;
    border-radius: 50px;
}

.active-filters__pill button {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    font-size: 0.8rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.active-filters__pill button:hover {
    background: rgba(255, 255, 255, 0.4);
}

.active-filters__clear {
    font-size: 0.78rem;
    font-weight: 700;
    color: #dc2626;
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: underline;
}

/* ---- Product grid ---- */
.battery-products__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
    min-height: 200px;
    transition: opacity 0.18s ease;
}

.battery-products__grid.is-switching {
    opacity: 0;
}

/* ---- Product card ---- */
.b-card {
    background: var(--bp-card);
    border: 1px solid var(--bp-line);
    border-radius: var(--bp-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
    transition: transform 0.35s cubic-bezier(.22, .68, 0, 1.2), box-shadow 0.35s ease;
    opacity: 0;
    animation: bCardIn 0.45s cubic-bezier(.22, .68, 0, 1.2) forwards;
}

@keyframes bCardIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.b-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.12);
}

.b-card__media {
    position: relative;
    aspect-ratio: 1 / 0.92;
    background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 10%, white), #ffffff);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.b-card__media svg {
    width: 62%;
    height: 62%;
    transition: transform 0.5s ease;
}

/* Real product photo, layered over the vector illustration; onerror hides it so the SVG shows through. */
.b-card__photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    padding: 30px;
    transition: transform 0.5s ease;
}

.b-card:hover .b-card__media svg,
.b-card:hover .b-card__photo {
    transform: scale(1.08);
}

.b-card__badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--bp-badge);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 5px 11px;
    border-radius: 50px;
    z-index: 2;
}

.b-card__actions {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transform: translateX(10px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 2;
}

.b-card:hover .b-card__actions,
.b-card:focus-within .b-card__actions {
    opacity: 1;
    transform: translateX(0);
}

.b-card__action-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #ffffff;
    border: none;
    color: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.18);
    transition: background 0.2s, color 0.2s, transform 0.2s;
    text-decoration: none;
}

.b-card__action-btn:hover {
    background: var(--accent);
    color: #fff;
    transform: scale(1.08);
}

.b-card__wishlist.is-active {
    color: #ef4444;
}

.b-card__wishlist.is-active svg {
    fill: #ef4444;
    stroke: #ef4444;
}

.b-card__whatsapp:hover {
    background: #25d366;
}

.b-card__body {
    padding: 14px 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.b-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.72rem;
    color: var(--bp-faint);
}

.b-card__category {
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.b-card__rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 700;
    color: var(--bp-ink);
}

.b-card__name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--bp-ink);
    margin: 0;
    line-height: 1.3;
}

.b-card__price-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.b-card__price {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--accent-dark);
}

.b-card__mrp {
    font-size: 0.82rem;
    color: var(--bp-faint);
    text-decoration: line-through;
}

/* ---- Pagination ---- */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 32px;
}

.pagination__btn {
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid var(--bp-line);
    background: #fff;
    color: var(--bp-ink);
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.pagination__btn:hover:not(:disabled) {
    border-color: #1d4ed8;
    color: #1d4ed8;
}

.pagination__btn.is-active {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #fff;
}

.pagination__btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ============================================================
   QUICK VIEW MODAL
   ============================================================ */
.qv-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 200;
}

.qv-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

.qv-modal {
    background: #fff;
    border-radius: 20px;
    max-width: 760px;
    width: 100%;
    max-height: 88vh;
    overflow-y: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    transform: scale(0.94) translateY(10px);
    transition: transform 0.25s ease;
}

.qv-overlay.is-open .qv-modal {
    transform: scale(1) translateY(0);
}

.qv-modal__media {
    position: relative;
    background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 12%, white), #ffffff);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    overflow: hidden;
}

.qv-modal__media svg {
    width: 80%;
    max-width: 260px;
}

/* Real product photo, layered over the vector illustration; onerror hides it so the SVG shows through. */
.qv-modal__photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.qv-modal__body {
    padding: 30px 30px 30px 24px;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.qv-modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: #f1f5f9;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    color: var(--bp-muted);
}

.qv-modal__close:hover {
    background: #e2e8f0;
}

.qv-modal__category {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--bp-faint);
}

.qv-modal__name {
    font-size: 1.3rem;
    font-weight: 800;
    margin: 0;
    color: var(--bp-ink);
}

.qv-modal__rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--bp-ink);
}

.qv-modal__rating span {
    margin-left: 4px;
}

.qv-modal__desc {
    font-size: 0.85rem;
    color: var(--bp-muted);
    line-height: 1.65;
    margin: 4px 0;
}

.qv-modal__specs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 14px;
    padding: 14px 0;
    border-top: 1px dashed var(--bp-line);
    border-bottom: 1px dashed var(--bp-line);
}

.qv-modal__spec {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.qv-modal__spec span {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--bp-faint);
    font-weight: 700;
}

.qv-modal__spec strong {
    font-size: 0.88rem;
    color: #1e293b;
}

.qv-modal__price-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.qv-modal__price {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--bp-ink);
}

.qv-modal__mrp {
    font-size: 0.9rem;
    color: var(--bp-faint);
    text-decoration: line-through;
}

.qv-modal__discount {
    font-size: 0.78rem;
    font-weight: 700;
    color: #16a34a;
}

.qv-modal__book {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 20px;
    border-radius: 50px;
    background: #25d366;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    margin-top: 6px;
    transition: filter 0.2s, transform 0.2s;
}

.qv-modal__book:hover {
    filter: brightness(1.08);
    transform: translateY(-2px);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1023px) {
    .battery-page {
        flex-direction: column;
        padding: 24px 20px 70px;
    }

    .filters-panel {
        position: static;
        width: 100%;
        max-height: none;
    }

    .battery-products__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }

    .qv-modal {
        grid-template-columns: 1fr;
    }

    .qv-modal__media {
        padding: 24px;
    }
}

@media (max-width: 599px) {
    .bp-header {
        padding: 14px 18px;
    }

    .battery-page {
        padding: 20px 16px 56px;
        gap: 20px;
    }

    .products-toolbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .battery-products__grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {

    .b-card,
    .battery-products__grid,
    .qv-modal,
    .qv-overlay {
        animation: none;
        transition: none;
    }
}