/* ============================================================
   WDM Site1 — Custom Theme (Bootstrap 5)
   Cor primária definida via --site-primary em topo.php
============================================================ */

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

body {
    font-family: 'Poppins', sans-serif;
    color: #333;
    background: #f8f9fa;
}

a { text-decoration: none; }
a:hover { text-decoration: none; }

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

/* --- Navbar ---------------------------------------------- */
.site-navbar {
    background: var(--site-primary) !important;
    box-shadow: 0 2px 12px rgba(0,0,0,.18);
    padding: .75rem 0;
    transition: background .3s;
}

.site-navbar .navbar-brand img { height: 42px; object-fit: contain; }
.site-navbar .navbar-brand.text-brand { font-size: 1.2rem; font-weight: 700; color: #fff; }

.site-navbar .nav-link {
    color: rgba(255,255,255,.88) !important;
    font-size: .88rem;
    font-weight: 500;
    padding: .45rem .75rem !important;
    border-radius: .375rem;
    transition: background .2s, color .2s;
}

.site-navbar .nav-link:hover,
.site-navbar .nav-link.active {
    background: rgba(255,255,255,.15);
    color: #fff !important;
}

.site-navbar .nav-icon { font-size: 1.1rem; }

/* --- Buttons --------------------------------------------- */
.site-btn {
    background: var(--site-primary);
    border: 2px solid var(--site-primary);
    color: #fff;
    font-weight: 600;
    border-radius: .5rem;
    padding: .55rem 1.4rem;
    transition: background .2s, border-color .2s, transform .15s, box-shadow .2s;
}

.site-btn:hover {
    background: var(--site-primary-dark);
    border-color: var(--site-primary-dark);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0,0,0,.18);
}

.site-btn-outline {
    background: transparent;
    border: 2px solid #fff;
    color: #fff;
    font-weight: 600;
    border-radius: .5rem;
    padding: .55rem 1.4rem;
    transition: background .2s, color .2s, transform .15s;
}

.site-btn-outline:hover {
    background: #fff;
    color: var(--site-primary);
    transform: translateY(-1px);
}

/* --- Hero Section ---------------------------------------- */
.site-hero {
    position: relative;
    min-height: 520px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
}

.site-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0,0,0,.62) 0%, rgba(0,0,0,.32) 100%);
}

.site-hero-content {
    position: relative;
    z-index: 2;
    color: #fff;
    text-align: center;
    padding: 3rem 1rem;
}

.site-hero-content h1 {
    font-size: clamp(1.8rem, 5vw, 3.2rem);
    font-weight: 700;
    line-height: 1.15;
    text-shadow: 0 2px 8px rgba(0,0,0,.35);
    margin-bottom: 1rem;
}

.site-hero-content p {
    font-size: clamp(.95rem, 2vw, 1.15rem);
    font-weight: 300;
    max-width: 640px;
    margin: 0 auto 1.8rem;
    opacity: .92;
    text-shadow: 0 1px 4px rgba(0,0,0,.3);
}

/* --- Section Titles -------------------------------------- */
.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #222;
    margin-bottom: .25rem;
}

.section-title-line {
    width: 48px;
    height: 4px;
    background: var(--site-primary);
    border-radius: 2px;
    margin: 0 auto 2rem;
}

/* --- Product Card ---------------------------------------- */
.product-card {
    background: #fff;
    border-radius: .75rem;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,.07);
    transition: transform .22s, box-shadow .22s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 28px rgba(0,0,0,.14);
}

.product-card-img-wrap {
    aspect-ratio: 4/3;
    overflow: hidden;
    background: #f1f3f5;
}

.product-card-img-wrap img,
.product-card-img-wrap video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s;
}

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

.product-card-body {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-card-title {
    font-size: .9rem;
    font-weight: 600;
    color: #222;
    margin-bottom: .4rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--site-primary);
    margin-bottom: .75rem;
}

.product-card-body .site-btn {
    margin-top: auto;
    font-size: .82rem;
    padding: .4rem 1rem;
}

/* --- Breadcrumb Header ----------------------------------- */
.page-header-section {
    background: linear-gradient(135deg, var(--site-primary) 0%, var(--site-primary-dark) 100%);
    padding: 2rem 0;
    margin-bottom: 2.5rem;
}

.page-header-section h1 {
    color: #fff;
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0;
}

.page-header-section .breadcrumb {
    background: none;
    padding: 0;
    margin: .5rem 0 0;
    justify-content: flex-end;
}

.page-header-section .breadcrumb-item a { color: rgba(255,255,255,.8); }
.page-header-section .breadcrumb-item.active,
.page-header-section .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,.6); }

/* --- Sidebar --------------------------------------------- */
.sidebar-card {
    background: #fff;
    border-radius: .75rem;
    box-shadow: 0 2px 10px rgba(0,0,0,.07);
    overflow: hidden;
}

.sidebar-card-header {
    background: var(--site-primary);
    color: #fff;
    padding: .75rem 1.25rem;
    font-weight: 600;
    font-size: .9rem;
}

.sidebar-card-body { padding: 1rem; }

