
/* ============================================================
   DANY MODAS V8.9.80
   MINHAS COMPRAS + ÁREA DA CLIENTE
   Arquivo externo para garantir aplicação mesmo com CSP restritiva.
   ============================================================ */

.catalog-customer-backdrop{
  position:fixed;
  inset:0;
  z-index:10020;
  background:rgba(31,18,33,.58);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
  box-sizing:border-box;
}
.catalog-customer-backdrop.hidden{display:none!important}

.catalog-customer-modal{
  position:relative;
  width:min(760px,96vw);
  max-height:92vh;
  overflow:auto;
  box-sizing:border-box;
  background:#fff;
  border-radius:22px;
  box-shadow:0 24px 70px rgba(30,15,35,.30);
  padding:26px;
}
.catalog-modal-close{
  position:absolute;
  right:16px;
  top:14px;
  z-index:5;
  width:42px;
  height:42px;
  border:1px solid #eadff0;
  border-radius:50%;
  background:#fff;
  color:#4d1b57;
  font-size:25px;
  line-height:1;
  cursor:pointer;
}

.catalog-purchases-modal{
  width:min(1060px,97vw)!important;
  max-height:94vh!important;
  padding:0!important;
  overflow:auto!important;
}
.catalog-checkout-modal{
  width:min(860px,96vw)!important;
  max-height:94vh!important;
}

.purchases-shell{
  padding:30px;
  box-sizing:border-box;
}
.purchases-heading{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:18px;
  flex-wrap:wrap;
  margin-bottom:20px;
  padding-right:48px;
}
.purchases-heading .catalog-eyebrow{
  display:block;
  margin-bottom:7px;
  color:#b18a20;
  font-size:12px;
  font-weight:900;
  letter-spacing:.13em;
}
.purchases-heading h2{
  margin:0;
  color:#311139;
  font-size:clamp(27px,3vw,36px);
  line-height:1.05;
}
.purchases-heading p{
  margin:7px 0 0;
  color:#746777;
  font-size:15px;
}

.purchase-list{
  display:grid;
  gap:16px;
}
.purchase-card{
  display:block;
  width:100%;
  box-sizing:border-box;
  border:1px solid #e8ddea;
  border-radius:18px;
  background:#fff;
  overflow:hidden;
  box-shadow:0 5px 18px rgba(67,31,73,.06);
}
.purchase-card-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
  padding:13px 17px;
  background:#fbf8fc;
  border-bottom:1px solid #eee4f0;
}
.purchase-card-date{
  display:block;
  font-size:15px;
  font-weight:900;
  color:#42104d;
}
.purchase-card-head > div > span:last-child{
  display:block;
  margin-top:2px;
  color:#8a7a8d!important;
  font-size:12px!important;
}
.purchase-status{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  white-space:nowrap;
  border-radius:999px;
  padding:7px 11px;
  font-size:12px;
  font-weight:900;
  background:#f2e7f5;
  color:#64236f;
}
.purchase-status.paid{
  background:#e7f7ed;
  color:#126b39;
}
.purchase-status.waiting{
  background:#fff2ca;
  color:#745400;
}
.purchase-status.cancelled{
  background:#fde9e9;
  color:#972d2d;
}

.purchase-card-body{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:20px;
  align-items:center;
  padding:16px 18px;
}
.purchase-items-preview{
  display:flex;
  align-items:center;
  gap:14px;
  min-width:0;
}
.purchase-thumb{
  display:block!important;
  width:82px!important;
  height:82px!important;
  min-width:82px!important;
  max-width:82px!important;
  min-height:82px!important;
  max-height:82px!important;
  object-fit:cover!important;
  object-position:center!important;
  border-radius:13px!important;
  background:#f7f2f8!important;
  border:1px solid #eee4f0!important;
  box-sizing:border-box!important;
}
.purchase-item-copy{
  min-width:0;
  overflow:hidden;
}
.purchase-item-copy strong{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  color:#2f2231;
  font-size:17px;
  line-height:1.25;
}
.purchase-item-copy span{
  display:block;
  margin-top:4px;
  color:#7a6d7c;
  font-size:13px;
  line-height:1.3;
}
.purchase-card-side{
  min-width:145px;
  text-align:right;
}
.purchase-card-side > strong{
  display:block;
  margin-bottom:9px;
  color:#42104d;
  font-size:21px;
}
.purchase-card-side .catalog-btn{
  min-width:125px;
}

