
/* FIX FINAL - Pedidos El Padrino: productos en una sola columna */
:root{
  --dark:#130d08;
  --coffee:#4b2b18;
  --gold:#d4a762;
  --cream:#fff7e8;
  --green:#173d2f;
  --whatsapp:#25D366;
  --muted:#74685f;
  --line:#ead9bd;
}

*{box-sizing:border-box}

body{
  margin:0;
  font-family:Montserrat,Arial,sans-serif;
  background:#fbf5ea;
  color:#20150d;
}

.order-header{
  position:sticky;
  top:0;
  z-index:40;
  background:rgba(19,13,8,.94);
  backdrop-filter:blur(14px);
  color:#fff;
  border-bottom:1px solid rgba(212,167,98,.22);
}

.order-nav{
  max-width:1280px;
  margin:auto;
  display:flex;
  align-items:center;
  gap:16px;
  padding:13px 18px;
}

.order-logo{
  width:48px;
  height:48px;
  border-radius:50%;
  object-fit:contain;
  background:#fff;
  padding:5px;
}

.order-title{font-weight:900;line-height:1.05}
.order-title small{display:block;color:var(--gold);font-weight:700;font-size:12px;margin-top:4px}
.order-actions{margin-left:auto;display:flex;gap:10px;align-items:center}

.pill{
  border:1px solid rgba(255,255,255,.15);
  background:rgba(255,255,255,.09);
  color:#fff;
  border-radius:999px;
  padding:9px 13px;
  text-decoration:none;
  font-weight:800;
  font-size:13px;
}