.category-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .55rem .75rem;
    border-radius: .375rem;
    color: #444;
    font-size: .875rem;
    transition: background .15s, color .15s;
    margin-bottom: .15rem;
}

.category-link:hover,
.category-link.active {
    background: var(--site-primary);
    color: #fff;
}

/* --- Contact -------------------------------------------- */
.contact-info-card {
    background: #fff;
    border-radius: .75rem;
    box-shadow: 0 2px 10px rgba(0,0,0,.07);
    padding: 1.5rem;
}

.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    margin-bottom: 1.1rem;
}

.contact-info-item .icon-wrap {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--site-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: .9rem;
}

.contact-info-item .info-text { font-size: .875rem; color: #555; line-height: 1.5; }
.contact-info-item .info-label { font-weight: 600; color: #222; font-size: .8rem; margin-bottom: .1rem; }

/* --- Product Detail -------------------------------------- */
.detail-image-wrap {
    border-radius: .75rem;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,.1);
    background: #fff;
}

.detail-image-wrap img { width: 100%; aspect-ratio: 1; object-fit: cover; }

.detail-info-card {
    background: #fff;
    border-radius: .75rem;
    box-shadow: 0 2px 10px rgba(0,0,0,.07);
    padding: 1.75rem;
}

.detail-price {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--site-primary);
}

.detail-category-badge {
    background: rgba(0,0,0,.06);
    color: #555;
    padding: .25rem .75rem;
    border-radius: 2rem;
    font-size: .78rem;
    font-weight: 600;
}

/* --- Related products (ofertas) -------------------------- */
.related-card {
    position: relative;
    border-radius: .6rem;
    overflow: hidden;
    aspect-ratio: 1;
    cursor: pointer;
}

.related-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s;
}

.related-card:hover img { transform: scale(1.08); }

.related-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.65) 0%, transparent 55%);
    display: flex;
    align-items: flex-end;
    padding: .75rem;
    opacity: 0;
    transition: opacity .25s;
}

.related-card:hover .related-card-overlay { opacity: 1; }

.related-card-overlay h6 {
    color: #fff;
    font-size: .8rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
}

/* --- Footer --------------------------------------------- */
.site-footer {
    background: #1a1a2e;
    color: rgba(255,255,255,.75);
    padding: 3.5rem 0 1.5rem;
    margin-top: 4rem;
}

.site-footer h5 {
    color: #fff;
    font-weight: 700;
    font-size: .95rem;
    margin-bottom: 1.2rem;
    position: relative;
    padding-bottom: .6rem;
}

.site-footer h5::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 32px;
    height: 3px;
    background: var(--site-primary);
    border-radius: 2px;
}

.site-footer p, .site-footer li { font-size: .85rem; line-height: 1.8; }
.site-footer a { color: rgba(255,255,255,.65); transition: color .2s; }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,.1);
    color: rgba(255,255,255,.75);
    font-size: .95rem;
    margin-right: .35rem;
    transition: background .2s, color .2s;
}

.footer-social a:hover {
    background: var(--site-primary);
    color: #fff;
}

.site-copyright {
    background: rgba(0,0,0,.25);
    text-align: center;
    padding: .85rem 0;
    font-size: .78rem;
    color: rgba(255,255,255,.45);
    margin-top: 2rem;
}

.site-copyright a { color: rgba(255,255,255,.6); }
.site-copyright a:hover { color: #fff; }

/* --- "Get It" Banner ------------------------------------- */
.site-getit {
    background: var(--site-primary);
    color: #fff;
    padding: 2rem 0;
    text-align: center;
}

.site-getit h4 {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    font-weight: 600;
    margin: 0;
    opacity: .95;
}

/* --- Pagination ------------------------------------------ */
.pagination .page-link {
    color: var(--site-primary);
    border-radius: .375rem;
    margin: 0 .15rem;
}

.pagination .page-item.active .page-link {
    background: var(--site-primary);
    border-color: var(--site-primary);
    color: #fff;
}

/* --- Map wrapper ---------------------------------------- */
.map-wrapper { border-radius: .75rem; overflow: hidden; box-shadow: 0 4px 16px rgba(0,0,0,.1); }
.map-wrapper iframe { display: block; width: 100%; height: 360px; border: 0; }

/* --- Picture element ------------------------------------ */
/* Garante que <picture> se comporte como bloco dentro dos wrappers */
picture {
    display: block;
    width: 100%;
    height: 100%;
}

picture img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s;
}

/* Herda o efeito de zoom do card hover */
.product-card:hover picture img { transform: scale(1.05); }

/* No detalhe do produto, a imagem principal ocupa o espaço sem zoom */
.detail-image-wrap picture img {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    transition: none;
}

/* Nos cards de relacionados */
.related-card picture { position: absolute; inset: 0; }
.related-card picture img { transition: transform .35s; }
.related-card:hover picture img { transform: scale(1.08); }

/* --- Utilities ------------------------------------------ */
.section-pad { padding: 3.5rem 0; }
.form-control:focus { border-color: var(--site-primary); box-shadow: 0 0 0 .2rem rgba(var(--site-primary-rgb), .2); }