.purchase-detail-grid{
  display:grid;
  grid-template-columns:minmax(0,1.35fr) minmax(290px,.65fr);
  gap:20px;
}
.purchase-detail-panel{
  box-sizing:border-box;
  border:1px solid #e8ddea;
  border-radius:18px;
  background:#fff;
  padding:18px;
}
.purchase-detail-panel h3{
  margin:0 0 13px;
  color:#42104d;
  font-size:19px;
}
.purchase-detail-item{
  display:grid;
  grid-template-columns:68px minmax(0,1fr) auto;
  gap:12px;
  align-items:center;
  padding:11px 0;
  border-bottom:1px solid #f0e8f2;
}
.purchase-detail-item:last-child{border-bottom:0}
.purchase-detail-item img{
  display:block!important;
  width:68px!important;
  height:68px!important;
  max-width:68px!important;
  max-height:68px!important;
  object-fit:cover!important;
  border-radius:10px!important;
  background:#f6f1f7!important;
}
.purchase-detail-item > div{min-width:0}
.purchase-detail-item > div strong{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
}
.purchase-detail-item > strong{
  color:#42104d;
  white-space:nowrap;
}

.purchase-summary-row{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  padding:9px 0;
  border-bottom:1px solid #f0e8f2;
}
.purchase-summary-row:last-child{border-bottom:0}
.purchase-summary-row span{
  color:#756878;
  min-width:90px;
}
.purchase-summary-row strong{
  color:#332335;
  text-align:right;
  overflow-wrap:anywhere;
}

.purchase-timeline{
  display:grid;
  gap:13px;
}
.purchase-timeline-item{
  display:grid;
  grid-template-columns:14px 1fr;
  gap:10px;
}
.purchase-timeline-dot{
  width:10px;
  height:10px;
  margin-top:5px;
  border-radius:50%;
  background:#6b2a76;
}
.purchase-timeline-item strong{
  display:block;
  color:#402642;
}
.purchase-timeline-item span{
  display:block;
  margin-top:2px;
  color:#756878;
  font-size:13px;
}

.purchase-pay-box{
  margin-top:10px;
  padding:15px;
  border:1px solid #eadff0;
  border-radius:15px;
  background:#faf5fc;
  line-height:1.4;
}
.purchase-pay-box.ready{
  background:#edf8f1;
  border-color:#c5e6d0;
}
.purchase-pay-box.wait{
  background:#fff9e8;
  border-color:#ead08a;
}
.purchase-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top:14px;
}

.checkout-products{
  display:grid;
  gap:8px;
  margin:14px 0;
}
.checkout-product{
  display:flex;
  justify-content:space-between;
  gap:14px;
  padding:11px 13px;
  border:1px solid #eee4f0;
  border-radius:12px;
}
.checkout-delivery-options{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:10px;
  margin:13px 0 16px;
}
.checkout-choice{position:relative}
.checkout-choice input{
  position:absolute;
  opacity:0;
  pointer-events:none;
}
.checkout-choice span{
  display:block;
  box-sizing:border-box;
  height:100%;
  padding:12px;
  border:2px solid #e5d8e8;
  border-radius:14px;
  background:#fff;
  color:#4c3050;
  font-weight:800;
  cursor:pointer;
}
.checkout-choice input:checked + span{
  border-color:#6b2a76;
  background:#f8f0fa;
  color:#5b1d66;
  box-shadow:0 4px 14px rgba(91,29,102,.10);
}
.checkout-form-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}
.checkout-form-grid label{
  display:grid;
  gap:6px;
  color:#432445;
  font-size:13px;
  font-weight:800;
}
.checkout-form-grid input,
.checkout-form-grid select,
.checkout-form-grid textarea{
  box-sizing:border-box;
  width:100%;
  border:1px solid #dacbe0;
  border-radius:10px;
  padding:11px 12px;
  font:inherit;
}
.checkout-span-2{grid-column:1/-1}
.checkout-info{
  padding:12px 14px;
  border:1px solid #edd793;
  border-radius:14px;
  background:#fff7df;
  color:#66501c;
  line-height:1.45;
}

