/* Todo el diseño se limita a la vista privada y al documento del configurador. */
.apf-preview-banner{position:fixed;bottom:12px;left:12px;right:12px;z-index:99990;max-width:720px;margin:auto;padding:11px 16px;border:1px solid #ebc896;border-radius:12px;background:#fffaf0;color:#604b31;font:13px/1.5 system-ui,sans-serif;box-shadow:0 4px 24px #38281a14}
.apf-preview-banner a{color:#a72520;text-decoration:underline;margin-left:8px}
#apf-dialog{box-sizing:border-box;width:min(1060px,calc(100vw - 40px));max-width:1060px;max-height:calc(100dvh - 40px);padding:0;border:1px solid #fff9;border-radius:22px;box-shadow:0 30px 110px #1e110b55;background:#fcfaf7;color:#25201d;overflow:hidden}
#apf-dialog::backdrop{background:#201b17b3;backdrop-filter:blur(5px)}
.apf-dialog-header{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:18px 26px;background:#fff;border-bottom:1px solid #eee6dd}
.apf-brand-label{display:block;margin-bottom:4px;color:#be2924;font:800 10px/1.3 system-ui,sans-serif;letter-spacing:.18em}
.apf-dialog-header h2{margin:0;padding:0;font:750 23px/1.25 system-ui,sans-serif;letter-spacing:-.03em;color:#26211e}
.apf-close{border:1px solid #e8e1d9;background:white;border-radius:50%;font:26px/1 system-ui,sans-serif;width:40px;height:40px;cursor:pointer;color:#55483f;flex:0 0 auto;transition:background .15s}
.apf-close:hover{background:#f8f1eb}
.apf-close:focus-visible,.apf-fallback a:focus-visible{outline:3px solid #b52b25;outline-offset:3px}
.apf-close:disabled{opacity:.4;cursor:wait}
.apf-frame-slot iframe{display:block;width:100%;height:min(730px,calc(100dvh - 143px));border:0;background:#fcfaf7}
.apf-loading{margin:0;padding:12px 26px;background:#fff3e5;font:14px/1.4 system-ui,sans-serif}
.apf-loading[hidden]{display:none}
.apf-fallback{margin:0;padding:11px 26px;border-top:1px solid #eee6dd;background:#fff;font:12px/1.5 system-ui,sans-serif}
.apf-fallback a{color:#716357;text-decoration:none}
.apf-fallback a:hover{text-decoration:underline}
.apf-dialog-open{overflow:hidden}
.apf-parent-message{position:fixed;bottom:82px;left:16px;z-index:99991;max-width:420px;padding:13px 18px;border-radius:12px;background:#fff;color:#25201d;box-shadow:0 4px 24px #0003;font:14px/1.5 system-ui,sans-serif}
body.apf-product-frame{margin:0!important;padding:0!important;background:#fcfaf7!important;min-width:0!important;color:#302924;font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;line-height:1.5}
body.apf-product-frame #wpadminbar{display:none!important}
.apf-product-frame *{box-sizing:border-box}
.apf-product-content{max-width:1080px;margin:0 auto;padding:26px}
.apf-product-frame .apf-product{display:grid;grid-template-columns:minmax(220px,.75fr) minmax(0,1.25fr);gap:28px;align-items:start}
.apf-product-hero{position:sticky;top:24px;min-width:0;overflow:hidden;border:1px solid #e9e0d6;border-radius:18px;background:#fff}
.apf-product-photo{background:#eee4da;aspect-ratio:1.65;overflow:hidden}
.apf-product-photo img{display:block;width:100%!important;height:100%!important;max-height:none!important;object-fit:cover}
.apf-product-intro{padding:22px}
.apf-eyebrow{display:block;color:#a52e25;font:750 10px/1.4 system-ui,sans-serif;letter-spacing:.13em}
.apf-frame-title{margin:8px 0 10px!important;padding:0!important;color:#302924!important;font:750 25px/1.18 system-ui,sans-serif!important;letter-spacing:-.035em}
.apf-product-description{margin:0 0 20px;padding:0;color:#786d63;font:14px/1.65 system-ui,sans-serif}
.apf-base-price{padding-top:17px;border-top:1px solid #eee6dd}
.apf-price-caption{display:block;margin-bottom:6px;color:#7a6e63;font:12px/1.5 system-ui,sans-serif}
.apf-product-frame .apf-base-price .price{margin:0!important;padding:0!important;color:#b32b24!important;font:750 25px/1.35 system-ui,sans-serif!important}
.apf-base-price .price del{font-size:14px!important;font-weight:400;opacity:.5}
.apf-base-price .price ins{background:transparent!important;text-decoration:none!important}
.apf-base-price .price small{font-size:16px!important;line-height:1.9}
.apf-selected-mode{display:block;font:500 12px/1.5 system-ui,sans-serif;color:#7b6b5f}
.apf-extras-note{margin:10px 0 0;padding:0;color:#8c7d70;font:11px/1.6 system-ui,sans-serif}
body.apf-product-frame div.product .summary{width:100%!important;float:none!important;margin:0!important;min-width:0}
.apf-options-heading{padding:0 0 18px}
.apf-options-heading p{margin:6px 0 0;padding:0;color:#87796d;font:12px/1.5 system-ui,sans-serif}
.apf-product-frame form.cart{margin:0!important;max-width:100%}
.apf-product-frame table.variations{display:table;width:100%!important;margin:0 0 18px!important;border:0!important;border-collapse:separate;border-spacing:0 10px}
.apf-product-frame table.variations th,.apf-product-frame table.variations td{padding:0 0 5px!important;border:0!important;vertical-align:middle}
.apf-product-frame table.variations th{width:30%;text-align:left}
.apf-product-frame table.variations label{font:650 13px/1.4 system-ui,sans-serif;color:#4e4035}
.apf-product-frame table.variations .reset_variations{font-size:12px;color:#93765f}
.apf-product-frame select,.apf-product-frame input[type=text],.apf-product-frame textarea{max-width:100%!important;min-height:46px!important;padding:11px 13px!important;border:1px solid #dfd5cb!important;border-radius:9px!important;background-color:#fff!important;color:#493e35!important;font:14px/1.4 system-ui,sans-serif!important;box-shadow:0 1px 2px #3c241208}
.apf-product-frame select{width:100%;padding-right:30px!important}
.apf-product-frame textarea{width:100%;min-height:80px!important;resize:vertical}
.apf-product-frame select:focus,.apf-product-frame input[type=text]:focus,.apf-product-frame textarea:focus{outline:2px solid #be2c2529!important;border-color:#b72b24!important}
.apf-product-frame #yith-wapo-container .yith-wapo-addon{margin:0 0 14px!important;padding:18px!important;border:1px solid #e9e0d6!important;border-radius:13px!important;background:#fff!important;box-shadow:0 2px 4px #3c241203}
.apf-product-frame .yith-wapo-addon h3,.apf-product-frame .yith-wapo-addon h4{margin:0 0 9px!important;padding:0!important;color:#44372e!important;font:700 15px/1.4 system-ui,sans-serif!important;letter-spacing:-.01em}
.apf-product-frame .yith-wapo-addon p{font:12px/1.6 system-ui,sans-serif;color:#8a7b6e;margin:4px 0 12px}
.apf-product-frame .yith-wapo-addon .options-container{margin-top:8px}
.apf-product-frame .yith-wapo-addon input[type=checkbox],.apf-product-frame .yith-wapo-addon input[type=radio]{accent-color:#b82c24}
.apf-product-frame #wapo-total-price-table{width:100%;margin:18px 0!important;border:0!important;background:#f3ede4;border-radius:12px;overflow:hidden;font-size:14px}
.apf-product-frame #wapo-total-price-table td,.apf-product-frame #wapo-total-price-table th{padding:10px 14px!important;border:0!important}
.apf-product-frame #wapo-total-order-price{color:#b32b24;font-weight:750;font-size:22px}
.apf-purchase-bar{position:sticky;bottom:0;z-index:9;display:flex;align-items:center;gap:12px;margin-top:16px;padding:14px 0 8px;background:#fcfaf7f5;backdrop-filter:blur(8px)}
.apf-product-frame .apf-purchase-bar .quantity{float:none!important;margin:0!important;flex:0 0 76px}
.apf-product-frame .apf-purchase-bar input.qty{width:76px!important;min-height:48px!important;padding:10px!important;border:1px solid #d9cbbf!important;border-radius:10px!important;background:#fff!important;color:#44372e;font:600 16px/1.5 system-ui,sans-serif!important;text-align:center}
.apf-product-frame .apf-purchase-bar .single_add_to_cart_button{flex:1;margin:0!important;padding:15px 20px!important;min-height:48px!important;border:0!important;border-radius:10px!important;background:#bd2b24!important;color:white!important;font:700 15px/1.4 system-ui,sans-serif!important;text-transform:none!important;letter-spacing:0!important;box-shadow:0 4px 10px #a32b2226;cursor:pointer}
.apf-product-frame .apf-purchase-bar .single_add_to_cart_button:after{display:none!important}
.apf-product-frame .single_add_to_cart_button.disabled,.apf-product-frame .single_add_to_cart_button:disabled{opacity:.45!important}
.apf-product-frame .woocommerce-variation-price{margin-bottom:12px}
@media(max-width:700px){#apf-dialog{width:100vw;max-height:100dvh;height:100dvh;max-width:100vw;margin:0;border-radius:0;border:0}.apf-dialog-header{padding:13px 16px}.apf-dialog-header h2{font-size:19px}.apf-frame-slot iframe{height:calc(100dvh - 82px)}.apf-fallback{padding:10px 16px}.apf-product-content{padding:16px}.apf-product-frame .apf-product{grid-template-columns:1fr;gap:20px}.apf-product-hero{position:static;display:block;border-radius:13px}.apf-product-photo{width:100%;height:160px;aspect-ratio:auto}.apf-product-photo img{object-position:center 55%}.apf-product-intro{padding:16px}.apf-frame-title{font-size:19px!important;margin-top:5px!important}.apf-product-description{font-size:12px;margin-bottom:12px}.apf-base-price{padding-top:10px}.apf-product-frame .apf-base-price .price{font-size:20px!important}.apf-extras-note{display:none}.apf-preview-banner{font-size:12px}.apf-product-frame table.variations th{width:32%}.apf-product-frame #yith-wapo-container .yith-wapo-addon{padding:15px!important}}
@media(prefers-reduced-motion:reduce){#apf-dialog *{transition:none!important;scroll-behavior:auto!important}}

/* Defensa visual para variantes antiguas del contenedor de Stripe, solo en la ficha del popup. */
body.apf-product-frame #wc-stripe-express-checkout-element,
body.apf-product-frame #wc-stripe-express-checkout-button-separator,
body.apf-product-frame #wc-stripe-payment-request-wrapper,
body.apf-product-frame #wc-stripe-payment-request-button-separator{display:none!important}

/* En la ficha embebida basta con la cruz del diálogo exterior. */
body.apf-product-frame .boton-close,
body.apf-product-frame .boton-close + br{display:none!important}

/* 0.4.1: controles rectos y espacio para la navegación inferior de Food Online. */
.apf-product-frame .apf-purchase-bar .single_add_to_cart_button{border-radius:0!important;text-transform:uppercase!important}
@media(max-width:700px){
#apf-dialog{height:calc(100dvh - 90px - env(safe-area-inset-bottom,0px));max-height:calc(100dvh - 90px - env(safe-area-inset-bottom,0px))}
.apf-frame-slot iframe{height:calc(100dvh - 172px - env(safe-area-inset-bottom,0px))}
.apf-product-content{padding-bottom:40px}
.apf-purchase-bar{padding-bottom:18px}
}

@media(max-width:700px){
#apf-dialog{height:calc(100dvh - 120px - env(safe-area-inset-bottom,0px));max-height:calc(100dvh - 120px - env(safe-area-inset-bottom,0px))}
.apf-frame-slot iframe{height:calc(100dvh - 202px - env(safe-area-inset-bottom,0px))}
.apf-purchase-bar{padding-bottom:28px}
}
