/* ======================================================================
 * DreamyCartDrawer26 — Sanctuary Drawer (Woo fragments + real cart data)
 *
 * Based on your supplied “AJAX Add to Cart” UI concept, re-mapped to the
 * DreamyStudio26 design tokens.
 * ====================================================================== */

/* Drawer surface */
#dreamyheader26-cart.cart-drawer{
  display: flex;
  flex-direction: column;
  background: var(--dc-bg, #ffffff);
  color: var(--dc-ink, #050505);
  border: 1px solid var(--dc-line, rgba(0,0,0,0.14));
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.18);
  overflow: hidden;
}

/* Header */
#dreamyheader26-cart .drawer-header{
  padding: 18px 18px 12px;
  border-bottom: 1px solid var(--dc-lineSoft, rgba(0,0,0,0.09));
}

#dreamyheader26-cart .drawer-header .header-top{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

#dreamyheader26-cart .cart-title{
  font-family: var(--dc-serif, "Playfair Display", serif);
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  margin: 0;
}

#dreamyheader26-cart .close-btn{
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--dc-lineSoft, rgba(0,0,0,0.09));
  background: rgba(255,255,255,0.8);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s var(--dc-ease, cubic-bezier(0.16,1,0.3,1));
}

#dreamyheader26-cart .close-btn:hover{ transform: scale(1.04); }

/* Free shipping progress (drawer-specific) */
#dreamyheader26-cart .ship-progress{
  margin-top: 12px;
  background: rgba(0,0,0,0.03);
  border: 1px solid var(--dc-lineSoft, rgba(0,0,0,0.09));
  border-radius: 14px;
  padding: 10px 12px;
}


/* Progress is rendered in the footer (just above subtotal). */
#dreamyheader26-cart .drawer-footer .ship-progress{
  margin-top: 0;
  margin-bottom: 10px;
}
#dreamyheader26-cart .ship-text{
  font-size: 0.84rem;
  color: var(--dc-inkSub, #5e5e5e);
  margin-bottom: 8px;
}

#dreamyheader26-cart .ship-track{
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(0,0,0,0.08);
  overflow: hidden;
}

#dreamyheader26-cart .ship-fill{
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(0,0,0,0.65), rgba(0,0,0,0.25));
  transition: width 0.4s var(--dc-ease, cubic-bezier(0.16,1,0.3,1));
}

/* Body */
#dreamyheader26-cart .drawer-body{
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

#dreamyheader26-cart .dreamycartdrawer26-scroll{
  height: 100%;
  overflow: auto;
  padding: 0 18px;
}

/* Empty state */
#dreamyheader26-cart .drawer-empty{
  padding: 26px 0;
  text-align: center;
}

#dreamyheader26-cart .drawer-empty-title{
  font-family: var(--dc-serif, "Playfair Display", serif);
  font-size: 1.05rem;
  margin: 0 0 8px;
}

#dreamyheader26-cart .drawer-empty-sub{
  margin: 0;
  color: var(--dc-inkSub, #5e5e5e);
  font-size: 0.92rem;
}

/* List */
#dreamyheader26-cart .dreamycartdrawer26-list{
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Item */
#dreamyheader26-cart .cart-item{
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--dc-lineSoft, rgba(0,0,0,0.09));
  align-items: flex-start;
}

#dreamyheader26-cart .item-img-wrap{
  width: 78px;
  height: 78px;
  border-radius: 16px;
  background: var(--dc-stage, #f6f6f6);
  overflow: hidden;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

#dreamyheader26-cart .item-img-wrap img{ width: 100%; height: 100%; object-fit: cover; }

#dreamyheader26-cart .item-meta{ flex: 1; min-width: 0; }

#dreamyheader26-cart .item-title-row{
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

#dreamyheader26-cart .item-title{
  font-family: var(--dc-serif, "Playfair Display", serif);
  font-size: 0.98rem;
  line-height: 1.25;
  margin: 0;
}

#dreamyheader26-cart .item-title a{ color: inherit; text-decoration: none; }

#dreamyheader26-cart .remove-btn{
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid var(--dc-lineSoft, rgba(0,0,0,0.09));
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: 0 0 auto;
  transition: background 0.2s var(--dc-ease, cubic-bezier(0.16,1,0.3,1));
}

#dreamyheader26-cart .remove-btn:hover{ background: rgba(0,0,0,0.04); }

#dreamyheader26-cart .item-variant{
  color: var(--dc-inkSub, #5e5e5e);
  font-size: 0.82rem;
  margin-top: 6px;
}

#dreamyheader26-cart .item-price-row{
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  gap: 10px;
}

#dreamyheader26-cart .item-price{
  font-weight: 600;
  font-size: 0.92rem;
  white-space: nowrap;
}

/* Qty control */
#dreamyheader26-cart .qty-control{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--dc-lineSoft, rgba(0,0,0,0.09));
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255,255,255,0.9);
}

#dreamyheader26-cart .qty-btn{
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: none;
  background: rgba(0,0,0,0.06);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#dreamyheader26-cart .qty-btn:active{ transform: scale(0.96); }

#dreamyheader26-cart .qty-input{
  width: 36px;
  border: none;
  background: transparent;
  text-align: center;
  font-weight: 600;
  font-size: 0.9rem;
  outline: none;
  -moz-appearance: textfield;
}

#dreamyheader26-cart .qty-input::-webkit-outer-spin-button,
#dreamyheader26-cart .qty-input::-webkit-inner-spin-button{ -webkit-appearance: none; margin: 0; }

/* Footer */
#dreamyheader26-cart .drawer-footer{
  padding: 16px 18px calc(16px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--dc-lineSoft, rgba(0,0,0,0.09));
  background: rgba(255,255,255,0.95);
}

#dreamyheader26-cart .subtotal-row{
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
  gap: 12px;
}

#dreamyheader26-cart .subtotal-label{
  color: var(--dc-inkSub, #5e5e5e);
  font-size: 0.86rem;
}

#dreamyheader26-cart .subtotal-value{
  font-weight: 700;
  font-size: 1.02rem;
  white-space: nowrap;
}

#dreamyheader26-cart .checkout-btn{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(0,0,0,0.12);
  background: #050505;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.02em;
}

#dreamyheader26-cart .checkout-btn:hover{ filter: brightness(0.98); }

#dreamyheader26-cart .checkout-total{
  font-weight: 700;
  opacity: 0.9;
}

#dreamyheader26-cart .view-bag{
  display: inline-block;
  margin-top: 10px;
  font-size: 0.84rem;
  color: var(--dc-inkSub, #5e5e5e);
  text-decoration: none;
}

#dreamyheader26-cart .view-bag:hover{ text-decoration: underline; }

/* Optional / future upsell (kept hidden by default) */
#dreamyheader26-cart .upsell{ margin: 18px 0 24px; }

/* Mobile: bottom sheet behavior */
@media (max-width: 760px){
  #dreamyheader26-cart.cart-drawer{
    top: auto;
    right: 0;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 85vh;
    border-radius: 22px 22px 0 0;
    transform: translate3d(0, 18px, 0);
  }
}
