/* Shopix-style product catalog (KG3 brand accents) */

.shop-page {
    background: #f8fafc;
    padding: 1.25rem 0 3rem;
}

.shop-page__inner {
    max-width: var(--storefront-container-max, 1280px);
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 1024px) {
    .shop-page__inner {
        padding: 0 1.5rem;
    }
}

.shop-breadcrumb {
    margin-bottom: 1.25rem;
    font-size: 0.8125rem;
    color: #64748b;
}

.shop-breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.shop-breadcrumb a {
    color: #64748b;
    text-decoration: none;
    transition: color 0.15s ease;
}

.shop-breadcrumb a:hover {
    color: #af3e3e;
}

.shop-breadcrumb li:last-child {
    color: #0f172a;
    font-weight: 600;
}

.shop-breadcrumb__sep {
    color: #cbd5e1;
}

.shop-layout {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 1024px) {
    .shop-layout {
        grid-template-columns: 260px minmax(0, 1fr);
        gap: 2rem;
        align-items: start;
    }

    .shop-layout--no-sidebar {
        grid-template-columns: minmax(0, 1fr);
    }
}

.shop-page-intro {
    margin-bottom: 1.5rem;
}

.shop-main__title--meta {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #64748b;
}

.shop-sidebar {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1.25rem 1.25rem 1.5rem;
}

.shop-sidebar__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.shop-sidebar__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
}

.shop-sidebar__clear {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
}

.shop-sidebar__clear:hover {
    color: #af3e3e;
}

.shop-filter-block {
    padding-top: 1rem;
    margin-top: 1rem;
    border-top: 1px solid #f1f5f9;
}

.shop-filter-block:first-of-type {
    border-top: none;
    margin-top: 0;
    padding-top: 0;
}

.shop-filter-block__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.shop-filter-block__title {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 700;
    color: #0f172a;
}

.shop-filter-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    max-height: 220px;
    overflow-y: auto;
}

.shop-filter-list--categories {
    max-height: none;
    overflow: visible;
    gap: 0;
}

.shop-filter-list--availability {
    max-height: none;
    overflow: visible;
}

.shop-filter-indicator {
    display: inline-flex;
    flex-shrink: 0;
    width: 1rem;
    height: 1rem;
    border-radius: 9999px;
    border: 1px solid #cbd5e1;
    box-sizing: border-box;
}

.shop-filter-indicator.is-active {
    border-width: 5px;
    border-color: #0f172a;
}

.shop-filter-parent-group {
    padding: 0.15rem 0;
}

.shop-filter-parent-group.is-expanded {
    padding-bottom: 0.35rem;
    margin-bottom: 0.35rem;
    border-bottom: 1px solid #f1f5f9;
}

.shop-filter-parent-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.shop-filter-row--parent {
    font-weight: 600;
    color: #0f172a;
}

.shop-filter-children {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    margin: 0.2rem 0 0 0.35rem;
    padding-left: 0.65rem;
    border-left: 2px solid #e2e8f0;
}

.shop-filter-row--child {
    padding-left: 0;
    font-size: 0.8125rem;
    font-weight: 400;
    color: #64748b;
}

.shop-filter-indicator--child {
    width: 0.875rem;
    height: 0.875rem;
}

.shop-filter-row__label {
    min-width: 0;
    line-height: 1.35;
}

.shop-filter-row {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.35rem 0;
    font-size: 0.8125rem;
    color: #475569;
    text-decoration: none;
    cursor: pointer;
}

.shop-filter-row:hover {
    color: #0f172a;
}

.shop-filter-row.is-active {
    color: #0f172a;
    font-weight: 600;
}

.shop-filter-row.is-branch {
    color: #334155;
}

.shop-filter-row input[type="radio"],
.shop-filter-row input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: #0f172a;
    flex-shrink: 0;
}

.shop-brand-search {
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    padding: 0.4rem 0.65rem;
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
}

.shop-brand-search:focus {
    outline: none;
    border-color: #af3e3e;
    box-shadow: 0 0 0 2px rgb(175 62 62 / 0.12);
}

.shop-price-slider {
    padding: 0.25rem 0;
}

.shop-price-slider input[type="range"] {
    width: 100%;
    accent-color: #0f172a;
}

.shop-price-values {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
    margin-top: 0.5rem;
}

.shop-main__toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.shop-main__title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    color: #0f172a;
}

.shop-main__controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.shop-view-toggle {
    display: inline-flex;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    overflow: hidden;
    background: #fff;
}

.shop-view-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #64748b;
    background: transparent;
    border: none;
    cursor: pointer;
}

