/*
Theme Name:   AutoDeal Child
Theme URI:    https://umohcrew.com
Description:  Child theme del tema AutoDeal para Avanim Concesionarios.
Author:       umoh
Author URI:   https://umohcrew.com
Template:     autodeal
Version:      1.0.5
Text Domain:  autodeal-child
*/

/* ============================================================
   AVANIM — CHILD THEME STYLES
   ============================================================ */


/* ─── LOGO ─────────────────────────────────────────────────── */
/*
 * El logo NO se define aca. La regla viva vive en
 * Apariencia > Personalizar > CSS adicional (bloque "LOGO FIX"),
 * que usa Avanim_Logotipo.svg + filter:brightness(0) invert(1)
 * y pisa todo con !important.
 * El bloque que habia aca (logo-blanco.webp / logo-rojo.webp,
 * sin !important) estaba muerto: nunca ganaba la cascada.
 * Eliminado el 2026-07-30 en la auditoria previa a la migracion.
 */

/* ─── NAV COLOR POR CONTEXTO ────────────────────────────────── */

/* Single listing — header blanco, nav oscuro */
.single-listing #header nav.mainnav ul.menu li:not(.current-menu-item):not(.current-menu-ancestor) > a:not(:hover) {
  color: #111111 !important;
}

/* Pagina Vehiculos (3870) — header transparente oscuro, texto blanco */
body.elementor-page-3870 .header-boxed {
  position: absolute !important;
  width: 100%;
  left: 0;
  top: 0;
  z-index: 1000;
}

body.elementor-page-3870 #header,
body.elementor-page-3870 .themesflat-top {
  background: rgba(2, 1, 1, 0) !important;
}

body.elementor-page-3870 .page-header {
  display: none !important;
}

body.elementor-page-3870 #mainnav > ul > li > a,
body.elementor-page-3870 #header .show-search a,
body.elementor-page-3870 .show-search a,
body.elementor-page-3870 #header .header-ct-right .icon-login *,
body.elementor-page-3870 #header .tf-btn {
  color: #ffffff !important;
}

body.elementor-page-3870 #header .tf-btn {
  border-color: #ffffff !important;
}

body.elementor-page-3870 #header.header-sticky,
body.elementor-page-3870 #header.fixed-show {
  background: #ffffff !important;
}

body.elementor-page-3870 #header.header-sticky #mainnav > ul > li > a,
body.elementor-page-3870 #header.fixed-show #mainnav > ul > li > a {
  color: #24272c !important;
}

/* ─── BLOG SIDEBAR — TIPOGRAFÍAS ─────────────────────────────── */

/* Chivo Mono global */
@font-face {
  font-family: 'Chivo Mono';
  font-style: normal;
  font-weight: 400;
  font-display: auto;
  src: url('https://avanim.com.ar/wp-content/uploads/2026/06/ChivoMono-Regular.woff') format('woff');
}

/* Títulos del sidebar — Chivo Mono, mayúsculas */
#secondary h4.widget-title,
#secondary .widget-title {
  font-family: 'Chivo Mono', monospace !important;
  text-transform: uppercase !important;
  letter-spacing: 0.08em;
}

/* Categorías, etiquetas y artículos relacionados — Atyp Text */
#secondary .wp-block-categories-list a,
#secondary .wp-block-tag-cloud a,
#secondary .crp-related-posts .crp_title a,
#secondary .crp_posts_widget a {
  font-family: 'Atyp Text', sans-serif !important;
}

/* === ARTÍCULOS RECIENTES — cards horizontales === */
#secondary .wp-block-latest-posts__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
#secondary .wp-block-latest-posts__list li {
  display: flex;
  align-items: center;
  gap: 12px;
}
#secondary .wp-block-latest-posts__featured-image {
  float: none !important;
  flex-shrink: 0;
  width: 90px;
  height: 68px;
  overflow: hidden;
  border-radius: 8px;
}
#secondary .wp-block-latest-posts__featured-image img {
  width: 90px !important;
  height: 68px !important;
  max-width: 90px !important;
  max-height: 68px !important;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

/* ─── Pagina Test Drive (4367) — header transparente, texto blanco ─ */
body.elementor-page-4367 .header-boxed {
  position: absolute !important;
  width: 100%;
  left: 0;
  top: 0;
  z-index: 1000;
}

body.elementor-page-4367 #header,
body.elementor-page-4367 .themesflat-top {
  background: rgba(2, 1, 1, 0) !important;
}

body.elementor-page-4367 .page-header {
  display: none !important;
}

body.elementor-page-4367 #mainnav > ul > li > a,
body.elementor-page-4367 #header .show-search a,
body.elementor-page-4367 .show-search a,
body.elementor-page-4367 #header .header-ct-right .icon-login *,
body.elementor-page-4367 #header .tf-btn {
  color: #ffffff !important;
}

body.elementor-page-4367 #header .tf-btn {
  border-color: #ffffff !important;
}

body.elementor-page-4367 #header.header-sticky,
body.elementor-page-4367 #header.fixed-show {
  background: #ffffff !important;
}

body.elementor-page-4367 #header.header-sticky #mainnav > ul > li > a,
body.elementor-page-4367 #header.fixed-show #mainnav > ul > li > a {
  color: #24272c !important;
}


/* ============================================================
   FORMULARIOS CONTACT FORM 7 — UI
   Movido desde functions.php el 2026-07-30 (auditoria previa
   a la migracion). Aplica a Cotizar Usado (4301) y afines.
   ============================================================ */

