/*
  Path: public_html/aba_meds_php/public/assets/css/cart.css

  Cart page styles
  - Matches current markup in app/views/pages/cart.php
  - Keeps the items panel on the dark theme
  - Makes the summary card plain white (readable), as requested
*/

/* =========================
   CART HERO
========================= */
.cart-hero{
  padding: 46px 0 30px;
  background:
    radial-gradient(900px 520px at 20% 0%, rgba(209,174,101,.12), transparent 60%),
    radial-gradient(900px 520px at 80% 30%, rgba(44,94,92,.22), transparent 60%),
    linear-gradient(180deg, #071010 0%, #0b1212 100%);
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.cart-head{
  margin-top: 10px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.cart-title{
  margin: 0 0 6px;
  color: rgba(255,255,255,.94);
  font-size: clamp(22px, 2.8vw, 34px);
  letter-spacing: -0.3px;
  line-height: 1.1;
}

.cart-sub{
  margin: 0;
  color: rgba(255,255,255,.72);
  line-height: 1.65;
}

/* =========================
   LAYOUT
========================= */
.cart-grid{
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 16px;
  align-items: start;
}

.cart-panel{
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.05);
  box-shadow: 0 26px 70px rgba(0,0,0,.35);
  padding: 16px;
}

.cart-panel__top{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.cart-panel__title{
  margin: 0;
  color: rgba(255,255,255,.92);
  font-size: 16px;
}

.cart-clear{
  border: 0;
  background: transparent;
  color: rgba(255,255,255,.70);
  font-weight: 900;
  cursor: pointer;
  text-decoration: none;
}

.cart-clear:hover{
  color: rgba(209,174,101,.95);
}

.cart-list{
  display: grid;
  gap: 12px;
}

.cart-item{
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  padding: 12px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}

.ci-left{
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.ci-img{
  width: 64px;
  height: 64px;
  border-radius: 18px;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
}

.ci-meta{ min-width: 0; }

.ci-name{
  display: block;
  color: rgba(255,255,255,.92);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ci-variant{
  display: block;
  margin-top: 3px;
  color: rgba(255,255,255,.62);
  font-size: 13px;
}

.ci-actions{
  margin-top: 8px;
  display: flex;
  gap: 8px;
  align-items: center;
  color: rgba(255,255,255,.55);
  font-size: 13px;
}

.ci-remove{
  border: 0;
  background: transparent;
  color: rgba(255,180,180,.92);
  font-weight: 900;
  cursor: pointer;
  text-decoration: none;
}

.ci-link{
  color: rgba(209,174,101,.92);
  font-weight: 900;
  text-decoration: none;
}

.ci-link:hover{ text-decoration: underline; }

.ci-right{
  display: grid;
  gap: 8px;
  justify-items: end;
}

.ci-price{
  color: rgba(255,255,255,.86);
  font-weight: 900;
}

.ci-qty{ width: 160px; }

.qty-input{
  width: 100%;
}

.ci-total{
  display: flex;
  gap: 10px;
  align-items: baseline;
}

.ci-total__label{
  color: rgba(255,255,255,.60);
  font-size: 12px;
}

.ci-total__val{
  color: rgba(209,174,101,.95);
  font-weight: 900;
}

.cart-actions{
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
}

.cart-empty{
  padding: 22px 10px 10px;
  text-align: center;
}

.cart-empty h3{
  margin: 0 0 6px;
  color: rgba(255,255,255,.92);
}

.cart-empty p{
  margin: 0 0 14px;
  color: rgba(255,255,255,.68);
}

/* =========================
   SUMMARY (WHITE)
========================= */
.cart-summary{
  border-radius: 22px;
  border: 1px solid rgba(0,0,0,.08);
  background: #fff;
  box-shadow: 0 18px 50px rgba(0,0,0,.18);
  padding: 16px;
}

.cart-summary__title{
  margin: 0 0 12px;
  color: rgba(0,0,0,.92);
}

.cart-summary .muted,
.cart-summary .muted.small{
  color: rgba(0,0,0,.62);
}

.cart-summary .sum-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0,0,0,.08);
  color: rgba(0,0,0,.74);
}

.cart-summary .sum-total{
  border-bottom: 0;
  padding-top: 14px;
  margin-top: 8px;
  font-size: 16px;
  color: rgba(0,0,0,.92);
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 900px){
  .cart-grid{ grid-template-columns: 1fr; }
  .cart-head{ align-items: flex-start; flex-direction: column; }
  .ci-right{ justify-items: start; }
  .cart-item{ grid-template-columns: 1fr; }
  .ci-qty{ width: 100%; }
}

/* === Match cart summary to checkout summary === */
.cart-summary {
  background: linear-gradient(180deg, #0b1212, #070d0d);
  border-radius: 18px;
  padding: 18px;
  color: #ffffff;
  box-shadow: 0 20px 50px rgba(0,0,0,.45);
}

.cart-summary h3 {
  color: #ffffff;
  margin-bottom: 12px;
}

.cart-summary .sum-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.85);
}

.cart-summary .sum-total {
  border-top: 2px solid rgba(209,174,101,.6);
  margin-top: 12px;
  padding-top: 12px;
  font-size: 18px;
  color: #d1ae65;
}

.cart-summary .btn {
  width: 100%;
  margin-top: 16px;
}

/* === FIX: Cart summary text must be WHITE on dark summary background === */
/* Put this at the VERY BOTTOM of cart.css to override earlier rules */
.cart-summary,
.cart-summary *{
  color: rgba(255,255,255,.92) !important;
}

.cart-summary .muted,
.cart-summary .small{
  color: rgba(255,255,255,.70) !important;
}

.cart-summary .sum-row span{
  color: rgba(255,255,255,.82) !important;
}

.cart-summary .sum-row strong{
  color: #ffffff !important;
}

/* Keep total highlighted */
.cart-summary .sum-total strong{
  color: #d1ae65 !important;
}