/* ══════════════════════════════════════════════════════════════
   DIM Inventory Styles
   ══════════════════════════════════════════════════════════════ */

/* ── Divi Theme Override: break out of layout constraints ── */
.et_pb_code_inner #ct-inventory-wrap,
.et_pb_code_inner #ct-detail-wrap,
.et_pb_code_inner #dim-dashboard {
    max-width: none !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    float: none !important;
}
.is-layout-constrained > #ct-inventory-wrap,
.is-layout-constrained > #ct-detail-wrap,
.is-layout-constrained > #dim-dashboard {
    max-width: none !important;
}
.et_pb_code_inner {
    max-width: none !important;
    width: 100% !important;
}

/* ── Inventory Grid ── */
.ct-card-title {
    font-family: "ironstrike", sans-serif !important;
    font-size: 28px;
    font-weight: 900;
    text-transform: uppercase;
    color: #000000;
    margin: 20px 0px 5px;
    line-height: 1.2;
}

#ct-inventory-wrap * { box-sizing: border-box !important; }
#ct-inventory-wrap {
    --ct-navy:   #0a1e3d;
    --ct-blue:   #1b4f8a;
    --ct-accent: #2a73c5;
    --ct-light:  #e8edf4;
    --ct-border: #d1dae6;
    --ct-text:   #1a1a1a;
    --ct-muted:  #5a6a7e;
    --ct-white:  #ffffff;
    --ct-radius: 4px;
    font-family: "Univers 65 Bold", sans-serif;
    color: var(--ct-text);
    width: 100% !important;
    max-width: 1300px !important;
}
#ct-inventory-layout { display: flex !important; gap: 32px !important; align-items: flex-start !important; }
#ct-sidebar { flex: 0 0 200px !important; position: sticky; top: 20px; }
#ct-search-wrap { position: relative; margin-bottom: 24px; }
#ct-search {
    width: 100%; padding: 9px 36px 9px 12px;
    border: 1px solid var(--ct-border); border-radius: var(--ct-radius);
    font-size: 14px; font-family: inherit; color: var(--ct-text);
    background: var(--ct-white); outline: none; transition: border-color .2s;
}
#ct-search:focus { border-color: var(--ct-accent); }
#ct-search-wrap svg { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--ct-muted); pointer-events: none; }
.ct-filter-group { margin-bottom: 22px; }
.ct-filter-label { font-size: 15px; font-weight: 800; text-transform: uppercase; color: #000000; margin-bottom: 5px; display: block; font-family: "Univers 65 Bold", sans-serif; }
.ct-filter-group label { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #000000; font-family: 'Raleway', sans-serif; cursor: pointer; padding: 2px 0; transition: color .15s; }
.ct-filter-group label:hover { color: var(--ct-accent); }
.ct-filter-group input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--ct-accent); cursor: pointer; flex-shrink: 0; }
#ct-results-count { font-size: 13px; color: var(--ct-muted); margin-bottom: 16px; }
#ct-vehicle-grid { display: grid !important; grid-template-columns: repeat(3, minmax(100px, 500px)) !important; gap: 24px !important; align-items: stretch; }
.ct-vehicle-card { background: var(--ct-white); overflow: hidden; transition: box-shadow .2s, transform .2s; display: flex !important; flex-direction: column !important; height: 100%; padding: 15px; box-shadow: 0 6px 24px rgba(0,0,0,.22); }
.ct-vehicle-card:hover { box-shadow: 0 6px 24px rgba(0,0,0,.32); transform: translateY(-2px); }
.ct-card-gallery { position: relative; background: #f0f0f0; aspect-ratio: 4/3; overflow: hidden; }
.ct-gallery-slides { display: flex !important; height: 100%; transition: transform .3s ease; }
.ct-gallery-slide { flex: 0 0 100% !important; height: 100%; }
.ct-gallery-slide img { width: 100% !important; height: 100% !important; object-fit: cover !important; display: block !important; max-width: none !important; }
.ct-gallery-nav { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); display: flex !important; align-items: center; gap: 6px; background: rgba(0,0,0,.45); border-radius: 20px; padding: 4px 10px; }
.ct-gallery-btn { background: none; border: none; color: white; cursor: pointer; padding: 0; display: flex; align-items: center; opacity: .8; transition: opacity .15s; }
.ct-gallery-btn:hover { opacity: 1; }
.ct-gallery-count { font-size: 12px; color: white; font-family: inherit; white-space: nowrap; }
.ct-card-body { padding-top: 15px; display: flex !important; flex-direction: column !important; flex: 1; }
.ct-card-accent { width: 50px; height: 8px; background: #31A7E1; margin-bottom: 10px; }
.ct-card-details-link { font-size: 15px; color: #000000; text-decoration: none; display: block; margin: 20px 0px 30px 0; font-weight: 500; }
.ct-card-details-link:hover { color: var(--ct-accent); text-decoration: underline; }
.ct-card-price { font-size: 17px; font-weight: 700; color: #0a1e3d; margin-bottom: 10px; }
.ct-card-location { font-size: 12px; color: var(--ct-muted); margin-bottom: 8px; line-height: 1.5; }
.ct-card-location b { color: #0a1e3d; }
.ct-card-location a { color: #2a73c5; text-decoration: underline; }
.ct-card-actions { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 8px !important; margin-top: auto; padding-top: 14px; }
.ct-btn { display: block; text-align: center; padding: 15px 3px; font-size: 13px; font-weight: 800; line-height: 1em; text-transform: uppercase; text-decoration: none; cursor: pointer; border: none; transition: background .2s; font-family: inherit; }
.ct-btn-primary  { background: #002D74; color: #fff; font-family: 'Raleway', sans-serif; }
.ct-btn-secondary { background: #002D74; color: #fff; font-family: 'Raleway', sans-serif; }
.ct-btn-primary:hover, .ct-btn-secondary:hover { background: #31A7E1; color: #fff; font-family: 'Raleway', sans-serif; }
#ct-no-results { display: none; grid-column: 1 / -1; text-align: center; padding: 48px 24px; color: var(--ct-muted); font-size: 15px; }

/* ── Detail Page ── */
#ct-detail-wrap { font-family: "Univers 65 Bold", sans-serif; max-width: 1500px !important; margin: 0 auto; padding: 40px 24px 60px; color: #000000; width: 100% !important; }
.ct-detail-layout { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 48px !important; align-items: start; }
.ct-detail-info { max-width: 450px; width: 100%; }
.ct-main-photo { position: relative; background: #f4f6f9; overflow: hidden; aspect-ratio: 4/3; margin-bottom: 12px; }
.ct-main-slides { display: flex !important; height: 100%; transition: transform .35s ease; }
.ct-main-slide { flex: 0 0 100% !important; height: 100%; }
.ct-main-slide img { width: 100% !important; height: 100% !important; object-fit: cover !important; display: block !important; max-width: none !important; }
.ct-main-prev, .ct-main-next { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,.5); border: none; border-radius: 50%; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: white; z-index: 2; }
.ct-photo-counter { text-align: center; font-size: 13px; color: #5a6a7e; margin-bottom: 10px; }
.ct-thumbnails { display: grid !important; grid-template-columns: repeat(4, 1fr) !important; gap: 8px !important; }
.ct-thumb { aspect-ratio: 4/3; overflow: hidden; cursor: pointer; border: 3px solid transparent; transition: border-color .15s; }
.ct-thumb.active { border-color: #002d74; }
.ct-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ct-detail-title { font-size: 40px; font-weight: 900; text-transform: uppercase; color: #000000; margin: 0 0 6px; line-height: 1.1; font-family: "Univers 65 Bold", sans-serif; }
.ct-detail-dealer { font-size: 18px; color: #000000; margin-bottom: 16px; line-height: 1.7; font-weight: 600; }
.p-location { color: #000000; font-size: 13px; text-decoration: none !important; font-weight: 500 !important; }
.ct-detail-price { font-size: 28px; font-weight: 800; color: #002D74; margin-bottom: 50px; margin-top: 30px; font-family: "Univers 65 Bold", sans-serif; }
.ct-detail-btn {
    display: block; text-align: center; padding: 10px 20px;
    font-size: 13px; font-weight: 800; text-transform: uppercase;
    text-decoration: none; transition: background .15s, color .15s;
    border: 2px solid #002D74; background: #002D74; color: #ffffff;
    font-family: 'Raleway', sans-serif; font-style: normal;
    margin-bottom: 10px;
}
.ct-detail-btn:hover { background: #31A7E1; border-color: #31A7E1; }
.ct-spec-table { width: 100%; border-collapse: collapse; margin-bottom: 24px; }
.ct-spec-table tr { border-bottom: 1px solid #d1dae6; }
.ct-spec-table td { padding: 15px 4px; font-size: 15px; }
.ct-spec-table td:first-child { text-transform: uppercase; color: #000000; width: 40%; font-family: 'Raleway', sans-serif; font-weight: 700; }
.ct-spec-table td:last-child { text-align: right; font-size: 12px; }
.ct-description-body { font-size: 13px; color: #000000; line-height: 1.7; padding: 0 4px 20px; display: block; margin-top: 20px; }
.ct-description-section { }
.ct-description-toggle {
    display: flex; justify-content: space-between; align-items: center;
    padding: 5px 4px; cursor: pointer; font-size: 15px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .06em; color: #000000;
    user-select: none; border: none; background: none; width: 100%;
    font-family: 'Raleway', sans-serif; margin-top: -15px;
}
#ct-dealer-filter {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--ct-border);
    border-radius: var(--ct-radius);
    font-size: 14px;
    font-family: inherit;
    color: var(--ct-text);
    background: var(--ct-white);
    margin-top: 4px;
    cursor: pointer;
}
#ct-dealer-filter:focus { border-color: var(--ct-accent); outline: none; }
.ct-toggle-icon { font-size: 20px; line-height: 1; font-weight: 300; }
.ct-description-body.close { display: none; }
.ct-back-link { display: inline-flex; text-align: center; padding: 10px 20px; gap: 6px; font-size: 12px; text-transform: uppercase; background-color: #31A7E1; color: #ffffff; text-decoration: none; margin-bottom: 10px; font-family: 'Raleway', sans-serif; font-weight: 800; }
.ct-back-link:hover { background-color: #002D74; }

/* ── Responsive ── */
@media (max-width: 900px) {
    #ct-inventory-layout { flex-direction: column !important; }
    #ct-sidebar { flex: none !important; width: 100% !important; position: static !important; }
    .ct-detail-layout { grid-template-columns: 1fr !important; gap: 28px !important; }
    #ct-vehicle-grid { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 600px) {
    #ct-vehicle-grid { grid-template-columns: 1fr !important; }
    #ct-detail-wrap { padding: 20px 16px 40px; }
    .ct-detail-title { font-size: 26px; }
    .ct-detail-dealer { font-size: 15px; margin-bottom: 10px; }
    .ct-detail-price { font-size: 22px; margin-bottom: 28px; margin-top: 16px; }
    .ct-thumbnails { grid-template-columns: repeat(4, 1fr); gap: 6px; }
    .ct-detail-actions { display: flex; flex-direction: column; gap: 8px; }
    .ct-detail-btn { width: 100%; box-sizing: border-box; padding: 14px 20px; font-size: 14px; }
    .ct-spec-table td { padding: 12px 4px; font-size: 13px; }
    .ct-back-link { display: block; text-align: center; }
}
@media (max-width: 400px) {
    .ct-thumbnails { grid-template-columns: repeat(3, 1fr); }
    .ct-detail-title { font-size: 22px; }
}
