/* Casa de las Lámparas — Mi Espacio */
.cdlme-app{max-width:760px;margin:30px auto;padding:0 16px;font-family:inherit}
.cdlme-card{background:#fff;border:1px solid #e9e9e9;border-radius:18px;padding:28px;box-shadow:0 12px 40px rgba(0,0,0,.06)}
.cdlme-brand{font-size:12px;letter-spacing:2px;opacity:.6;margin-bottom:8px}
.cdlme-card h1{margin:0 0 8px;font-size:32px;line-height:1.15}
.cdlme-subtitle{margin:0 0 22px;color:#666}
.cdlme-product{display:flex;gap:16px;align-items:center;padding:12px;border:1px solid #eee;border-radius:14px;margin-bottom:18px}
.cdlme-product img{width:82px;height:82px;object-fit:contain;border-radius:10px;background:#fafafa}
.cdlme-product strong,.cdlme-product span{display:block}
.cdlme-product strong{font-size:16px}
.cdlme-product span{font-size:13px;color:#777;margin-top:4px}
.cdlme-upload{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:210px;border:2px dashed #cfcfcf;border-radius:16px;cursor:pointer;text-align:center;transition:.2s}
.cdlme-upload:hover{border-color:#888;background:#fafafa}
.cdlme-upload input{display:none}
.cdlme-upload-icon{font-size:40px;line-height:1;margin-bottom:10px}
.cdlme-upload small{margin-top:6px;color:#888}
.cdlme-preview{margin-top:16px}
.cdlme-preview img,.cdlme-result img{display:block;width:100%;max-height:620px;object-fit:contain;border-radius:14px;background:#f6f6f6}
.cdlme-generate{width:100%;margin-top:18px;border:0;border-radius:12px;padding:15px 18px;background:#111;color:#fff;font-weight:700;cursor:pointer}
.cdlme-generate:disabled{opacity:.45;cursor:not-allowed}
.cdlme-status{min-height:24px;text-align:center;margin-top:14px;color:#666}
.cdlme-status.error{color:#a33}
.cdlme-status.ok{color:#28733c}
.cdlme-result{margin-top:24px}
.cdlme-result-actions{display:flex;gap:10px;margin-top:12px;align-items:stretch}
.cdlme-result-actions a,.cdlme-result-actions button{
  flex:1 1 0;
  min-height:44px;
  box-sizing:border-box;
  padding:12px 14px!important;
  border-radius:10px!important;
  border:1px solid #222!important;
  background:#fff!important;
  color:#222!important;
  text-decoration:none!important;
  font:inherit!important;
  font-size:14px!important;
  font-weight:600!important;
  line-height:1.2!important;
  text-align:center!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  cursor:pointer;
  opacity:1!important;
  visibility:visible!important;
  box-shadow:none!important;
}
.cdlme-result-actions a:hover,.cdlme-result-actions button:hover{
  background:#f5f5f5!important;
  color:#111!important;
  text-decoration:none!important;
}
.cdlme-download{
  border-color:#222!important;
  color:#222!important;
  background:#fff!important;
}
/* v1.8: product-page CTA is explicitly styled and loaded on WooCommerce product pages */
.cdlme-product-button{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:9px!important;
  margin-top:12px!important;
  min-height:46px!important;
  padding:12px 22px!important;
  border:2px solid #2f8f46!important;
  border-radius:10px!important;
  background:#2f8f46!important;
  color:#fff!important;
  text-decoration:none!important;
  font-size:14px!important;
  font-weight:700!important;
  letter-spacing:.2px!important;
  line-height:1.2!important;
  box-sizing:border-box!important;
  box-shadow:0 4px 12px rgba(47,143,70,.18)!important;
  transition:background-color .18s ease,color .18s ease,box-shadow .18s ease,transform .18s ease!important;
}
.cdlme-product-button:hover,.cdlme-product-button:focus{
  background:#24753a!important;
  color:#fff!important;
  text-decoration:none!important;
  box-shadow:0 7px 18px rgba(47,143,70,.26)!important;
  transform:translateY(-1px);
}
.cdlme-product-button:focus-visible{outline:3px solid rgba(47,143,70,.25)!important;outline-offset:2px!important}
.cdlme-button-icon{font-size:18px!important;line-height:1!important}
@media(max-width:600px){
 .cdlme-product-button{width:100%!important;margin-top:12px!important}
}

/* v1.4: result actions — download + product purchase link */
.cdlme-result-actions{display:flex;gap:10px;margin-top:12px;align-items:stretch}
.cdlme-result-actions > *{
  flex:1 1 0 !important;
  min-width:0;
  min-height:44px !important;
  box-sizing:border-box !important;
  padding:12px 14px !important;
  border-radius:10px !important;
  border:1px solid #222 !important;
  background:#fff !important;
  color:#222 !important;
  text-decoration:none !important;
  font:inherit !important;
  font-size:14px !important;
  font-weight:600 !important;
  line-height:1.2 !important;
  text-align:center !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  cursor:pointer;
  opacity:1 !important;
  visibility:visible !important;
  box-shadow:none !important;
}
.cdlme-result-actions > *:hover{
  background:#f5f5f5 !important;
  color:#111 !important;
  text-decoration:none !important;
}
.cdlme-result-actions .cdlme-buy{
  background:#111 !important;
  color:#fff !important;
  border-color:#111 !important;
}
.cdlme-result-actions .cdlme-buy:hover{
  background:#333 !important;
  color:#fff !important;
}
@media(max-width:600px){
  .cdlme-result-actions{flex-direction:column}
  .cdlme-result-actions > *{width:100% !important;flex:0 0 auto}
}


/* v1.5: optional room measurements */
.cdlme-measures{margin-top:16px;border:1px solid #e7e7e7;border-radius:12px;background:#fafafa;overflow:hidden}
.cdlme-measures summary{list-style:none;cursor:pointer;padding:14px 16px;font-weight:600;color:#333}
.cdlme-measures summary::-webkit-details-marker{display:none}
.cdlme-measures summary::after{content:'＋';float:right;font-size:18px;line-height:1}
.cdlme-measures[open] summary::after{content:'−'}
.cdlme-measures summary span{font-size:12px;font-weight:500;color:#888;margin-left:6px}
.cdlme-measures-content{padding:0 16px 16px}
.cdlme-measures-content p{margin:0 0 12px;color:#777;font-size:13px;line-height:1.45}
.cdlme-measure-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.cdlme-measure-grid label{display:block}
.cdlme-measure-grid label>span{display:block;font-size:12px;font-weight:600;color:#555;margin-bottom:5px}
.cdlme-measure-grid input,.cdlme-measure-grid select{width:100%;min-height:42px;box-sizing:border-box;border:1px solid #d7d7d7;border-radius:8px;background:#fff;padding:9px 10px;font:inherit;font-size:14px}
.cdlme-measure-grid input:focus,.cdlme-measure-grid select:focus{outline:none;border-color:#999;box-shadow:0 0 0 2px rgba(0,0,0,.05)}
@media(max-width:600px){
 .cdlme-measure-grid{grid-template-columns:1fr 1fr}
}
@media(max-width:380px){
 .cdlme-measure-grid{grid-template-columns:1fr}
}
