/**
 * Home page.
 *
 * What was here before was 900 lines for a wall of eleven browsing tiles —
 * cascading dropdown forms, facet lists, term chips. The tiles are gone, and
 * so is all of it. This is a search box and two rows of product cards.
 */

.pt-home {
    max-width: 1080px;
    margin: 0 auto;
    padding: 24px 16px 48px;
    font-family: var(--pt-font, system-ui, -apple-system, "Segoe UI", sans-serif);
    color: var(--pt-text, #1e293b);
}

/* ------------------------------------------------------------------ Search */

.pt-home-hero {
    padding: 28px 20px 32px;
    text-align: center;
}

.pt-home-hero__title {
    margin: 0 0 6px;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.pt-home-hero__sub {
    margin: 0 0 22px;
    color: var(--pt-text-muted, #64748b);
    font-size: 15px;
}

.pt-home-search {
    display: flex;
    gap: 8px;
    max-width: 560px;
    margin: 0 auto;
}

.pt-home-search__input {
    flex: 1;
    min-width: 0;
    padding: 13px 16px;
    border: 1px solid var(--pt-border, #cbd5e1);
    border-radius: var(--pt-radius-lg, 12px);
    background: var(--pt-bg-card, #fff);
    font-size: 15px;
    color: inherit;
}

.pt-home-search__input:focus {
    outline: 2px solid var(--pt-primary, #3b82f6);
    outline-offset: 1px;
    border-color: transparent;
}

.pt-home-search__btn {
    padding: 13px 24px;
    border: 0;
    border-radius: var(--pt-radius-lg, 12px);
    background: var(--pt-primary, #3b82f6);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.pt-home-search__btn:hover {
    background: var(--pt-primary-dark, #2563eb);
}

/* ---------------------------------------------------------------- Sections */

.pt-home-section {
    margin-top: 36px;
}

.pt-home-section--quiet {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--pt-border-light, #e2e8f0);
}

.pt-home-section__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.pt-home-section__title {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.pt-home-section__title svg {
    width: 22px;
    height: 27px;
    flex: none;
}

.pt-home-section__all {
    flex: none;
    color: var(--pt-primary, #3b82f6);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.pt-home-section__all:hover {
    text-decoration: underline;
}

/* ------------------------------------------------------------------- Cards */

.pt-home-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pt-home-card {
    margin: 0;
}

.pt-home-card__link {
    display: flex;
    flex-direction: column;
    gap: 6px;
    height: 100%;
    padding: 16px;
    border: 1px solid var(--pt-border-light, #e2e8f0);
    border-radius: var(--pt-radius-lg, 12px);
    background: var(--pt-bg-card, #fff);
    box-shadow: var(--pt-shadow-sm, 0 1px 2px rgb(15 23 42 / 6%));
    color: inherit;
    text-decoration: none;
}

.pt-home-card__link:hover {
    border-color: var(--pt-primary, #3b82f6);
    box-shadow: var(--pt-shadow-md, 0 4px 12px rgb(15 23 42 / 10%));
}

.pt-home-card__title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
}

.pt-home-card__meta {
    color: var(--pt-text-muted, #64748b);
    font-size: 12px;
}

.pt-home-card__price {
    margin-top: auto;
    padding-top: 6px;
    color: var(--pt-success, #059669);
    font-size: 15px;
    font-weight: 800;
}

/* -------------------------------------------------------- Newest questions */

.pt-home-latest {
    margin: 0;
    padding-left: 20px;
    color: var(--pt-text-muted, #64748b);
}

.pt-home-latest__item {
    margin: 0 0 8px;
    line-height: 1.6;
}

.pt-home-latest__link {
    color: var(--pt-text, #1e293b);
    font-size: 14px;
    text-decoration: none;
}

.pt-home-latest__link:hover {
    color: var(--pt-primary, #3b82f6);
    text-decoration: underline;
}

/* ----------------------------------------------------------------- Library */

.pt-home-library {
    display: inline-block;
    padding: 11px 20px;
    border-radius: var(--pt-radius-pill, 999px);
    background: var(--pt-bg-subtle, #f1f5f9);
    color: var(--pt-text, #1e293b);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.pt-home-library:hover {
    background: var(--pt-border-light, #e2e8f0);
}

.pt-home-note {
    margin: 0;
    color: var(--pt-text-muted, #64748b);
    font-size: 13px;
    line-height: 1.7;
}

/* ------------------------------------------------------------------- Phone */

@media (max-width: 480px) {
    .pt-home-hero {
        padding: 16px 4px 24px;
    }

    .pt-home-hero__title {
        font-size: 23px;
    }

    .pt-home-search {
        flex-direction: column;
    }

    .pt-home-cards {
        grid-template-columns: 1fr;
    }
}
