/*
 * American Trade Parts. Sizes, colors and spacing measured on the old
 * WordPress/Elementor site at 1440px wide; tablet and phone layouts are new
 * (the old ones cut off the logo and stacked buttons twice).
 */

:root {
    --black: #000;
    --text: #c8c8c8;
    --title: #f5f5f5;
    --white: #fff;
    --green: #27d84e;
    --blue-glow: #4464b4;
    --gold: #fcb900;
    --cyan: #16b7cc;
    --instagram: #e1306c;
    --facebook: #1877f2;
    --gutter: 10px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--black);
    color: var(--text);
    font: 400 16px/1.5 Roboto, -apple-system, "Segoe UI", Arial, sans-serif;
}

img { max-width: 100%; height: auto; }

a { color: inherit; }

h1, h2, h3, p, ul, ol, figure, blockquote { margin: 0; }

ul, ol { padding: 0; list-style: none; }

.container {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.icon { flex: none; }

:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }

/* ==================== Language bar ==================== */
/* Pills with a round flag (US, Spain, Brazil); the current language has the
   blue glow of the landing page buttons. */
.lang-bar__inner {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 8px var(--gutter) 6px;
}
.lang-bar a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 12px 4px 4px;
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 99px;
    color: var(--title);
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: .04em;
    text-decoration: none;
    transition: border-color .2s, background-color .2s;
}
.lang-bar a:hover {
    border-color: var(--white);
    background: rgba(255, 255, 255, .1);
}
.lang-bar a[aria-current="page"] {
    border-color: var(--white);
    background: rgba(68, 100, 180, .35);
    box-shadow: 0 0 8px 2px var(--blue-glow);
    color: var(--white);
}
.flag {
    display: inline-flex;
    flex: none;
    width: 20px;
    height: 20px;
    overflow: hidden;
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .3);
}
.flag svg { width: 100%; height: 100%; }

/* ==================== Shared: section titles, social icons ==================== */
.section-title {
    padding-bottom: 2px;
    border-bottom: 1px solid var(--text);
    color: var(--title);
    font-size: 24px;
    font-weight: 600;
    line-height: 1;
}

.social {
    display: flex;
    justify-content: center;
    gap: 5px;
}
.social a {
    display: grid;
    place-items: center;
    width: 94px;
    height: 94px;
    border-radius: 10%;
    color: var(--white);
    transition: opacity .2s;
}
.social a:hover { opacity: .8; }

/* ==================== Home: header ==================== */
.site-header { padding: 4px 0 19px; }

.header-grid {
    display: grid;
    grid-template-columns: 360px 1fr;
    column-gap: 19px;
}
.logo { display: block; line-height: 0; }
.logo img { width: 360px; }
.header-brand .social { margin-top: 30px; }

.header-about .section-title {
    padding-bottom: 0;
    color: var(--white);
}
.about-text {
    margin-top: 15px;
    font-size: 24px;
    line-height: 36px;
}

/* ==================== Home: slider ==================== */
/* Full width, half as tall, at most 600px (the old slider's 1200x600 base).
   The explicit width keeps the 600px cap from narrowing it. */
.slider {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 1;
    max-height: 600px;
    overflow: hidden;
    background: #111;
    touch-action: pan-y;
}
/* Own stacking context: slides moving in (z-index 2) stay under the arrows and dots. */
.slider__viewport { position: absolute; inset: 0; z-index: 0; }
.slide {
    position: absolute;
    inset: 0;
    visibility: hidden;
}
.slide.is-active,
.slide.is-entering,
.slide.is-leaving { visibility: visible; }
.slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slider__arrow {
    position: absolute;
    top: 50%;
    z-index: 1;
    display: grid;
    place-items: center;
    padding: 12px;
    border: 0;
    border-radius: 99px;
    background: var(--white);
    box-shadow: 0 1px 10px rgba(0, 0, 0, .17);
    color: var(--cyan);
    cursor: pointer;
    transform: translateY(-50%);
}
.slider__arrow--prev { left: 15px; }
.slider__arrow--next { right: 15px; }
.slider__arrow:hover { background: #eefafc; }

.slider__dots {
    position: absolute;
    bottom: 10px;
    z-index: 1;
    left: 50%;
    display: flex;
    gap: 9px;
    padding: 11px 13px;
    border-radius: 99px;
    background: var(--white);
    transform: translateX(-50%);
}
.slider__dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, .57);
    cursor: pointer;
}
.slider__dot[aria-current="true"] { background: var(--cyan); }

/* ==================== Home: sections ==================== */
.section { padding-top: 40px; }

.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 10px;
    text-align: center;
}
.features strong {
    display: block;
    font-size: 24px;
    line-height: 36px;
}
.features img {
    display: block;
    width: 300px;
    margin: 28px auto 0;
}

.section + .section { padding-top: 60px; }

.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 19px;
    margin-top: 10px;
    font-size: 24px;
    line-height: 36px;
}
.steps__num {
    color: var(--white);
    font-size: 36px;
    line-height: 1;
}

