/* ============================================================
   PEÇA PEÇAS — Homepage Styles
   ============================================================ */

:root {
    --pp-primary: #007bff;
    --pp-primary-dark: #0056b3;
    --pp-primary-light: #e8f0fe;
    --pp-dark: #1a1a2e;
    --pp-gray-50: #f8f9fa;
    --pp-gray-100: #f1f3f5;
    --pp-gray-200: #e9ecef;
    --pp-gray-400: #ced4da;
    --pp-gray-600: #868e96;
    --pp-gray-800: #343a40;
    --pp-success: #28a745;
    --pp-danger: #dc3545;
    --pp-warning: #ffc107;
    --pp-radius: 14px;
    --pp-radius-sm: 8px;
    --pp-shadow: 0 4px 16px rgba(0,0,0,.10);
    --pp-shadow-hover: 0 12px 32px rgba(0,0,0,.14);
    --pp-transition: .25s ease;
}

/* ---- Swiper global fix (scoped — exclude banner) ---------- */

.pp-brands .swiper-wrapper,
.pp-categories .swiper-wrapper,
.pp-products .swiper-wrapper,
.pp-stores .swiper-wrapper {
    height: auto !important;
    align-items: stretch !important;
}

.pp-categories .swiper-slide,
.pp-products .swiper-slide,
.pp-stores .swiper-slide {
    height: auto !important;
    display: flex;
}

/* ---- Banners ---------------------------------------------- */

#home-banners-section.container-fluid {
    padding: 0 !important;
    margin: 0;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

#home-banners-section .swiper-pagination {
    z-index: 1;
}

/* Sections after banner must cover banner dots when scrolling */
.pp-trust-bar,
.pp-brands,
.pp-section,
.pp-how-it-works,
.pp-testimonials,
.pp-cta {
    position: relative;
    z-index: 2;
}

#home-banners-section img {
    width: 100%;
    display: block;
}

#home-banners-section .swiper-slide a.slider-banner-img-desktop {
    display: block;
    line-height: 0;
}

#home-banners-section .swiper-slide a.slider-banner-img-mobile {
    display: none;
}

@media (max-width: 768px) {
    #home-banners-section .swiper-slide a.slider-banner-img-desktop {
        display: none;
    }
    #home-banners-section .swiper-slide a.slider-banner-img-mobile {
        display: block;
        line-height: 0;
    }
}

#swipper-next-banner, #swipper-prev-banner {
    background-color: rgba(255,255,255,.9);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--pp-shadow);
}

#swipper-prev-banner::after,
#swipper-next-banner::after {
    font-size: .8rem !important;
    font-weight: 700;
    color: var(--pp-gray-800);
}

/* Mobile/desktop banner toggle is handled above with #home-banners-section specificity */

/* ---- Fallback hero (no banners) --------------------------- */

.section-home-banner {
    height: 23em;
    background: linear-gradient(3.17deg, rgba(0,123,255,.45) -64%, rgba(0,123,255,0) 112%),
        url("../../images/mecanico.dcc741103648.png");
    background-size: cover;
    background-repeat: no-repeat;
    background-position: 0 0;
}

@media (max-width: 900px) {
    .section-home-banner {
        background-image: linear-gradient(3.17deg, rgba(0,123,255,.45) -64%, rgba(0,123,255,0) 112%),
            url("../../images/mecanico-pc.bb9b6f0aadf7.png");
        background-position: center;
    }
}

/* ---- Hero (no banners fallback) --------------------------- */

.pp-hero {
    background: linear-gradient(135deg, var(--pp-primary) 0%, var(--pp-primary-dark) 100%);
    color: #fff;
    padding: 3.5rem 0 4.5rem;
    position: relative;
    overflow: hidden;
}

.pp-hero::after {
    content: '';
    position: absolute;
    right: -5%;
    bottom: -10%;
    width: 480px;
    height: 480px;
    background: rgba(255,255,255,.06);
    border-radius: 50%;
    pointer-events: none;
}

