/* Catalog pages (module "catalog"): neutral defaults. The site's own CSS (Studio → Design) can restyle every ct-* class. */
/* Everything sits in a cascade layer: CSS of the website (design/css.css) is not in a layer and therefore beats it
   whatever the order or the selector — a design only needs its own rules, no !important. */
@layer catalog {
/* the attribute hidden always hides, even where a design gives the element its own display */
.ct-card[hidden], .ct-compare-pick[hidden], .ct-filters label[hidden], .ct-bar[hidden], .ct-empty[hidden] { display: none !important; }
.ct-filters { display: flex; flex-wrap: wrap; gap: 12px 18px; margin: 0 0 18px; }
.ct-filters label { display: flex; flex-direction: column; gap: 4px; font-size: .9rem; min-width: 0; flex: 1 1 200px; }
.ct-filters select { width: 100%; min-width: 0; padding: 8px 10px; box-sizing: border-box; }
.ct-filters .ct-search { flex: 1 1 100%; position: relative; }
.ct-filters input[type=search] { width: 100%; min-width: 0; box-sizing: border-box; padding: 11px 12px 11px 40px; font-size: 1rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 13px center; }
.ct-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.ct-count { margin: 0 0 14px; color: var(--muted, #6b7280); }
.ct-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.ct-card { position: relative; border: 1px solid var(--line, #e5e7eb); border-radius: 10px; background: var(--surface, #fff); overflow: hidden; display: flex; flex-direction: column; }
.ct-card-link { display: flex; flex-direction: column; color: inherit; flex: 1; }
/* the link rules of a site (a:hover { underline }) must not underline the whole card */
.ct-card-link, .ct-card-link:hover { text-decoration: none !important; }
.ct-card-img { display: block; aspect-ratio: 1 / 1; background: var(--bg-alt, #f3f4f6); }
.ct-card-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.ct-card-body { display: flex; flex-direction: column; gap: 6px; padding: 14px; }
.ct-brand-logo { display: block; text-transform: none; letter-spacing: 0; }
.ct-brand-logo img { display: block; height: 1.7rem; width: auto; max-width: 9rem; object-fit: contain; object-position: left center; }
.ct-product-info .ct-brand-logo img { height: 2.4rem; max-width: 12rem; }
.ct-brand { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted, #6b7280); }
.ct-name { font-weight: 700; color: var(--ink, #111827); }
.ct-summary { color: var(--text, #4b5563); font-size: .92rem; }
.ct-specs { display: flex; flex-direction: column; gap: 2px; font-size: .85rem; }
.ct-spec span { color: var(--muted, #6b7280); }
.ct-draft { font-size: .75rem; padding: 2px 6px; border-radius: 4px; background: #fef3c7; color: #92400e; font-weight: 600; }
.ct-compare-pick { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-top: 1px solid var(--line, #e5e7eb); font-size: .9rem; cursor: pointer; }
.ct-empty { padding: 24px 0; color: var(--muted, #6b7280); }
.ct-bar { position: sticky; bottom: 0; z-index: 50; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: center; padding: 12px 16px; background: #111827; color: #fff; }
.ct-btn { padding: 8px 16px; border: 1px solid transparent; border-radius: 8px; background: var(--brand, #2563eb); color: var(--on-brand, #fff); font: inherit; cursor: pointer; }
.ct-btn-ghost { background: transparent; border-color: currentColor; color: inherit; }
.ct-dialog { width: min(1100px, 94vw); max-height: 90vh; padding: 0; border: 0; border-radius: 12px; background: var(--surface, #fff); color: var(--text, inherit); }
.ct-dialog::backdrop { background: rgba(17, 24, 39, .6); }
.ct-dialog-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line, #e5e7eb); }
.ct-dialog-head h2 { margin: 0; font-size: 1.1rem; }
.ct-dialog-body { padding: 14px 18px; overflow: auto; max-height: calc(90vh - 70px); }
.ct-table { width: 100%; border-collapse: collapse; min-width: 480px; }
.ct-table th, .ct-table td { padding: 10px 12px; border-bottom: 1px solid var(--line, #e5e7eb); text-align: left; vertical-align: top; }
.ct-table thead th { position: sticky; top: 0; background: var(--surface, #fff); }
.ct-table td.is-better { font-weight: 700; color: var(--ok-text, #047857); background: var(--ok-bg, #ecfdf5); }
.ct-cats { margin: 0 0 28px; }
.ct-cats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.ct-cat { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 22px; border: 1px solid var(--line, #e5e7eb); border-radius: 12px; background: var(--surface, #fff); }
.ct-cat-icon { display: inline-flex; width: 40px; height: 40px; color: var(--muted, #6b7280); }
.ct-cat-icon svg { width: 100%; height: 100%; }
.ct-cat-name { margin: 6px 0 0; font-size: 1.15rem; color: var(--ink, #111827); }
.ct-cat-text { margin: 0; color: var(--text, #4b5563); font-size: .95rem; }
.ct-cat-link { display: inline-block; margin-top: auto; padding: 8px 16px; border-radius: 8px; background: var(--brand, #2563eb); color: var(--on-brand, #fff); font-weight: 600; text-decoration: none !important; }
.ct-cat-for { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ct-product-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
@media (max-width: 800px) { .ct-product-grid { grid-template-columns: 1fr; } }
.ct-gallery-main { margin: 0; aspect-ratio: 1 / 1; background: var(--bg-alt, #f3f4f6); border-radius: 10px; overflow: hidden; }
.ct-gallery-main img { width: 100%; height: 100%; object-fit: contain; display: block; }
.ct-thumbs { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ct-thumbs img { width: 72px; height: 72px; object-fit: contain; background: var(--bg-alt, #f3f4f6); border-radius: 6px; display: block; }
.ct-spec-table { width: 100%; border-collapse: collapse; margin: 8px 0 24px; }
.ct-spec-table th, .ct-spec-table td { padding: 10px 12px; border-bottom: 1px solid var(--line, #e5e7eb); text-align: left; }
.ct-spec-table th { width: 40%; font-weight: 600; color: var(--ink, #374151); }
.ct-docs { padding-left: 18px; }
.ct-back { margin: 0 0 12px; font-size: .9rem; }
.ct-hero { margin: 16px 0 0; }
.ct-hero img { width: 100%; height: auto; max-height: 420px; object-fit: cover; border-radius: 10px; display: block; }
}
