﻿.mive-store-hero,
.mive-home-categories,
.mive-home-sale {
    direction: rtl;
}

.mive-store-hero {
    margin: 4px 0 14px;
}

.mive-store-hero__banner {
    width: 100%;
    aspect-ratio: 16 / 8;
    overflow: hidden;
    border-radius: 14px;
    background: var(--mive-primary);
}

.mive-store-hero__banner.has-fallback {
    aspect-ratio: auto;
    height: 104px;
    background: var(--mive-primary);
}

.mive-store-hero__banner img,
.mive-store-card__logo img,
.mive-home-category__image img,
.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-img {
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.mive-store-card {
    position: relative;
    z-index: 2;
    margin: -28px 10px 0;
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--store-border);
    border-radius: 14px;
    background: var(--store-surface);
    font-family: 'Vazirmatn', Tahoma, Arial, sans-serif;
}

.mive-store-card__head {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.mive-store-card__logo {
    display: grid;
    flex: 0 0 54px;
    width: 54px;
    height: 54px;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--store-border);
    border-radius: 12px;
    background: var(--store-page);
    color: var(--mive-primary);
    font-size: 20px;
    font-weight: 900;
}

.mive-store-card__identity {
    flex: 1;
    min-width: 0;
}

.mive-store-card__identity h1 {
    margin: 0;
    overflow: hidden;
    color: var(--store-text);
    font-size: 16px;
    font-weight: 900;
    line-height: 1.6;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mive-store-card__identity p {
    display: -webkit-box;
    overflow: hidden;
    margin: 2px 0 0;
    color: var(--store-muted);
    font-size: 12px;
    line-height: 1.6;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.mive-store-status {
    flex: 0 0 auto;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
}

.mive-store-status.is-open {
    background: var(--store-success-soft);
    color: var(--store-success);
}

.mive-store-status.is-closed {
    background: var(--store-primary-soft);
    color: var(--store-primary-dark);
}

.mive-store-card__meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    margin-top: 12px;
    padding-top: 11px;
    border-top: 1px solid var(--store-border);
}

.mive-store-card__meta span {
    display: grid;
    min-width: 0;
    justify-items: center;
    color: var(--store-text);
    font-size: 10px;
    line-height: 1.55;
    text-align: center;
}

.mive-store-card__meta b {
    display: block;
    margin-bottom: 2px;
    color: var(--store-muted);
    font-size: 9px;
    font-weight: 600;
}

.mive-store-card__meta-icon {
    width: 24px;
    height: 24px;
    margin-bottom: 4px;
    fill: none;
    stroke: var(--store-primary);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.mive-store-card__free-shipping {
    margin: 10px -6px -6px;
    padding: 7px 10px;
    border-radius: 8px;
    background: var(--mive-primary-soft);
    color: var(--mive-primary);
    font-size: 11px;
    font-weight: 800;
    text-align: center;
}

.mive-category-scroll-shell {
    position: sticky;
    top: 0;
    z-index: 45;
    display: flex;
    direction: ltr;
    width: 100%;
    align-items: center;
    gap: 6px;
    margin: 0 0 14px;
    padding: 8px;
    border: 1px solid var(--store-border);
    border-radius: 16px;
    background: var(--store-surface);
    box-shadow: 0 2px 8px color-mix(in srgb,var(--store-text) 4%,transparent);
}

.mive-home-categories {
    display: flex;
    direction: rtl;
    flex: 1;
    min-width: 0;
    gap: 8px;
    padding: 0;
    overflow-x: auto;
    scroll-behavior: smooth;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
}

.mive-home-categories::-webkit-scrollbar {
    display: none;
}

.mive-category-scroll-button {
    display: grid;
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    place-items: center;
    padding: 0;
    border: 1px solid var(--store-border);
    border-radius: 50%;
    background: var(--store-surface);
    color: var(--store-primary);
    box-shadow: 0 1px 5px color-mix(in srgb,var(--store-text) 7%,transparent);
    cursor: pointer;
    transition: opacity .18s ease;
}

.mive-category-scroll-button svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.mive-category-scroll-button.is-unavailable {
    opacity: .24;
    pointer-events: none;
}

.mive-category-chip {
    flex: 0 0 auto;
    padding: 7px 13px;
    border: 1px solid var(--store-border);
    border-radius: 999px;
    background: var(--store-surface);
    color: var(--store-text);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.mive-category-chip.is-active {
    border-color: var(--store-primary);
    background: var(--store-primary);
    color: var(--store-surface);
}

.mive-home-sale {
    margin-bottom: 16px;
    padding: 0;
    background: transparent;
}

.mive-home-sale h2 {
    margin: 0 0 12px;
    color: var(--store-text);
    font-size: 16px;
    font-weight: 900;
}

.mive-home-sale .product-grid {
    display: grid;
    margin: 0;
    padding: 0;
    overflow: visible;
}

.mive-home-sale .mive-sale-badge,
.mive-sale-badge {
    background: var(--mive-primary-light);
}

body.home .product-price,
body.home .qty-stepper button,
body.home .qty-stepper .qty-value,
body.home .add-btn {
    color: var(--mive-primary);
}

body.home .add-btn,
body.home .qty-stepper {
    background: var(--mive-primary-soft);
}

body.home .footer-item.is-active,
body.home .footer-item.is-active svg {
    color: var(--mive-primary);
}

body.home .footer-item.is-active {
    background: var(--mive-primary-soft);
}

.mive-fade {
    opacity: 0;
    transition: opacity .35s ease;
}

.mive-fade.is-visible {
    opacity: 1;
}

@media (min-width: 600px) {
    .mive-store-hero__banner {
        aspect-ratio: 16 / 7;
    }

    .mive-store-card {
        margin-right: 24px;
        margin-left: 24px;
        padding: 16px;
    }

    .mive-store-card__meta span {
        font-size: 12px;
    }

    .mive-store-card__meta b {
        font-size: 10px;
    }
}