.shop-view-btn.is-active {
    background: #f1f5f9;
    color: #0f172a;
}

.shop-sort-select {
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 0.45rem 2rem 0.45rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #334155;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M3 4.5 6 7.5 9 4.5'/%3E%3C/svg%3E") no-repeat right 0.65rem center;
    appearance: none;
}

.shop-products {
    display: grid;
    gap: 1rem;
}

.shop-products--grid {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

@media (min-width: 640px) {
    .shop-products--grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .shop-products--grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1280px) {
    .shop-products--grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.shop-products--list {
    grid-template-columns: minmax(0, 1fr);
}

.shop-card {
    --shop-brand: #af3e3e;
    --shop-brand-hover: #9c3434;
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border: 1px solid #e8ecf1;
    border-radius: 1.125rem;
    overflow: hidden;
    box-shadow: 0 2px 10px rgb(15 23 42 / 0.04);
    transition:
        box-shadow 0.25s cubic-bezier(0.22, 1, 0.36, 1),
        border-color 0.25s ease,
        transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.shop-card:hover {
    border-color: #e2e8f0;
    box-shadow: 0 14px 36px rgb(15 23 42 / 0.08);
    transform: translateY(-2px);
}

.shop-card__media {
    position: relative;
    aspect-ratio: 1;
    background: #f3f4f6;
}

.shop-card__media-link {
    display: block;
    height: 100%;
}

.shop-card__media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1.5rem 1.25rem;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.shop-card:hover .shop-card__media img {
    transform: scale(1.03);
}

.shop-card__wishlist {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 3;
    display: inline-flex;
    height: 2rem;
    width: 2rem;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 9999px;
    background: #fff;
    color: #0f172a;
    font-size: 0.875rem;
    line-height: 1;
    box-shadow: 0 2px 8px rgb(15 23 42 / 0.08);
    cursor: pointer;
    transition: color 0.15s ease, transform 0.15s ease;
}

.shop-card__wishlist:hover {
    color: #ed1d24;
    transform: scale(1.05);
}

.shop-card__badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 2;
    padding: 0.2rem 0.55rem;
    border-radius: 9999px;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #fff;
    background: #16a34a;
    box-shadow: none;
}

.shop-card__badge--new {
    background: #22c55e;
}

.shop-card__badge--sale {
    background: #0f172a;
}

.shop-card__badge--secondary {
    top: 2.65rem;
}

.shop-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 0.875rem 1rem 1rem;
    gap: 0.25rem;
}

.shop-card__brand {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #0f172a;
    text-decoration: none;
    transition: color 0.15s ease;
}

.shop-card__brand:hover {
    color: #334155;
}

.shop-card__name {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.4;
    color: #6b7280;
    font-weight: 400;
}

.shop-card__name a {
    color: inherit;
    text-decoration: none;
}

.shop-card__name a:hover {
    color: #0f172a;
}

.shop-card__price-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 0.5rem;
    margin-top: 0.35rem;
}

.shop-card__price {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
}

.shop-card__price-old {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #9ca3af;
    text-decoration: line-through;
}

.shop-card__actions {
    margin-top: auto;
    padding-top: 0.875rem;
}

.shop-card__cart {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: 1px solid #ed1d24;
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #fff;
    background: #ed1d24;
    cursor: pointer;
    transition:
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.shop-card:hover .shop-card__cart:not(:disabled) {
    background: #fff;
    color: #ed1d24;
    border-color: #ed1d24;
    box-shadow: none;
}

.shop-card__cart:hover:not(:disabled) {
    background: #d01920;
    border-color: #d01920;
    color: #fff;
}

.shop-card:hover .shop-card__cart:hover:not(:disabled) {
    background: #fff5f5;
    border-color: #d01920;
    color: #d01920;
}

.shop-card__cart:disabled {
    background: #e5e7eb;
    border-color: #e5e7eb;
    color: #9ca3af;
    opacity: 1;
    cursor: not-allowed;
}

.shop-products--list .shop-card {
    flex-direction: row;
}

.shop-products--list .shop-card__media {
    width: 200px;
    flex-shrink: 0;
    aspect-ratio: auto;
    min-height: 160px;
}

.shop-products--list .shop-card__body {
    padding: 1rem 1.25rem;
}

.shop-products--list .shop-card__actions {
    max-width: 200px;
}

.shop-empty {
    grid-column: 1 / -1;
    border: 1px dashed #e2e8f0;
    border-radius: 0.75rem;
    background: #fff;
    padding: 3rem 1.5rem;
    text-align: center;
}

.shop-pagination {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
}