.pp-hero-content {
    position: relative;
    z-index: 2;
}

.pp-hero h1 {
    font-size: 2.4rem !important;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: .75rem;
}

.pp-hero p {
    font-size: 1.1rem;
    opacity: .9;
    max-width: 520px;
}

.pp-hero-search {
    max-width: 540px;
    margin-top: 1.5rem;
}

.pp-hero-search .input-group {
    background: #fff;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,.15);
}

.pp-hero-search .form-control {
    border: none;
    padding: .85rem 1.5rem;
    font-size: 1rem;
    height: auto;
}

.pp-hero-search .form-control:focus {
    box-shadow: none;
}

.pp-hero-search .btn {
    border-radius: 0 50px 50px 0 !important;
    padding: .85rem 1.8rem;
    font-weight: 600;
    font-size: .95rem;
}

.pp-hero-image {
    position: relative;
    z-index: 2;
    text-align: right;
}

.pp-hero-image img {
    max-height: 320px;
    filter: drop-shadow(0 10px 30px rgba(0,0,0,.25));
}

.pp-hero-stats {
    display: flex;
    gap: 2.5rem;
    margin-top: 2rem;
}

.pp-hero-stat strong {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
}

.pp-hero-stat span {
    font-size: .85rem;
    opacity: .8;
}

@media (max-width: 767px) {
    .pp-hero { padding: 2.5rem 0 3rem; text-align: center; }
    .pp-hero h1 { font-size: 1.7rem !important; }
    .pp-hero p { margin: 0 auto .75rem; }
    .pp-hero-search { margin: 1.5rem auto 0; }
    .pp-hero-stats { justify-content: center; gap: 1.5rem; }
    .pp-hero-image { display: none; }
}

/* ---- Section shared --------------------------------------- */

.pp-section {
    padding: 1.75rem 0 2rem;
}

.pp-section-header {
    text-align: center;
    margin-bottom: 1.25rem;
}

.pp-section-header h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--pp-gray-800);
    margin-bottom: .4rem;
}

.pp-section-header p {
    color: var(--pp-gray-600);
    font-size: .95rem;
    margin: 0;
}

.pp-section-header .pp-link {
    display: inline-block;
    margin-top: .5rem;
    font-weight: 600;
    color: var(--pp-primary);
    text-decoration: none;
    font-size: .9rem;
}

.pp-section-header .pp-link:hover {
    text-decoration: underline;
}

.pp-section-alt {
    background: var(--pp-gray-50);
}

/* Thin line between white sections */
.pp-section + .pp-section {
    border-top: 1px solid var(--pp-gray-200);
}

/* ---- Trust bar -------------------------------------------- */

.pp-trust-bar {
    background: #fff;
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--pp-gray-200);
}

.pp-trust-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .5rem 0;
}

.pp-trust-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 50%;
    background: var(--pp-primary-light);
    color: var(--pp-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.pp-trust-text strong {
    display: block;
    font-size: .875rem;
    font-weight: 700;
    color: var(--pp-gray-800);
    line-height: 1.3;
}

.pp-trust-text span {
    font-size: .75rem;
    color: var(--pp-gray-600);
}

@media (max-width: 767px) {
    .pp-trust-item {
        flex-direction: column;
        text-align: center;
        gap: .35rem;
    }
    .pp-trust-icon {
        width: 36px;
        height: 36px;
        min-width: 36px;
        font-size: .9rem;
    }
    .pp-trust-text strong { font-size: .7rem; }
    .pp-trust-text span { display: none; }
}

/* ---- Brands strip ----------------------------------------- */

.pp-brands {
    padding: 1.5rem 0;
    background: #fff;
    border-bottom: 1px solid var(--pp-gray-200);
}

.pp-brands-label {
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: .75rem;
    font-weight: 600;
    color: var(--pp-gray-600);
    margin-bottom: 1.25rem;
}

.pp-brands-track {
    position: relative;
    margin: 0 40px;
}

.pp-brands .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
}

