/* === ETR Recambios — Frontend CSS === */

/* === GRID 4/3/2 columnas === */
.etr-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 30px 0;
}
@media (max-width: 1199px) {
    .etr-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
}
@media (max-width: 767px) {
    .etr-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}
.etr-grid--single { grid-template-columns: 1fr; max-width: 280px; }

/* === CARD === */
.etr-card {
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
    display: flex;
    flex-direction: column;
    transition: transform .2s ease, box-shadow .2s ease;
}
.etr-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(0,0,0,.1);
}
.etr-card__img-wrap {
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    background: #fff;
    border-bottom: 1px solid #f5f5f5;
    text-decoration: none;
}
.etr-card__img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    width: auto;
    height: auto;
}
.etr-card__no-img {
    color: #c8c8c8;
    font-size: 13px;
    font-style: italic;
}
.etr-card__body {
    padding: 14px 12px 16px;
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
}
.etr-card__title {
    font-size: 14px;
    line-height: 1.4;
    color: #333;
    margin: 0;
    font-weight: 500;
    min-height: 38px;
}
.etr-card__btn {
    display: inline-block;
    background: #2471a3;
    color: #fff !important;
    padding: 9px 18px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none !important;
    letter-spacing: .5px;
    transition: background .2s;
    margin: 0 auto;
    width: fit-content;
}
.etr-card__btn:hover {
    background: #1a5a85;
    color: #fff !important;
}

/* === BUSCADOR DE MODELO === */
.etr-buscador {
    background: linear-gradient(135deg, #f5f9fc 0%, #e8f1f8 100%);
    border: 2px solid #d6e4f0;
    border-radius: 14px;
    padding: 28px 24px;
    margin: 24px 0;
    text-align: center;
}
.etr-buscador__title {
    color: #2471a3;
    margin: 0 0 16px;
    font-size: 22px;
    font-weight: 700;
}
.etr-buscador__form {
    display: flex;
    gap: 8px;
    max-width: 640px;
    margin: 0 auto;
    flex-wrap: wrap;
    justify-content: center;
}
.etr-buscador__input {
    flex: 1;
    min-width: 240px;
    padding: 13px 18px;
    border: 1px solid #c8d6e0;
    border-radius: 8px;
    font-size: 16px;
    background: #fff;
}
.etr-buscador__input:focus {
    outline: none;
    border-color: #2471a3;
    box-shadow: 0 0 0 3px rgba(36,113,163,.15);
}
.etr-buscador__btn {
    padding: 13px 26px;
    background: #2471a3;
    color: #fff;
    border: 0;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    font-size: 15px;
    transition: background .2s;
}
.etr-buscador__btn:hover { background: #1a5a85; }
.etr-buscador__hint {
    font-size: 13px;
    color: #555;
    margin: 14px 0 0;
}
.etr-buscador__hint a {
    color: #2471a3;
    font-weight: 600;
}

/* === MARCAS === */
.etr-marcas {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    margin: 24px 0;
}
@media (max-width: 768px) {
    .etr-marcas { grid-template-columns: repeat(3, 1fr); }
}
.etr-marca {
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 10px;
    padding: 18px 10px;
    text-align: center;
    text-decoration: none !important;
    color: #333;
    transition: all .2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 70px;
}
.etr-marca:hover {
    border-color: #2471a3;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,.08);
    color: #2471a3;
}
.etr-marca__name {
    font-size: 14px;
    font-weight: 600;
}

/* === BOTÓN WHATSAPP === */
.etr-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #25D366;
    color: #fff !important;
    padding: 13px 26px;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none !important;
    font-size: 15px;
    box-shadow: 0 4px 14px rgba(37,211,102,.3);
    transition: all .2s;
    margin: 12px 0;
}
.etr-whatsapp:hover {
    background: #1ea654;
    color: #fff !important;
    transform: scale(1.02);
    box-shadow: 0 6px 18px rgba(37,211,102,.45);
}
.etr-whatsapp__icon { font-size: 20px; }

/* === SINGLE RECAMBIO === */
.etr-single {
    max-width: 1100px;
    margin: 30px auto;
    padding: 20px;
    box-sizing: border-box;
}
.etr-breadcrumbs {
    margin: 0 0 24px;
    font-size: 14px;
    color: #777;
}
.etr-breadcrumbs a {
    color: #2471a3;
    text-decoration: none;
}
.etr-breadcrumbs a:hover { text-decoration: underline; }
.etr-breadcrumbs span { color: #555; }

.etr-single__top {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}
@media (max-width: 768px) {
    .etr-single__top { grid-template-columns: 1fr; }
}
.etr-single__img-wrap {
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 12px;
    padding: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
}
.etr-single__img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.etr-single__no-img {
    color: #c8c8c8;
    font-style: italic;
}
.etr-single__data {
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.etr-single__title {
    font-size: 28px;
    margin: 0 0 18px;
    color: #2471a3;
    line-height: 1.25;
}
.etr-single__meta {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 16px;
    margin: 0 0 24px;
    padding: 0;
}
.etr-single__meta dt {
    color: #666;
    font-weight: 600;
}
.etr-single__meta dd {
    margin: 0;
    color: #333;
}
.etr-single__meta code {
    background: #f0f4f8;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: .9em;
}
.etr-single__cta-btn {
    display: block;
    background: #2471a3;
    color: #fff !important;
    padding: 18px 28px;
    border-radius: 10px;
    font-size: 17px;
    font-weight: 700;
    text-align: center;
    text-decoration: none !important;
    margin: 0 0 14px;
    transition: background .2s, transform .2s;
    box-shadow: 0 4px 14px rgba(36,113,163,.3);
}
.etr-single__cta-btn:hover {
    background: #1a5a85;
    transform: translateY(-1px);
    color: #fff !important;
}
.etr-single__cta-btn small {
    display: block;
    font-size: 12px;
    font-weight: 400;
    opacity: .85;
    margin-top: 4px;
}
.etr-single__desc {
    padding: 24px;
    background: #f9fafb;
    border-radius: 10px;
    margin: 30px 0;
    border-left: 4px solid #2471a3;
}
.etr-single__desc h2 {
    margin: 0 0 12px;
    font-size: 20px;
    color: #2471a3;
}
.etr-single__video {
    margin: 30px 0;
}
.etr-single__video h2 {
    color: #2471a3;
    margin: 0 0 16px;
}
.etr-video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,.1);
}
.etr-video-wrapper iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: 0;
}

/* === ESTADO VACÍO === */
.etr-empty {
    background: #fff8e5;
    border: 1px solid #f0b849;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
}
.etr-empty a {
    color: #2471a3;
    font-weight: 600;
}
