/* ===== header ===== */
.site-top {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 20px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.brand {
    color: #ff9700;
    font-weight: 800;
    font-size: 1.4rem;
    text-decoration: none;
    letter-spacing: 0.02em;
}
.top-nav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}
.top-nav a {
    color: #ccc;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid #2b2b2b;
    background: #111;
    font-size: 0.95rem;
}
.top-nav a.active,
.top-nav a:hover {
    color: #000;
    background: #ff9700;
    border-color: #ff9700;
}
.top-nav a.nav-cta {
    background: #ff9700;
    color: #000;
    border-color: #ff9700;
    font-weight: 700;
}

/* ===== hero ===== */
.hero-mini {
    text-align: center;
    padding: 36px 20px 10px;
    position: relative;
    z-index: 1;
}
.hero-rich { padding: 48px 20px 28px; }
.hero-kicker {
    display: inline-block;
    color: #ff9700;
    border: 1px solid #3a2a10;
    background: rgba(255,151,0,.08);
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 14px;
}
.hero-mini h1 {
    color: #ff9700;
    font-size: clamp(2rem, 5vw, 3.2rem);
    margin: 0 0 12px;
    letter-spacing: 0.02em;
}
.hero-lead {
    color: #f2f2f2;
    font-size: clamp(1.05rem, 2.2vw, 1.3rem);
    font-weight: 600;
    margin: 0 0 8px;
}
.hero-sub {
    color: #9a9a9a;
    margin: 0 0 22px;
    font-size: 0.98rem;
}

.catalog-meta {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 18px;
}
.api-error {
    background: #1a1010;
    border: 1px solid #5a2a2a;
    color: #ffb4b4;
    border-radius: 16px;
    padding: 20px;
    margin: 20px 0;
}

/* ===== product cards: avatar + text, fixed image size ===== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
    align-items: stretch;
}

.product-card {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 14px;
    text-decoration: none;
    color: inherit;
    background: #151515;
    border: 1px solid #2b2b2b;
    border-radius: 18px;
    padding: 14px;
    overflow: hidden;
    min-height: 112px;
    box-sizing: border-box;
    transition: border-color .2s, transform .2s;
}
.product-card:hover {
    border-color: #ff9700;
    transform: translateY(-2px);
}

.product-media {
    flex: 0 0 72px;
    width: 72px;
    height: 72px;
    border-radius: 16px;
    overflow: hidden;
    background: #0d0d0d;
    border: 1px solid #2b2b2b;
}
.product-media img {
    width: 72px !important;
    height: 72px !important;
    max-width: 72px !important;
    max-height: 72px !important;
    object-fit: cover;
    object-position: center;
    display: block;
}

.product-body {
    flex: 1 1 auto;
    min-width: 0; /* allow text truncate in flex */
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.product-cat {
    color: #ff9700;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.product-name {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}
.product-desc {
    color: #999;
    font-size: 0.86rem;
    line-height: 1.4;
    margin: 0;
    min-height: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-shop {
    color: #bbb;
    font-size: 0.82rem;
    border-top: 1px solid #2b2b2b;
    padding-top: 8px;
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== detail page ===== */
.detail-wrap {
    max-width: 860px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}
.detail-card {
    background: #151515;
    border: 1px solid #2b2b2b;
    border-radius: 22px;
    padding: 28px;
}
.detail-with-media {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 22px;
    align-items: start;
}
.detail-media {
    width: 120px;
}
.detail-media img {
    width: 120px !important;
    height: 120px !important;
    max-width: 120px !important;
    max-height: 120px !important;
    object-fit: cover;
    border-radius: 20px;
    border: 1px solid #2b2b2b;
    background: #0d0d0d;
    display: block;
}
.detail-card h1 {
    margin: 0 0 8px;
    font-size: clamp(1.35rem, 3vw, 1.8rem);
    line-height: 1.25;
    word-break: break-word;
}
.detail-meta {
    color: #aaa;
    margin-bottom: 18px;
}
.detail-meta a { color: #ff9700; }
.detail-body {
    color: #ddd;
    line-height: 1.65;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: none;
}
.back-link {
    display: inline-block;
    margin-bottom: 16px;
    color: #ff9700;
    text-decoration: none;
}

/* ===== product reviews ===== */
.reviews-block {
    margin-top: 28px;
    background: #151515;
    border: 1px solid #2b2b2b;
    border-radius: 22px;
    padding: 24px;
}
.reviews-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px 16px;
    margin-bottom: 16px;
}
.reviews-title {
    margin: 0;
    font-size: 1.25rem;
    color: #fff;
}
.reviews-count {
    color: #ff9700;
    font-weight: 700;
}
.reviews-note {
    color: #777;
    font-size: 0.8rem;
}
.reviews-empty {
    color: #999;
    margin: 0;
}
.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.review-card {
    background: #101010;
    border: 1px solid #2b2b2b;
    border-left: 3px solid #ff9700;
    border-radius: 14px;
    padding: 14px 16px;
}
.review-text {
    color: #e8e8e8;
    line-height: 1.55;
    word-break: break-word;
}
.review-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin-top: 10px;
    font-size: 0.82rem;
    color: #999;
}
.review-pack {
    color: #ff9700;
}
.reviews-more-hint {
    margin: 14px 0 0;
    color: #777;
    font-size: 0.85rem;
}

/* ===== shops list avatars (override style.css stretch) ===== */
.shops-grid .shop-avatar,
.shop-bubble img.shop-avatar {
    width: 56px !important;
    height: 56px !important;
    max-width: 56px !important;
    max-height: 56px !important;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.shop-bubble .shop-info-text {
    color: #999;
    font-size: 0.88rem;
    margin-top: 10px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.shop-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 720px) {
    .detail-with-media {
        grid-template-columns: 1fr;
    }
    .detail-media,
    .detail-media img {
        width: 96px !important;
        height: 96px !important;
        max-width: 96px !important;
        max-height: 96px !important;
    }
    .products-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 640px) {
    .site-top { padding-top: 16px; }
    .hero-mini { padding-top: 24px; }
    .product-media,
    .product-media img {
        width: 64px !important;
        height: 64px !important;
        max-width: 64px !important;
        max-height: 64px !important;
        border-radius: 14px;
    }
}