/* Hide page title on Cotizar Usado */
.page-id-4301 .page-header { display: none !important; }

/* Sections as cards */
.wpcf7 .cf7-section {
    background: #f8f8f8;
    border-radius: 8px;
    padding: 28px 28px 20px;
    margin-bottom: 24px;
    border: 1px solid #ebebeb;
}

/* Section title */
.wpcf7 .cf7-section-title {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #1a1a1a;
    margin: 0 0 22px 0;
    padding-bottom: 14px;
    border-bottom: 2px solid #EB192E;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Numbered badge on section titles */
.wpcf7 .cf7-section-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    min-width: 24px;
    background: #EB192E;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    border-radius: 50%;
}

/* Grid rows */
.wpcf7 .cf7-row {
    display: grid;
    gap: 16px;
    margin-bottom: 16px;
}
.wpcf7 .cf7-row--2col { grid-template-columns: 1fr 1fr; }
.wpcf7 .cf7-row--3col { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 640px) {
    .wpcf7 .cf7-row--2col,
    .wpcf7 .cf7-row--3col { grid-template-columns: 1fr; }
    .wpcf7 .cf7-section { padding: 20px 16px 16px; }
}

/* Labels */
.wpcf7 .cf7-section label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #444;
    margin-bottom: 0;
}

/* Inputs / selects / textareas */
.wpcf7 .cf7-section input[type="text"],
.wpcf7 .cf7-section input[type="email"],
.wpcf7 .cf7-section input[type="tel"],
.wpcf7 .cf7-section input[type="number"],
.wpcf7 .cf7-section select,
.wpcf7 .cf7-section textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    color: #1a1a1a;
    background: #fff;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.wpcf7 .cf7-section input:focus,
.wpcf7 .cf7-section select:focus,
.wpcf7 .cf7-section textarea:focus {
    outline: none;
    border-color: #EB192E;
}
.wpcf7 .cf7-section textarea { min-height: 90px; resize: vertical; }
.wpcf7 .cf7-section select { cursor: pointer; }

/* Upload area */
.wpcf7 .cf7-upload-hint {
    font-size: 13px;
    color: #666;
    margin: 0 0 16px 0;
    line-height: 1.6;
}
.wpcf7 .cf7-upload-hint strong { color: #1a1a1a; }

.wpcf7 .cf7-upload-area {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
@media (max-width: 640px) {
    .wpcf7 .cf7-upload-area { grid-template-columns: 1fr; }
}
.wpcf7 .cf7-upload-area .wpcf7-form-control-wrap {
    display: block;
}
.wpcf7 .cf7-upload-area input[type="file"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px dashed #ccc;
    border-radius: 6px;
    background: #fff;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    box-sizing: border-box;
    transition: border-color 0.2s;
}
.wpcf7 .cf7-upload-area input[type="file"]:hover {
    border-color: #EB192E;
}

/* Submit button */
.wpcf7 .cotizacion-usado-btn,
.wpcf7 #cotizacion-usado-submit {
    margin-top: 8px;
    width: 100%;
    padding: 14px;
    background: #EB192E;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.04em;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}
.wpcf7 .cf7-section .nice-select {
    border: 1px solid #ddd; border-radius: 6px;
    font-size: 14px; height: auto; line-height: normal; padding: 10px 40px 10px 14px;
    width: 100%; box-sizing: border-box;
}
.wpcf7 .cf7-section .nice-select .current { color: #1a1a1a; }
.wpcf7 .cf7-section .nice-select .list {
    background: #fff; border: 1px solid #ddd;
    border-radius: 6px; width: 100%; z-index: 999;
}
.wpcf7 .cf7-section .nice-select .option { color: #1a1a1a !important; font-size: 14px; }
.wpcf7 .cf7-section .nice-select .option:hover { background: #fdf0f1; color: #EB192E !important; }
.wpcf7 .cf7-section .nice-select .option.selected { color: #fff !important; font-weight: 600; }
.wpcf7 .cf7-section .nice-select:after { border-bottom-color: #EB192E; border-right-color: #EB192E; }
.wpcf7 .cotizacion-usado-btn:hover { background: #C5151C; }


/* ============================================================
   FORMULARIO CONTACTO (4279) — LAYOUT EN GRID
   Movido desde functions.php el 2026-07-30. El fix de
   nice-select de este formulario sigue en functions.php.
   ============================================================ */

[id^="wpcf7-f4279"] form.wpcf7-form {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 20px 24px !important;
    align-items: start !important;
}
[id^="wpcf7-f4279"] form.wpcf7-form > * {
    grid-column: 1 / -1 !important;
}
[id^="wpcf7-f4279"] form.wpcf7-form > label:nth-of-type(3) {
    grid-column: 1 !important;
}
[id^="wpcf7-f4279"] form.wpcf7-form > label:nth-of-type(4) {
    grid-column: 2 !important;
}
[id^="wpcf7-f4279"] form.wpcf7-form > label {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
}
[id^="wpcf7-f4279"] form.wpcf7-form input:not([type="submit"]),
[id^="wpcf7-f4279"] form.wpcf7-form textarea,
[id^="wpcf7-f4279"] form.wpcf7-form .nice-select {
    width: 100% !important;
    box-sizing: border-box !important;
}
[id^="wpcf7-f4279"] form.wpcf7-form input[type="submit"],
[id^="wpcf7-f4279"] form.wpcf7-form .wpcf7-spinner {
    grid-column: 1 / -1 !important;
}