.pp-brand-item {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border-radius: var(--pp-radius-sm);
    padding: .8rem 1rem;
    transition: var(--pp-transition);
    width: 100%;
    text-decoration: none;
}

.pp-brand-item:hover {
    background: var(--pp-gray-50);
    text-decoration: none;
}

.pp-brand-item img {
    max-height: 48px;
    max-width: 100%;
    object-fit: contain;
    opacity: .9;
    transition: var(--pp-transition);
}

.pp-brand-item:hover img {
    opacity: 1;
}

.pp-brands .swiper-button-prev,
.pp-brands .swiper-button-next {
    color: var(--pp-gray-600);
    width: 32px;
    height: 32px;
    background: #fff;
    border: 1px solid var(--pp-gray-200);
    border-radius: 50%;
    top: 50%;
}

.pp-brands .swiper-button-prev {
    left: -36px;
}

.pp-brands .swiper-button-next {
    right: -36px;
}

.pp-brands .swiper-button-prev::after,
.pp-brands .swiper-button-next::after {
    font-size: .65rem !important;
    font-weight: 700;
}

/* ---- Categories slider ------------------------------------ */

.pp-category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid var(--pp-gray-200);
    border-radius: var(--pp-radius);
    padding: 1.5rem 1rem;
    text-decoration: none;
    color: var(--pp-gray-800);
    transition: var(--pp-transition);
    text-align: center;
    height: 100%;
}

.pp-category-card:hover {
    border-color: var(--pp-gray-400);
    background: var(--pp-gray-50);
    color: var(--pp-primary);
    text-decoration: none;
}

.pp-category-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(0,123,255,.06) 0%, rgba(0,123,255,.12) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: .75rem;
}

.pp-category-icon img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.pp-category-icon .fa {
    font-size: 1.5rem;
    color: var(--pp-primary);
}

.pp-category-card span {
    font-size: .8rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--pp-gray-800);
}

.pp-category-card:hover span {
    color: var(--pp-primary);
}

/* Force equal height on category slides */
.pp-categories .swiper-wrapper {
    align-items: stretch !important;
}

.pp-categories .swiper-slide {
    height: auto !important;
    display: flex;
}

.pp-categories .swiper-pagination {
    display: none !important;
}

.pp-categories .swiper-button-prev,
.pp-categories .swiper-button-next {
    color: var(--pp-primary);
    width: 36px;
    height: 36px;
    background: #fff;
    border: 1px solid var(--pp-gray-200);
    border-radius: 50%;
    box-shadow: var(--pp-shadow);
}

.pp-categories .swiper-button-prev { left: 4px; }
.pp-categories .swiper-button-next { right: 4px; }

.pp-categories .swiper-button-prev::after,
.pp-categories .swiper-button-next::after {
    font-size: .8rem !important;
    font-weight: 700;
}

@media (max-width: 767px) {
    .pp-categories .swiper-button-prev,
    .pp-categories .swiper-button-next,
    .pp-products .swiper-button-prev,
    .pp-products .swiper-button-next,
    .pp-stores .swiper-button-prev,
    .pp-stores .swiper-button-next,
    .pp-brands .swiper-button-prev,
    .pp-brands .swiper-button-next {
        width: 28px;
        height: 28px;
        opacity: .5;
    }

    .pp-category-card {
        padding: 1rem .5rem;
    }
    .pp-category-icon {
        width: 48px;
        height: 48px;
    }
    .pp-category-icon img {
        width: 28px;
        height: 28px;
    }
}

/* ---- Product card ----------------------------------------- */

.pp-product-card {
    background: #fff;
    border: 1px solid var(--pp-gray-200);
    border-radius: var(--pp-radius);
    overflow: hidden;
    transition: var(--pp-transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.pp-product-card:hover {
    border-color: var(--pp-gray-400);
    box-shadow: 0 2px 8px rgba(0,0,0,.1);
}

.pp-product-card > a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.pp-product-img {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    padding: 1rem;
    position: relative;
    overflow: hidden;
}

.pp-product-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform .3s ease;
}

.pp-product-card:hover .pp-product-img img {
    transform: scale(1.05);
}

.pp-product-badge {
    position: absolute;
    top: .75rem;
    left: .75rem;
    background: var(--pp-primary);
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    padding: .25rem .65rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: .3px;
}

.pp-product-badge.promotion {
    background: var(--pp-danger);
}

.pp-product-body {
    padding: 1rem 1.15rem 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--pp-gray-200);
}

