:root {
    --shop-bg: #f5f7fb;
    --shop-surface: #ffffff;
    --shop-surface-2: #eef5ff;
    --shop-primary: #0f5cc0;
    --shop-primary-2: #0b3f8a;
    --shop-accent: #ff9f1c;
    --shop-accent-2: #ff7a00;
    --shop-text: #172033;
    --shop-muted: #667085;
    --shop-border: #e4e9f2;
    --shop-radius-lg: 28px;
    --shop-radius-md: 20px;
    --shop-shadow: 0 18px 45px rgba(15, 35, 75, 0.12);
    --shop-shadow-soft: 0 10px 25px rgba(15, 35, 75, 0.08);
}

body {
    background: var(--shop-bg) !important;
}

.phase4a-home {
    width: 100vw;
    margin-inline-start: calc(50% - 50vw);
    margin-inline-end: calc(50% - 50vw);
    color: var(--shop-text);
    background:
        radial-gradient(circle at top right, rgba(15, 92, 192, .10), transparent 35rem),
        linear-gradient(180deg, #f7faff 0%, #f5f7fb 100%);
    padding: 24px 0 60px;
}

.section-shell {
    width: min(1180px, calc(100% - 32px));
    margin-inline: auto;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--shop-primary);
    font-size: .82rem;
    font-weight: 800;
    letter-spacing: .2px;
    margin-bottom: 8px;
}

.shop-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.03fr) minmax(380px, .97fr);
    align-items: center;
    gap: 28px;
    min-height: 430px;
    padding: 34px;
    border-radius: 36px;
    background:
        linear-gradient(135deg, rgba(255,255,255,.96) 0%, rgba(238,245,255,.94) 100%);
    box-shadow: var(--shop-shadow);
    overflow: hidden;
    position: relative;
}

.shop-hero::before {
    content: "";
    position: absolute;
    inset-inline-start: -110px;
    inset-block-start: -110px;
    width: 260px;
    height: 260px;
    border-radius: 999px;
    background: rgba(255, 159, 28, .18);
}

.shop-hero__content,
.shop-hero__visual {
    position: relative;
    z-index: 1;
}

.shop-hero h1 {
    max-width: 650px;
    font-size: clamp(2.1rem, 5vw, 4rem);
    line-height: 1.08;
    font-weight: 950;
    margin: 0 0 18px;
    color: var(--shop-text);
}

.shop-hero p {
    max-width: 620px;
    color: var(--shop-muted);
    font-size: clamp(1rem, 1.5vw, 1.18rem);
    line-height: 1.9;
    margin-bottom: 24px;
}

.hero-actions,
.filter-actions,
.product-actions,
.toolbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-primary-cta,
.btn-secondary-cta,
.btn-reset-cta,
.btn-icon-cta,
.mobile-filter-btn {
    border-radius: 999px;
    min-height: 46px;
    padding: 10px 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 850;
    border: 0;
    text-decoration: none;
}

.btn-primary-cta {
    background: linear-gradient(135deg, var(--shop-primary), var(--shop-primary-2));
    color: #fff !important;
    box-shadow: 0 12px 25px rgba(15, 92, 192, .28);
}

.btn-primary-cta:hover {
    color: #fff;
    transform: translateY(-1px);
}

.btn-secondary-cta,
.btn-reset-cta {
    background: #fff;
    color: var(--shop-primary) !important;
    border: 1px solid var(--shop-border);
}

.btn-icon-cta {
    width: 46px;
    min-width: 46px;
    padding: 0;
    background: var(--shop-surface-2);
    color: var(--shop-primary);
}

.hero-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 28px;
    max-width: 540px;
}

.hero-metrics div {
    background: #fff;
    border: 1px solid var(--shop-border);
    border-radius: 18px;
    padding: 14px 16px;
    box-shadow: var(--shop-shadow-soft);
}

.hero-metrics strong {
    display: block;
    color: var(--shop-primary);
    font-size: 1.35rem;
    font-weight: 950;
}

.hero-metrics span {
    color: var(--shop-muted);
    font-weight: 750;
    font-size: .9rem;
}

.shop-hero__visual {
    display: grid;
    gap: 14px;
}

.hero-product {
    background: #fff;
    border-radius: 26px;
    border: 1px solid rgba(255,255,255,.75);
    box-shadow: var(--shop-shadow-soft);
    overflow: hidden;
}

.hero-product--main {
    min-height: 275px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
}

.hero-product--main img,
.hero-product--mini img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #f0f3f8;
}

