/* ================================================================
   CarZoon — Body Type & Make landing pages
   File: css/carzoon-taxonomy.css
   Used by: [carzoon_body_types] and [carzoon_makes]
   Mobile-first (2/3 columns) → wider grids on tablet & desktop.
   ================================================================ */

.czt-wrap {
    --czt-navy:   #0f2744;
    --czt-ink:    #1a2b45;
    --czt-muted:  #6b7c93;
    --czt-line:   #e6ebf2;
    --czt-accent: #2563eb;
    --czt-card:   #ffffff;
    --czt-bg:     #f7f9fc;

    max-width: 1180px;
    margin: 0 auto;
    padding: 8px 16px 48px;
    box-sizing: border-box;
}

.czt-wrap *,
.czt-wrap *::before,
.czt-wrap *::after {
    box-sizing: border-box;
}

/* ---------------------------------------------------------------
   HEADER
   --------------------------------------------------------------- */
.czt-head {
    margin: 0 0 22px;
}

.czt-back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: .9rem;
    font-weight: 600;
    color: var(--czt-muted);
    text-decoration: none;
    margin: 0 0 10px;
    transition: color .2s ease;
}
.czt-back:hover {
    color: var(--czt-accent);
    text-decoration: none;
}
.czt-back svg {
    width: 16px;
    height: 16px;
}

.czt-title {
    font-size: 1.75rem;
    line-height: 1.2;
    font-weight: 800;
    color: var(--czt-navy);
    margin: 0 0 6px;
    padding: 0;
}

.czt-subtitle {
    font-size: 1rem;
    color: var(--czt-muted);
    margin: 0;
    padding: 0;
}

/* ---------------------------------------------------------------
   SEARCH (makes page)
   --------------------------------------------------------------- */
.czt-search {
    position: relative;
    max-width: 360px;
    margin: 0 0 22px;
}
.czt-search svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--czt-muted);
    pointer-events: none;
}
.czt-search-input {
    width: 100%;
    height: 46px;
    padding: 0 16px 0 42px;
    font-size: .95rem;
    color: var(--czt-ink);
    background: var(--czt-card);
    border: 1px solid var(--czt-line);
    border-radius: 12px;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.czt-search-input:focus {
    border-color: var(--czt-accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

/* ---------------------------------------------------------------
   GRIDS
   --------------------------------------------------------------- */
.czt-grid {
    display: grid;
    gap: 14px;
}

/* Body types — 2 up on phones (matches the approved mockup) */
.czt-grid--body {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Makes — 3 up on phones */
.czt-grid--make {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* ---------------------------------------------------------------
   TILE
   --------------------------------------------------------------- */
.czt-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 132px;
    padding: 18px 12px;
    background: var(--czt-card);
    border: 1px solid var(--czt-line);
    border-radius: 16px;
    text-decoration: none;
    color: var(--czt-ink);
    text-align: center;
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.czt-tile:hover,
.czt-tile:focus-visible {
    transform: translateY(-3px);
    border-color: #cfe0ff;
    box-shadow: 0 10px 24px rgba(15, 39, 68, .08);
    text-decoration: none;
    color: var(--czt-ink);
}
.czt-tile:focus-visible {
    outline: 2px solid var(--czt-accent);
    outline-offset: 2px;
}

/* Types with no live stock — visible but visually de-emphasised */
.czt-tile.is-empty {
    opacity: .55;
}

.czt-tile-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 58px;
    width: 145px;
    margin-bottom: 2px;
    overflow: hidden;
}

/* These shapes only draw across the middle ~35% of their square
   viewBox (a wide/short car silhouette on a square canvas), so sizing
   by width alone (the old rule) left a barely-visible sliver of car.
   Rendering by height instead (with the box above sized to match)
   crops out that empty space top/bottom without squashing the width —
   same technique as the homepage body-type slider and the Available
   Cars / Feature Cars badges. */
.czt-tile-svg {
    height: 145px;
    width: auto;
    color: var(--czt-navy);
}

.czt-tile-img {
    max-width: 108px;
    max-height: 52px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.czt-logo {
    max-width: 62px;
    max-height: 46px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.czt-logo-initial {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--czt-bg);
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--czt-navy);
}

.czt-tile-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--czt-navy);
    line-height: 1.25;
    word-break: break-word;
}

.czt-tile-count {
    font-size: .78rem;
    font-weight: 500;
    color: var(--czt-muted);
}

.czt-empty-msg {
    margin: 24px 0 0;
    text-align: center;
    color: var(--czt-muted);
}

/* ---------------------------------------------------------------
   TABLET
   --------------------------------------------------------------- */
@media (min-width: 640px) {
    .czt-grid { gap: 16px; }
    .czt-grid--body { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .czt-grid--make { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .czt-title { font-size: 2rem; }
}

/* ---------------------------------------------------------------
   DESKTOP — roomier grid + slightly larger artwork
   --------------------------------------------------------------- */
@media (min-width: 1000px) {
    .czt-wrap  { padding: 16px 24px 64px; }
    .czt-grid  { gap: 18px; }
    .czt-grid--body { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .czt-grid--make { grid-template-columns: repeat(6, minmax(0, 1fr)); }

    .czt-title    { font-size: 2.25rem; }
    .czt-subtitle { font-size: 1.05rem; }

    .czt-tile      { min-height: 150px; padding: 22px 14px; }
    .czt-tile-icon { height: 64px; width: 160px; }
    .czt-tile-svg  { height: 160px; width: auto; }
    .czt-tile-img  { max-width: 124px; max-height: 58px; }

    .czt-grid--make .czt-tile { min-height: 138px; }
}

/* ---------------------------------------------------------------
   SMALL PHONES
   --------------------------------------------------------------- */
@media (max-width: 380px) {
    .czt-grid { gap: 10px; }
    .czt-tile { min-height: 118px; padding: 14px 8px; }
    .czt-tile-name { font-size: .92rem; }
    .czt-logo { max-width: 48px; max-height: 38px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .czt-tile,
    .czt-back,
    .czt-search-input { transition: none; }
    .czt-tile:hover { transform: none; }
}