.pp-product-ref {
    font-size: .72rem;
    color: var(--pp-gray-600);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: .35rem;
}

.pp-product-name {
    font-size: .9rem;
    font-weight: 600;
    color: var(--pp-gray-800);
    line-height: 1.35;
    margin-bottom: .6rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pp-product-price {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--pp-primary);
    margin-top: auto;
}

.pp-product-price.consulta {
    font-size: .85rem;
    font-weight: 600;
    color: var(--pp-gray-600);
}

.pp-product-stock {
    font-size: .75rem;
    margin-top: .3rem;
}

.pp-product-cta {
    display: block;
    margin-top: .75rem;
    font-size: .82rem;
    font-weight: 600;
    color: var(--pp-primary);
}

/* Products swiper nav */
.pp-products .swiper {
    padding-bottom: 2px;
}

.pp-products .swiper-wrapper {
    align-items: stretch !important;
}

.pp-products .swiper-slide {
    height: auto !important;
    display: flex;
}

.pp-products .swiper-slide .pp-product-card {
    width: 100%;
}

.pp-products .swiper-button-prev,
.pp-products .swiper-button-next {
    color: var(--pp-primary);
    width: 36px;
    height: 36px;
    background: #fff;
    border: 1px solid var(--pp-gray-200);
    border-radius: 50%;
    box-shadow: var(--pp-shadow);
    top: 35%;
}

.pp-products {
    overflow: hidden;
}

.pp-products .swiper-button-prev { left: 2px; }
.pp-products .swiper-button-next { right: 2px; }

.pp-products .swiper-button-prev::after,
.pp-products .swiper-button-next::after {
    font-size: .8rem !important;
    font-weight: 700;
}

.pp-products-pagination,
.pp-stores-pagination {
    text-align: center;
    margin-top: 1rem;
}

.pp-products-pagination .swiper-pagination-bullet-active,
.pp-stores-pagination .swiper-pagination-bullet-active {
    background: var(--pp-primary);
}

/* ---- Store card ------------------------------------------- */

