:root {
    --ink: #101b2c;
    --muted: #647287;
    --line: #dbe4ec;
    --paper: #eef5fa;
    --surface: #ffffff;
    --brand: #082a40;
    --brand-2: #0d5c5f;
    --brand-dark: #06192a;
    --gold: #d39a22;
    --gold-soft: #fff4d9;
    --green: #139b68;
    --green-soft: #e5f5ee;
    --danger: #aa3636;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Arial, Helvetica, sans-serif; line-height: 1.5; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
svg { fill: currentColor; height: 20px; width: 20px; }
main { min-height: calc(100vh - 220px); overflow: hidden; }

.top-strip { align-items: center; background: var(--brand-dark); color: #fff; display: flex; flex-wrap: wrap; font-size: .88rem; gap: 14px; justify-content: center; padding: 9px 16px; }
.top-strip strong { color: var(--gold); }
.top-strip a { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); border-radius: 999px; color: #fff; font-weight: 800; padding: 6px 10px; }

.site-header, .site-footer { margin: 0 auto; max-width: 1240px; padding-left: 24px; padding-right: 24px; }
.site-header { align-items: center; background: rgba(238,245,250,.96); border-bottom: 1px solid rgba(219,228,236,.9); display: flex; gap: 24px; justify-content: space-between; padding-bottom: 14px; padding-top: 14px; position: sticky; top: 0; z-index: 20; }
.brand { align-items: center; display: flex; font-size: 1.12rem; font-weight: 900; gap: 12px; white-space: nowrap; }
.brand img { border: 2px solid rgba(211,154,34,.55); border-radius: 8px; height: 64px; object-fit: cover; width: 64px; }
nav { align-items: center; display: flex; gap: 18px; }
nav a, .link-button { color: var(--muted); font: inherit; font-weight: 800; }
.link-button { background: transparent; border: 0; cursor: pointer; padding: 0; }
.header-actions { align-items: center; display: flex; gap: 10px; }
.whatsapp-pill, .cart-pill { align-items: center; border-radius: 999px; display: inline-flex; font-weight: 900; gap: 8px; min-height: 42px; padding: 10px 14px; }
.whatsapp-pill { background: var(--green); color: #fff; }
.cart-pill { background: var(--surface); border: 1px solid var(--line); color: var(--brand); }
.cart-pill span { background: var(--gold); border-radius: 999px; color: #1d1403; display: grid; font-size: .8rem; height: 22px; place-items: center; width: 22px; }

.hero, .benefit-bar, .section-head, .product-grid, .split-showcase, .category-band, .testimonials, .final-cta, .page-title, .catalog-note, .product-hero, .product-content-grid, .faq-strip, .admin-head, .stats, .auth-panel, .form, .table-wrap { margin-left: auto; margin-right: auto; max-width: 1240px; padding-left: 24px; padding-right: 24px; }

.bookstore-hero { align-items: center; display: grid; gap: 48px; grid-template-columns: minmax(0, 1fr) minmax(360px, 460px); min-height: 680px; padding-bottom: 72px; padding-top: 62px; position: relative; }
.hero-bg-mark { color: rgba(8,42,64,.08); position: absolute; right: -110px; top: 28px; width: 420px; z-index: -1; }
.hero-copy h1, .page-title h1, .product-info h1 { font-family: Georgia, 'Times New Roman', serif; font-size: clamp(2.5rem, 5.5vw, 5.2rem); line-height: .96; margin: 10px 0 18px; max-width: 860px; }
.hero-copy p, .page-title p, .section-head p, .lead { color: var(--muted); font-size: 1.15rem; max-width: 720px; }
.eyebrow, .tag { color: var(--gold); font-size: .78rem; font-weight: 900; letter-spacing: 0; text-transform: uppercase; }
.actions, .trust-row, .product-meta, .catalog-tools, .category-chips { display: flex; flex-wrap: wrap; gap: 12px; }
.actions { margin-top: 28px; }

.button { align-items: center; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; display: inline-flex; font-weight: 900; justify-content: center; min-height: 46px; padding: 12px 18px; transition: transform .18s ease, background .18s ease, box-shadow .18s ease; }
.button:hover { transform: translateY(-1px); }
.button.primary { background: var(--brand); border-color: var(--brand); box-shadow: 0 12px 24px rgba(8,42,64,.16); color: #fff; }
.button.primary:hover { background: var(--brand-dark); }
.button.ghost { background: var(--surface); color: var(--brand); }
.button.small { min-height: 42px; padding: 10px 13px; width: 100%; }

.hero-indicators { display: flex; gap: 10px; margin-top: 32px; }
.hero-indicators button { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; color: var(--muted); cursor: pointer; font-weight: 900; height: 38px; transition: .2s ease; width: 38px; }
.hero-indicators button.active { background: var(--brand); color: #fff; transform: scale(1.08); }
.featured-carousel { min-height: 620px; position: relative; }
.hero-product { background: linear-gradient(180deg, #fff, #f8fbfd); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 22px 54px rgba(16,27,44,.15); display: grid; gap: 18px; opacity: 0; padding: 18px; pointer-events: none; position: absolute; transform: translateX(24px) scale(.98); transition: opacity .35s ease, transform .35s ease; width: 100%; }
.hero-product.active { opacity: 1; pointer-events: auto; transform: translateX(0) scale(1); }
.hero-product img { aspect-ratio: 3 / 4; border-radius: 7px; object-fit: cover; width: 100%; }
.floating-label { background: var(--gold); border-radius: 999px; color: #241a0a; font-size: .78rem; font-weight: 900; left: 18px; padding: 8px 12px; position: absolute; top: 18px; z-index: 2; }

.section-panel { background: rgba(255,255,255,.44); border-top: 1px solid rgba(219,228,236,.8); padding-bottom: 18px; padding-top: 18px; }
.stats-panel { background: #f8fbfd; }
.benefit-bar { display: grid; gap: 14px; grid-template-columns: repeat(4, 1fr); padding-bottom: 36px; padding-top: 22px; }
.benefit-bar article { background: var(--brand); border-radius: 8px; color: #fff; display: grid; gap: 4px; padding: 20px; }
.benefit-bar strong { color: var(--gold); font-size: 1.7rem; }
.benefit-bar span { color: rgba(255,255,255,.8); }

.section-head, .page-title { padding-bottom: 20px; padding-top: 54px; }
.section-head.compact { padding-top: 30px; }
.section-head h2, .split-showcase h2, .category-band h2, .testimonials h2, .final-cta h2, .rich-text h2, .faq-strip h2, .admin-head h1 { font-family: Georgia, 'Times New Roman', serif; font-size: clamp(1.8rem, 3.2vw, 3.1rem); line-height: 1.05; margin: 8px 0; }

.product-grid { display: grid; gap: 22px; grid-template-columns: repeat(4, minmax(0, 1fr)); padding-bottom: 56px; }
.product-card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 18px 42px rgba(16,27,44,.09); display: grid; gap: 14px; grid-template-rows: auto 1fr auto auto; padding: 14px; transition: transform .22s ease, box-shadow .22s ease; }
.product-card:hover { box-shadow: 0 24px 52px rgba(16,27,44,.15); transform: translateY(-4px); }
.cover { position: relative; }
.cover span { background: var(--brand-dark); border-radius: 999px; color: #fff; font-size: .74rem; font-weight: 900; left: 10px; padding: 7px 9px; position: absolute; top: 10px; z-index: 2; }
.cover img { aspect-ratio: 3 / 4; border-radius: 7px; object-fit: cover; width: 100%; }
.product-card h3 { font-size: 1.06rem; line-height: 1.22; margin: 8px 0; }
.product-card p, td span, .showcase-list span, .testimonial-carousel p, .rich-text, .faq-strip p { color: var(--muted); }
.card-tags, .seo-tags { align-items: center; display: flex; flex-wrap: wrap; gap: 8px; }
.card-tags span:last-child, .seo-tags span { background: var(--green-soft); border-radius: 999px; color: var(--brand-2); font-size: .76rem; font-weight: 800; padding: 5px 8px; }
.seo-tags { margin-top: 10px; }
.price-line, .price-box { display: grid; gap: 2px; }
del { color: var(--muted); }
.price-line strong, .price-box strong, .purchase-panel strong { color: var(--brand-2); font-size: 1.58rem; line-height: 1; }
.coupon-badge, .price-box small { background: var(--gold-soft); border: 1px solid rgba(211,154,34,.35); border-radius: 999px; color: #6b4b11; display: inline-flex; font-size: .82rem; font-weight: 900; margin-top: 8px; padding: 7px 10px; width: fit-content; }

.split-showcase { align-items: center; background: var(--brand-dark); color: #fff; display: grid; gap: 36px; grid-template-columns: .9fr 1.1fr; max-width: none; padding: 72px max(24px, calc((100vw - 1240px) / 2 + 24px)); }
.split-showcase p { color: rgba(255,255,255,.72); }
.coupon-showcase { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); border-radius: 8px; display: grid; gap: 10px; justify-items: start; padding: 28px; }
.coupon-showcase span { color: var(--gold); font-weight: 900; text-transform: uppercase; }
.coupon-showcase strong { color: #fff; font-size: clamp(3rem, 7vw, 6rem); line-height: .9; }

.category-band, .final-cta { align-items: center; display: grid; gap: 36px; grid-template-columns: .9fr 1.1fr; padding-bottom: 62px; padding-top: 62px; }
.category-grid { display: grid; gap: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.category-grid a { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; display: grid; gap: 4px; padding: 18px; transition: transform .2s ease; }
.category-grid a:hover { transform: translateY(-2px); }
.category-grid span { color: var(--muted); }

.testimonial-carousel { min-height: 180px; position: relative; }
.testimonial-carousel article { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 18px 42px rgba(16,27,44,.09); left: 24px; opacity: 0; padding: 26px; position: absolute; right: 24px; top: 0; transform: translateY(12px); transition: opacity .3s ease, transform .3s ease; }
.testimonial-carousel article.active { opacity: 1; transform: translateY(0); }
.testimonial-carousel p { font-size: 1.2rem; }
.final-cta { background: linear-gradient(135deg, var(--gold-soft), #fff); border: 1px solid rgba(211,154,34,.25); border-radius: 8px; margin-bottom: 58px; padding: 34px; }

.catalog-tools { margin-top: 22px; }
.search-box { align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; display: flex; flex: 1 1 300px; gap: 8px; min-height: 50px; padding: 0 16px; }
.search-box input, .catalog-tools > input { border: 0; flex: 1; font: inherit; outline: 0; padding: 12px 0; }
.category-chips button { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; color: var(--muted); cursor: pointer; font: inherit; font-weight: 800; padding: 10px 13px; transition: .2s ease; }
.category-chips button.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.catalog-note { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; display: flex; gap: 8px; margin-bottom: 22px; padding-bottom: 14px; padding-top: 14px; }

.product-sales-page { padding-bottom: 40px; }
.product-hero { align-items: center; display: grid; gap: 44px; grid-template-columns: minmax(280px, 430px) minmax(0, 1fr); padding-bottom: 56px; padding-top: 46px; }
.product-media { position: relative; }
.product-media img { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 22px 54px rgba(16,27,44,.12); padding: 12px; width: 100%; }
.product-meta span, .product-meta strong { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-weight: 800; padding: 8px 11px; }
.product-tags { margin: 18px 0 0; }
.purchase-panel, .showcase-list article, .faq-strip details, .auth-panel, .stats article, .table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 18px 42px rgba(16,27,44,.09); }
.purchase-panel { display: grid; gap: 10px; margin-top: 24px; max-width: 430px; padding: 18px; }
.purchase-panel small { color: var(--muted); }
.product-content-grid { display: grid; gap: 28px; grid-template-columns: 1.2fr .8fr; padding-bottom: 44px; }
.rich-text { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 24px; }
.showcase-list { display: grid; gap: 14px; }
.showcase-list article { display: grid; gap: 5px; padding: 18px; }
.faq-strip { display: grid; gap: 12px; padding-bottom: 44px; }
.faq-strip details { padding: 18px; }
.faq-strip summary { cursor: pointer; font-weight: 900; }

.auth-panel { margin-top: 56px; max-width: 460px; padding-bottom: 26px; padding-top: 26px; }
.form { display: grid; gap: 16px; }
.form label { color: var(--muted); display: grid; font-size: .9rem; font-weight: 800; gap: 7px; }
.form input, .form select, .form textarea { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; color: var(--ink); font: inherit; padding: 11px 12px; width: 100%; }
.form-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.span-2 { grid-column: 1 / -1; }
.admin-webhook-actions { align-items: center; display: flex; flex-wrap: wrap; gap: 10px; }
.check { align-content: center; display: flex !important; flex-direction: row; }
.check input { width: auto; }
.alert { background: #fff1f1; border: 1px solid #f1c2c2; border-radius: 8px; color: var(--danger); padding: 10px 12px; }
.admin-head { align-items: center; display: flex; gap: 16px; justify-content: space-between; padding-bottom: 20px; padding-top: 36px; }
.stats { display: grid; gap: 16px; grid-template-columns: repeat(3, 1fr); padding-bottom: 18px; }
.stats article { display: grid; gap: 4px; padding: 18px; }
.stats strong { font-size: 2rem; }
.table-wrap { margin-bottom: 54px; overflow-x: auto; padding: 0; }
table { border-collapse: collapse; width: 100%; }
.format-picker fieldset { border: 0; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 16px; }
.format-picker legend { font-weight: 700; margin-bottom: 8px; }
.format-picker label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.format-picker input { width: auto; accent-color: var(--brand); }
.buy-form .button:disabled { opacity: .6; cursor: not-allowed; }
th, td { border-bottom: 1px solid var(--line); padding: 14px; text-align: left; vertical-align: middle; }
th { color: var(--muted); font-size: .78rem; text-transform: uppercase; }
td:first-child { display: grid; gap: 2px; }

.site-footer { background: var(--brand-dark); color: rgba(255,255,255,.72); max-width: none; padding: 0; }
.footer-main { display: grid; gap: 34px; grid-template-columns: 1.4fr .7fr .7fr; margin: 0 auto; max-width: 1240px; padding: 42px 24px; }
.footer-main > div { display: grid; gap: 9px; align-content: start; }
.footer-main strong, .footer-brand { color: #fff; }
.footer-brand img { height: 58px; width: 58px; }
.footer-main a { color: rgba(255,255,255,.72); }
.footer-main p { max-width: 520px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; margin: 0 auto; max-width: 1240px; padding: 18px 24px 26px; }
.footer-bottom a { color: var(--gold); font-weight: 900; }
.floating-whatsapp { align-items: center; background: var(--green); border-radius: 999px; bottom: 24px; box-shadow: 0 18px 34px rgba(19,155,104,.35); color: #fff; display: flex; height: 58px; justify-content: center; position: fixed; right: 24px; width: 58px; z-index: 45; }
.floating-whatsapp svg { height: 30px; width: 30px; }
.sales-pop { background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--gold); border-radius: 8px; bottom: 24px; box-shadow: 0 20px 44px rgba(16,27,44,.18); display: grid; gap: 2px; left: 24px; max-width: 290px; opacity: 0; padding: 14px 16px; position: fixed; transform: translateY(12px); transition: opacity .25s ease, transform .25s ease; z-index: 40; }
.sales-pop.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 980px) {
    .bookstore-hero, .split-showcase, .category-band, .final-cta, .product-hero, .product-content-grid { grid-template-columns: 1fr; }
    .featured-carousel { min-height: 700px; }
    .product-grid, .benefit-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-main { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
    .top-strip, .site-header, .admin-head, .catalog-note { align-items: flex-start; flex-direction: column; }
    nav, .header-actions { flex-wrap: wrap; }
    .brand img { height: 54px; width: 54px; }
    .hero-copy h1, .page-title h1, .product-info h1 { font-size: 2.35rem; }
    .featured-carousel { min-height: 640px; }
    .product-grid, .benefit-bar, .category-grid, .stats, .form-grid { grid-template-columns: 1fr; }
    .span-2 { grid-column: auto; }
    .testimonial-carousel article { left: 0; right: 0; }
}
