/* Entre libros — the store's wine, paper, gold and editorial type. */
.shop-chat-open,.shop-chat-panel{--chat-wine:var(--ec-wine,#500708);--chat-deep:var(--ec-wine-dark,#300406);--chat-gold:var(--ec-gold,#b58d55);--chat-ink:var(--ec-ink,#2b1a16);--chat-muted:var(--ec-muted,#6b5a52);--chat-line:var(--ec-line,#e8ddd4);font-family:"Plus Jakarta Sans",sans-serif;box-sizing:border-box}
.shop-chat-open{position:fixed;right:24px;bottom:112px;z-index:85;display:flex;align-items:center;gap:11px;padding:9px 17px 9px 9px;border:1px solid #bc9256;border-radius:999px;color:#fff8ed;background:linear-gradient(120deg,var(--chat-deep),#64252e);box-shadow:0 8px 28px #30040633;cursor:pointer;text-align:left;transition:transform .18s,box-shadow .18s}
.shop-chat-open:hover{transform:translateY(-3px);box-shadow:0 12px 34px #30040644}.shop-chat-open-avatar{width:44px;height:44px;overflow:hidden;border-radius:50%;box-shadow:0 0 0 1px #e8c98a66}.shop-chat-open-avatar img{display:block;width:100%;height:100%;object-fit:cover}.shop-chat-open strong{display:block;font-size:13px;font-weight:700;line-height:1.5}.shop-chat-open small{display:block;font-size:10px;color:#efdabf;line-height:1.5}.shop-chat-open>.ec-icon{width:21px;height:21px;margin-left:6px;color:#e0bb7b}
.shop-chat-panel{position:fixed;inset:16px 18px 16px auto;margin:0;width:436px;max-width:calc(100vw - 36px);height:calc(100dvh - 32px);max-height:900px;padding:0;overflow:hidden;border:1px solid #b58d5566;border-radius:26px;background:#fffbf7;color:var(--chat-ink);box-shadow:0 22px 90px #30040633;font-size:13px;line-height:1.6}
.shop-chat-panel:not([open]){display:none}.shop-chat-panel[open]{display:flex;flex-direction:column}.shop-chat-panel::backdrop{background:#25141345;backdrop-filter:blur(3px)}.shop-chat-panel *{box-sizing:border-box}.shop-chat-panel button,.shop-chat-panel textarea{font-family:inherit}.shop-chat-panel button{cursor:pointer}.shop-chat-panel button:disabled{opacity:.5;cursor:wait}.shop-chat-panel button:focus-visible,.shop-chat-open:focus-visible,.shop-chat-panel a:focus-visible,.shop-chat-panel summary:focus-visible{outline:3px solid #c8953f;outline-offset:3px}.shop-chat-panel svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.shop-chat-header{position:relative;display:flex;align-items:center;gap:12px;padding:23px 22px;background:linear-gradient(120deg,var(--chat-deep),#64252e);color:#fff8ed;flex-shrink:0}.shop-chat-avatar{border-radius:15px;box-shadow:0 0 0 1px #d6b58366;object-fit:cover;flex-shrink:0}.shop-chat-eyebrow{display:block;font-size:9px;font-weight:700;letter-spacing:.13em;text-transform:uppercase}.shop-chat-header .shop-chat-eyebrow{color:#e3c18a}.shop-chat-header h2{font-family:"Fraunces",Georgia,serif;font-size:27px;line-height:1.15;letter-spacing:-.03em;margin:2px 0 4px;color:inherit;font-weight:550}.shop-chat-header p{margin:0;color:#f0dcd0;font-size:10px}.shop-chat-icon-button{display:grid;place-items:center;margin-left:auto;align-self:flex-start;border:1px solid #ffffff26;background:#ffffff0d;border-radius:50%;width:33px;height:33px;color:#fffbf7;padding:0;flex-shrink:0}.shop-chat-icon-button:hover{background:#ffffff20}
.shop-chat-season{display:flex;align-items:center;justify-content:center;gap:7px;padding:9px 16px;border-bottom:1px solid #e5d4bd;background:#f5ead8;color:#755025;font-size:10px;letter-spacing:.02em;flex-shrink:0}.shop-chat-season svg{width:15px;height:15px}
#shop-chat-messages{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:22px 19px 6px;scrollbar-width:thin;scrollbar-color:#cfb8a9 transparent}.shop-chat-welcome{text-align:center;padding:24px 13px 26px}.shop-chat-welcome-icon{display:grid;place-items:center;width:54px;height:54px;margin:0 auto 20px;color:#997139;border:1px solid #dbc6a3;border-radius:18px;background:linear-gradient(140deg,#fffdf8,#f2e6d4);transform:rotate(-6deg)}.shop-chat-welcome-icon svg{width:26px;height:26px;transform:rotate(6deg)}.shop-chat-welcome .shop-chat-eyebrow{font-size:8px;color:#8f6a3a;letter-spacing:.11em}.shop-chat-welcome h3{font-family:"Fraunces",Georgia,serif;font-weight:500;font-size:35px;line-height:1.12;letter-spacing:-.045em;color:var(--chat-deep);margin:13px 0 16px}.shop-chat-welcome p{font-size:12px;line-height:1.85;color:var(--chat-muted);max-width:285px;margin:0 auto 18px}.shop-chat-welcome>small{font-size:10px;color:#8c7a6c}
.shop-chat-turn{margin:0 0 19px;overflow-wrap:anywhere}.shop-chat-turn-label{display:block;margin:0 4px 5px;color:#947953;font-size:9px;font-weight:700;letter-spacing:.06em}.shop-chat-turn[data-role=user]{margin-left:36px}.shop-chat-turn[data-role=user] .shop-chat-turn-label{text-align:right;color:var(--chat-muted)}.shop-chat-message{white-space:pre-wrap;border:1px solid var(--chat-line);border-radius:4px 17px 17px;padding:13px 15px;background:#fff;box-shadow:0 2px 7px #30040603;color:var(--chat-ink);font-size:12px;line-height:1.8}.shop-chat-turn[data-role=user] .shop-chat-message{background:#f2e9e1;border-color:#e4d4c7;border-radius:17px 4px 17px 17px;box-shadow:none}
.shop-chat-product{white-space:normal;margin-top:13px;padding-top:14px;border-top:1px solid var(--chat-line)}.shop-chat-product-main{display:grid;grid-template-columns:56px minmax(0,1fr);gap:12px}.shop-chat-cover{display:grid;place-items:center;width:56px;height:82px;border:1px solid #e2d5c8;border-radius:5px;overflow:hidden;background:#f6eee6;color:#aa845a}.shop-chat-cover img{width:100%;height:100%;object-fit:contain;background:#fff}.shop-chat-cover svg{width:25px;height:25px}.shop-chat-product h4{margin:0 0 4px;font-family:"Fraunces",Georgia,serif;font-size:16px;font-weight:550;line-height:1.35;letter-spacing:-.02em}.shop-chat-product-author{display:block;font-size:10px;line-height:1.5;color:var(--chat-muted)}.shop-chat-product-price{display:block;margin-top:6px;font-size:14px;line-height:1.4;font-weight:700;color:var(--chat-wine)}.shop-chat-product del{font-size:10px;display:block;margin-top:4px;color:var(--chat-muted)}.shop-chat-stock{display:block;margin-top:8px;color:#5e6450;font-size:10px;line-height:1.5}.shop-chat-product details{margin-top:9px;color:var(--chat-muted);font-size:10px}.shop-chat-product summary{cursor:pointer;font-weight:600;color:var(--chat-ink);padding:4px 0}.shop-chat-product details p{margin:5px 0 8px;line-height:1.7}.shop-chat-product .shop-chat-book-link{display:flex;align-items:center;justify-content:space-between;gap:8px;border:1px solid #decbb3;background:#fbf5eb;border-radius:9px;margin-top:9px;padding:8px 11px;font-size:11px;font-weight:700;color:var(--chat-wine);text-decoration:none}.shop-chat-book-link:hover{background:#f3e7d6}.shop-chat-book-link svg{width:16px;height:16px}.shop-chat-catalog-note{margin:12px 0 0;font-size:9px;line-height:1.6;color:#8a796a}.shop-chat-editorial-link{display:block;margin-top:11px;padding-top:10px;border-top:1px solid var(--chat-line);color:var(--chat-wine);font-size:12px;font-weight:600;text-decoration:underline;text-underline-offset:3px}.shop-chat-editorial-excerpt{display:block;margin-top:3px;color:var(--chat-muted);font-size:10px;line-height:1.65;white-space:normal}
.shop-chat-status{min-height:0;padding:0 22px;color:#80664c;font-size:10px}.shop-chat-status:not(:empty){padding-top:5px;padding-bottom:9px}.shop-chat-status[data-busy=true]::before{content:"";display:inline-block;width:6px;height:6px;background:#b58d55;border-radius:50%;margin-right:8px;animation:shop-chat-pulse 1s ease-in-out infinite}.shop-chat-suggestions{display:flex;gap:6px;overflow-x:auto;flex-shrink:0;padding:9px 19px 13px;scrollbar-width:none}.shop-chat-suggestions button{white-space:nowrap;border:1px solid #e3d2bd;border-radius:999px;padding:7px 11px;background:#fffaf3;color:#6d4931;font-size:10px;line-height:1.4}.shop-chat-suggestions button:hover{background:#f3e8d8;border-color:#bb965e}.shop-chat-composer{flex-shrink:0;padding:0 18px 4px}.shop-chat-input-shell{display:flex;gap:8px;align-items:flex-end;padding:8px;border:1px solid #d8c2ad;border-radius:15px;background:#fff;box-shadow:0 3px 14px #30040604}.shop-chat-input-shell:focus-within{outline:2px solid #c8953f66;outline-offset:2px}.shop-chat-input-shell textarea{display:block;flex:1;min-width:0;resize:none;max-height:105px;padding:9px 6px 7px;border:0;background:transparent;color:var(--chat-ink);font-size:12px;line-height:1.5;outline:0}.shop-chat-input-shell textarea::placeholder{color:#9c8a7d}.shop-chat-input-shell button{display:grid;place-items:center;flex-shrink:0;width:36px;height:36px;border:0;border-radius:10px;color:#fff9f0;background:var(--chat-wine)}.shop-chat-input-shell button svg{width:18px;height:18px}.shop-chat-composer-footer{display:flex;justify-content:space-between;align-items:center;gap:9px;margin:9px 3px 1px;font-size:8px;color:#978273}.shop-chat-composer-footer button{border:0;padding:3px 0;background:transparent;color:#815733;font-size:9px;white-space:nowrap;text-decoration:underline;text-underline-offset:3px}.shop-chat-privacy{margin:4px 21px 14px;font-size:8px;line-height:1.6;color:#9a8b80;flex-shrink:0}.shop-chat-retry{margin:0 20px 8px;border:1px solid #d8c2ad;border-radius:9px;background:#fff;color:var(--chat-wine);padding:7px;font-size:11px}.shop-chat-history-note{font-size:10px;color:var(--chat-muted);padding:6px 3px 16px}
@keyframes shop-chat-pulse{50%{opacity:.25;transform:scale(.7)}}
@media(max-width:767px){.shop-chat-open{bottom:160px;right:14px;padding:6px 12px 6px 6px;gap:8px}.shop-chat-open-avatar{width:38px;height:38px}.shop-chat-open strong{font-size:11px}.shop-chat-open small{font-size:9px}.shop-chat-open>.ec-icon{display:none}}
@media(max-width:600px){.shop-chat-panel{inset:0;width:100%;max-width:100%;height:100dvh;max-height:100dvh;border:0;border-radius:0;padding-bottom:env(safe-area-inset-bottom)}.shop-chat-header{padding:18px 19px}.shop-chat-header h2{font-size:26px}.shop-chat-welcome{padding-top:22px}.shop-chat-input-shell textarea{font-size:16px;padding-top:7px}.shop-chat-privacy{font-size:9px}.shop-chat-composer-footer{font-size:9px}.shop-chat-message{font-size:13px}.shop-chat-composer-footer button{font-size:10px}}
@media(max-height:680px){.shop-chat-header{padding:12px 18px}.shop-chat-header h2{font-size:23px}.shop-chat-welcome{padding:12px 8px}.shop-chat-welcome-icon{margin-bottom:12px;width:40px;height:40px}.shop-chat-welcome h3{font-size:29px;margin:10px 0}.shop-chat-welcome p{margin-bottom:12px}.shop-chat-season{padding:6px}.shop-chat-privacy{margin-bottom:8px}}
@media(prefers-reduced-motion:reduce){.shop-chat-open{transition:none}.shop-chat-status[data-busy=true]::before{animation:none}}
/* Scope over the shop's broad heading/button rules; preserve contrast in light chips. */
#shop-chat-panel .shop-chat-header h2{color:#fff8ed}
#shop-chat-panel .shop-chat-suggestions button,#shop-chat-panel .shop-chat-suggestions button:hover,#shop-chat-panel .shop-chat-suggestions button:focus-visible{color:#6d4931!important}
#shop-chat-panel #shop-chat-reset,#shop-chat-panel #shop-chat-reset:hover,#shop-chat-panel #shop-chat-reset:focus-visible{color:#815733!important}
#shop-chat-panel #shop-chat-retry,#shop-chat-panel #shop-chat-retry:hover,#shop-chat-panel #shop-chat-retry:focus-visible{color:var(--chat-wine)!important}
#shop-chat-panel #shop-chat-input,#shop-chat-panel #shop-chat-input:focus{outline:0!important;box-shadow:none!important;border:0!important;background:transparent!important}
/* The festive theme scales the desktop body to 90%; keep the modal at viewport size. */
@media(hover:hover) and (pointer:fine){#shop-chat-panel{zoom:1.1111111111}}
html:has(#shop-chat-panel[open]){overflow:hidden!important;scrollbar-gutter:auto}

/* Floating actions: chat below, WhatsApp above; leave room for the mobile dock. */
#shop-chat-open{right:20px;bottom:calc(20px + env(safe-area-inset-bottom,0px))}
body.ec-site:has(#shop-chat-open) .ec-whatsapp-fab{right:20px!important;bottom:calc(100px + env(safe-area-inset-bottom,0px))!important}
@media(max-width:991.98px){
    #shop-chat-open{right:14px;bottom:calc(96px + env(safe-area-inset-bottom,0px))}
    body.ec-site:has(#shop-chat-open) .ec-whatsapp-fab{right:14px!important;bottom:calc(176px + env(safe-area-inset-bottom,0px))!important}
}