.order-hero{
  background:linear-gradient(135deg,#1c120b,#4e2d19);
  color:#fff;
  padding:34px 18px 22px;
}

.order-hero-inner{
  max-width:1280px;
  margin:auto;
  display:grid;
  grid-template-columns:1fr auto;
  gap:22px;
  align-items:center;
}

.order-hero h1{
  font-family:'Playfair Display',serif;
  font-size:clamp(34px,6vw,64px);
  margin:0;
  color:#f7d394;
  line-height:1;
}

.order-hero p{
  font-size:17px;
  line-height:1.6;
  color:rgba(255,255,255,.86);
  max-width:760px;
}

.delivery-box{
  background:rgba(255,255,255,.09);
  border:1px solid rgba(255,255,255,.15);
  border-radius:24px;
  padding:20px;
  min-width:280px;
  box-shadow:0 18px 50px rgba(0,0,0,.22);
}

.delivery-box strong{display:block;color:#f7d394;margin-bottom:8px}

.order-status{
  margin-top:18px;
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:12px 16px;
  border-radius:999px;
  font-weight:900;
  font-size:14px;
  border:1px solid rgba(255,255,255,.18);
  backdrop-filter:blur(10px);
}

.order-status.open{
  color:#d8ffe7;
  background:rgba(37,211,102,.14);
  border-color:rgba(37,211,102,.35);
}

.order-status.closed{
  color:#ffe8d8;
  background:rgba(180,35,24,.18);
  border-color:rgba(255,120,95,.35);
}

.layout{
  width:min(1280px,100%);
  margin:0 auto;
  display:grid;
  grid-template-columns:230px minmax(0,1fr) 350px;
  gap:20px;
  padding:22px 18px;
  align-items:start;
}

.categories{
  position:sticky;
  top:86px;
  align-self:start;
  background:#fff;
  border-radius:22px;
  padding:16px;
  box-shadow:0 14px 38px rgba(60,35,16,.08);
}

.categories strong{
  display:block;
  margin-bottom:8px;
  color:#3d2415;
}

.cat-link{
  display:block;
  color:#4b2b18;
  text-decoration:none;
  font-weight:900;
  padding:10px 12px;
  border-radius:14px;
  margin-bottom:4px;
}

.cat-link:hover,.cat-link.active{background:var(--green);color:#fff}

.search-box{
  position:sticky;
  top:86px;
  background:#fbf5ea;
  padding:0 0 12px;
  z-index:10;
}

.search-box input{
  width:100%;
  border:1px solid var(--line);
  border-radius:999px;
  padding:15px 18px;
  font-size:15px;
  outline:none;
  box-shadow:0 10px 28px rgba(60,35,16,.05);
}

.category-title{
  font-family:'Playfair Display',serif;
  font-size:34px;
  color:#4b2b18;
  margin:20px 0 13px;
  border-bottom:2px solid var(--gold);
  padding-bottom:8px;
}

/* CORRECCIÓN IMPORTANTE: una sola columna */
.product-grid{
  display:grid !important;
  grid-template-columns:1fr !important;
  gap:14px !important;
}

.product{
  background:#fff;
  border:1px solid var(--line);
  border-radius:24px;
  overflow:hidden;
  display:grid !important;
  grid-template-columns:150px minmax(0,1fr) 125px !important;
  min-height:160px;
  box-shadow:0 14px 36px rgba(60,35,16,.08);
  transition:transform .18s ease, box-shadow .18s ease;
  width:100%;
}

.product:hover{
  transform:translateY(-2px);
  box-shadow:0 18px 44px rgba(60,35,16,.12);
}

.product-img{
  width:150px;
  min-height:160px;
  background:
    linear-gradient(135deg,rgba(212,167,98,.10),rgba(23,61,47,.10)),
    #f4eadb;
  background-size:cover !important;
  background-position:center !important;
  background-repeat:no-repeat !important;
  border-right:1px solid var(--line);
  display:grid;
  place-items:center;
  overflow:hidden;
}

.product-img[style*="background-image"] img{display:none}

.product-img img{
  width:76px;
  height:76px;
  object-fit:contain;
  opacity:.82;
}

.product-body{
  padding:18px 16px;
  min-width:0;
}

.product h3{
  margin:0 0 8px;
  color:#21160d;
  font-size:22px;
  line-height:1.18;
  overflow-wrap:anywhere;
}

.product p{
  margin:0;
  color:#74685f;
  font-size:14px;
  line-height:1.45;
}

.product-side{
  min-width:125px;
  padding:18px 14px 18px 0;
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
}

.price{
  font-weight:900;
  color:#007044;
  font-size:25px;
  white-space:nowrap;
}

.add-btn{
  background:var(--green);
  color:#fff;
  border:none;
  border-radius:999px;
  padding:11px 17px;
  font-weight:900;
  cursor:pointer;
  white-space:nowrap;
}

.add-btn.disabled,
.submit.disabled{
  opacity:.58;
  cursor:not-allowed;
  filter:grayscale(.15);
}

.variant-chip{
  display:inline-flex;
  margin-top:12px;
  background:#fff2d4;
  color:#6a3b19;
  border:1px solid #e1bd77;
  border-radius:999px;
  padding:6px 10px;
  font-size:11px;
  font-weight:900;
  text-transform:uppercase;
}

.cart{
  position:sticky;
  top:86px;
  align-self:start;
  background:#fff;
  border-radius:26px;
  padding:20px;
  box-shadow:0 18px 50px rgba(60,35,16,.12);
  border:1px solid var(--line);
}

.cart h2{
  margin:0 0 12px;
  font-family:'Playfair Display',serif;
  color:#4b2b18;
  font-size:42px;
}

.cart-empty{color:#74685f;text-align:center;padding:30px 8px}

.cart-item{
  border-bottom:1px solid #e8d7bc;
  padding:16px 0;
}

.cart-line{
  display:flex;
  justify-content:space-between;
  gap:16px;
  font-weight:900;
  align-items:flex-start;
}

.cart-line .cart-name{
  max-width:205px;
  line-height:1.2;
}

.cart-line strong{
  font-size:18px;
  white-space:nowrap;
}

.cart-option,.cart-notes{
  display:block;
  color:#74685f;
  font-size:12px;
  margin-top:4px;
  font-weight:800;
}

.cart-notes{
  color:#9a6a2f;
  font-style:italic;
}

.qty{
  display:flex;
  gap:9px;
  align-items:center;
  margin-top:12px;
}

.qty button{
  width:34px;
  height:34px;
  border-radius:50%;
  border:none;
  background:#f1e3ca;
  font-weight:900;
  cursor:pointer;
  font-size:18px;
}

.remove{
  margin-left:auto;
  width:auto !important;
  height:34px !important;
  border-radius:999px !important;
  padding:0 14px !important;
  background:#fff2f2 !important;
  color:#9b1c1c !important;
  border:1px solid #ffd7d7 !important;
  font-size:13px !important;
  font-weight:900 !important;
}

.checkout{margin-top:14px;border-top:2px solid var(--line);padding-top:14px}
.total-row{display:flex;justify-content:space-between;margin:7px 0;font-weight:800}
.total-row.total{font-size:20px;color:var(--green)}
.field{margin:10px 0}
.field label{display:block;font-size:12px;font-weight:900;color:#4b2b18;margin-bottom:5px;text-transform:uppercase}

.field input,.field textarea,.field select{
  width:100%;
  border:1px solid var(--line);
  border-radius:13px;
  padding:11px;
  font-family:inherit;
}

.submit{
  width:100%;
  background:#25D366;
  color:#063719;
  border:none;
  border-radius:999px;
  padding:15px;
  font-weight:900;
  margin-top:12px;
  font-size:15px;
  cursor:pointer;
}

.notice{padding:12px 14px;border-radius:14px;margin:12px 0;font-weight:800}
.notice.ok{background:#e8f7ed;color:#0f5132}
.notice.err{background:#fdecec;color:#8a1d1d}

/* Modal opciones/instrucciones */
.option-modal{
  position:fixed;
  inset:0;
  z-index:100;
  background:rgba(0,0,0,.48);
  display:none;
  align-items:center;
  justify-content:center;
  padding:18px;
}

.option-modal.open{display:flex}

.option-card{
  width:min(820px,100%);
  max-height:92vh;
  overflow:auto;
  background:#fff;
  border-radius:30px;
  padding:24px 28px;
  position:relative;
  box-shadow:0 30px 90px rgba(0,0,0,.35);
}

.option-close{
  position:absolute;
  top:18px;
  left:18px;
  width:48px;
  height:48px;
  border-radius:50%;
  border:0;
  background:#fff;
  box-shadow:0 8px 22px rgba(0,0,0,.16);
  font-size:38px;
  line-height:1;
  cursor:pointer;
  color:#333;
}

.option-image{
  width:min(420px,100%);
  height:300px;
  margin:10px auto 22px;
  border-radius:16px;
  background:
    linear-gradient(135deg,rgba(212,167,98,.12),rgba(23,61,47,.12)),
    #fbf5ea;
  background-size:cover;
  background-position:center;
  display:grid;
  place-items:center;
  box-shadow:0 8px 22px rgba(0,0,0,.12);
  overflow:hidden;
}

.option-image[style*="background-image"] img{display:none}

.option-image img{
  width:120px;
  height:120px;
  object-fit:contain;
  opacity:.82;
}

.option-card h2{
  text-align:center;
  font-size:34px;
  margin:0;
  color:#242424;
}

.option-card>p{
  text-align:center;
  color:#4b5563;
  font-weight:700;
  font-size:16px;
}

.option-header{
  display:flex;
  justify-content:space-between;
  align-items:end;
  border-bottom:2px solid #e8e8e8;
  padding:18px 0 10px;
  margin-top:18px;
}

.option-header strong{font-size:22px}
.option-header span{display:block;color:#777;font-weight:700}

.required-pill{
  background:#fdecec!important;
  color:#9b1c1c!important;
  border-radius:999px;
  padding:6px 12px;
  font-weight:900;
}

.option-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  border-bottom:1px solid #eee;
  padding:17px 8px;
  font-size:20px;
  font-weight:600;
  cursor:pointer;
}

.option-row input{width:24px;height:24px}
.option-price{margin-left:auto;margin-right:12px;font-weight:900}

.special-instructions{margin-top:20px}

.special-instructions label{
  display:block;
  font-size:13px;
  text-transform:uppercase;
  letter-spacing:.05em;
  color:#4b2b18;
  font-weight:900;
  margin-bottom:8px;
}

.special-instructions textarea{
  width:100%;
  min-height:92px;
  border:1px solid var(--line);
  border-radius:16px;
  padding:13px;
  font-family:inherit;
  font-size:15px;
  resize:vertical;
}

.option-add{margin-top:22px}

/* Modal cerrado */
.closed-modal{
  position:fixed;
  inset:0;
  z-index:120;
  display:none;
  align-items:center;
  justify-content:center;
  padding:18px;
  background:rgba(0,0,0,.58);
  backdrop-filter:blur(8px);
}

.closed-modal.open{display:flex}

.closed-card{
  width:min(560px,100%);
  text-align:center;
  background:
    radial-gradient(circle at top, rgba(212,167,98,.18), transparent 42%),
    #fffaf0;
  border:1px solid #ead9bd;
  border-radius:30px;
  padding:34px 28px;
  box-shadow:0 30px 90px rgba(0,0,0,.38);
}

.closed-icon{
  width:78px;
  height:78px;
  border-radius:50%;
  display:grid;
  place-items:center;
  margin:0 auto 16px;
  background:#f1e3ca;
  font-size:38px;
}

.closed-card h2{
  margin:0 0 10px;
  font-family:'Playfair Display',serif;
  font-size:38px;
  color:#4b2b18;
}

.closed-card p{
  margin:0 0 14px;
  color:#74685f;
  font-size:17px;
  line-height:1.5;
}

.closed-card strong{
  display:block;
  color:#173d2f;
  font-size:18px;
  line-height:1.45;
}

.closed-actions{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:12px;
  margin-top:24px;
}

.closed-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:46px;
  padding:0 18px;
  border-radius:999px;
  text-decoration:none;
  font-weight:900;
}

.closed-btn.light{background:#f1e3ca;color:#4b2b18}
.closed-btn.green{background:#25D366;color:#063719}

/* Responsivo */
@media(max-width:1050px){
  .layout{grid-template-columns:1fr}
  .categories,.cart,.search-box{position:static}
  .product-grid{grid-template-columns:1fr !important}
  .order-hero-inner{grid-template-columns:1fr}
  .delivery-box{min-width:0}
  .order-actions .pill:not(.cart-pill){display:none}
}

@media(max-width:680px){
  .layout{padding:16px 12px}

  .order-status{
    border-radius:18px;
    line-height:1.35;
  }

  .product{
    grid-template-columns:92px minmax(0,1fr) !important;
  }

  .product-img{
    width:92px;
    min-height:128px;
  }

  .product-side{
    grid-column:1/-1;
    flex-direction:row;
    align-items:center;
    padding:0 14px 14px;
  }

  .cart h2{font-size:34px}
  .option-card{padding:18px;border-radius:22px}
  .option-image{height:230px}
  .option-card h2{font-size:28px}
  .option-row{font-size:17px}
  .closed-card h2{font-size:30px}
}