.hero-product--main div {
    padding: 26px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-product span {
    color: var(--shop-muted);
    font-weight: 750;
    font-size: .85rem;
}

.hero-product h3 {
    margin: 8px 0 12px;
    font-weight: 950;
    font-size: 1.4rem;
}

.hero-product strong {
    color: var(--shop-accent-2);
    font-size: 1.35rem;
}

.hero-product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.hero-product--mini {
    min-height: 138px;
    display: grid;
    grid-template-rows: 90px auto;
}

.hero-product--mini div {
    padding: 10px 12px;
}

.hero-empty-visual,
.empty-state {
    background: #fff;
    border: 1px dashed #cbd5e1;
    border-radius: 28px;
    min-height: 280px;
    display: grid;
    place-items: center;
    text-align: center;
    color: var(--shop-muted);
}

.hero-empty-visual i,
.empty-state__icon i {
    font-size: 2.5rem;
    color: var(--shop-primary);
}

.trust-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-top: 18px;
}

.trust-strip div {
    background: #fff;
    border: 1px solid var(--shop-border);
    border-radius: 20px;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 850;
    box-shadow: var(--shop-shadow-soft);
}

.trust-strip i {
    color: var(--shop-accent-2);
    font-size: 1.25rem;
}

.categories-section,
.catalog-layout {
    margin-top: 28px;
}

.section-heading,
.catalog-toolbar {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.section-heading h2,
.catalog-toolbar h2 {
    margin: 0;
    font-size: clamp(1.55rem, 2vw, 2.1rem);
    font-weight: 950;
}

.catalog-toolbar p {
    margin: 8px 0 0;
    color: var(--shop-muted);
    font-weight: 650;
}

.text-link {
    color: var(--shop-primary);
    font-weight: 850;
    text-decoration: none;
}

.category-rail {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 14px;
}

.category-card {
    min-height: 122px;
    border-radius: 22px;
    background: #fff;
    border: 1px solid var(--shop-border);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-decoration: none;
    color: var(--shop-text);
    box-shadow: var(--shop-shadow-soft);
    transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.category-card:hover,
.category-card.active {
    transform: translateY(-3px);
    border-color: rgba(15,92,192,.45);
    background: linear-gradient(180deg, #fff, #eff6ff);
    color: var(--shop-text);
}

.category-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--shop-primary), #38bdf8);
}

.category-card strong {
    font-size: 1.02rem;
}

.category-card small {
    color: var(--shop-muted);
    font-weight: 700;
}

.catalog-layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.catalog-filters {
    position: sticky;
    top: 96px;
}

.filter-card {
    background: #fff;
    border: 1px solid var(--shop-border);
    border-radius: var(--shop-radius-lg);
    padding: 20px;
    box-shadow: var(--shop-shadow);
}

.filter-card__header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    margin-bottom: 18px;
}

.filter-card__header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 950;
}

.filter-card__header > i {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: var(--shop-primary);
    background: var(--shop-surface-2);
}

.filter-group {
    margin-bottom: 16px;
}

.filter-group label {
    display: block;
    margin-bottom: 7px;
    color: var(--shop-text);
    font-weight: 850;
    font-size: .92rem;
}

.filter-group input,
.filter-group select,
.sort-form select {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--shop-border);
    border-radius: 14px;
    background: #fff;
    color: var(--shop-text);
    padding: 10px 12px;
    outline: none;
    font-weight: 650;
}

.filter-group input:focus,
.filter-group select:focus,
.sort-form select:focus {
    border-color: var(--shop-primary);
    box-shadow: 0 0 0 4px rgba(15, 92, 192, .10);
}

.input-icon {
    position: relative;
}

.input-icon i {
    position: absolute;
    inset-inline-start: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--shop-muted);
}

.input-icon input {
    padding-inline-start: 42px;
}

.filter-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.price-range {
    accent-color: var(--shop-accent-2);
}

.range-values {
    display: flex;
    justify-content: space-between;
    color: var(--shop-muted);
    font-size: .82rem;
    font-weight: 700;
}

.catalog-main {
    min-width: 0;
}

.catalog-toolbar {
    padding: 18px 20px;
    border-radius: 24px;
    background: #fff;
    border: 1px solid var(--shop-border);
    box-shadow: var(--shop-shadow-soft);
}

.mobile-filter-btn {
    display: none;
    color: var(--shop-primary);
    background: var(--shop-surface-2);
}

.sort-form {
    min-width: 190px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.product-card-v2 {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    background: #fff;
    border: 1px solid var(--shop-border);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--shop-shadow-soft);
    transition: transform .18s ease, box-shadow .18s ease;
}

.product-card-v2:hover {
    transform: translateY(-4px);
    box-shadow: var(--shop-shadow);
}

.product-media {
    position: relative;
    aspect-ratio: 4 / 4.7;
    overflow: hidden;
    background: #eef2f7;
}

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

.product-card-v2:hover .product-media img {
    transform: scale(1.045);
}

.product-badge,
.favorite-btn-v2 {
    position: absolute;
    z-index: 2;
}

