.bc-archive { font-family: inherit; color: var(--bc-text, #1a1a1a); }

/* ===== Reset theme heading interference ===== */
.bc-archive h1,
.bc-archive h2,
.bc-archive h3,
.bc-archive h4 {
    margin: 0;
    padding: 0;
    line-height: 1.2;
    font-family: inherit;
}

/* ===== Breadcrumb ===== */
.bc-archive__breadcrumb {
    font-size: 0.85rem;
    color: var(--bc-text-mute, #6b6b6b);
    margin-bottom: 1rem;
}
.bc-archive__breadcrumb a { color: inherit; text-decoration: none; }
.bc-archive__breadcrumb a:hover { color: var(--bc-teal-dark, #0f8d83); }
.bc-archive__breadcrumb-sep { opacity: 0.5; margin: 0 0.25rem; }
.bc-archive__breadcrumb-current {
    color: var(--bc-text, #1a1a1a);
    font-weight: 500;
}

/* ===== Header ===== */
.bc-archive__header {
    margin-bottom: 1.5rem;
}
.bc-archive__title {
    font-size: 1.75rem !important;
    font-weight: 700 !important;
    margin: 0 0 0.5rem !important;
    line-height: 1.2 !important;
    color: var(--bc-text, #1a1a1a) !important;
    letter-spacing: normal !important;
}
.bc-archive__description {
    color: var(--bc-text-mute, #6b6b6b);
    font-size: 0.95rem;
    max-width: 720px;
}

/* ===== Layout ===== */
.bc-archive__layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 2rem;
    align-items: start;
}

/* ===== Sidebar ===== */
.bc-archive__sidebar { position: sticky; top: 1rem; }
.bc-archive__sidebar-toggle {
    display: none;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bc-teal-light, #e6f7f5);
    border: none;
    border-radius: 8px;
    color: var(--bc-teal-dark, #0f8d83);
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 1rem;
}
.bc-archive__sidebar-inner {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.bc-archive__filter {
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 8px;
    padding: 1rem 1.1rem;
}
.bc-archive__filter-heading {
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    color: var(--bc-text-mute, #6b6b6b) !important;
    margin: 0 0 0.6rem !important;
    line-height: 1.3 !important;
}
.bc-archive__filter-list { list-style: none; margin: 0; padding: 0; }
.bc-archive__filter-item a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.45rem 0.55rem;
    border-radius: 6px;
    color: var(--bc-text, #1a1a1a);
    text-decoration: none;
    font-size: 0.88rem;
    transition: background 0.15s ease, color 0.15s ease;
}
.bc-archive__filter-item a:hover,
.bc-archive__filter-item.is-active a {
    background: var(--bc-teal-light, #e6f7f5);
    color: var(--bc-teal-dark, #0f8d83);
    font-weight: 500;
}
.bc-archive__filter-count {
    color: var(--bc-text-mute, #6b6b6b);
    font-size: 0.72rem;
    background: #f5f5f5;
    padding: 0.1rem 0.45rem;
    border-radius: 10px;
    min-width: 22px;
    text-align: center;
}
.bc-archive__filter-item a:hover .bc-archive__filter-count,
.bc-archive__filter-item.is-active a .bc-archive__filter-count {
    background: #fff;
    color: var(--bc-teal-dark, #0f8d83);
}

/* ===== Price filter ===== */
.bc-archive__price-inputs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
}
.bc-archive__price label {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.bc-archive__price label span {
    font-size: 0.68rem;
    color: var(--bc-text-mute, #6b6b6b);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}
.bc-archive__price input,
.bc-archive__price input[type="number"] {
    width: 100% !important;
    padding: 0.5rem 0.6rem !important;
    border: 1px solid #d4d4d4 !important;
    border-radius: 6px !important;
    font-size: 0.88rem !important;
    font-family: inherit !important;
    background: #fff !important;
    color: var(--bc-text, #1a1a1a) !important;
    box-shadow: none !important;
    height: auto !important;
    line-height: 1.4 !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    appearance: textfield;
    -moz-appearance: textfield;
    -webkit-appearance: none;
}
.bc-archive__price input:focus,
.bc-archive__price input[type="number"]:focus {
    outline: none !important;
    border-color: var(--bc-teal, #1ab5a8) !important;
    box-shadow: 0 0 0 3px var(--bc-teal-light, #e6f7f5) !important;
}
.bc-archive__price input:hover {
    border-color: #b8b8b8 !important;
}
.bc-archive__price input::-webkit-outer-spin-button,
.bc-archive__price input::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

.bc-archive__price-btn {
    width: 100%;
    padding: 0.5rem !important;
    background: var(--bc-teal, #1ab5a8) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    font-size: 0.82rem !important;
    cursor: pointer;
    transition: background 0.15s ease;
    box-shadow: none !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}
.bc-archive__price-btn:hover {
    background: var(--bc-teal-dark, #0f8d83) !important;
}
.bc-archive__price-reset {
    display: block;
    text-align: center;
    margin-top: 0.4rem;
    font-size: 0.75rem;
    color: var(--bc-text-mute, #6b6b6b);
    text-decoration: underline;
}
.bc-archive__price-range {
    margin: 0.5rem 0 0;
    color: var(--bc-text-mute, #6b6b6b);
    text-align: center;
    font-size: 0.75rem;
}

/* ===== Main ===== */
.bc-archive__main { min-width: 0; }

.bc-archive__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #ececec;
}
.bc-archive__count {
    color: var(--bc-text-mute, #6b6b6b);
    font-size: 0.88rem;
}
.bc-archive__count strong {
    color: var(--bc-text, #1a1a1a);
    font-weight: 600;
}
.bc-archive__toolbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* ===== Vista toggle ===== */
.bc-archive__view {
    display: inline-flex;
    background: #f5f5f5;
    border-radius: 6px;
    padding: 3px;
    gap: 2px;
}
.bc-archive__view-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 30px;
    background: transparent !important;
    border: none !important;
    border-radius: 4px !important;
    cursor: pointer;
    color: #6b6b6b !important;
    transition: background 0.15s ease, color 0.15s ease;
    padding: 0 !important;
    box-shadow: none !important;
    line-height: 1 !important;
}
.bc-archive__view-btn svg {
    width: 15px;
    height: 15px;
    stroke: currentColor;
}
.bc-archive__view-btn:hover {
    color: #1a1a1a !important;
    background: transparent !important;
}
.bc-archive__view-btn.is-active {
    background: #fff !important;
    color: var(--bc-teal-dark, #0f8d83) !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
}

.bc-archive__sort {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.bc-archive__sort-label {
    font-size: 0.85rem;
    color: var(--bc-text-mute, #6b6b6b);
}
.bc-archive__sort select {
    padding: 0.4rem 1.8rem 0.4rem 0.65rem;
    border: 1px solid #d4d4d4;
    border-radius: 6px;
    background-color: #fff;
    font-size: 0.85rem;
    font-family: inherit;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b6b6b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 10px;
}
.bc-archive__sort select:focus {
    outline: none;
    border-color: var(--bc-teal, #1ab5a8);
}

/* ===== Results area + loading state ===== */
.bc-archive__results {
    position: relative;
    min-height: 200px;
    transition: opacity 0.2s ease;
}
.bc-archive__results.is-loading {
    opacity: 0.5;
    pointer-events: none;
}
.bc-archive__results.is-loading::after {
    content: '';
    position: absolute;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 36px;
    border: 3px solid var(--bc-teal-light, #e6f7f5);
    border-top-color: var(--bc-teal, #1ab5a8);
    border-radius: 50%;
    animation: bc-spin 0.8s linear infinite;
}
@keyframes bc-spin { to { transform: translateX(-50%) rotate(360deg); } }

/* ===== Grid ===== */
.bc-archive__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.bc-product {
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.bc-product:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
    border-color: transparent;
}
.bc-product__link {
    display: block;
    text-decoration: none !important;
    color: inherit !important;
}
.bc-product__img-wrap {
    background: #ffffff !important;
    position: relative;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 1rem;
}
.bc-product__img {
    max-width: 85%;
    max-height: 85%;
    object-fit: contain;
    transition: transform 0.3s ease;
}
.bc-product:hover .bc-product__img { transform: scale(1.04); }
.bc-product__badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: var(--bc-teal, #1ab5a8);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    padding: 0.2rem 0.45rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 1;
    line-height: 1.4;
}
.bc-product__info {
    padding: 0.7rem 0.85rem 0.4rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.bc-product__name {
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    line-height: 1.35 !important;
    margin: 0 !important;
    color: var(--bc-text, #1a1a1a) !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.3em;
    letter-spacing: normal !important;
    text-transform: none !important;
}
.bc-product__price {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--bc-teal-dark, #0f8d83);
    margin-top: auto;
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    flex-wrap: wrap;
}
.bc-product__price del {
    color: var(--bc-text-mute, #6b6b6b);
    font-weight: 400;
    font-size: 0.78rem;
}
.bc-product__price ins {
    text-decoration: none;
    background: none;
    color: var(--bc-teal-dark, #0f8d83);
}
.bc-product__actions {
    padding: 0 0.85rem 0.85rem;
}
.bc-product__add-to-cart,
.bc-product .button {
    display: block !important;
    width: 100%;
    padding: 0.5rem 0.75rem !important;
    background: var(--bc-teal-light, #e6f7f5) !important;
    color: var(--bc-teal-dark, #0f8d83) !important;
    border: none !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    font-size: 0.82rem !important;
    text-align: center !important;
    text-decoration: none !important;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease !important;
    line-height: 1.3 !important;
    box-shadow: none !important;
    margin: 0 !important;
    letter-spacing: normal !important;
    text-transform: none !important;
}
.bc-product__add-to-cart:hover,
.bc-product .button:hover {
    background: var(--bc-teal, #1ab5a8) !important;
    color: #fff !important;
}
.bc-product .added_to_cart { display: none !important; }

/* ===== List view ===== */
.bc-archive__results.is-list-view .bc-archive__grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
}
.bc-archive__results.is-list-view .bc-product {
    flex-direction: row;
    align-items: stretch;
}
.bc-archive__results.is-list-view .bc-product__link {
    display: flex;
    flex: 1;
    align-items: stretch;
}
.bc-archive__results.is-list-view .bc-product__img-wrap {
    aspect-ratio: 1 / 1;
    width: 140px;
    flex-shrink: 0;
}
.bc-archive__results.is-list-view .bc-product__info {
    padding: 1rem 1.25rem;
    justify-content: center;
}
.bc-archive__results.is-list-view .bc-product__name {
    font-size: 0.95rem !important;
    -webkit-line-clamp: 3;
    min-height: 0;
}
.bc-archive__results.is-list-view .bc-product__price {
    font-size: 1.05rem;
}
.bc-archive__results.is-list-view .bc-product__actions {
    display: flex;
    align-items: center;
    padding: 1rem 1rem 1rem 0;
    flex-shrink: 0;
}
.bc-archive__results.is-list-view .bc-product__actions .button {
    width: auto;
    padding: 0.55rem 1.25rem !important;
    white-space: nowrap;
}

/* ===== Empty state ===== */
.bc-archive__empty {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--bc-text-mute, #6b6b6b);
}

/* ===== Pagination ===== */
.bc-archive__pagination {
    margin-top: 2.5rem;
    display: flex;
    justify-content: center;
}
.bc-archive__pagination ul {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
    justify-content: center;
}
.bc-archive__pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.55rem;
    border: 1px solid #ececec;
    border-radius: 6px;
    color: var(--bc-text, #1a1a1a);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    cursor: pointer;
    background: #fff;
}
.bc-archive__pagination .page-numbers:hover {
    background: var(--bc-teal-light, #e6f7f5);
    color: var(--bc-teal-dark, #0f8d83);
    border-color: var(--bc-teal-light, #e6f7f5);
}
.bc-archive__pagination .page-numbers.current {
    background: var(--bc-teal, #1ab5a8);
    color: #fff;
    border-color: var(--bc-teal, #1ab5a8);
}
.bc-archive__pagination .dots {
    border: none;
    background: none;
}

/* ===== Toast notifications ===== */
.bc-toast-stack {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}
.bc-toast {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.1rem 0.85rem 0.85rem;
    background: #fff;
    border: 1px solid #ececec;
    border-left: 4px solid var(--bc-teal, #1ab5a8);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    min-width: 280px;
    max-width: 380px;
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
    pointer-events: auto;
}
.bc-toast.is-visible {
    transform: translateX(0);
    opacity: 1;
}
.bc-toast.is-error { border-left-color: #e63946; }
.bc-toast__icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bc-teal-light, #e6f7f5);
    color: var(--bc-teal-dark, #0f8d83);
    border-radius: 50%;
}
.bc-toast.is-error .bc-toast__icon {
    background: #fde8ea;
    color: #e63946;
}
.bc-toast__body { flex: 1; min-width: 0; }
.bc-toast__title {
    font-size: 0.88rem !important;
    font-weight: 600 !important;
    color: var(--bc-text, #1a1a1a) !important;
    margin: 0 0 2px !important;
    line-height: 1.3 !important;
}
.bc-toast__message {
    font-size: 0.8rem;
    color: var(--bc-text-mute, #6b6b6b);
    margin: 0;
    line-height: 1.35;
}
.bc-toast__close {
    flex-shrink: 0;
    background: none !important;
    border: none !important;
    cursor: pointer;
    color: var(--bc-text-mute, #6b6b6b);
    padding: 0.2rem !important;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none !important;
}
.bc-toast__close:hover { color: var(--bc-text, #1a1a1a); }
.bc-toast__cta {
    display: inline-block;
    margin-top: 0.4rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--bc-teal-dark, #0f8d83);
    text-decoration: none;
}
.bc-toast__cta:hover { text-decoration: underline; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .bc-archive__layout { grid-template-columns: 1fr; }
    .bc-archive__sidebar { position: static; }
    .bc-archive__sidebar-toggle { display: flex; }
    .bc-archive__sidebar-inner { display: none; }
    .bc-archive__sidebar.is-open .bc-archive__sidebar-inner { display: flex; }
    .bc-archive__title { font-size: 1.4rem !important; }
}

@media (max-width: 600px) {
    .bc-archive__toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    .bc-archive__toolbar-right {
        justify-content: space-between;
    }
    .bc-archive__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.6rem;
    }
    .bc-product__info { padding: 0.55rem 0.7rem 0.35rem; }
    .bc-product__name { font-size: 0.78rem !important; min-height: 2.1em; }
    .bc-product__price { font-size: 0.88rem; }
    .bc-product__actions { padding: 0 0.7rem 0.7rem; }

    .bc-archive__results.is-list-view .bc-product__img-wrap { width: 100px; }
    .bc-archive__results.is-list-view .bc-product__info { padding: 0.75rem; }
    .bc-archive__results.is-list-view .bc-product__actions { display: none; }

    .bc-toast-stack {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
    }
    .bc-toast {
        min-width: 0;
        max-width: none;
    }
}