/* D2 Home — "Legado Dourado" — Editora dos Pioneiros */

/* ── Accessibility: screen-reader-only text ── */
.screen-reader-text {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.screen-reader-text:focus {
    position: static !important;
    width: auto !important;
    height: auto !important;
    padding: 12px 24px !important;
    margin: 0 !important;
    overflow: visible !important;
    clip: auto !important;
    white-space: normal !important;
    background: #d4a84b !important;
    color: #fff !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    z-index: 100000 !important;
    display: block !important;
}

/* ── Header ── */
.d2h-header { background: #3a3a3a; border-bottom: 3px solid #d4a84b; position: sticky; top: 0; z-index: 100; }
.d2h-header-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; height: 64px; padding: 0 20px; }
.d2h-logo { color: #d4a84b; font-size: 20px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.d2h-nav { display: flex; gap: 24px; }
.d2h-nav a { color: #ccc; font-size: 14px; text-decoration: none; transition: color 0.2s; }
.d2h-nav a:hover { color: #d4a84b; }
.d2h-cart-link { color: #fff; display: flex; align-items: center; gap: 6px; text-decoration: none; position: relative; }
.d2h-cart-link:hover { color: #d4a84b; }
.d2h-cart-count { background: #d4a84b; color: #fff; font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.d2h-cart-count:empty { display: none; }
.d2h-mobile-toggle { display: none; background: none; border: none; color: #fff; font-size: 24px; cursor: pointer; }

/* ── Hero ── */
.d2h-hero { background: #faf6eb; padding: 32px 20px; }
.d2h-hero-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; gap: 32px; }
.d2h-hero-pioneer { flex: 0 0 160px; align-self: center; }
.d2h-hero-pioneer-img { width: 100%; height: auto; display: block; opacity: 0.85; }
.d2h-hero-text { flex: 1; }
.d2h-hero-text h1 { font-size: 36px; font-weight: 800; color: #3a3a3a; line-height: 1.2; margin-bottom: 12px; }
.d2h-hero-text h1 em { color: #d4a84b; font-style: normal; }
.d2h-hero-text p { font-size: 15px; color: #666; line-height: 1.6; margin-bottom: 0; max-width: 440px; }
.d2h-hero-books { flex: 0 0 320px; position: relative; height: 300px; }
.d2h-hero-book { position: absolute; width: 150px; border-radius: 6px; overflow: hidden; box-shadow: 0 8px 24px rgba(0,0,0,0.15); transition: transform 0.3s, z-index 0s; display: block; background: none !important; border: none !important; padding: 0 !important; line-height: 0; }
.d2h-hero-book:hover { z-index: 10 !important; transform: scale(1.05) !important; }
.d2h-hero-book img { width: 100% !important; height: auto !important; display: block !important; border-radius: 0 !important; margin: 0 !important; padding: 0 !important; border: none !important; background: none !important; }
.d2h-hero-book:nth-child(1) { top: 0; left: 0; transform: rotate(-8deg); z-index: 1; }
.d2h-hero-book:nth-child(2) { top: 30px; left: 90px; transform: rotate(3deg); z-index: 2; }
.d2h-hero-book:nth-child(3) { top: 100px; left: 30px; transform: rotate(-3deg); z-index: 3; }

/* ── Buttons ── */
.d2h-btn {
    display: inline-block; padding: 14px 36px; background: #d4a84b !important; color: #fff !important;
    font-size: 15px; font-weight: 600; border-radius: 6px; text-decoration: none !important;
    transition: background 0.2s; box-shadow: 0 2px 8px rgba(212,168,75,0.25);
}
.d2h-btn:hover, .d2h-btn:visited { background: #c49a3f !important; color: #fff !important; }
.d2h-btn-outline {
    display: inline-block; padding: 12px 32px; background: transparent; color: #d4a84b !important;
    border: 2px solid #d4a84b; font-size: 14px; font-weight: 600; border-radius: 6px;
    text-decoration: none !important; transition: all 0.2s;
}
.d2h-btn-outline:hover { background: #d4a84b; color: #fff !important; }

/* ── Trust Bar ── */
.d2h-trust { background: #3a3a3a; padding: 20px; border-bottom: 1px solid #4a4a4a; }
.d2h-trust-inner { max-width: 1200px; margin: 0 auto; display: flex; justify-content: center; gap: 48px; flex-wrap: wrap; }
.d2h-trust-item { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #ccc; font-weight: 500; }
.d2h-trust-icon { font-size: 22px; }

/* ── Sections ── */
.d2h-section { max-width: 1200px; margin: 0 auto; padding: 48px 20px; }
.d2h-section-title { font-size: 24px; font-weight: 700; color: #3a3a3a; margin-bottom: 6px; }
.d2h-section-sub { font-size: 14px; color: #888; margin-bottom: 28px; }
.d2h-section-cta { text-align: center; margin-top: 28px; }

/* ── Product Grid ── */
.d2h-grid { display: grid; gap: 20px; }
.d2h-grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ── Product Cards ── */
.d2h-product-card { background: #fff; border-radius: 8px; border: 1px solid #e5e5e5; overflow: hidden; transition: box-shadow 0.2s, transform 0.2s; }
.d2h-product-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.1); transform: translateY(-2px); }
.d2h-product-img { display: block; width: 100%; aspect-ratio: 3/4; overflow: hidden; background: #f5f0e8; }
.d2h-product-img img { width: 100% !important; height: 100% !important; object-fit: cover !important; border-radius: 0 !important; margin: 0 !important; padding: 0 !important; }
.d2h-product-info { padding: 14px; }
.d2h-product-title {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    font-size: 13px; font-weight: 600; color: #1a1a1a; line-height: 1.4; margin-bottom: 8px;
    min-height: 36px; text-decoration: none;
}
.d2h-product-title:hover { color: #d4a84b; }
.d2h-product-price { font-size: 15px; font-weight: 700; color: #b8860b; margin-bottom: 12px; }
.d2h-product-price del { color: #bbb; font-size: 13px; font-weight: 400; }
.d2h-product-price ins { text-decoration: none; }
.d2h-add-to-cart {
    display: block; width: 100%; padding: 10px; background: #d4a84b !important; color: #fff !important;
    border: none; border-radius: 5px; font-size: 12px; font-weight: 600; cursor: pointer;
    text-align: center; text-decoration: none !important; font-family: inherit; transition: background 0.2s;
    box-sizing: border-box;
}
.d2h-add-to-cart:hover, .d2h-add-to-cart:visited { background: #c49a3f !important; color: #fff !important; }
.d2h-add-to-cart.loading { opacity: 0.7; }

/* "Ver carrinho" link after AJAX add-to-cart */
.d2h-product-card .added_to_cart,
.d2h-product-info .added_to_cart {
    display: block !important;
    text-align: center !important;
    color: #d4a84b !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    margin-top: 6px !important;
    text-decoration: none !important;
}
.d2h-product-card .added_to_cart:hover,
.d2h-product-info .added_to_cart:hover {
    color: #c49a3f !important;
    text-decoration: underline !important;
}

/* ── Quote Banner ── */
.d2h-quote { background: linear-gradient(135deg, #3a3a3a, #2a2a2a); padding: 48px 20px; text-align: center; position: relative; overflow: hidden; }
.d2h-quote::before { content: '\201C'; position: absolute; top: 10px; left: 50%; transform: translateX(-50%); font-size: 120px; color: rgba(212,168,75,0.08); font-family: Georgia, serif; line-height: 1; }
.d2h-quote-inner { max-width: 700px; margin: 0 auto; position: relative; z-index: 1; }
.d2h-quote blockquote { color: #e8dcc8; font-size: 18px; font-style: italic; line-height: 1.7; margin: 0 0 16px; }
.d2h-quote cite { color: #d4a84b; font-size: 14px; font-style: normal; font-weight: 600; }

/* ── Pioneer Banner ── */
.d2h-pioneer-banner { background: linear-gradient(135deg, #3a3a3a, #2a2a2a); padding: 60px 20px; text-align: center; }
.d2h-pioneer-inner { max-width: 800px; margin: 0 auto; }
.d2h-pioneer-banner h2 { color: #fff; font-size: 26px; font-weight: 700; margin-bottom: 12px; }
.d2h-pioneer-banner p { color: #999; font-size: 15px; margin-bottom: 28px; line-height: 1.6; }
.d2h-pioneer-circles { display: flex; justify-content: center; gap: 12px; margin-bottom: 32px; flex-wrap: nowrap; }
.d2h-pioneer-item { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.d2h-pioneer-circle { width: 120px; height: 120px; border-radius: 0; border: none; overflow: visible; transition: transform 0.2s; }
.d2h-pioneer-circle:hover { transform: scale(1.1); }
.d2h-pioneer-circle img { width: 100%; height: 100%; object-fit: contain; }
.d2h-pioneer-name { font-size: 13px; color: #999; font-weight: 500; }

/* ── Footer ── */
.d2h-footer { background: #3a3a3a; padding: 40px 20px 0; border-top: 3px solid #d4a84b; }
.d2h-footer-inner { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.d2h-footer-col h4 { color: #d4a84b; font-size: 13px; font-weight: 600; margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
.d2h-footer-col p, .d2h-footer-col a { color: #888; font-size: 12px; line-height: 1.8; display: block; text-decoration: none; }
.d2h-footer-col a:hover { color: #d4a84b; }
.d2h-footer-bottom { max-width: 1200px; margin: 24px auto 0; padding: 20px 0; border-top: 1px solid #4a4a4a; text-align: center; color: #888; font-size: 12px; }

/* ── Responsive ── */
@media (max-width: 900px) {
    .d2h-hero-inner { flex-direction: column; text-align: center; }
    .d2h-hero-pioneer { display: none; }
    .d2h-hero-text p { margin-left: auto; margin-right: auto; }
    .d2h-hero-books { flex: none; width: 300px; height: 340px; margin: 0 auto; }
    .d2h-hero-book { width: 140px; }
    .d2h-grid-4 { grid-template-columns: repeat(2, 1fr); }
    .d2h-nav { display: none; }
    .d2h-nav.d2h-nav--open {
        display: flex; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0;
        background: #3a3a3a; padding: 16px 20px; gap: 12px; border-bottom: 3px solid #d4a84b; z-index: 99;
    }
    .d2h-mobile-toggle { display: block; }
    .d2h-trust-inner { gap: 20px; }
    .d2h-hero-text h1 { font-size: 28px; }
    .d2h-footer-inner { flex-direction: column; gap: 24px; }
    .d2h-pioneer-circles { gap: 10px; }
}

@media (max-width: 480px) {
    .d2h-grid-4 { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .d2h-hero { padding: 40px 16px; }
    .d2h-section { padding: 32px 16px; }
    .d2h-hero-books { width: 240px; height: 280px; }
    .d2h-hero-book { width: 120px; }
    .d2h-trust-inner { flex-direction: column; gap: 10px; align-items: center; }
}