.product-badge {
    inset-block-start: 12px;
    inset-inline-start: 12px;
    border-radius: 999px;
    padding: 7px 11px;
    background: var(--shop-accent);
    color: #1d160b;
    font-size: .78rem;
    font-weight: 950;
}

.product-badge--soft {
    background: rgba(255,255,255,.92);
    color: var(--shop-primary);
}

.favorite-btn-v2 {
    inset-block-start: 12px;
    inset-inline-end: 12px;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 0;
    background: rgba(255,255,255,.94);
    color: #e11d48;
    display: grid;
    place-items: center;
    box-shadow: 0 6px 15px rgba(0,0,0,.10);
}

.favorite-btn-v2.favorited {
    background: #fff1f2;
}

.product-body {
    padding: 16px 16px 10px;
    flex: 1;
}

.product-body small {
    display: block;
    color: var(--shop-primary);
    font-weight: 850;
    margin-bottom: 6px;
}

.product-body h3 {
    font-size: 1.05rem;
    font-weight: 950;
    margin: 0 0 8px;
    line-height: 1.45;
}

.product-body p {
    color: var(--shop-muted);
    font-size: .9rem;
    line-height: 1.65;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 48px;
}

.product-price-row {
    margin-top: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.product-price-row strong {
    color: var(--shop-text);
    font-size: 1.15rem;
    font-weight: 950;
}

.product-price-row del {
    color: #98a2b3;
    font-size: .9rem;
    margin-inline-start: 6px;
}

.rating {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #b45309;
    background: #fff7ed;
    border-radius: 999px;
    padding: 5px 8px;
    font-size: .82rem;
    font-weight: 900;
}

.product-actions {
    padding: 0 16px 16px;
}

.product-actions .btn-primary-cta {
    flex: 1;
}

.pagination-wrap {
    margin-top: 26px;
}

.pagination-wrap .page-link {
    border-radius: 12px !important;
    border: 1px solid var(--shop-border);
    color: var(--shop-primary);
    font-weight: 850;
    min-width: 42px;
    text-align: center;
}

.pagination-wrap .active .page-link {
    background: var(--shop-primary);
    border-color: var(--shop-primary);
    color: #fff;
}

.empty-state {
    min-height: 420px;
    padding: 32px;
    box-shadow: var(--shop-shadow-soft);
}

.empty-state h3 {
    font-weight: 950;
    margin: 14px 0 8px;
}

.empty-state p {
    color: var(--shop-muted);
    margin-bottom: 18px;
}

.mobile-filter-sheet {
    height: auto !important;
    max-height: 86vh;
    border-top-left-radius: 28px;
    border-top-right-radius: 28px;
}

.filter-card--mobile {
    box-shadow: none;
    border: 0;
    padding: 0;
}

@media (max-width: 1199.98px) {
    .shop-hero {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 991.98px) {
    .phase4a-home {
        padding-top: 10px;
    }

    .shop-hero {
        padding: 24px;
        border-radius: 28px;
    }

    .trust-strip {
        grid-template-columns: repeat(2, 1fr);
    }

    .catalog-layout {
        grid-template-columns: 1fr;
    }

    .desktop-filters {
        display: none;
    }

    .mobile-filter-btn {
        display: inline-flex;
    }

    .catalog-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .toolbar-actions {
        justify-content: space-between;
    }

    .sort-form {
        flex: 1;
    }
}

@media (max-width: 767.98px) {
    .section-shell {
        width: min(100% - 22px, 1180px);
    }

    .shop-hero {
        min-height: auto;
        padding: 20px;
    }

    .shop-hero h1 {
        font-size: 2rem;
    }

    .hero-actions .btn,
    .filter-actions .btn {
        width: 100%;
    }

    .hero-metrics {
        grid-template-columns: 1fr;
    }

    .hero-product--main {
        grid-template-columns: 1fr;
    }

    .hero-product--main img {
        height: 220px;
    }

    .hero-product-grid {
        grid-template-columns: 1fr;
    }

    .hero-product--mini {
        grid-template-columns: 110px 1fr;
        grid-template-rows: auto;
        min-height: 94px;
    }

    .trust-strip {
        grid-template-columns: 1fr;
    }

    .section-heading {
        align-items: start;
        flex-direction: column;
    }

    .category-rail {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding-bottom: 8px;
    }

    .category-card {
        min-width: 170px;
        scroll-snap-align: start;
    }

    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .product-card-v2 {
        border-radius: 22px;
    }

    .product-body {
        padding: 12px;
    }

    .product-body h3 {
        font-size: .96rem;
    }

    .product-body p {
        display: none;
    }

    .product-price-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    .product-actions {
        padding: 0 12px 12px;
    }

    .product-actions .btn-icon-cta {
        display: none;
    }

    .filter-grid-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 420px) {
    .product-grid {
        grid-template-columns: 1fr;
    }

    .toolbar-actions {
        flex-direction: column;
        align-items: stretch;
    }
}
