﻿/* =========================
   GRID / CARDS
========================= */

.store-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
}

.store-card,
.store-product-card,
.store-category-card {
    background: rgba(255,255,255,0.98);
    border-radius: 26px;
    overflow: hidden;
    box-shadow: var(--store-shadow-md);
    height: 100%;
    border: 1px solid rgba(229, 231, 235, 0.9);
}

.store-card-relative {
    position: relative;
}

/* =========================
   CATEGORY CARD
========================= */

.store-category-card {
    padding: 22px;
    color: var(--store-text);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

    .store-category-card:hover {
        transform: translateY(-3px);
        box-shadow: var(--store-shadow-lg);
    }

.store-category-image-wrap {
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f7f8fa;
    border-radius: 20px;
    margin-bottom: 16px;
}

.store-category-image {
    max-width: 100%;
    max-height: 180px;
    object-fit: contain;
}

.store-category-name {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
    min-height: 52px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* =========================
   PRODUCT CARD
========================= */

.store-product-card {
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

    .store-product-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--store-shadow-lg);
    }

.store-product-top {
    display: flex;
    justify-content: flex-end;
    padding: 14px 14px 0 14px;
}

.store-product-image-wrap {
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: #ffffff;
    text-decoration: none;
}

.store-product-image {
    max-width: 100%;
    max-height: 210px;
    object-fit: contain;
    transition: transform 0.25s ease;
}

.store-product-card:hover .store-product-image {
    transform: scale(1.04);
}

.store-product-body {
    padding: 0 18px 18px 18px;
}

.store-product-title {
    font-size: 19px;
    line-height: 1.34;
    height: 52px;
    margin-bottom: 8px;
    color: var(--store-text);
    font-weight: 700;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.store-product-category {
    color: var(--store-text-soft);
    font-size: 14px;
    margin-bottom: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.store-product-price {
    margin-bottom: 14px;
}

.store-price-current {
    font-size: 28px;
    font-weight: 700;
    color: #8b5e57;
    line-height: 1;
}

.store-price-old {
    font-size: 15px;
    color: #999;
    text-decoration: line-through;
}

.store-sale-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    min-width: 56px;
    height: 56px;
    padding: 0 10px;
    border-radius: 50%;
    background: var(--store-danger);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 24px rgba(191, 29, 36, 0.18);
}

/* =========================
   BUTTONS
========================= */

.store-btn-red,
.store-filter-open,
.store-filter-mobile-close {
    height: 46px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--store-accent) 0%, var(--store-accent-hover) 100%);
    color: #fff;
    font-weight: 700;
    padding: 0 20px;
    box-shadow: 0 10px 22px rgba(174, 116, 109, 0.20);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .store-btn-red:hover,
    .store-filter-open:hover,
    .store-filter-mobile-close:hover {
        color: #fff;
        transform: translateY(-1px);
        box-shadow: 0 14px 28px rgba(174, 116, 109, 0.24);
    }

/* =========================
   CATALOG / FILTERS
========================= */

.store-catalog-layout {
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.store-catalog-content {
    min-width: 0;
}

.store-catalog-grid {
    align-items: stretch;
}

.store-catalog-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.store-catalog-count {
    color: var(--store-text-soft);
    font-size: 15px;
}

.store-filter-sidebar {
    position: sticky;
    top: 116px;
}

.store-filter-card {
    background: rgba(255,255,255,0.96);
    border-radius: 28px;
    padding: 24px;
    box-shadow: var(--store-shadow-md);
    border: 1px solid rgba(229, 231, 235, 0.9);
}

.store-filter-group {
    padding-bottom: 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--store-line);
}

    .store-filter-group:last-child {
        border-bottom: 0;
        margin-bottom: 0;
        padding-bottom: 0;
    }

.store-filter-title {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 14px;
    color: var(--store-text);
}

.store-filter-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
    cursor: pointer;
    font-size: 14px;
    color: var(--store-text);
}

    .store-filter-check input {
        margin-top: 3px;
    }

.store-filter-price-note {
    color: var(--store-text-soft);
    font-size: 13px;
}

.store-filter-mobile-head {
    display: none;
}

/* =========================
   TABLET
========================= */

@media (max-width: 1199.98px) {
    .store-grid-4 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .store-catalog-layout {
        grid-template-columns: 280px minmax(0, 1fr);
    }
}

@media (max-width: 991.98px) {
    .store-grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .store-catalog-layout {
        grid-template-columns: 1fr;
    }

    .store-filter-sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: 340px;
        max-width: 88%;
        height: 100%;
        background: rgba(245, 246, 248, 0.98);
        z-index: 3000;
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        padding: 16px;
        box-shadow: 0 16px 36px rgba(0,0,0,0.18);
    }

        .store-filter-sidebar.open {
            transform: translateX(0);
        }

    .store-filter-card {
        padding: 18px;
        border-radius: 22px;
        box-shadow: none;
    }

    .store-filter-mobile-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 14px;
    }

    .store-filter-mobile-title {
        font-size: 20px;
        font-weight: 800;
    }
}

/* =========================
   MOBILE
========================= */

@media (max-width: 767.98px) {
    .store-grid-4 {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        overflow: visible;
        padding-bottom: 0;
    }

        .store-grid-4 > * {
            min-width: 0;
            flex: initial;
        }

    .store-catalog-grid {
        margin-left: -6px;
        margin-right: -6px;
    }

        .store-catalog-grid > div {
            padding-left: 6px;
            padding-right: 6px;
        }

    .store-catalog-toolbar {
        align-items: center;
        gap: 10px;
        margin-bottom: 16px;
    }

    .store-catalog-count {
        font-size: 14px;
        text-align: right;
    }

    .store-category-card {
        padding: 14px;
        border-radius: 20px;
    }

    .store-category-image-wrap {
        height: 140px;
        border-radius: 16px;
        margin-bottom: 12px;
    }

    .store-category-image {
        max-height: 108px;
    }

    .store-category-name {
        font-size: 18px;
        min-height: 44px;
    }

    .store-product-card {
        border-radius: 20px;
    }

    .store-product-top {
        padding: 10px 10px 0 10px;
    }

    .store-product-image-wrap {
        height: 152px;
        padding: 10px;
    }

    .store-product-image {
        max-height: 122px;
    }

    .store-product-body {
        padding: 0 12px 12px 12px;
    }

    .store-product-title {
        font-size: 14px;
        line-height: 1.28;
        height: 38px;
        margin-bottom: 8px;
    }

    .store-product-category {
        font-size: 11px;
        margin-bottom: 8px;
    }

    .store-price-old {
        font-size: 11px;
    }

    .store-price-current {
        font-size: 18px;
    }

    .store-sale-badge {
        min-width: 42px;
        height: 42px;
        font-size: 12px;
        top: 10px;
        left: 10px;
    }

    .store-btn-red,
    .store-filter-open,
    .store-filter-mobile-close {
        height: 38px;
        font-size: 12px;
        padding: 0 14px;
    }

    .store-filter-sidebar {
        width: 88%;
        max-width: 88%;
        padding: 12px;
    }

    .store-filter-card {
        padding: 16px;
    }

    .store-filter-title {
        font-size: 16px;
        margin-bottom: 12px;
    }
}

@media (max-width: 420px) {
    .store-product-image-wrap {
        height: 136px;
    }

    .store-product-image {
        max-height: 108px;
    }

    .store-product-title {
        font-size: 13px;
        height: 34px;
    }

    .store-price-current {
        font-size: 17px;
    }

    .store-btn-red {
        font-size: 11px;
    }
}