/* Conta e sacola também recebem acabamento pelo CSS externo */
.customer-account-cards{
  display:grid;
  grid-template-columns:repeat(3,minmax(130px,1fr));
  gap:10px;
  margin:16px 0;
}
.customer-account-card{
  border:1px solid #eadff0;
  border-radius:14px;
  padding:14px;
  background:#fbf8fc;
}
.customer-account-card span{
  display:block;
  color:#766879;
  font-size:11px;
  font-weight:800;
  text-transform:uppercase;
}
.customer-account-card strong{
  display:block;
  margin-top:5px;
  color:#51205b;
  font-size:23px;
}
.customer-tabs{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin:14px 0;
}
.customer-tabs button{
  border:1px solid #dacbe0;
  border-radius:999px;
  background:#fff;
  color:#64236f;
  padding:9px 14px;
  font-weight:800;
  cursor:pointer;
}
.customer-tabs button.active{
  background:#64236f;
  color:#fff;
  border-color:#64236f;
}
.customer-form-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}
.customer-form-grid label{
  display:grid;
  gap:6px;
  color:#432445;
  font-size:13px;
  font-weight:700;
}
.customer-form-grid input{
  box-sizing:border-box;
  width:100%;
  border:1px solid #dacbe0;
  border-radius:10px;
  padding:11px 12px;
  font:inherit;
}
.customer-span-2{grid-column:1/-1}

.cart-list{
  display:grid;
  gap:10px;
  margin-top:14px;
}
.cart-row{
  display:grid;
  grid-template-columns:64px minmax(0,1fr) auto;
  gap:12px;
  align-items:center;
  border:1px solid #eadff0;
  border-radius:14px;
  padding:10px;
}
.cart-row img{
  display:block!important;
  width:64px!important;
  height:64px!important;
  max-width:64px!important;
  max-height:64px!important;
  object-fit:cover!important;
  border-radius:10px!important;
  background:#f6f0f7!important;
}
.cart-row-actions{
  display:flex;
  align-items:center;
  gap:6px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.cart-row-actions button{
  border:1px solid #dacbe0;
  background:#fff;
  border-radius:8px;
  padding:6px 9px;
  cursor:pointer;
}
.cart-summary{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-top:16px;
  padding-top:14px;
  border-top:1px solid #eadff0;
}

@media(max-width:760px){
  .catalog-customer-backdrop{
    padding:8px;
    align-items:flex-start;
  }
  .catalog-customer-modal,
  .catalog-purchases-modal,
  .catalog-checkout-modal{
    width:100%!important;
    max-height:96vh!important;
    border-radius:16px;
  }
  .purchases-shell{padding:20px 16px}
  .purchases-heading{padding-right:42px}
  .purchase-card-body,
  .purchase-detail-grid{
    grid-template-columns:1fr;
  }
  .purchase-card-side{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    text-align:left;
  }
  .purchase-card-side > strong{margin:0}
  .purchase-thumb{
    width:66px!important;
    height:66px!important;
    min-width:66px!important;
    max-width:66px!important;
    min-height:66px!important;
    max-height:66px!important;
  }
  .checkout-delivery-options,
  .checkout-form-grid,
  .customer-form-grid{
    grid-template-columns:1fr;
  }
  .checkout-span-2,
  .customer-span-2{grid-column:auto}
  .customer-account-cards{grid-template-columns:1fr}
  .cart-row{grid-template-columns:52px 1fr}
  .cart-row img{
    width:52px!important;
    height:52px!important;
    max-width:52px!important;
    max-height:52px!important;
  }
  .cart-row-actions{
    grid-column:1/-1;
    justify-content:flex-start;
  }
}


/* V8.9.82 - estados claros do pagamento */
.purchase-pay-box.expired{
  background:#fff0f0;
  border-color:#efb5b5;
  color:#7d3030;
}
.purchase-pay-box.expired strong{
  color:#9a3030!important;
}


/* V8.9.83 - botão de reconciliação manual */
.purchase-pay-box .purchase-actions [data-infinitepay-check]{
  border-style:dashed;
}
