/* SOLDY.RU STEP138 — STEP136 accepted fixes + corrected visual polish. */

/* Laravel pagination: project does not ship Tailwind utility CSS used by Laravel's default pagination view. */
.catalog-layout section > nav[role="navigation"] {
    width: 100%;
    max-width: 100%;
    margin: 24px 0 0;
    color: #475467;
    font-size: 14px;
    line-height: 1.4;
    box-sizing: border-box;
}
.catalog-layout section > nav[role="navigation"] > div:first-child { display: none; }
.catalog-layout section > nav[role="navigation"] > div:last-child {
    display: flex;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    box-sizing: border-box;
}
.catalog-layout section > nav[role="navigation"] p {
    margin: 0;
    color: #667085;
    font-size: 14px;
    line-height: 1.4;
}
.catalog-layout section > nav[role="navigation"] > div:last-child > div:last-child > span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    max-width: 100%;
    box-sizing: border-box;
}
.catalog-layout section > nav[role="navigation"] > div:last-child > div:last-child > span > a,
.catalog-layout section > nav[role="navigation"] > div:last-child > div:last-child > span > span {
    display: inline-flex;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    align-items: center;
    justify-content: center;
    border: 1px solid #d0d5dd;
    border-radius: 7px;
    background: #fff;
    color: #0f172a;
    text-decoration: none;
    line-height: 1;
    box-sizing: border-box;
}
.catalog-layout section > nav[role="navigation"] [aria-current="page"] {
    border-color: #2563eb;
    background: #2563eb;
    color: #fff;
}
.catalog-layout section > nav[role="navigation"] [aria-disabled="true"] { opacity: .45; }
.catalog-layout section > nav[role="navigation"] svg {
    display: block !important;
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    min-height: 18px !important;
    max-width: 18px !important;
    max-height: 18px !important;
    flex: 0 0 18px !important;
}

/* Catalog/product intrinsic width containment. */
.catalog-layout,
.catalog-layout > section,
.grid.products,
.product-card,
.product-card * { box-sizing: border-box; }
.catalog-layout > section,
.grid.products,
.product-card,
.product-card > *,
.product-card * {
    min-width: 0;
    max-width: 100%;
}
.product-card {
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: auto;
}
.product-card > strong {
    font-size: 14px;
    line-height: 1.30;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
    letter-spacing: 0;
}
.product-card img,
.product-card picture,
.product-card picture img {
    max-width: 100%;
    height: auto;
}

/* Product commercial block containment. */
.product-detail,
.product-detail *,
.product-main,
.product-main * { box-sizing: border-box; }
.product-detail,
.product-detail > *,
.product-main,
.product-main > * {
    min-width: 0;
    max-width: 100%;
}
.product-detail h1,
.product-detail h2,
.product-detail h3,
.product-detail p,
.product-detail td,
.product-detail th {
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: auto;
}
#seller-select,
#seller-qty,
#seller-cart-button {
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

@media (max-width: 640px) {
    .catalog-layout section > nav[role="navigation"] > div:first-child {
        display: flex;
        width: 100%;
        max-width: 100%;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        box-sizing: border-box;
    }
    .catalog-layout section > nav[role="navigation"] > div:last-child { display: none; }
    .catalog-layout section > nav[role="navigation"] > div:first-child > a,
    .catalog-layout section > nav[role="navigation"] > div:first-child > span {
        display: inline-flex;
        min-width: 0;
        max-width: 48%;
        min-height: 40px;
        padding: 9px 14px;
        align-items: center;
        justify-content: center;
        border: 1px solid #d0d5dd;
        border-radius: 8px;
        background: #fff;
        color: #0f172a;
        text-decoration: none;
        box-sizing: border-box;
    }

    .product-detail {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        grid-template-columns: minmax(0,1fr) !important;
    }
    .product-detail > *,
    .product-detail form,
    .product-detail form > *,
    .product-detail .panel {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }
    #seller-select,
    #seller-qty,
    #seller-cart-button {
        display: block;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    #seller-select { text-overflow: ellipsis; }

    main.container > h1,
    main.container .toolbar,
    main.container .toolbar > * {
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
    }
    main.container > h1,
    main.container .toolbar h1 {
        overflow-wrap: normal;
        word-break: normal;
        hyphens: none;
    }
    main.container > h1 {
        font-size: clamp(28px, 7.6vw, 30px);
        line-height: 1.12;
    }
    main.container .toolbar {
        display: flex;
        width: 100%;
        flex-wrap: wrap;
        gap: 10px;
    }
    main.container .toolbar h1 {
        flex: 1 1 100%;
        margin-right: 0;
    }
}
