/* VP2 Restaurantes: todos los selectores van limitados a restaurantes habilitados */
body.vp2r-restaurant-page .woocommerce div.product .summary>p.price,
body.vp2r-restaurant-page .woocommerce div.product .summary>span.price,
body.vp2r-restaurant-page .woocommerce div.product form.cart:not(.vp2r-cart-form){display:none!important}
body.vp2r-restaurant-page .vp2r-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:18px 0 22px;clear:both}
body.vp2r-restaurant-page .vp2r-facts>div{padding:13px;border-bottom:1px solid #dec89e;min-width:0}
.vp2r-facts small{display:block;font:12px Arial,sans-serif;color:#917335;margin-bottom:4px}.vp2r-facts strong{display:block;font-size:14px;line-height:1.45;color:#332f2d}.vp2r-facts em{display:block;color:#79716b;font-size:11px;font-style:normal}
.vp2r-commerce{clear:both;width:100%;max-width:100%;margin:28px auto 40px}.vp2r-commerce *{box-sizing:border-box}.vp2r-commerce form.cart{width:100%;float:none!important;display:block!important}
.vp2r-root{color:#262321;font-family:Arial,sans-serif;font-size:14px;line-height:1.55}
.vp2r-step{display:flex;gap:13px;align-items:flex-start;margin:25px 0 15px}.vp2r-step>span{width:34px;height:34px;border-radius:50%;background:#ce4744;color:white;font-weight:700;display:grid;place-items:center;flex:none}.vp2r-step h3{font:normal 25px Georgia,serif;margin:0 0 5px}.vp2r-step p{font-size:13px;color:#6f6860;margin:0}
.vp2r-personalize{border:1px solid #d5b66c;border-radius:12px;background:#fff;padding:13px}.vp2r-personalize>summary{cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:8px;list-style:none}.vp2r-personalize>summary strong{font-size:17px}.vp2r-personalize>summary b{font-size:10px;letter-spacing:1px;color:#967636;border:1px solid #d6b879;border-radius:30px;padding:5px 8px;white-space:nowrap}
.vp2r-products{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px;margin-top:15px}
.vp2r-product{border:1px solid #ebdfd0;border-radius:12px;background:#fff;overflow:hidden;min-width:0}.vp2r-product img{width:100%;height:190px;object-fit:contain;background:#f8f5f1;display:block}.vp2r-product>div{padding:15px}.vp2r-product strong{font:normal 20px Georgia,serif;display:block}.vp2r-product details{margin:10px 0;font-size:12px}.vp2r-product details summary{text-decoration:underline;cursor:pointer}.vp2r-product label,.vp2r-grid label,.vp2r-notes{display:block;margin:11px 0;font-size:12px;font-weight:600}
.vp2r-product select,.vp2r-product textarea,.vp2r-grid input,.vp2r-notes textarea{width:100%;font-size:16px;color:#242424;background:#fff;border:1px solid #d5c7b8;border-radius:8px;padding:10px;margin-top:5px;min-height:44px}
.vp2r-product button[data-toggle]{border:1px solid #d34747;color:#cc4141;background:#fff;border-radius:30px;padding:9px 17px;margin:9px 0 0;cursor:pointer;font-size:13px}
.vp2r-summary{background:#faf7f2;border:1px solid #efe6d9;padding:16px;border-radius:10px;margin:18px 0}.vp2r-summary p{margin:5px 0}.vp2r-summary p:first-child{font-weight:700}.vp2r-warning{color:#9a5126!important;font-size:13px}.vp2r-ok{color:#23714d}.vp2r-logistics{display:flex;gap:12px;align-items:flex-start;background:#f8f5ef;border:1px solid #e4dbce;border-radius:10px;padding:17px;margin:16px 0;cursor:pointer}.vp2r-logistics input{flex:none;margin-top:5px}.vp2r-logistics small{display:block;font-weight:400;color:#625d57;line-height:1.5;padding-top:7px}
.vp2r-opentable a{display:block;width:100%;text-align:center;border-radius:9px!important;background:#292929!important;color:white!important;padding:15px!important;text-decoration:none!important}.vp2r-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px 14px}.vp2r-notes{display:block}.vp2r-conditions{padding:12px;background:#faf6f1;border-left:3px solid #c9a15a;font-size:12px;color:#625850}.vp2r-check{display:flex;align-items:flex-start;gap:9px;font-size:13px;margin:18px 0}.vp2r-check input{flex:none;margin-top:4px}
.vp2r-commerce .vp2r-buy{display:block!important;background:#cc4643!important;color:#fff!important;padding:17px!important;border-radius:9px!important;width:100%;font-size:15px!important;margin-top:15px!important;border:0;cursor:pointer}.vp2r-order{padding:15px;border:1px solid #e5d8c9;margin:15px 0}
@media(max-width:700px){.vp2r-products{grid-template-columns:1fr}.vp2r-product{display:grid;grid-template-columns:35% 65%}.vp2r-product img{height:100%;max-height:240px}.vp2r-product strong{font-size:18px}.vp2r-grid{grid-template-columns:1fr 1fr}.vp2r-root{font-size:13px}.vp2r-step h3{font-size:22px}}

/* Diagnóstico visible solo para quienes pueden editar productos. */
.vp2r-admin-diagnostic{margin:12px 0 18px;padding:15px 18px;background:#fff7e9;border:1px solid #e2c38e;border-radius:10px;color:#63481f;font:13px/1.5 Arial,sans-serif}
.vp2r-admin-diagnostic ul{margin:9px 0 7px;padding-left:20px;list-style:disc}
.vp2r-admin-diagnostic li{margin:4px 0}
@media(max-width:700px){.vp2r-commerce{width:100%;margin:24px 0}.vp2r-facts{grid-template-columns:repeat(2,minmax(0,1fr))}.vp2r-product>div{min-width:0}}

/* 0.4.2: catálogo compacto y replegable, sin afectar los productos habituales. */
.vp2r-personalize:not([open]){padding:14px 16px;margin-bottom:10px}
.vp2r-personalize>summary{min-height:38px;user-select:none}
.vp2r-personalize>summary:before{content:'▸';color:#af873e;font-size:16px;margin-right:7px}
.vp2r-personalize[open]>summary:before{content:'▾'}
.vp2r-personalize>summary strong{font:600 14px/1.3 Arial,sans-serif;margin-right:auto}
.vp2r-products{gap:10px;margin-top:12px}
.vp2r-product{display:grid;grid-template-columns:112px minmax(0,1fr);border-radius:9px;align-items:stretch}
.vp2r-product img{width:112px;height:100%;min-height:150px;max-height:230px;object-fit:cover;align-self:stretch}
.vp2r-product>div{padding:10px 11px;min-width:0}
.vp2r-product strong{font:600 15px/1.3 Georgia,serif}
.vp2r-product details{margin:5px 0;font-size:11px}
.vp2r-product label{font-size:11px;margin:7px 0}
.vp2r-product select,.vp2r-product textarea{font-size:12px;min-height:32px;padding:5px 7px;margin-top:3px}
.vp2r-product textarea{height:46px}
.vp2r-product button[data-toggle]{font-size:11px;padding:5px 13px;margin-top:5px}
.vp2r-optional{display:block;margin:10px 0;font-size:12px;font-weight:600}
.vp2r-optional input{width:100%;min-height:40px;border:1px solid #d5c7b8;border-radius:8px;padding:9px;margin-top:5px;font-size:14px}
@media(max-width:800px){.vp2r-products{grid-template-columns:1fr}.vp2r-product{grid-template-columns:105px minmax(0,1fr)}.vp2r-product img{width:105px;min-height:135px;max-height:200px}.vp2r-personalize>summary strong{font-size:13px}}
@media(max-width:400px){.vp2r-product{grid-template-columns:90px minmax(0,1fr)}.vp2r-product img{width:90px}.vp2r-product>div{padding:8px}.vp2r-grid{grid-template-columns:1fr}}

/* 0.4.4: claridad del carrito/checkout; solo pedidos con restaurante VP2. */
body.vp2r-restaurant-order .woocommerce-cart-form .product-name dl.variation,
body.vp2r-restaurant-order .woocommerce-checkout-review-order-table .product-name dl.variation{display:grid;grid-template-columns:minmax(0,1fr);gap:4px;margin-top:12px;max-width:100%;min-width:0;overflow-wrap:anywhere;word-break:normal}
body.vp2r-restaurant-order .woocommerce-cart-form .product-name dl.variation dt,
body.vp2r-restaurant-order .woocommerce-checkout-review-order-table .product-name dl.variation dt{float:none!important;clear:both;display:block;margin:9px 0 0!important;font-weight:700;max-width:100%;min-width:0}
body.vp2r-restaurant-order .woocommerce-cart-form .product-name dl.variation dd,
body.vp2r-restaurant-order .woocommerce-checkout-review-order-table .product-name dl.variation dd{float:none!important;clear:both;display:block;margin:0 0 4px!important;max-width:100%;min-width:0;overflow-wrap:anywhere}
body.vp2r-restaurant-order .woocommerce-cart-form .product-name dl.variation dd p,
body.vp2r-restaurant-order .woocommerce-checkout-review-order-table .product-name dl.variation dd p{margin:0;overflow-wrap:anywhere}
body.vp2r-restaurant-order .woocommerce-checkout-review-order-table td.product-name{min-width:0;overflow-wrap:anywhere}
body.vp2r-restaurant-order .woocommerce-checkout-review-order-table td.product-total{white-space:nowrap;text-align:right;vertical-align:top}
body.vp2r-restaurant-order .woocommerce-cart-form .vp2r-fixed-quantity{font-weight:600;color:#6d6356;font-size:13px}
@media(max-width:767px){
 body.vp2r-restaurant-order .woocommerce-checkout-review-order-table{table-layout:auto;width:100%}
 body.vp2r-restaurant-order .woocommerce-checkout-review-order-table td.product-name{width:70%;font-size:13px;line-height:1.5}
 body.vp2r-restaurant-order .woocommerce-checkout-review-order-table td.product-total{width:30%;font-size:13px}
 body.vp2r-restaurant-order .woocommerce-checkout-review-order-table .product-name dl.variation{font-size:12px}
}

/* 0.4.5 — Carrito simple: sólo se activa si el carrito contiene VP2 Restaurantes.
   Conserva cargos reales en tabla de totales, evita duplicar precio y metadatos. */
body.vp2r-restaurant-order .vp2r-item-card{width:100%;max-width:100%;box-sizing:border-box;color:#272421;font:14px/1.45 Arial,sans-serif;text-align:left}
body.vp2r-restaurant-order .vp2r-item-card *{box-sizing:border-box}
body.vp2r-restaurant-order .vp2r-item-header{display:flex;align-items:center;gap:12px;margin:3px 0 14px;min-width:0}
body.vp2r-restaurant-order .vp2r-item-header img.vp2r-item-image{width:68px!important;height:68px!important;max-width:68px!important;object-fit:cover;border-radius:8px;flex-shrink:0;margin:0!important}
body.vp2r-restaurant-order .vp2r-item-heading{min-width:0;flex:1}
body.vp2r-restaurant-order .vp2r-item-heading strong{display:block;font:bold 17px/1.3 Georgia,serif;color:#25211e}
body.vp2r-restaurant-order .vp2r-item-heading p{margin:5px 0 0;font:13px/1.5 Arial,sans-serif;color:#70675e}
body.vp2r-restaurant-order .vp2r-item-label{display:block;font-weight:700;font-size:13px;margin:0 0 8px;color:#45382e}
body.vp2r-restaurant-order .vp2r-item-extras{padding-top:10px;border-top:1px solid #eae2d8}
body.vp2r-restaurant-order .vp2r-item-extras ul{padding:0!important;margin:0!important;list-style:none!important;display:grid;gap:9px}
body.vp2r-restaurant-order .vp2r-item-extras li{display:flex;align-items:flex-start;gap:10px;justify-content:space-between;margin:0!important;min-width:0;font-size:13px;line-height:1.4}
body.vp2r-restaurant-order .vp2r-item-extras li>span{min-width:0;flex:1;overflow-wrap:break-word}
body.vp2r-restaurant-order .vp2r-item-extras li small{display:block;color:#766d64;font-size:11px;margin-top:2px}
body.vp2r-restaurant-order .vp2r-item-extras li b{font-weight:600;white-space:nowrap;font-size:12px}
body.vp2r-restaurant-order .vp2r-item-details{border-top:1px solid #eae2d8;margin-top:13px;padding-top:10px;font:12px/1.5 Arial,sans-serif}
body.vp2r-restaurant-order .vp2r-item-details summary{cursor:pointer;color:#88652a;font-weight:600;list-style:revert}
body.vp2r-restaurant-order .vp2r-item-details>div{padding:8px 0 0;color:#665b52;overflow-wrap:anywhere}
body.vp2r-restaurant-order .vp2r-item-details p{margin:5px 0;font-size:12px}
/* Carrito clásico: mantener únicamente la tarjeta y el resumen real de WooCommerce. */
body.vp2r-restaurant-order .woocommerce-cart-form table.shop_table.cart th.product-thumbnail,
body.vp2r-restaurant-order .woocommerce-cart-form table.shop_table.cart th.product-price,
body.vp2r-restaurant-order .woocommerce-cart-form table.shop_table.cart th.product-quantity,
body.vp2r-restaurant-order .woocommerce-cart-form table.shop_table.cart th.product-subtotal,
body.vp2r-restaurant-order .woocommerce-cart-form table.shop_table.cart tr.cart_item td.product-thumbnail,
body.vp2r-restaurant-order .woocommerce-cart-form table.shop_table.cart tr.cart_item td.product-price,
body.vp2r-restaurant-order .woocommerce-cart-form table.shop_table.cart tr.cart_item td.product-quantity,
body.vp2r-restaurant-order .woocommerce-cart-form table.shop_table.cart tr.cart_item td.product-subtotal{display:none!important}
body.vp2r-restaurant-order .woocommerce-cart-form table.shop_table.cart tr.cart_item td.product-name{width:100%!important;min-width:0!important;max-width:100%!important;display:table-cell!important;padding:18px!important;vertical-align:top;text-align:left}
body.vp2r-restaurant-order .woocommerce-cart-form table.shop_table.cart tr.cart_item td.product-remove{width:32px!important;vertical-align:top;padding:12px 5px!important}
body.vp2r-restaurant-order .woocommerce-cart-form table.shop_table.cart tr.cart_item td.product-name:before{display:none!important}
/* Checkout: no estrechar la ficha de reserva a una columna minúscula. */
body.vp2r-restaurant-order .woocommerce-checkout-review-order-table tr.cart_item{display:block;width:100%}
body.vp2r-restaurant-order .woocommerce-checkout-review-order-table tr.cart_item td.product-name{display:block!important;width:100%!important;max-width:100%!important;padding:14px 10px!important;box-sizing:border-box;white-space:normal!important}
body.vp2r-restaurant-order .woocommerce-checkout-review-order-table tr.cart_item td.product-total{display:none!important}
body.vp2r-restaurant-order .woocommerce-checkout-review-order-table thead{display:none}
body.vp2r-restaurant-order .woocommerce-checkout-review-order-table .vp2r-item-header{gap:10px}
body.vp2r-restaurant-order .woocommerce-checkout-review-order-table .vp2r-item-header img{width:55px!important;height:55px!important;max-width:55px!important}
body.vp2r-restaurant-order .woocommerce-checkout-review-order-table .vp2r-item-heading strong{font-size:15px}
@media(max-width:767px){
 body.vp2r-restaurant-order .woocommerce-cart-form table.shop_table.cart tr.cart_item td.product-name{display:block!important;width:100%!important;padding:12px!important}
 body.vp2r-restaurant-order .woocommerce-cart-form table.shop_table.cart tr.cart_item td.product-remove{display:block!important;width:100%!important;text-align:right;padding:5px 10px!important}
 body.vp2r-restaurant-order .woocommerce-cart-form table.shop_table.cart tr.cart_item td.product-remove:before{display:none!important}
 body.vp2r-restaurant-order .woocommerce-cart-form table.shop_table.cart tr.cart_item{display:block;width:100%}
 body.vp2r-restaurant-order .woocommerce-checkout-review-order-table tr.cart_item td.product-name{font-size:13px!important}
 body.vp2r-restaurant-order .woocommerce-checkout-review-order-table{width:100%!important;table-layout:auto!important}
}
