*{box-sizing:border-box}body{margin:0;background:#f7f3ec;color:#211b16;font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif}.topbar{height:68px;background:#17130f;color:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 max(18px,calc((100% - 1080px)/2));position:sticky;top:0;z-index:10}.brand{display:flex;align-items:center;gap:10px}.brand-mark{width:40px;height:40px;border:1px solid #b99a67;border-radius:50%;display:grid;place-items:center;font-size:12px;color:#e1c18d}.brand strong{display:block;font-size:13px;letter-spacing:1.2px}.brand span{display:block;font-size:12px;color:#c9bba7}.cart-btn{border:1px solid #4e4439;background:#241d17;color:#fff;border-radius:999px;padding:9px 14px;font-weight:700}.hero{max-width:1080px;margin:auto;padding:42px 18px 22px}.hero>div{background:#2b2119;color:#fff;border-radius:24px;padding:34px 26px}.eyebrow{font-size:11px;letter-spacing:2px;color:#d6b37a;font-weight:800}.hero h1{font-family:Georgia,serif;font-size:clamp(32px,7vw,56px);line-height:1;margin:8px 0 12px}.hero p{max-width:650px;color:#e3d9cc;line-height:1.55}.status{display:inline-block;margin-top:8px;padding:7px 11px;border-radius:999px;font-size:13px;font-weight:800}.status.open{background:#d9f3e3;color:#0b6532}.status.closed{background:#f5dada;color:#8a2424}.tools{max-width:1080px;margin:auto;padding:0 18px 18px;display:flex;gap:10px;align-items:center}.tools>input{flex:1;border:1px solid #d8cec0;background:white;border-radius:10px;padding:11px}.table-box{display:flex;gap:8px;align-items:center}.table-box label{font-weight:700;font-size:13px}.table-box input{width:85px;border:1px solid #d8cec0;background:white;border-radius:10px;padding:10px}.categories{max-width:1080px;margin:auto;padding:0 18px 18px;display:flex;gap:8px;overflow:auto;scrollbar-width:none}.categories button{white-space:nowrap;border:1px solid #ddd2c2;background:#fff;border-radius:999px;padding:10px 15px;font-weight:700;color:#594d40}.categories button.active{background:#211912;color:#fff;border-color:#211912}.product-grid{max-width:1080px;margin:auto;padding:0 18px 40px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.product{background:#fff;border-radius:18px;overflow:hidden;border:1px solid #e7ded2;box-shadow:0 2px 10px #2d21100a;cursor:pointer}.product-photo,.product img{display:block;width:100%;height:150px}.product-photo{background:#e8dfd1;display:grid;place-items:center;font-size:44px}.product img{object-fit:cover;object-position:center}.product-body{padding:15px}.product h3{font-family:Georgia,serif;margin:4px 0 5px;font-size:19px}.product p{margin:0;color:#756a5e;font-size:13px;line-height:1.45;min-height:38px}.product-foot{display:flex;justify-content:space-between;align-items:center;margin-top:13px}.product-foot strong{font-size:17px}.product-foot button{border:0;background:#211912;color:#fff;border-radius:10px;padding:9px 12px;font-weight:800}.tag{display:inline-block;background:#f0e3ce;color:#725329;border-radius:999px;padding:4px 8px;font-size:11px;font-weight:800}.featured,.search-results{max-width:1080px;margin:auto;padding:0 18px}.featured h2,.search-results h2{font-family:Georgia,serif}.featured-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:22px}.featured .product-photo,.featured .product img{height:120px}.overlay{position:fixed;inset:0;background:#0008;z-index:30;display:flex;justify-content:flex-end}.hidden{display:none}.cart{background:#fff;width:min(440px,100%);height:100%;padding:20px;overflow:auto}.cart-head{display:flex;justify-content:space-between;align-items:center}.cart-head h2{font-family:Georgia,serif}.cart-head button,.modal-x{border:0;background:none;font-size:32px}.cart-item{display:flex;justify-content:space-between;gap:10px;padding:14px 0;border-bottom:1px solid #eee}.cart-item small{display:block;color:#888;margin:4px 0}.cart-item b{display:block;margin-top:5px}.qty{display:flex;align-items:center;gap:10px}.qty button{width:30px;height:30px;border:1px solid #ddd;border-radius:50%;background:#fff}.cart-note{margin:18px 0}.cart-note label,.detail-note{display:block;font-size:13px;font-weight:700;margin-bottom:6px}.cart-note textarea,.detail-note textarea{width:100%;min-height:80px;border:1px solid #ddd;border-radius:10px;padding:10px}.total{display:flex;justify-content:space-between;font-size:20px;padding:16px 0}.whatsapp{width:100%;border:0;background:#168a45;color:#fff;border-radius:12px;padding:14px;font-weight:800;font-size:16px}.continue{width:100%;border:0;background:#f2eee8;border-radius:12px;padding:12px;margin-top:8px}.empty{text-align:center;color:#888;padding:40px 10px}.modal-card{background:#fff;width:min(520px,100%);max-height:90vh;overflow:auto;border-radius:20px;padding:20px;position:relative;align-self:center;margin:15px}.modal-x{position:absolute;right:12px;top:7px;z-index:2}.detail-photo{height:220px;border-radius:14px;overflow:hidden;background:#e8dfd1;display:grid;place-items:center;font-size:55px;margin-bottom:15px}.detail-photo img{width:100%;height:100%;object-fit:cover}.detail-options h4{margin:18px 0 8px}.option{display:block;padding:9px;border:1px solid #eee;border-radius:9px;margin:5px 0}.detail-bottom{display:flex;align-items:center;gap:15px;margin-top:18px}.detail-bottom strong{font-size:21px}.detail-bottom .whatsapp{flex:1}.detail-note{margin-top:18px}@media(max-width:700px){.tools{flex-wrap:wrap}.tools>input{flex-basis:100%}.product-grid{grid-template-columns:1fr}.product-photo,.product img{height:135px}.featured-grid{grid-template-columns:repeat(2,1fr)}.featured .product-photo,.featured .product img{height:100px}.modal-card{margin:0;border-radius:20px 20px 0 0;align-self:flex-end;width:100%}}
/* Compatibilidad y estabilidad de tarjetas */
html,body{width:100%;max-width:100%;overflow-x:hidden}
.product-grid,.featured-grid{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}
.product{min-width:0;max-width:100%}
.product-body{min-width:0;overflow:hidden}
.product h3,.product p,.product-foot{overflow-wrap:anywhere;word-break:break-word}
.product-photo,.product img{max-width:100%;min-width:0}
@media(min-width:1000px){.product-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(min-width:701px) and (max-width:999px){.product-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}

/* Ajuste de destacados: tarjetas contenidas y sin desbordamiento horizontal */
.featured-grid{display:grid;width:100%;max-width:100%;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;overflow:hidden}
.featured-grid .product{width:100%;min-width:0;max-width:100%;overflow:hidden}
.featured-grid .product-body{width:100%;min-width:0;max-width:100%;overflow:hidden}
.featured-grid .product h3,.featured-grid .product p{max-width:100%;overflow:hidden;text-overflow:ellipsis}
.featured-grid .product h3{white-space:nowrap}
.featured-grid .product p{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
@media(max-width:999px){.featured-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){.featured-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.featured .product-photo,.featured .product img{height:110px}}
@media(max-width:430px){.featured-grid{grid-template-columns:1fr}.featured .product-photo,.featured .product img{height:135px}}

/* Menú de categorías lateral: todas visibles y desplazamiento independiente */
.menu-area{max-width:1080px;margin:0 auto;padding:0 18px 40px;display:grid;grid-template-columns:190px minmax(0,1fr);gap:18px;align-items:start}
.menu-area .categories{max-width:none;margin:0;padding:0;display:flex;flex-direction:column;gap:7px;position:sticky;top:84px;max-height:calc(100vh - 105px);overflow-y:auto;overflow-x:hidden;scrollbar-width:thin}
.menu-area .categories button{width:100%;text-align:left;white-space:normal;border-radius:12px;padding:10px 12px;line-height:1.25}
.menu-area #products{min-width:0}
.menu-area .product-grid{max-width:none;margin:0;padding:0 0 40px}
@media(max-width:700px){
  .menu-area{display:block;padding:0 18px 40px}
  .menu-area .categories{position:sticky;top:68px;z-index:8;max-height:none;overflow-x:auto;overflow-y:hidden;flex-direction:row;flex-wrap:nowrap;padding:8px 0 10px;background:#f7f3ec}
  .menu-area .categories button{width:auto;flex:0 0 auto;white-space:nowrap;text-align:center;border-radius:999px}
  .menu-area .product-grid{padding:0 0 40px}
}

/* Carrito: controles seguros y cómodos */
.cart-item-info{min-width:0;flex:1}.cart-item-info strong{display:block;overflow-wrap:anywhere}.cart-item-info small{overflow-wrap:anywhere}.cart-controls{display:flex;flex-direction:column;align-items:flex-end;gap:7px;flex:0 0 auto}.qty{flex-shrink:0}.qty button{cursor:pointer;font-size:18px;display:grid;place-items:center}.qty button:hover{background:#f2eee8}.remove-item{border:0;background:none;color:#a33b2f;font-size:12px;font-weight:700;padding:2px 0;cursor:pointer}.remove-item:hover{text-decoration:underline}@media(max-width:420px){.cart{padding:16px}.cart-item{gap:8px}.cart-controls{gap:5px}.qty{gap:7px}.qty button{width:32px;height:32px}.remove-item{font-size:11px}}

/* PRO UI */
.old-price{text-decoration:line-through;color:#9a9084;margin-right:5px}.fav{float:right;border:0;background:transparent;font-size:22px;color:#9b3a2f;cursor:pointer;padding:0 2px}.product-body{position:relative}.tools select{border:1px solid #d8cec0;background:white;border-radius:10px;padding:10px}.status{max-width:100%;}.featured-grid{grid-template-columns:repeat(4,minmax(0,1fr));overflow:hidden}.featured-grid .product{min-width:0}@media(max-width:999px){.featured-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:430px){.featured-grid{grid-template-columns:1fr}}

.payment-info{margin-top:8px;padding:10px;border-radius:10px;background:#faf7f2}.payment-qr{display:block;width:180px;height:180px;object-fit:contain;margin:10px auto;border-radius:10px;background:#fff}

/* Extras opcionales de producto */
.extras-box{margin:16px 0;padding:12px;border:1px solid #e5ddd3;border-radius:12px;background:#faf8f5}.extras-head{display:flex;justify-content:space-between;gap:10px;align-items:center;margin-bottom:10px}.extras-head small{display:block;color:#756a5e;font-size:12px;margin-top:3px}.extra-row{display:grid;grid-template-columns:minmax(0,1fr) 120px 38px;gap:7px;margin:7px 0}.extra-row input{width:100%;box-sizing:border-box;border:1px solid #ddd;border-radius:8px;padding:8px}@media(max-width:600px){.extra-row{grid-template-columns:1fr 100px 38px}.extras-head{align-items:flex-start;flex-direction:column}}

.detail-options{margin:14px 0;padding:12px;border:1px solid #e5ddd3;border-radius:12px;background:#faf8f5}.detail-options h3{margin:0 0 4px}.detail-options h4{margin:12px 0 6px}.option{display:flex;align-items:center;gap:8px;padding:7px 0;border-bottom:1px solid #eee}.option:last-child{border-bottom:0}.option input{width:18px;height:18px}
\n/* Nuevas funciones */\n.edit-item{border:0;background:#f2eee8;color:#5b4938;border-radius:8px;padding:5px 8px;font-size:12px;font-weight:700;cursor:pointer}.edit-item:hover{background:#e8dfd2}\n.invoice-box input,.receipt-box input{margin-top:8px;width:100%;box-sizing:border-box}.checkline{display:flex;align-items:center;gap:8px;font-weight:700}.checkline input{width:auto;margin:0}.invoice-ruc-row{display:flex;gap:8px;align-items:center}.invoice-ruc-row input{flex:1}.mini-btn{padding:8px 10px;font-size:12px}.receipt-box input[type=file]{padding:8px;border:1px dashed #cfc4b6;border-radius:9px;background:#faf7f2}.payment-info .payment-qr{max-width:180px;max-height:180px;object-fit:contain}.invoice-box{border:1px solid #e7ded3;border-radius:12px;padding:10px;background:#fbf8f3}@media(max-width:520px){.invoice-ruc-row{flex-direction:column;align-items:stretch}}
