/**
 * FayzliBazar — sahifalar: bosh sahifa (hero, afzalliklar), katalog, mahsulot,
 * qidiruv, status sahifalari (rahmat / xatolik).
 */

/* ---------- Bosh sahifa: hero ---------- */

.hero {
    margin: 16px 0 8px;
    background: linear-gradient(115deg, var(--navy-dark), var(--navy) 55%, var(--navy-light));
    border-radius: var(--radius-panel);
    padding: 44px 48px;
    position: relative;
    overflow: hidden;
}

.hero::before,
.hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
}

.hero::before {
    right: -70px;
    top: -70px;
    width: 280px;
    height: 280px;
    background: rgba(255, 255, 255, 0.05);
}

.hero::after {
    right: 60px;
    bottom: -100px;
    width: 220px;
    height: 220px;
    background: rgba(242, 176, 53, 0.15);
}

.hero__content {
    max-width: 520px;
    position: relative;
    z-index: 1;
}

.hero__badge {
    display: inline-block;
    background: var(--gold);
    color: var(--gold-ink);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1px;
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    text-transform: uppercase;
}

.hero__title {
    color: #ffffff;
    font-size: 36px;
    line-height: 1.15;
    margin: 16px 0 10px;
    font-weight: 800;
}

.hero__desc {
    color: var(--on-navy-2);
    font-size: 16px;
    margin: 0 0 22px;
}

.hero__cta {
    display: inline-block;
    background: var(--gold);
    color: var(--gold-ink);
    font-weight: 800;
    padding: 13px 28px;
    border-radius: 12px;
    font-size: 15px;
    transition: background 0.15s, color 0.15s;
}

.hero__cta:hover {
    background: #ffffff;
    color: var(--navy);
}

@media (max-width: 480px) {
    .hero {
        padding: 28px 24px;
    }

    .hero__title {
        font-size: 28px;
    }
}

/* ---------- Bosh sahifa: afzalliklar ---------- */

.benefits {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin: 20px 0;
}

.benefit {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px 18px;
    display: flex;
    gap: 12px;
    align-items: center;
}

.benefit__icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.benefit__icon--navy {
    background: var(--navy-tint);
    color: var(--navy);
}

.benefit__icon--gold {
    background: var(--gold-tint);
    color: var(--gold-text);
}

.benefit__title {
    font-weight: 700;
    font-size: 14px;
}

.benefit__desc {
    font-size: 12px;
    color: var(--text-muted);
}

/* ---------- Bo'lim sarlavhasi ---------- */

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin: 26px 0 16px;
    flex-wrap: wrap;
}

.section-head__title {
    font-size: 24px;
}

.section-head__link {
    font-size: 14px;
    font-weight: 700;
}

.home-products {
    padding-bottom: 44px;
}

/* ---------- Katalog / qidiruv ---------- */

.page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.page-head__title {
    font-size: 26px;
}

.page-head__count {
    font-size: 13px;
    color: var(--text-muted);
}

.catalog-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    flex-wrap: wrap;
    padding-bottom: 44px;
}

.catalog-layout__grid {
    flex: 1 1 400px;
    min-width: 0;
}

/* Mobil: filtr paneli drawer'ga aylanadi (components.css), grid to'liq kenglik oladi */
@media (max-width: 760px) {
    .catalog-layout {
        flex-direction: column;
    }

    .catalog-layout__grid {
        flex: 1 1 100%;
        width: 100%;
    }
}

/* ---------- Mahsulot sahifasi ---------- */

.product-detail {
    display: flex;
    gap: 32px;
    align-items: flex-start;
    flex-wrap: wrap;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-panel);
    padding: 28px;
}

.product-detail__media {
    flex: 1 1 320px;
    min-width: 260px;
    max-width: 480px;
}

.product-detail__image {
    aspect-ratio: 1;
    background: var(--img-bg);
    border-radius: var(--radius-card);
    overflow: hidden;
}

.product-detail__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-thumbs {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.product-thumbs__item {
    width: 64px;
    height: 64px;
    border-radius: 10px;
    overflow: hidden;
    border: 1.5px solid var(--border-input);
    background: var(--img-bg);
    padding: 0;
    transition: border-color 0.15s;
}

.product-thumbs__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-thumbs__item:hover,
.product-thumbs__item.is-active {
    border-color: var(--navy);
}

.product-detail__info {
    flex: 1 1 340px;
    min-width: 280px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.product-detail__title {
    font-size: 28px;
    font-weight: 800;
    line-height: 1.2;
}

.product-detail__desc {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-2);
}

/* CKEditor'dan keladigan HTML uchun xavfsiz tipografika */
.product-detail__desc p {
    margin: 0 0 10px;
}

.product-detail__desc p:last-child {
    margin-bottom: 0;
}

.product-detail__desc ul,
.product-detail__desc ol {
    padding-left: 20px;
    margin: 0 0 10px;
    list-style: disc;
}

.product-detail__desc img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

.price-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
}

.price-row__current {
    font-size: 32px;
    font-weight: 800;
    color: var(--navy);
}

.price-row__old {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-faint);
    text-decoration: line-through;
}

.product-perks {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--text-2);
}

.similar-title {
    font-size: 22px;
    margin: 36px 0 16px;
}

.product-page {
    padding-bottom: 44px;
}

/* Oqim (link) sahifasida breadcrumb yo'q — yuqoridan bo'shliq beriladi */
.product-page--landing {
    padding-top: 24px;
}

@media (max-width: 480px) {
    .product-detail {
        padding: 18px;
        gap: 20px;
    }

    .product-detail__title {
        font-size: 22px;
    }

    .price-row__current {
        font-size: 26px;
    }
}

/* ---------- Status sahifalari (rahmat / xatolik) ---------- */

.status-page {
    padding: 56px 0 72px;
    display: flex;
    justify-content: center;
}

.status-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-panel);
    padding: 44px 36px;
    max-width: 560px;
    width: 100%;
    text-align: center;
}

.status-card__icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
}

.status-card__icon--success {
    background: rgba(28, 124, 75, 0.12);
    color: var(--success);
}

.status-card__icon--error {
    background: var(--navy-tint);
    color: var(--navy);
}

.status-card__title {
    font-size: 24px;
    margin-bottom: 10px;
}

.status-card__title--success {
    color: var(--success);
}

.status-card__desc {
    font-size: 15px;
    color: var(--text-2);
    margin-bottom: 8px;
}

.status-card__hint {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

/* ---------- Harakat kamaytirilgan rejim (a11y) ---------- */
/* Bu blok eng oxirgi yuklanadigan faylda turadi — barcha transition/animation'lardan ustun keladi */

@media (prefers-reduced-motion: reduce) {
    .lazy-wrap .lazy-loader {
        animation: none;
    }

    .lazy-wrap img,
    .product-card,
    .site-header,
    .filter-panel,
    .drawer-backdrop,
    .hero__cta,
    .btn {
        transition: none;
    }

    .product-card:hover {
        transform: none;
    }
}
