:root {
    --ec-wine: #500708;
    --ec-wine-dark: #390405;
    --ec-gold: #c88b2a;
    --ec-ink: #211817;
    --ec-muted: #746a67;
    --ec-line: #e8e2df;
    --ec-soft: #f8f6f5;
    --ec-white: #fff;
    --ec-success: #1f7a4d;
}

.ec-shell { width: min(1180px, calc(100% - 32px)); margin-inline: auto; }
.ec-sr-only { 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; }
.ec-skip-link { position: fixed; z-index: 9999; top: 8px; left: 8px; padding: 10px 14px; border-radius: 8px; background: #fff; color: var(--ec-wine); font-weight: 700; transform: translateY(-160%); }
.ec-skip-link:focus { transform: translateY(0); outline: 3px solid var(--ec-gold); }
body.ec-site :focus-visible { outline: 3px solid #c88b2a; outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

.ec-promo-bar { background: var(--ec-wine-dark); color: var(--ec-white); font-size: 11px; font-weight: 300; }
.ec-promo-content { min-height: 27px; display: flex; align-items: center; justify-content: center; gap: 30px; overflow: hidden; white-space: nowrap; }
.ec-promo-content span + span::before { content: "•"; margin-right: 30px; color: #ddc1ad; }

.ec-site-header { position: relative; z-index: 30; background: var(--ec-white); border-bottom: 1px solid var(--ec-line); color: var(--ec-ink); }
.ec-header-main { min-height: 82px; display: grid; grid-template-columns: 190px minmax(260px, 1fr) auto; align-items: center; gap: 26px; }
.ec-brand { display: inline-flex; align-items: center; min-width: 0; }
.ec-brand img { display: block; width: min(180px, 100%); max-height: 52px; object-fit: contain; }
.ec-header-search { position: relative; display: flex; align-items: center; min-height: 42px; border: 1px solid #d9d2cf; border-radius: 9px; background: var(--ec-white); overflow: visible; }
.ec-header-search input { width: 100%; min-width: 0; padding: 10px 14px; border: 0; outline: 0; background: transparent; color: var(--ec-ink); font: inherit; font-weight: 300; }
.ec-header-search button { align-self: stretch; width: 48px; display: grid; place-items: center; border: 0; border-radius: 0 8px 8px 0; background: var(--ec-wine); color: var(--ec-white); cursor: pointer; font-weight: 500; }
.ec-header-search button:hover { background: var(--ec-wine-dark); }
.ec-header-search svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }

.ec-header-actions { display: flex; align-items: center; gap: 16px; }
.ec-header-action { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 42px; color: var(--ec-ink); font-size: 13px; font-weight: 500; text-decoration: none; }
.ec-header-action:hover { color: var(--ec-wine); }
.ec-header-action svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ec-header-counter { padding-right: 5px; }
.ec-count-badge { position: absolute; top: -1px; left: 13px; min-width: 18px; height: 18px; padding: 0 5px; display: grid; place-items: center; border: 2px solid var(--ec-white); border-radius: 999px; background: var(--ec-wine); color: var(--ec-white); font-size: 10px; line-height: 1; font-weight: 500; box-sizing: border-box; }
.ec-count-badge[hidden] { display: none; }
.ec-count-badge.ec-bump { animation: ec-badge-bump .28s ease; }
@keyframes ec-badge-bump { 50% { transform: scale(1.28); } }

.ec-main-nav { border-top: 1px solid var(--ec-line); background: var(--ec-white); }
.ec-main-nav .ec-shell { min-height: 42px; display: flex; align-items: center; gap: 34px; }
.ec-main-nav a { color: #4f4542; font-size: 13px; font-weight: 400; text-decoration: none; }
.ec-main-nav a:hover { color: var(--ec-wine); }

.ec-cart-page, .ec-favorites-page { min-height: 60vh; padding: 30px 0 70px; background: var(--ec-white); color: var(--ec-ink); font-weight: 300; }
.ec-shop-breadcrumb { display: flex; gap: 8px; margin-bottom: 24px; color: var(--ec-muted); font-size: 13px; }
.ec-shop-breadcrumb a { color: inherit; text-decoration: none; }
.ec-cart-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; padding-bottom: 22px; border-bottom: 1px solid var(--ec-line); }
.ec-cart-heading h1 { margin: 5px 0 3px; color: var(--ec-ink); font-family: "Fraunces", Georgia, serif; font-size: clamp(29px, 4vw, 42px); line-height: 1.1; font-weight: 600; }
.ec-cart-heading p { margin: 0; color: var(--ec-muted); font-weight: 300; }
.ec-shop-kicker { color: var(--ec-gold); font-size: 11px; font-weight: 500; letter-spacing: .13em; text-transform: uppercase; }

.ec-cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 34px; padding-top: 28px; align-items: start; }
.ec-cart-list { border: 1px solid var(--ec-line); border-radius: 15px; overflow: hidden; background: var(--ec-white); }
.ec-cart-item { display: grid; grid-template-columns: 100px minmax(0, 1fr) auto 120px; gap: 20px; align-items: center; padding: 20px; border-bottom: 1px solid var(--ec-line); }
.ec-cart-item:last-child { border-bottom: 0; }
.ec-cart-cover { width: 100px; height: 138px; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--ec-line); border-radius: 9px; background: var(--ec-white); }
.ec-cart-cover img { width: 100%; height: 100%; object-fit: contain; }
.ec-cart-info h2 { margin: 5px 0; font-size: 18px; line-height: 1.25; font-weight: 600; }
.ec-cart-info h2 a { color: inherit; text-decoration: none; }
.ec-cart-info p { margin: 0 0 10px; color: var(--ec-muted); font-size: 13px; font-weight: 300; }
.ec-unit-price { color: var(--ec-wine); font-size: 14px; font-weight: 500; }
.ec-quantity-form { display: grid; grid-template-columns: 32px 42px 32px; align-items: center; border: 1px solid #d9d2cf; border-radius: 999px; overflow: hidden; }
.ec-quantity-form button { height: 34px; padding: 0; border: 0; background: var(--ec-white); color: var(--ec-wine); font-size: 18px; font-weight: 500; cursor: pointer; }
.ec-quantity-form input { width: 42px; height: 34px; padding: 0; border: 0; outline: 0; text-align: center; font: inherit; font-size: 13px; font-weight: 500; -moz-appearance: textfield; }
.ec-quantity-form input::-webkit-inner-spin-button { appearance: none; }
.ec-cart-line-actions { display: grid; justify-items: end; gap: 20px; }
.ec-line-total { color: var(--ec-ink); font-size: 17px; font-weight: 600; }
.ec-text-button { display: inline-flex; align-items: center; gap: 5px; padding: 4px; border: 0; background: transparent; cursor: pointer; font: inherit; font-size: 12px; font-weight: 500; }
.ec-text-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ec-danger { color: #9a2626; }

.ec-cart-summary { position: sticky; top: 20px; padding: 24px; border: 1px solid var(--ec-line); border-radius: 15px; background: var(--ec-white); box-shadow: 0 15px 38px rgba(57, 4, 5, .07); }
.ec-cart-summary h2 { margin: 0 0 20px; font-size: 21px; font-weight: 600; }
.ec-cart-summary > div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; color: var(--ec-muted); font-size: 13px; }
.ec-cart-summary > div strong { color: var(--ec-ink); font-weight: 500; }
.ec-cart-summary .ec-cart-grand-total { margin-top: 8px; padding: 18px 0; border-top: 1px solid var(--ec-line); color: var(--ec-ink); font-size: 18px; font-weight: 500; }
.ec-cart-grand-total strong { color: var(--ec-wine) !important; font-size: 22px; font-weight: 600 !important; }
.ec-primary-button, .ec-secondary-button { min-height: 44px; display: flex; align-items: center; justify-content: center; padding: 10px 18px; border: 1px solid var(--ec-wine); border-radius: 999px; text-decoration: none; font-size: 13px; font-weight: 500; }
.ec-primary-button { background: var(--ec-wine); color: var(--ec-white); }
.ec-primary-button:hover { background: var(--ec-wine-dark); }
.ec-secondary-button { margin-top: 10px; background: var(--ec-white); color: var(--ec-wine); }
.ec-cart-security { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 18px 0 0; color: var(--ec-muted); text-align: center; font-size: 11px; }
.ec-cart-security svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; }

.ec-shop-empty { margin-top: 28px; padding: 65px 22px; border: 1px solid var(--ec-line); border-radius: 15px; background: var(--ec-white); text-align: center; }
.ec-shop-empty > svg { width: 46px; height: 46px; fill: none; stroke: var(--ec-wine); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.ec-shop-empty h2 { margin: 14px 0 5px; font-size: 24px; font-weight: 600; }
.ec-shop-empty p { margin: 0 0 22px; color: var(--ec-muted); font-weight: 300; }
.ec-shop-empty .ec-primary-button { width: fit-content; margin: auto; }

.ec-favorites-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; padding-top: 28px; }
.ec-favorite-card { min-width: 0; padding: 14px; border: 1px solid var(--ec-line); border-radius: 14px; background: var(--ec-white); }
.ec-favorite-cover { position: relative; height: 280px; margin-bottom: 14px; display: grid; place-items: center; overflow: hidden; border-radius: 9px; background: var(--ec-white); }
.ec-favorite-cover > a { width: 100%; height: 100%; display: grid; place-items: center; }
.ec-favorite-cover img { width: 100%; height: 100%; object-fit: contain; }
.ec-favorite-card h2 { margin: 5px 0; font-size: 17px; line-height: 1.25; font-weight: 600; }
.ec-favorite-card h2 a { color: inherit; text-decoration: none; }
.ec-favorite-card > p { min-height: 20px; margin: 0 0 12px; color: var(--ec-muted); font-size: 12px; font-weight: 300; }
.ec-favorite-card-bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.ec-favorite-card-bottom strong { color: var(--ec-wine); font-size: 16px; font-weight: 600; }
.ec-favorite-card-bottom a { font-size: 12px; font-weight: 500; color: var(--ec-wine); }

.ec-favorite-button { position: absolute; z-index: 3; top: 10px; right: 10px; width: 38px; height: 38px; display: grid; place-items: center; padding: 0; border: 1px solid var(--ec-line); border-radius: 50%; background: rgba(255,255,255,.96); color: var(--ec-wine); box-shadow: 0 5px 16px rgba(57,4,5,.1); cursor: pointer; font-weight: 500; }
.ec-favorite-button svg { width: 19px; height: 19px; fill: transparent; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; transition: fill .18s ease, transform .18s ease; }
.ec-favorite-button:hover svg { transform: scale(1.08); }
.ec-favorite-button.is-favorite svg { fill: var(--ec-wine); }
.ec-favorite-button[disabled] { opacity: .55; cursor: wait; }
.card, .ec-book-card, .book-card, .product-cover { position: relative; }

.ec-mini-toast { position: fixed; z-index: 9999; right: 20px; bottom: 20px; max-width: min(360px, calc(100% - 40px)); padding: 12px 16px; border-radius: 10px; background: var(--ec-wine); color: #fff; box-shadow: 0 12px 30px rgba(0,0,0,.18); font-size: 13px; font-weight: 400; }
.ec-mini-toast.is-error { background: #922d2d; }

@media (max-width: 930px) {
    .ec-header-main { grid-template-columns: 160px 1fr; gap: 14px; padding: 12px 0; }
    .ec-header-actions { justify-content: flex-end; }
    .ec-header-search { grid-column: 1 / -1; grid-row: 2; }
    .ec-main-nav { overflow-x: auto; }
    .ec-main-nav .ec-shell { width: max-content; min-width: 100%; padding-inline: 16px; }
    .ec-cart-layout { grid-template-columns: 1fr; }
    .ec-cart-summary { position: static; }
    .ec-favorites-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
    .ec-promo-content span:not(:first-child) { display: none; }
    .ec-header-main { grid-template-columns: 1fr auto; }
    .ec-brand img { width: 150px; }
    .ec-header-actions { gap: 10px; }
    .ec-header-action { width: 38px; justify-content: center; }
    .ec-header-action > span { display: none; }
    .ec-count-badge { left: 21px; }
    .ec-main-nav .ec-shell { gap: 23px; }
    .ec-cart-heading { align-items: start; }
    .ec-cart-item { grid-template-columns: 78px minmax(0, 1fr); gap: 14px; }
    .ec-cart-cover { width: 78px; height: 112px; }
    .ec-quantity-form { grid-column: 2; width: 106px; }
    .ec-cart-line-actions { grid-column: 1 / -1; display: flex; justify-content: space-between; justify-items: normal; }
    .ec-favorites-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .ec-favorite-card { padding: 9px; }
    .ec-favorite-cover { height: 220px; }
}

@media (max-width: 420px) {
    .ec-favorite-cover { height: 190px; }
    .ec-cart-item { padding: 14px; }
}

/* Directorios reales de autores y editoriales */
.ec-directory-page, .ec-entity-page { min-height: 60vh; padding: 30px 0 70px; background: var(--ec-white); color: var(--ec-ink); font-weight: 300; }
.ec-directory-heading { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 32px; align-items: end; padding-bottom: 24px; border-bottom: 1px solid var(--ec-line); }
.ec-directory-heading h1, .ec-entity-heading h1 { margin: 5px 0; color: var(--ec-ink); font-family: "Fraunces", Georgia, serif; font-size: clamp(30px, 4vw, 44px); line-height: 1.1; font-weight: 600; }
.ec-directory-heading p, .ec-entity-heading p { max-width: 720px; margin: 6px 0 0; color: var(--ec-muted); font-weight: 300; }
.ec-directory-search { display: flex; min-height: 42px; border: 1px solid #d9d2cf; border-radius: 9px; overflow: hidden; }
.ec-directory-search input { width: 100%; min-width: 0; padding: 10px 13px; border: 0; outline: 0; background: #fff; font: inherit; font-weight: 300; }
.ec-directory-search button { padding: 0 18px; border: 0; background: var(--ec-wine); color: #fff; font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; }
.ec-directory-summary { display: flex; align-items: baseline; gap: 8px; padding: 23px 0 14px; }
.ec-directory-summary strong { color: var(--ec-wine); font-size: 23px; font-weight: 600; }
.ec-directory-summary span { color: var(--ec-muted); font-size: 13px; font-weight: 300; }
.ec-directory-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ec-directory-item { min-width: 0; display: grid; grid-template-columns: 40px minmax(0, 1fr) 18px; gap: 12px; align-items: center; padding: 14px; border: 1px solid var(--ec-line); border-radius: 11px; background: #fff; color: var(--ec-ink); text-decoration: none; transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease; }
.ec-directory-item:hover { transform: translateY(-2px); border-color: #cdb8b4; box-shadow: 0 9px 24px rgba(57,4,5,.06); }
.ec-directory-item > span { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: #f7eeee; color: var(--ec-wine); font-family: "Fraunces", Georgia, serif; font-size: 18px; font-weight: 600; }
.ec-directory-item h2 { overflow: hidden; margin: 0; color: var(--ec-ink); font-size: 14px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.ec-directory-item p { margin: 3px 0 0; color: var(--ec-muted); font-size: 11px; font-weight: 300; }
.ec-directory-item svg { width: 17px; fill: none; stroke: var(--ec-muted); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ec-directory-pagination { margin-top: 28px; }

.ec-entity-heading { padding: 8px 0 25px; border-bottom: 1px solid var(--ec-line); }
.ec-entity-heading > strong { display: inline-block; margin-top: 14px; color: var(--ec-wine); font-size: 13px; font-weight: 500; }
.ec-entity-books { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; padding-top: 28px; }
.ec-book-card { min-width: 0; padding: 13px; border: 1px solid var(--ec-line); border-radius: 13px; background: #fff; }
.ec-book-cover { height: 270px; display: grid; place-items: center; overflow: hidden; border-radius: 8px; background: #fff; }
.ec-book-cover img { width: 100%; height: 100%; object-fit: contain; }
.ec-book-card > .ec-shop-kicker { display: block; margin-top: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ec-book-card h2 { min-height: 42px; margin: 5px 0; display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: 16px; line-height: 1.3; font-weight: 600; }
.ec-book-card h2 a { color: inherit; text-decoration: none; }
.ec-book-authors { min-height: 19px; margin: 0 0 12px; overflow: hidden; color: var(--ec-muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; font-weight: 300; }
.ec-book-card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ec-book-card-bottom > strong { color: var(--ec-wine); font-size: 16px; font-weight: 600; }
.ec-book-card-bottom form { margin: 0; }
.ec-book-card-bottom button, .ec-order-link { min-height: 34px; display: inline-flex; align-items: center; justify-content: center; padding: 6px 14px; border: 1px solid var(--ec-wine); border-radius: 999px; background: var(--ec-wine); color: #fff; font: inherit; font-size: 11px; font-weight: 500; text-decoration: none; cursor: pointer; }
.ec-order-link { background: #fff; color: var(--ec-wine); }

@media (max-width: 930px) {
    .ec-directory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ec-entity-books { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
    .ec-directory-heading { grid-template-columns: 1fr; gap: 18px; }
    .ec-directory-grid { grid-template-columns: 1fr; }
    .ec-entity-books { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .ec-book-card { padding: 9px; }
    .ec-book-cover { height: 210px; }
    .ec-book-card-bottom { align-items: start; flex-direction: column; }
    .ec-book-card-bottom button, .ec-order-link { width: 100%; }
}

/* Regla de envío y checkout */
.ec-free-shipping { color: var(--ec-success) !important; }
.ec-cart-summary > .ec-shipping-goal { display: block; margin: 7px 0 2px; padding: 11px; border-radius: 9px; background: #f7f2ef; }
.ec-shipping-goal p { margin: 0 0 8px; color: var(--ec-muted); font-size: 11px; font-weight: 300; }
.ec-shipping-goal p strong { color: var(--ec-wine); font-weight: 500; }
.ec-shipping-goal > span { height: 5px; display: block; overflow: hidden; border-radius: 999px; background: #e3d8d3; }
.ec-shipping-goal i { height: 100%; display: block; border-radius: inherit; background: var(--ec-wine); }
.ec-shipping-earned { margin: 9px 0 2px; padding: 9px 11px; border-radius: 9px; background: #edf7f1; color: var(--ec-success); font-size: 12px; font-weight: 500; }

.ec-checkout-page { min-height: 60vh; padding: 30px 0 70px; background: #fff; color: var(--ec-ink); font-weight: 300; }
.ec-checkout-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(390px, .8fr); gap: 35px; align-items: center; margin-bottom: 22px; padding: 28px 32px; border: 1px solid var(--ec-line); border-radius: 22px; background: #fff; box-shadow: 0 16px 38px rgba(57,4,5,.05); }
.ec-checkout-hero h1 { margin: 6px 0; max-width: 520px; font-family: "Fraunces", Georgia, serif; font-size: clamp(34px, 4.6vw, 52px); line-height: .98; font-weight: 600; }
.ec-checkout-hero p { margin: 12px 0 0; color: var(--ec-muted); font-size: 13px; font-weight: 300; }
.ec-checkout-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ec-checkout-stats article { min-height: 74px; padding: 14px; border: 1px solid #d9d2cf; border-radius: 9px; background: #fff; }
.ec-checkout-stats article:last-child { grid-column: 1 / -1; }
.ec-checkout-stats span { display: block; color: var(--ec-gold); font-size: 10px; font-weight: 400; letter-spacing: .12em; text-transform: uppercase; }
.ec-checkout-stats strong { display: block; margin-top: 5px; color: var(--ec-ink); font-size: 19px; font-weight: 500; }
.ec-checkout-layout { display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 42px; align-items: start; }
.ec-checkout-page h1 { margin: 5px 0 24px; font-family: "Fraunces", Georgia, serif; font-size: clamp(30px, 4vw, 42px); line-height: 1.1; font-weight: 600; }
.ec-checkout-data { min-width: 0; }
.ec-checkout-data > h2 { margin: 7px 0 20px; font-family: "Fraunces", Georgia, serif; font-size: clamp(25px, 3vw, 34px); line-height: 1.1; font-weight: 600; }
.ec-checkout-form { display: grid; gap: 15px; padding: 22px; border: 1px solid var(--ec-line); border-radius: 15px; background: #fff; }
.ec-checkout-form label { display: grid; gap: 6px; color: var(--ec-ink); font-size: 13px; font-weight: 500; }
.ec-checkout-form label small { color: var(--ec-muted); font-size: 10px; font-weight: 300; }
.ec-checkout-form input, .ec-checkout-form select { width: 100%; min-height: 43px; padding: 10px 12px; border: 1px solid #d9d2cf; border-radius: 8px; outline: none; background: #fff; color: var(--ec-ink); font: inherit; font-weight: 300; }
.ec-checkout-form input:focus, .ec-checkout-form select:focus { border-color: var(--ec-wine); box-shadow: 0 0 0 3px rgba(80,7,8,.08); }
.ec-form-two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ec-form-three { display: grid; grid-template-columns: .75fr 1fr 1fr; gap: 14px; }
.ec-checkout-form .ec-primary-button { width: 100%; border: 0; cursor: pointer; font-weight: 500; }
.ec-checkout-summary { top: 18px; }
.ec-cart-summary > .ec-checkout-items { display: block; max-height: 220px; overflow: auto; padding: 0 0 12px; border-bottom: 1px solid var(--ec-line); }
.ec-checkout-items p { display: flex; justify-content: space-between; gap: 14px; margin: 0; padding: 7px 0; color: var(--ec-muted); font-size: 11px; font-weight: 300; }
.ec-checkout-items p span { min-width: 0; }
.ec-checkout-items p span small { display: block; margin-top: 3px; color: var(--ec-muted); font-size: 10px; font-weight: 300; }
.ec-checkout-items p strong { flex: 0 0 auto; color: var(--ec-ink); font-weight: 500; }
.ec-shipping-policy { margin: 12px 0 0; color: var(--ec-muted); text-align: center; font-size: 11px; font-weight: 300; }

@media (max-width: 860px) {
    .ec-checkout-hero { grid-template-columns: 1fr; }
    .ec-checkout-layout { grid-template-columns: 1fr; }
    .ec-checkout-summary { position: static; }
}

@media (max-width: 560px) {
    .ec-checkout-hero { padding: 22px 18px; }
    .ec-form-two, .ec-form-three { grid-template-columns: 1fr; }
    .ec-checkout-form { padding: 15px; }
}

/* Estados de pago de Mercado Pago */
.ec-payment-page { min-height: 62vh; padding: 55px 0 80px; background: #fff; }
.ec-payment-result { width: min(680px, 100%); margin: auto; padding: 42px; border: 1px solid var(--ec-line); border-radius: 20px; background: #fff; text-align: center; box-shadow: 0 18px 45px rgba(57,4,5,.07); }
.ec-payment-icon { width: 62px; height: 62px; display: grid; place-items: center; margin: 0 auto 16px; border-radius: 50%; background: #edf7f1; color: var(--ec-success); font-size: 28px; font-weight: 500; }
.ec-payment-pendiente .ec-payment-icon { background: #fff6df; color: #a26a08; }
.ec-payment-rechazado .ec-payment-icon, .ec-payment-error .ec-payment-icon { background: #fdecec; color: #9a2626; }
.ec-payment-result h1 { margin: 7px 0; font-family: "Fraunces", Georgia, serif; font-size: clamp(30px, 5vw, 44px); line-height: 1.05; font-weight: 600; }
.ec-payment-result > p { max-width: 520px; margin: 12px auto 25px; color: var(--ec-muted); font-weight: 300; }
.ec-payment-order { display: grid; grid-template-columns: 1fr auto; gap: 9px 20px; max-width: 410px; margin: 0 auto 25px; padding: 16px; border: 1px solid var(--ec-line); border-radius: 10px; text-align: left; }
.ec-payment-order span { color: var(--ec-muted); font-size: 12px; font-weight: 300; }
.ec-payment-order strong { color: var(--ec-ink); text-align: right; font-size: 13px; font-weight: 500; }
.ec-payment-next { display: grid; gap: 7px; max-width: 500px; margin: 0 auto 25px; padding: 17px 20px; border-radius: 12px; background: #faf7f5; color: var(--ec-muted); font-size: 13px; line-height: 1.5; text-align: left; }
.ec-payment-next strong { color: var(--ec-ink); font-size: 14px; }
.ec-payment-next span { position: relative; padding-left: 18px; }
.ec-payment-next span::before { content: "✓"; position: absolute; left: 0; color: var(--ec-success); font-weight: 700; }
.ec-payment-rechazado .ec-payment-next span::before { content: "•"; color: #9a2626; }
.ec-payment-actions { display: grid; gap: 9px; max-width: 410px; margin: auto; }
.ec-payment-actions .ec-secondary-button { margin-top: 0; }
.ec-payment-actions .ec-text-button { justify-content: center; color: var(--ec-muted); }

@media (max-width: 560px) {
    .ec-payment-result { padding: 30px 18px; }
}

/* Pie original del ecommerce */
.ec-store-footer { padding: 34px 0 18px; background: #3b0305; color: #fff; }
.ec-store-footer-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 34px; }
.ec-store-footer-grid section { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.ec-store-footer-brand { display: grid !important; grid-template-columns: 58px minmax(0, 1fr); gap: 14px !important; }
.ec-store-footer-brand img { width: 58px; height: 58px; object-fit: contain; border-radius: 14px; filter: none; opacity: 1; }
.ec-store-footer h2 { margin: 0 0 3px; color: #fff; font-size: 13px; font-weight: 500; }
.ec-store-footer p, .ec-store-footer a { margin: 0; color: rgba(255,255,255,.78); font-size: 11px; line-height: 1.65; font-weight: 300; text-decoration: none; }
.ec-store-footer a:hover { color: #fff; }
.ec-store-footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 24px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.13); color: rgba(255,255,255,.7); font-size: 10px; font-weight: 300; }
@media (max-width: 900px) { .ec-store-footer-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } .ec-store-footer-brand { grid-column: 1 / -1; } }
@media (max-width: 520px) { .ec-store-footer-grid { grid-template-columns: 1fr; } .ec-store-footer-bottom { align-items: flex-start; flex-direction: column; } }

/* Base visual global del ecommerce. Mantiene todas las secciones presentables incluso
   cuando el servidor conserva una versión antigua de public/build/storefront.css. */
body { margin: 0; background: #fff; color: var(--ec-ink); font-family: system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 16px; line-height: 1.55; font-weight: 300; }
body > main, .ec-site-content { min-height: 55vh; }
body a { color: inherit; text-decoration: none; }
body img { max-width: 100%; height: auto; }
.wrap { width: min(1180px, calc(100% - 32px)); margin-inline: auto; }
.section { padding: 48px 0 64px; }
.breadcrumb { margin-bottom: 24px; color: var(--ec-muted); font-size: 13px; font-weight: 300; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.section h1, .section h2, .hero h1, .product h1, .description h2 { color: var(--ec-wine); font-family: Georgia, serif; line-height: 1.08; font-weight: 600; }
.section-head h1, .section-head h2 { margin: 4px 0; font-size: clamp(30px, 4vw, 46px); }
.kicker, .eyebrow { color: var(--ec-gold); font-size: 11px; font-weight: 500; letter-spacing: .13em; text-transform: uppercase; }

.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.card { min-width: 0; padding: 14px; overflow: hidden; border: 1px solid var(--ec-line); border-radius: 14px; background: #fff; transition: transform .18s ease, box-shadow .18s ease; }
.card:hover { transform: translateY(-3px); box-shadow: 0 13px 32px rgba(57, 4, 5, .08); }
.card > a { display: block; }
.cover { width: 100%; height: 285px; display: grid; place-items: center; overflow: hidden; border-radius: 9px; background: #fff; }
.cover img { width: 100%; height: 100%; object-fit: contain; }
.card .eyebrow { min-height: 17px; margin: 13px 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card h3 { min-height: 44px; margin: 5px 0; display: -webkit-box; overflow: hidden; color: var(--ec-ink); font-family: Georgia, serif; font-size: 17px; line-height: 1.28; font-weight: 600; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.card .author { min-height: 20px; margin: 0 0 11px; overflow: hidden; color: var(--ec-muted); font-size: 12px; font-weight: 300; text-overflow: ellipsis; white-space: nowrap; }
.card .price { margin: 0; color: var(--ec-wine); font-size: 17px; font-weight: 600; }

.hero { min-height: 440px; display: grid; align-items: center; background: radial-gradient(circle at 78% 32%, rgba(200,139,42,.2), transparent 28%), linear-gradient(135deg,#faf6f3,#f1e8e3); }
.hero-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 70px; align-items: center; }
.hero h1 { max-width: 820px; margin: .22em 0; font-size: clamp(42px, 5.5vw, 76px); }
.hero p { max-width: 650px; color: var(--ec-muted); font-size: 17px; font-weight: 300; }
.hero-art { min-height: 270px; display: flex; flex-direction: column; justify-content: center; padding: 58px 30px; border-radius: 50% 50% 12px 12px; background: var(--ec-wine); color: #fff; text-align: center; box-shadow: 0 14px 36px rgba(57,4,5,.14); }
.hero-art span { font-family: Georgia, serif; font-size: 34px; font-weight: 500; }
.hero-art strong { color: #e7c77d; font-weight: 500; }
.btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 11px 23px; border: 0; border-radius: 999px; background: var(--ec-wine); color: #fff; cursor: pointer; font: inherit; font-weight: 500; }
.btn.gold { background: var(--ec-gold); color: var(--ec-wine-dark); }
.btn.full { width: 100%; }

.trust { padding: 28px 0; background: var(--ec-wine-dark); color: #fff; }
.trust-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 24px; }
.trust-grid strong { font-weight: 500; }
.trust-grid span { display: block; color: #dbc8c1; font-size: 13px; font-weight: 300; }
.product { display: grid; grid-template-columns: minmax(280px, 480px) 1fr; gap: 60px; }
.product-cover { padding: 26px; border: 1px solid var(--ec-line); border-radius: 14px; background: #fff; text-align: center; }
.product-cover img { max-height: 580px; object-fit: contain; }
.product h1 { margin: .2em 0; font-size: clamp(34px, 5vw, 58px); }
.product-author { color: var(--ec-muted); font-size: 19px; font-weight: 400; }
.facts { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.facts div { padding-top: 10px; border-top: 1px solid var(--ec-line); }
.facts dt { color: var(--ec-muted); font-size: 11px; font-weight: 400; text-transform: uppercase; }
.facts dd { margin: 3px 0; font-weight: 300; }
.availability { color: var(--ec-success); font-weight: 500; }
.product-price { color: var(--ec-wine); font-size: 29px; font-weight: 600; }
.buy { display: flex; gap: 12px; }
.buy input { width: 72px; padding: 10px; border: 1px solid var(--ec-line); border-radius: 10px; }
.benefits { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-top: 24px; font-size: 13px; }
.description { max-width: 800px; margin-top: 52px; }
.empty, .confirmation { padding: 52px 24px; border: 1px solid var(--ec-line); border-radius: 14px; background: #fff; text-align: center; }
.pagination { margin-top: 30px; }

/* Acceso de clientes. La página comparte el layout, el header y el footer de la tienda. */
.ec-account-page { min-height: 60vh; padding: 34px 0 72px; background: linear-gradient(180deg, #fff 0, #faf7f5 100%); }
.ec-auth-layout { display: grid; grid-template-columns: minmax(0, .9fr) minmax(360px, 1.1fr); gap: 34px; align-items: stretch; }
.ec-auth-intro { display: flex; flex-direction: column; justify-content: center; padding: clamp(28px, 5vw, 56px); border-radius: 18px; background: var(--ec-wine-dark); color: #fff; }
.ec-auth-intro h1 { margin: 8px 0 14px; color: #fff; font-family: Georgia, serif; font-size: clamp(32px, 4vw, 48px); line-height: 1.08; font-weight: 600; }
.ec-auth-intro p { margin: 0; color: rgba(255,255,255,.8); font-size: 15px; }
.ec-auth-benefits { display: grid; gap: 12px; margin-top: 28px; }
.ec-auth-benefits span { display: flex; align-items: center; gap: 9px; color: rgba(255,255,255,.9); font-size: 13px; }
.ec-auth-benefits span::before { content: "✓"; width: 24px; height: 24px; display: grid; place-items: center; flex: 0 0 24px; border-radius: 50%; background: rgba(255,255,255,.12); color: #f0cf83; font-weight: 600; }
.ec-auth-card { padding: clamp(26px, 5vw, 48px); border: 1px solid var(--ec-line); border-radius: 18px; background: #fff; box-shadow: 0 18px 48px rgba(57,4,5,.08); }
.ec-auth-card h2 { margin: 0 0 6px; color: var(--ec-ink); font-family: Georgia, serif; font-size: 30px; font-weight: 600; }
.ec-auth-card > p { margin: 0 0 25px; color: var(--ec-muted); font-size: 14px; }
.ec-auth-form { display: grid; gap: 18px; }
.ec-auth-field { display: grid; gap: 7px; color: var(--ec-ink); font-size: 13px; font-weight: 500; }
.ec-auth-field input { width: 100%; min-height: 46px; box-sizing: border-box; padding: 10px 13px; border: 1px solid #d9d2cf; border-radius: 9px; background: #fff; color: var(--ec-ink); font: inherit; font-weight: 300; outline: 0; }
.ec-auth-field input:focus { border-color: var(--ec-wine); box-shadow: 0 0 0 3px rgba(80,7,8,.1); }
.ec-auth-error { margin: 0; color: #9a2626; font-size: 12px; font-weight: 400; }
.ec-auth-options { display: flex; align-items: center; justify-content: space-between; gap: 14px; color: var(--ec-muted); font-size: 12px; }
.ec-auth-remember { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.ec-auth-remember input { accent-color: var(--ec-wine); }
.ec-auth-submit { width: 100%; min-height: 46px; border: 0; border-radius: 999px; background: var(--ec-wine); color: #fff; cursor: pointer; font: inherit; font-size: 14px; font-weight: 500; }
.ec-auth-submit:hover { background: var(--ec-wine-dark); }
.ec-auth-back { display: inline-flex; margin-top: 20px; color: var(--ec-wine); font-size: 12px; font-weight: 500; }

@media (max-width: 780px) {
    .ec-auth-layout { grid-template-columns: 1fr; }
    .ec-auth-intro { padding: 30px; }
}

/* Catálogo unificado: también sirve a Novedades, Ofertas, Autores y Editoriales. */
.ec-catalog-page { min-height: 60vh; padding: 30px 0 70px; background: #fff; color: var(--ec-ink); font-weight: 300; }
.ec-catalog-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding-bottom: 22px; border-bottom: 1px solid var(--ec-line); }
.ec-catalog-heading h1 { margin: 5px 0; color: var(--ec-ink); font-family: Georgia, serif; font-size: clamp(30px, 4vw, 44px); line-height: 1.08; font-weight: 600; }
.ec-catalog-heading p { max-width: 700px; margin: 7px 0 0; color: var(--ec-muted); font-size: 14px; font-weight: 300; }
.ec-clear-filter { flex: 0 0 auto; min-height: 38px; display: inline-flex; align-items: center; justify-content: center; padding: 7px 16px; border: 1px solid #ddcbc4; border-radius: 999px; color: var(--ec-wine); font-size: 12px; font-weight: 500; }
.ec-catalog-count { padding: 22px 0 15px; color: var(--ec-muted); font-size: 13px; font-weight: 300; }
.ec-catalog-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.ec-catalog-filter { width: min(480px, 100%); min-height: 42px; display: flex; margin: 22px 0 0; overflow: hidden; border: 1px solid #d9d2cf; border-radius: 9px; background: #fff; }
.ec-catalog-filter input { min-width: 0; flex: 1; padding: 10px 13px; border: 0; outline: 0; background: #fff; font: inherit; font-weight: 300; }
.ec-catalog-filter button { padding: 0 18px; border: 0; background: var(--ec-wine); color: #fff; font: inherit; font-size: 12px; font-weight: 500; cursor: pointer; }

@media (max-width: 930px) { .ec-catalog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 680px) {
    .ec-catalog-heading { align-items: flex-start; flex-direction: column; }
    .ec-catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}

/* Protección ante una vista antigua almacenada en caché: ningún icono flotante puede crecer. */
.ec-whatsapp-fab { position: fixed !important; z-index: 60 !important; right: 20px !important; bottom: 20px !important; width: 50px !important; height: 50px !important; display: grid !important; place-items: center !important; overflow: hidden !important; border-radius: 50% !important; background: #1f9d55 !important; color: #fff !important; }
.ec-whatsapp-fab svg, .ec-whatsapp-fab img { width: 24px !important; height: 24px !important; max-width: 24px !important; max-height: 24px !important; }
body.ec-site .ec-icon-whatsapp { fill: currentColor !important; stroke: none !important; }

/* 1.0.103: elimina en celulares el espacio reservado para el antiguo dock movil. */
@media (max-width: 991.98px) {
    body.ec-site { padding-bottom: 0 !important; }
    body.ec-site .ec-store-footer { padding-bottom: max(18px, env(safe-area-inset-bottom)) !important; }
    body.ec-site .ec-whatsapp-fab::before,
    body.ec-site .ec-whatsapp-fab::after { content: none !important; display: none !important; }
}

@media (max-width: 900px) {
    .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .hero-grid, .product { grid-template-columns: 1fr; }
    .hero-art { display: none; }
    .trust-grid, .facts, .benefits { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .section { padding: 36px 0 48px; }
    .section-head { align-items: start; flex-direction: column; }
    .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .card { padding: 9px; }
    .cover { height: 220px; }
    .card h3 { font-size: 15px; }
    .hero { min-height: 390px; }
    .hero h1 { font-size: 42px; }
    .trust-grid, .facts, .benefits { grid-template-columns: 1fr; }
    .product { gap: 28px; }
}

/* 1.0.49: texto blanco consistente en todos los controles de acción. */
body.ec-site button:not(.ec-sr-only),
body.ec-site input[type="button"],
body.ec-site input[type="submit"],
body.ec-site .btn,
body.ec-site a.ec-primary-button,
body.ec-site a.ec-home-hero-cta,
body.ec-site a.ec-order-link,
body.ec-site a.ec-detail-btn,
body.ec-site a[class*="-button"] {
    color: #fff !important;
}

body.ec-site button:not(.ec-sr-only):hover,
body.ec-site button:not(.ec-sr-only):focus-visible,
body.ec-site input[type="button"]:hover,
body.ec-site input[type="submit"]:hover,
body.ec-site .btn:hover,
body.ec-site .btn:focus-visible,
body.ec-site a.ec-primary-button:hover,
body.ec-site a.ec-primary-button:focus-visible,
body.ec-site a.ec-home-hero-cta:hover,
body.ec-site a.ec-home-hero-cta:focus-visible,
body.ec-site a.ec-order-link:hover,
body.ec-site a.ec-detail-btn:hover,
body.ec-site a[class*="-button"]:hover,
body.ec-site a[class*="-button"]:focus-visible {
    color: #fff !important;
}

/* Los controles que antes tenían fondo claro conservan contraste legible. */
body.ec-site .btn-outline-dark,
body.ec-site .ec-home-hero-cta-secondary,
body.ec-site .ec-text-button,
body.ec-site .ec-quantity-form button,
body.ec-site .ec-detail-qty-box button,
body.ec-site .ec-detail-tabs .nav-link {
    border-color: var(--ec-wine) !important;
    background: var(--ec-wine) !important;
    color: #fff !important;
}

body.ec-site .btn-outline-dark:hover,
body.ec-site .btn-outline-dark:focus-visible,
body.ec-site .ec-home-hero-cta-secondary:hover,
body.ec-site .ec-home-hero-cta-secondary:focus-visible,
body.ec-site .ec-text-button:hover,
body.ec-site .ec-text-button:focus-visible,
body.ec-site .ec-quantity-form button:hover,
body.ec-site .ec-quantity-form button:focus-visible,
body.ec-site .ec-detail-qty-box button:hover,
body.ec-site .ec-detail-qty-box button:focus-visible,
body.ec-site .ec-detail-tabs .nav-link:hover,
body.ec-site .ec-detail-tabs .nav-link:focus-visible {
    border-color: var(--ec-wine-dark) !important;
    background: var(--ec-wine-dark) !important;
    color: #fff !important;
}

body.ec-site button svg,
body.ec-site .btn svg,
body.ec-site a[class*="-button"] svg {
    color: inherit;
    stroke: currentColor;
}

/* 1.0.51: cinco libros por fila, filas incompletas centradas y tarjetas compactas. */
body.ec-site .ec-catalog-grid,
body.ec-site .ec-favorites-grid,
body.ec-site .ec-entity-books {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 16px;
}

body.ec-site .ec-catalog-grid > .ec-book-card,
body.ec-site .ec-favorites-grid > .ec-book-card,
body.ec-site .ec-entity-books > .ec-book-card {
    display: flex;
    flex: 0 0 calc((100% - 64px) / 5);
    max-width: calc((100% - 64px) / 5);
    flex-direction: column;
    text-align: center;
}

body.ec-site .ec-catalog-grid .ec-book-cover,
body.ec-site .ec-favorites-grid .ec-book-cover,
body.ec-site .ec-entity-books .ec-book-cover {
    width: 100%;
    height: 230px;
    margin: 0 auto 10px;
}

body.ec-site .ec-catalog-grid .ec-book-cover img,
body.ec-site .ec-favorites-grid .ec-book-cover img,
body.ec-site .ec-entity-books .ec-book-cover img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

body.ec-site .ec-catalog-grid .ec-book-card > .ec-shop-kicker,
body.ec-site .ec-favorites-grid .ec-book-card > .ec-shop-kicker,
body.ec-site .ec-entity-books .ec-book-card > .ec-shop-kicker,
body.ec-site .ec-catalog-grid .ec-book-card h2,
body.ec-site .ec-favorites-grid .ec-book-card h2,
body.ec-site .ec-entity-books .ec-book-card h2,
body.ec-site .ec-catalog-grid .ec-book-authors,
body.ec-site .ec-favorites-grid .ec-book-authors,
body.ec-site .ec-entity-books .ec-book-authors {
    width: 100%;
    text-align: center;
}

body.ec-site .ec-catalog-grid .ec-book-card-bottom,
body.ec-site .ec-favorites-grid .ec-book-card-bottom,
body.ec-site .ec-entity-books .ec-book-card-bottom {
    width: 100%;
    justify-content: center;
    margin-top: auto;
    flex-wrap: wrap;
}

@media (max-width: 1000px) {
    body.ec-site .ec-catalog-grid > .ec-book-card,
    body.ec-site .ec-favorites-grid > .ec-book-card,
    body.ec-site .ec-entity-books > .ec-book-card {
        flex-basis: calc((100% - 32px) / 3);
        max-width: calc((100% - 32px) / 3);
    }
}

@media (max-width: 680px) {
    body.ec-site .ec-catalog-grid,
    body.ec-site .ec-favorites-grid,
    body.ec-site .ec-entity-books {
        gap: 10px;
    }

    body.ec-site .ec-catalog-grid > .ec-book-card,
    body.ec-site .ec-favorites-grid > .ec-book-card,
    body.ec-site .ec-entity-books > .ec-book-card {
        flex-basis: calc((100% - 10px) / 2);
        max-width: calc((100% - 10px) / 2);
    }

    body.ec-site .ec-catalog-grid .ec-book-cover,
    body.ec-site .ec-favorites-grid .ec-book-cover,
    body.ec-site .ec-entity-books .ec-book-cover {
        height: 205px;
    }
}

@media (max-width: 390px) {
    body.ec-site .ec-catalog-grid > .ec-book-card,
    body.ec-site .ec-favorites-grid > .ec-book-card,
    body.ec-site .ec-entity-books > .ec-book-card {
        flex-basis: min(100%, 280px);
        max-width: min(100%, 280px);
    }
}

/* 1.0.52: pestañas de la ficha claras, compactas y con un único panel visible. */
body.ec-site .ec-detail-tabs-panel {
    overflow: hidden;
    border: 1px solid var(--ec-line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(57, 4, 5, .07);
}

body.ec-site .ec-detail-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 12px 16px;
    border-bottom: 1px solid var(--ec-line);
    background: #faf8f7;
}

body.ec-site .ec-detail-tabs .nav-item {
    margin: 0;
}

body.ec-site .ec-detail-tabs .nav-link {
    min-height: 40px;
    margin: 0;
    padding: 9px 17px;
    border: 1px solid #78504c !important;
    border-radius: 999px;
    background: #78504c !important;
    color: #fff !important;
    line-height: 1.2;
    box-shadow: none;
    transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

body.ec-site .ec-detail-tabs .nav-link:hover,
body.ec-site .ec-detail-tabs .nav-link:focus-visible {
    border-color: var(--ec-wine) !important;
    background: var(--ec-wine) !important;
    color: #fff !important;
    transform: translateY(-1px);
}

body.ec-site .ec-detail-tabs .nav-link.active {
    border-color: var(--ec-wine-dark) !important;
    background: var(--ec-wine-dark) !important;
    color: #fff !important;
    box-shadow: 0 0 0 3px rgba(200, 139, 42, .28);
}

body.ec-site .ec-detail-tab-content {
    padding: 22px !important;
}

body.ec-site .ec-detail-tab-content > .tab-pane[hidden],
body.ec-site .ec-detail-tab-content > .tab-pane:not(.active) {
    display: none !important;
}

body.ec-site .ec-detail-tab-content > .tab-pane.active {
    display: block !important;
}

body.ec-site .ec-detail-story-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

body.ec-site .ec-detail-story-card {
    min-width: 0;
    padding: 18px;
    border: 1px solid var(--ec-line);
    border-radius: 12px;
    background: #fcfaf9;
}

body.ec-site .ec-detail-story-card .ec-detail-review-kicker {
    display: block;
    margin-bottom: 8px;
    color: #a66527;
    font-size: 10px;
    letter-spacing: .14em;
    text-transform: uppercase;
}

body.ec-site .ec-detail-story-card p {
    margin: 0;
    color: var(--ec-ink);
    font-size: 13px;
    line-height: 1.65;
}

body.ec-site .ec-detail-copy-shell {
    margin-top: 16px;
    padding: 18px;
    border-radius: 12px;
    background: #fcfaf9;
}

@media (max-width: 767px) {
    body.ec-site .ec-detail-tabs {
        gap: 6px;
        padding: 10px;
    }

    body.ec-site .ec-detail-tabs .nav-link {
        min-height: 38px;
        padding: 8px 12px;
    }

    body.ec-site .ec-detail-tab-content {
        padding: 14px !important;
    }

    body.ec-site .ec-detail-story-grid {
        grid-template-columns: 1fr;
    }
}

/* 1.0.54: tarjetas de inicio blancas, portadas amplias y favoritos visibles. */
body.ec-route-home .ec-store-shelf-grid .ec-book-card-compact-shop,
body.ec-route-home .ec-store-shelf-grid .ec-book-cover-link,
body.ec-route-home .ec-store-shelf-grid .ec-book-cover-shell,
body.ec-route-home .ec-store-shelf-grid .ec-book-body,
body.ec-route-home .ec-store-shelf-grid img.ec-book-cover {
    background: #fff !important;
}

body.ec-route-home .ec-store-shelf-grid .ec-book-cover-shell {
    aspect-ratio: 4 / 5;
    padding: 2px !important;
}

body.ec-route-home .ec-store-shelf-grid img.ec-book-cover {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: contain !important;
    object-position: center !important;
    transform: scale(1.06);
}

body.ec-site .ec-favorite-button {
    border: 1px solid rgba(80, 7, 8, .24) !important;
    background: #fff !important;
    color: var(--ec-wine) !important;
}

body.ec-site .ec-favorite-button svg,
body.ec-site .ec-favorite-button:not(.is-favorite) svg {
    fill: transparent !important;
    stroke: var(--ec-wine) !important;
    stroke-width: 2 !important;
}

body.ec-site .ec-favorite-button:hover,
body.ec-site .ec-favorite-button:focus-visible,
body.ec-site .ec-favorite-button.is-favorite {
    border-color: var(--ec-wine) !important;
    background: var(--ec-wine) !important;
    color: #fff !important;
}

body.ec-site .ec-favorite-button:hover svg,
body.ec-site .ec-favorite-button:focus-visible svg,
body.ec-site .ec-favorite-button.is-favorite svg {
    fill: #fff !important;
    stroke: #fff !important;
}