#contact { padding-bottom: 50px; }

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
    text-align: center;
}
.contact-card p {
    margin-bottom: 34px;
    font-size: 24px;
    line-height: 36px;
}

/* Rounded Instagram / Messenger buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 19px;
    color: var(--white);
    font-weight: 500;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    transition: filter .2s, transform .2s;
}
.btn:hover { filter: brightness(1.1); }

.btn--instagram,
.btn--messenger {
    width: 100%;
    max-width: 514px;
    min-height: 84px;
    padding: 25px 50px;
    border-radius: 30px;
    font-size: 32px;
}
.btn--instagram { background: var(--instagram); }
.btn--messenger { background: var(--facebook); }

/* ==================== Home: footer ==================== */
.site-footer { padding-bottom: 10px; }

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    align-items: center;
    gap: 20px;
    padding-top: 24px;
    border-top: 1px solid var(--text);
    font-size: 16px;
    line-height: 24px;
}
.footer-logo { display: block; line-height: 0; }
.footer-logo img { width: 265px; }
.footer-address {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: 30px;
}
.footer-address .icon { color: var(--white); }
.footer-legal { text-align: center; }

/* ==================== Landing page ==================== */
.lp-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 20px;
    padding-top: 4px;
}
.lp-hero__main { text-align: center; }
.lp-logo { display: inline-block; line-height: 0; }
.lp-logo img { width: 156px; }
.lp-title {
    margin-top: 21px;
    color: var(--white);
    font-size: 40.32px;
    font-weight: 600;
    line-height: 1;
}
.lp-subtitle {
    margin: 20px 0;
    color: var(--green);
    font-size: 20px;
    font-weight: 600;
    line-height: 1;
}
.lp-hero__side { padding-top: 14px; }
.lp-hero__side .video { margin-top: 35px; }

.lp-heading {
    color: var(--white);
    font-size: 32px;
    font-weight: 600;
    line-height: 1;
    text-align: center;
}

.lp-section { padding-top: 20px; }
.lp-section + .lp-section { padding-top: 80px; }
.lp-section + .lp-section--benefits { padding-top: 60px; }
.lp-section--benefits { padding-bottom: 70px; }

.lp-cta {
    margin-top: 80px;
    text-align: center;
}

/* Green WhatsApp buttons with the blue (first one: white) glow */
.btn--whatsapp {
    gap: 20px;
    padding: 25px 50px;
    border: 3px solid var(--white);
    border-radius: 6px;
    background: var(--green);
    box-shadow: 0 0 11px 8px var(--blue-glow);
    font-size: 26px;
    text-transform: uppercase;
}
.btn--block { display: flex; width: 100%; }
.btn--glow-white { box-shadow: 0 0 11px 8px rgba(255, 255, 255, .46); }

/* YouTube placeholder (main.js swaps in the player) */
.video {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #111;
}
.video__link,
.video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
.video__link { display: block; color: var(--white); text-decoration: none; }
.video__link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.video__title {
    position: absolute;
    inset: 0 0 auto;
    padding: 14px 16px 30px;
    overflow: hidden;
    background: linear-gradient(rgba(0, 0, 0, .75), transparent);
    font-size: 18px;
    font-weight: 500;
    line-height: 1.25;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.video .icon--play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .4));
    transition: transform .2s;
}
.video__link:hover .icon--play { transform: translate(-50%, -50%) scale(1.08); }

/* Reviews */
.reviews {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}
.review__head {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    column-gap: 10px;
    text-align: center;
}
.review__avatar {
    display: block;
    width: 120px;
    margin: 0 auto;
    border-radius: 50%;
}
.stars {
    display: inline-flex;
    margin-top: 5px;
    color: var(--gold);
}
.review__text {
    font-size: 16px;
    line-height: 24px;
    color: var(--white);
}
.review__text p {
    margin-bottom: 9px;
    color: var(--gold);
    font-size: 20px;
    font-style: italic;
    font-weight: 700;
}
.review__photos {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 24px;
}
.review__photos a { display: block; line-height: 0; }
.review__photos img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    transition: opacity .2s;
}
.review__photos a:hover img { opacity: .85; }
.review .video { margin-top: 20px; }

/* Brands */
.brands {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
    justify-items: center;
}
.brands img { width: 514px; }

/* Benefits */
.benefits {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 54px;
}
.benefit {
    padding: 10px 10px 10px;
    border: 4px solid var(--blue-glow);
    box-shadow: 0 0 10px var(--blue-glow);
    color: var(--white);
    text-align: center;
}
.benefit img { display: block; width: 103px; margin: 0 auto; }
.benefit h3 {
    margin-top: 29px;
    font-size: 28px;
    font-weight: 600;
    line-height: 1.2;
}
.benefit p {
    margin-top: 16px;
    font-size: 22px;
    line-height: 1.5;
}