.pp-store-card {
    background: #fff;
    border: 1px solid var(--pp-gray-200);
    border-radius: var(--pp-radius);
    padding: 2rem 1.5rem;
    text-align: center;
    transition: var(--pp-transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pp-store-card:hover {
    border-color: var(--pp-gray-400);
    box-shadow: 0 2px 8px rgba(0,0,0,.1);
}

.pp-store-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 3px solid var(--pp-gray-200);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 1rem;
}

.pp-store-avatar img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.pp-store-avatar-letter {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--pp-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.pp-store-name {
    font-weight: 700;
    font-size: .82rem;
    color: var(--pp-gray-800);
    margin-bottom: 1rem;
    line-height: 1.3;
    word-break: break-word;
    overflow-wrap: break-word;
}

.pp-store-btn {
    display: inline-block;
    border: 2px solid var(--pp-primary);
    color: var(--pp-primary);
    background: transparent;
    border-radius: 25px;
    padding: .5rem 1.5rem;
    font-size: .85rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--pp-transition);
    margin-top: auto;
}

.pp-store-btn:hover {
    background: var(--pp-primary);
    color: #fff;
    text-decoration: none;
}

/* Stores swiper nav */
/* Stores swiper */

.pp-stores .swiper-button-prev,
.pp-stores .swiper-button-next {
    color: var(--pp-primary);
    width: 36px;
    height: 36px;
    background: #fff;
    border: 1px solid var(--pp-gray-200);
    border-radius: 50%;
    box-shadow: var(--pp-shadow);
}

.pp-stores {
    overflow: hidden;
}

.pp-stores .swiper-button-prev { left: 2px; }
.pp-stores .swiper-button-next { right: 2px; }

.pp-stores .swiper-button-prev::after,
.pp-stores .swiper-button-next::after {
    font-size: .8rem !important;
    font-weight: 700;
}

/* pagination handled by shared .pp-stores-pagination rule */

/* ---- Testimonials ----------------------------------------- */

.pp-testimonials {
    background: linear-gradient(180deg, #f0f7ff 0%, #fff 100%);
    padding: 1.75rem 0 2rem;
    border-top: 1px solid var(--pp-gray-200);
}

.pp-testimonial-card {
    background: #fff;
    border: 1px solid var(--pp-gray-200);
    border-radius: var(--pp-radius);
    padding: 1.75rem;
    box-shadow: var(--pp-shadow);
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.pp-testimonial-quote {
    position: absolute;
    top: 1rem;
    left: 1.5rem;
    font-size: 4rem;
    line-height: 1;
    color: rgba(0,123,255,.08);
    font-family: Georgia, serif;
    pointer-events: none;
}

.pp-testimonial-stars {
    color: var(--pp-warning);
    margin-bottom: .75rem;
    position: relative;
    z-index: 1;
}

.pp-testimonial-text {
    font-size: .92rem;
    color: var(--pp-gray-800);
    line-height: 1.6;
    flex: 1;
    font-style: italic;
    position: relative;
    z-index: 1;
}

.pp-testimonial-author {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--pp-gray-200);
}

.pp-testimonial-avatar {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--pp-gray-100);
}

.pp-testimonial-avatar-letter {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 50%;
    background: var(--pp-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
}

.pp-testimonial-name {
    font-weight: 700;
    font-size: .9rem;
    color: var(--pp-gray-800);
    line-height: 1.2;
}

.pp-testimonial-role {
    font-size: .78rem;
    color: var(--pp-gray-600);
}

/* ---- How it Works ----------------------------------------- */

.pp-how-it-works {
    padding: 1.75rem 0 2rem;
    background: var(--pp-gray-50);
    border-top: 1px solid var(--pp-gray-200);
}

.pp-step-number {
    width: 56px;
    height: 56px;
    background: var(--pp-primary);
    color: #fff;
    border-radius: 50%;
    font-size: 1.4rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.pp-step h5 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--pp-gray-800);
    margin-bottom: .5rem;
}

.pp-step p {
    font-size: .875rem;
    color: var(--pp-gray-600);
    max-width: 280px;
    margin: 0 auto;
    line-height: 1.5;
}

.pp-steps-row {
    position: relative;
}

.pp-steps-row .pp-step-col {
    position: relative;
}

@media (min-width: 768px) {
    .pp-steps-row .pp-step-col:not(:last-child)::after {
        content: '';
        position: absolute;
        top: 28px;
        right: -10%;
        width: 20%;
        border-top: 2px dashed var(--pp-gray-400);
    }
}

/* ---- CTA Banner ------------------------------------------- */

.pp-cta {
    background: #1a1a2e;
    color: #fff;
    padding: 2.5rem 0 2rem;
    text-align: center;
}

.pp-cta-pre {
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: .7;
    margin-bottom: .5rem;
}

.pp-cta h2 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: .6rem;
    color: #fff;
}

.pp-cta p {
    font-size: 1rem;
    opacity: .85;
    max-width: 550px;
    margin: 0 auto 1.5rem;
}

.pp-cta .btn {
    padding: .85rem 2.5rem;
    font-weight: 700;
    font-size: 1rem;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(40,167,69,.3);
}

@media (max-width: 767px) {
    .pp-cta { padding: 3.5rem 0; }
    .pp-cta h2 { font-size: 1.4rem; }
}

/* Remove gap between last section and footer on homepage */
footer.bg-primary.mt-4 {
    margin-top: 0 !important;
}

footer.bg-dark.mt-5 {
    margin-top: 0 !important;
}
