/* ============================================================
   CLOUVI STUDIOS — cart.css
   Cart drawer — slides from right
   ============================================================ */

/* ------------------------------------------------------------
   OVERLAY + DRAWER
   ------------------------------------------------------------ */
.cart-drawer {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9500;
}

.cart-drawer.open { display: block; }

.cart-overlay {
  position: absolute;
  inset: 0;
  background: rgba(2,2,2,0.7);
  cursor: pointer;
}

.cart-panel {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: min(420px, 100vw);
  background: #f5f4f0;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.36s cubic-bezier(0.16,1,0.3,1);
  overflow: hidden;
}

.cart-drawer.open .cart-panel {
  transform: translateX(0);
}


/* ------------------------------------------------------------
   HEADER
   ------------------------------------------------------------ */
.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 18px;
  border-bottom: 1px solid rgba(180,140,20,0.15);
  flex-shrink: 0;
}

.cart-header-left {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.cart-title {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 4px;
  color: #0a0a0a;
  text-transform: uppercase;
}

.cart-header-count {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 1px;
  color: rgba(10,10,10,0.35);
}

.cart-close {
  background: transparent;
  border: none;
  color: rgba(10,10,10,0.35);
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s ease;
  line-height: 1;
}

.cart-close:hover { color: #0a0a0a; }


/* ------------------------------------------------------------
   BODY — scrollable items
   ------------------------------------------------------------ */
.cart-body {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: none;
  min-height: 0;
}

.cart-body::-webkit-scrollbar { display: none; }


/* ------------------------------------------------------------
   CART ITEM
   ------------------------------------------------------------ */
.cart-item {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 14px;
  padding: 16px 24px;
  border-bottom: 1px solid rgba(180,140,20,0.08);
  align-items: start;
}

.ci-img {
  width: 72px;
  height: 90px;
  background: #ece7de;
  overflow: hidden;
  flex-shrink: 0;
}

.ci-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.ci-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 2px;
}

.ci-name {
  font-family: 'Cinzel', serif;
  font-size: 12px;
  letter-spacing: 2px;
  color: #0a0a0a;
}

.ci-meta {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.5px;
  color: rgba(10,10,10,0.45);
}

.ci-back {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.5px;
  color: rgba(10,10,10,0.7);
  margin-top: 2px;
  overflow-wrap: anywhere;
}

.ci-typc {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.5px;
  color: rgba(10,10,10,0.7);
  margin-top: 2px;
  overflow-wrap: anywhere;
}

.ci-price {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: #B8960A;
  margin-top: 4px;
}

.ci-edit {
  background: transparent;
  border: none;
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 1.5px;
  color: rgba(10,10,10,0.35);
  cursor: pointer;
  padding: 0;
  margin-top: 8px;
  text-transform: uppercase;
  transition: color 0.2s ease, letter-spacing 0.2s ease;
  text-align: left;
}

.ci-edit:hover {
  color: #B8960A;
  letter-spacing: 2px;
}

.ci-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  padding-top: 2px;
}

.ci-qty {
  display: flex;
  align-items: center;
  border: 1px solid rgba(10,10,10,0.15);
}

.ci-qty-btn {
  width: 26px;
  height: 26px;
  background: transparent;
  border: none;
  color: #0a0a0a;
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.ci-qty-btn:hover { background: rgba(10,10,10,0.06); }

.ci-qty-num {
  width: 26px;
  text-align: center;
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: #0a0a0a;
  border-left: 1px solid rgba(10,10,10,0.1);
  border-right: 1px solid rgba(10,10,10,0.1);
  line-height: 26px;
}

.ci-remove {
  background: transparent;
  border: none;
  color: rgba(10,10,10,0.25);
  font-size: 11px;
  cursor: pointer;
  padding: 2px;
  transition: color 0.2s ease;
  line-height: 1;
}

.ci-remove:hover { color: #0a0a0a; }


/* ------------------------------------------------------------
   EMPTY STATE
   ------------------------------------------------------------ */
.cart-empty {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  gap: 20px;
  height: 100%;
}

.cart-empty-text {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 1px;
  color: rgba(10,10,10,0.4);
  font-style: italic;
}

.cart-empty-link {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 2px;
  color: #B8960A;
  text-decoration: none;
  text-transform: uppercase;
  transition: letter-spacing 0.3s ease;
}

.cart-empty-link:hover { letter-spacing: 3px; }


/* ------------------------------------------------------------
   FOOTER — sticky at bottom
   ------------------------------------------------------------ */
.cart-footer {
  display: none;
  flex-direction: column;
  gap: 12px;
  padding: 20px 24px 28px;
  border-top: 1px solid rgba(180,140,20,0.15);
  flex-shrink: 0;
  background: #f5f4f0;
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-total-label {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 3px;
  color: rgba(10,10,10,0.45);
  text-transform: uppercase;
}

.cart-total-price {
  font-family: 'Cinzel', serif;
  font-size: 18px;
  font-weight: 400;
  color: #0a0a0a;
  letter-spacing: 2px;
}

.cart-shipping {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.5px;
  color: rgba(10,10,10,0.35);
  font-style: italic;
}

.cart-checkout-btn {
  width: 100%;
  padding: 16px;
  background: #0a0a0a;
  color: #f5f4f0;
  border: 1px solid #0a0a0a;
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.cart-checkout-btn:hover:not(:disabled) {
  background: #B8960A;
  border-color: #B8960A;
  color: #ece7de;
}

.cart-checkout-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.cart-note {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.5px;
  color: rgba(10,10,10,0.3);
  font-style: italic;
  text-align: center;
}


/* ------------------------------------------------------------
   MOBILE NAV CART BUTTON
   ------------------------------------------------------------ */
.mobile-nav-cart {
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.mobile-cart-count {
  color: rgba(244,244,240,0.4);
  font-size: 11px;
}

.mobile-nav-cart.has-items .mobile-cart-count {
  color: #B8960A;
}


/* ------------------------------------------------------------
   MOBILE RESPONSIVE
   ------------------------------------------------------------ */
@media (max-width: 480px) {
  .cart-panel {
    width: 100vw;
  }
}