/* Photo lightbox */
.lightbox {
    width: 100vw;
    max-width: none;
    height: 100vh;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: rgba(0, 0, 0, .92);
}
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: rgba(0, 0, 0, .6); }
.lightbox__img {
    max-width: min(92vw, 1080px);
    max-height: 86vh;
    object-fit: contain;
}
.lightbox__btn {
    position: fixed;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .15);
    color: var(--white);
    cursor: pointer;
}
.lightbox__btn:hover { background: rgba(255, 255, 255, .3); }
.lightbox__close { top: 16px; right: 16px; }
.lightbox__prev { top: 50%; left: 16px; transform: translateY(-50%); }
.lightbox__next { top: 50%; right: 16px; transform: translateY(-50%); }
.lightbox__btn[hidden] { display: none; }

/* ==================== Narrower screens ==================== */
@media (max-width: 1160px) {
    :root { --gutter: 16px; }
}

@media (max-width: 1024px) {
    .header-grid { grid-template-columns: 300px 1fr; }
    .logo img { width: 300px; }
    .about-text { font-size: 20px; line-height: 32px; }
    .steps { font-size: 20px; line-height: 32px; }
    .btn--instagram,
    .btn--messenger { padding: 22px 24px; font-size: 26px; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); justify-items: center; }
    .footer-address { margin-left: 0; }
    .lp-title { font-size: 34px; }
    .btn--whatsapp { padding: 22px 30px; font-size: 22px; }
    .reviews { grid-template-columns: 1fr; max-width: 560px; margin-inline: auto; gap: 50px; }
    .review__photos { max-width: 380px; margin-inline: auto; }
    .review .video { max-width: 560px; margin-inline: auto; }
    .benefit h3 { font-size: 24px; }
    .benefit p { font-size: 19px; }
}

@media (max-width: 860px) {
    .header-grid { grid-template-columns: 1fr; row-gap: 24px; }
    .header-brand { text-align: center; }
    .logo { display: inline-block; }
    .header-brand .social { margin-top: 10px; }
    .steps,
    .contact-grid { grid-template-columns: 1fr; }
    .features strong { font-size: 20px; line-height: 30px; }
    .features img { margin-top: 14px; }
    .steps { gap: 18px; }
    .contact-card + .contact-card { margin-top: 20px; }
    .contact-card p { margin-bottom: 14px; }
    .lp-hero { grid-template-columns: 1fr; row-gap: 40px; }
    .lp-hero__side { padding-top: 0; }
    .lp-hero__side .video { margin-top: 20px; }
    .brands { grid-template-columns: 1fr; }
    .benefits { grid-template-columns: 1fr; gap: 20px; max-width: 480px; margin-inline: auto; margin-top: 30px; }
    .lp-section + .lp-section { padding-top: 60px; }
    .lp-cta { margin-top: 50px; }
}

@media (max-width: 600px) {
    .site-header { padding-bottom: 24px; }
    .logo img { width: 260px; }
    .social a { width: 64px; height: 64px; }
    .social .icon { width: 40px; height: 40px; }
    .section-title { font-size: 21px; }
    .about-text { margin-top: 12px; font-size: 18px; line-height: 28px; }
    .slider__arrow { display: none; }
    .slider__dots { bottom: 6px; padding: 8px 11px; gap: 8px; }
    .slider__dot { width: 8px; height: 8px; }
    .section { padding-top: 30px; }
    .features { grid-template-columns: 1fr; gap: 36px; }
    .features img { width: 240px; }
    .section + .section { padding-top: 44px; }
    .features strong,
    .contact-card p { font-size: 20px; line-height: 30px; }
    .steps { font-size: 18px; line-height: 28px; }
    .steps__num { font-size: 28px; }
    .btn--instagram,
    .btn--messenger { min-height: 64px; padding: 18px 20px; border-radius: 24px; font-size: 20px; gap: 12px; }
    .btn--instagram .icon,
    .btn--messenger .icon { width: 24px; height: 24px; }
    .footer-grid { grid-template-columns: 1fr; gap: 16px; }
    .footer-logo img { width: 220px; }
    .lp-title { font-size: 28px; line-height: 1.1; }
    .lp-subtitle { font-size: 17px; line-height: 1.2; }
    .lp-heading { font-size: 25px; line-height: 1.15; }
    .btn--whatsapp { width: 100%; gap: 14px; padding: 18px 18px; font-size: 19px; line-height: 1.15; box-shadow: 0 0 10px 5px var(--blue-glow); }
    .btn--glow-white { box-shadow: 0 0 10px 5px rgba(255, 255, 255, .46); }
    .btn--whatsapp .icon { width: 24px; height: 24px; }
    .review__head { grid-template-columns: 1fr; row-gap: 12px; }
    .review__text p { font-size: 19px; }
    .review__photos { gap: 10px; margin-top: 18px; }
    .video__title { font-size: 15px; padding: 10px 12px 24px; }
    .video .icon--play { width: 56px; height: 56px; }
    .benefit h3 { margin-top: 18px; font-size: 22px; }
    .benefit p { margin-top: 10px; font-size: 18px; }
    .lp-section--benefits { padding-bottom: 50px; }
}

@media (prefers-reduced-motion: reduce) {
    .lang-bar a,
    .btn,
    .social a,
    .video .icon--play,
    .review__photos img { transition: none; }
    .video__link:hover .icon--play { transform: translate(-50%, -50%); }
}
