/* The catalog for buyers (T27): /catalog, /catalog/small and the product pages. */
body { margin: 0; background: #f5f5f5; color: #333; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }
.site-nav a[aria-current="page"] { background: rgba(255, 255, 255, .18); border-radius: 8px; }
.catalog-page { max-width: 1100px; margin: 20px auto; padding: 0 16px; }
.catalog-page h1 { margin: 6px 0 16px; color: #2c3e50; font-size: 28px; overflow-wrap: anywhere; }
.catalog-page a { color: #5a67d8; }
.catalog-crumbs { color: #777; font-size: 14px; }
.catalog-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.catalog-tile { display: grid; gap: 6px; padding: 28px 24px; background: #fff; border-radius: 12px; text-decoration: none;
                color: #333 !important; box-shadow: 0 2px 10px rgba(0, 0, 0, .08); transition: box-shadow .15s; }
.catalog-tile:hover, .catalog-tile:focus-visible { box-shadow: 0 4px 18px rgba(90, 103, 216, .3); }
.catalog-tile .tile-icon { font-size: 44px; }
.catalog-tile strong { font-size: 22px; color: #2c3e50; }
.catalog-tile span:last-child { color: #666; }
.catalog-search { display: flex; gap: 8px; margin-bottom: 12px; }
.catalog-search input { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid #ccd; border-radius: 8px; font-size: 16px; }
.catalog-search button, .card-add { padding: 10px 16px; border: 0; border-radius: 8px; background: #667eea; color: #fff;
                                    font-size: 15px; font-weight: 600; cursor: pointer; }
.card-add:disabled { opacity: .6; cursor: wait; }
.catalog-sections { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.catalog-sections a { padding: 6px 12px; background: #fff; border-radius: 16px; text-decoration: none; border: 1px solid #dde; }
.catalog-sections a[aria-current="page"] { background: #667eea; color: #fff; border-color: #667eea; }
.catalog-sections span { color: #888; font-size: 13px; }
.catalog-sections a[aria-current="page"] span { color: #e8eaff; }
.catalog-count { color: #666; margin: 0 0 12px; }
.catalog-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.catalog-card { display: flex; flex-direction: column; gap: 6px; padding: 12px; background: #fff; border-radius: 12px;
                box-shadow: 0 2px 10px rgba(0, 0, 0, .06); min-width: 0; }
.card-photo { display: block; aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden; background: #f4f6f8; text-decoration: none; }
.card-photo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.photo-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; height: 100%;
                     color: #8a94a6; text-align: center; font-size: 14px; background: repeating-linear-gradient(45deg, #f4f6f8, #f4f6f8 10px, #eef1f5 10px, #eef1f5 20px); }
.placeholder-logo { font-weight: 700; color: #667eea; }
.photo-placeholder.large { aspect-ratio: 4 / 3; border-radius: 12px; font-size: 16px; }
.card-name { font-weight: 600; color: #2c3e50 !important; text-decoration: none; overflow-wrap: anywhere; }
.card-name:hover { text-decoration: underline; }
.card-article { color: #777; font-size: 13px; overflow-wrap: anywhere; }
.card-price, .item-price { font-size: 18px; font-weight: 700; color: #2c3e50; margin-top: auto; }
.card-price.on-request, .item-price.on-request { font-size: 15px; color: #8a5a00; }
.card-status { font-size: 13px; min-height: 1em; color: #246a3e; }
.card-status.error { color: #a12c3a; }
.catalog-empty { padding: 28px; background: #fff; border-radius: 12px; text-align: center; }
.catalog-empty strong { font-size: 20px; color: #2c3e50; }
.catalog-pages { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 20px 0; }
.catalog-pages a, .catalog-pages span { min-width: 38px; padding: 8px 10px; border-radius: 8px; text-align: center; background: #fff; text-decoration: none; }
.catalog-pages span[aria-current="page"] { background: #667eea; color: #fff; font-weight: 700; }
.catalog-pages .gap { background: none; }
.item-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; padding: 20px; background: #fff; border-radius: 12px;
               box-shadow: 0 2px 10px rgba(0, 0, 0, .06); }
.item-main-photo { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: contain; border-radius: 12px; background: #f4f6f8; }
.item-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.item-thumbs button { width: 72px; height: 56px; padding: 0; border: 2px solid transparent; border-radius: 8px; background: #f4f6f8; cursor: pointer; overflow: hidden; }
.item-thumbs button[aria-pressed="true"] { border-color: #667eea; }
.item-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.item-info { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; min-width: 0; }
.item-info h1 { margin: 0; }
.item-info .hint { margin: 0; color: #777; font-size: 14px; }
.item-price { margin: 4px 0; font-size: 24px; }
.item-description { margin-top: 12px; white-space: pre-line; line-height: 1.6; overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .catalog-page { margin: 12px auto; padding: 0 10px; }
  .catalog-page h1 { font-size: 22px; }
  .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .catalog-card { padding: 8px; }
  .card-add { padding: 8px 10px; font-size: 14px; }
  .item-layout { grid-template-columns: 1fr; padding: 14px; }
}
