/* ==========================================================================
   Mini Kosmos — Cart Drawer CSS
   Slide-in cart panel from the right (all pages)
   ========================================================================== */

/* Drawer container — always present in DOM */
#mk-cart-drawer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
}

#mk-cart-drawer.is-open {
  pointer-events: auto;
}

/* Backdrop */
.mk-drawer-overlay {
  position: absolute;
  inset: 0;
  background: rgba(32, 24, 46, .4);
  opacity: 0;
  transition: opacity .25s;
}

#mk-cart-drawer.is-open .mk-drawer-overlay {
  opacity: 1;
}

/* Sliding panel */
.mk-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: min(420px, 100vw);
  background: var(--cream);
  display: flex;
  flex-direction: column;
  box-shadow: -30px 0 60px -30px rgba(32, 24, 46, .3);
  transform: translateX(100%);
  transition: transform .35s cubic-bezier(.4, 0, .2, 1);
}

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

/* ── Head ─────────────────────────────────────────────────────────────────── */

.mk-drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.mk-drawer-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
}

.mk-drawer-count {
  color: var(--muted);
  font-weight: 400;
}

.mk-drawer-close {
  width: 36px !important;
  height: 36px !important;
  border-radius: 999px !important;
  border: 1px solid var(--line) !important;
  background: var(--paper) !important;
  display: grid !important;
  place-items: center;
  color: var(--ink);
  cursor: pointer;
  transition: background .15s, border-color .15s;
  flex-shrink: 0;
  line-height: 1;
  padding: 0 !important;
  box-shadow: none !important;
  text-transform: none !important;
}

.mk-drawer-close:hover {
  background: var(--cream-deep) !important;
  border-color: var(--ink-soft) !important;
}

/* ── Body ─────────────────────────────────────────────────────────────────── */

.mk-drawer-body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.mk-drawer-inner {
  padding: 14px 22px;
}

/* Empty state */
.mk-drawer-empty {
  padding: 44px 0;
  text-align: center;
}

.mk-drawer-empty-icon {
  font-size: 48px;
  line-height: 1;
  margin-bottom: 14px;
}

.mk-drawer-empty-h {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  color: var(--ink);
  margin-bottom: 6px;
}

.mk-drawer-empty-sub {
  font-size: 14px;
  color: var(--muted);
}

/* Free shipping meter */
.mk-drawer-meter {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 16px;
}

.mk-drawer-meter-label {
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 7px;
}

.mk-drawer-meter-label strong { color: var(--ink); }

.mk-drawer-meter-bar {
  height: 5px;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.mk-drawer-meter-fill {
  height: 100%;
  background: var(--coral);
  border-radius: 999px;
  transition: width .4s ease;
}

/* Items */
.mk-drawer-items {
  display: grid;
  gap: 16px;
}

.mk-drawer-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: start;
}

.mk-drawer-item-img {
  display: block;
  width: 72px;
  height: 72px;
  border-radius: 12px;
  background: var(--card-tint, #FFE9B8);
  overflow: hidden;
  flex-shrink: 0;
  text-decoration: none;
}

.mk-drawer-item-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.mk-drawer-item-info {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.mk-drawer-item-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mk-drawer-item-name:hover { color: var(--coral); }

.mk-drawer-item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.mk-drawer-item-qty {
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.mk-drawer-item-price {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
}

.mk-drawer-item-remove {
  font-size: 12px;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-style: dotted;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  display: inline;
  transition: color .15s;
}

.mk-drawer-item-remove:hover { color: var(--coral); }

/* ── Footer ───────────────────────────────────────────────────────────────── */

.mk-drawer-foot {
  padding: 16px 22px;
  border-top: 1px solid var(--line);
  background: var(--paper);
  flex-shrink: 0;
  display: grid;
  gap: 10px;
}

.mk-drawer-subtotal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: var(--ink-soft);
}

.mk-drawer-subtotal-amount {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  color: var(--ink);
}

/* "Δες το καλάθι" outline button */
.mk-drawer-view-cart {
  width: 100%;
  justify-content: center;
  border-radius: 999px !important;
  height: 44px;
  font-size: 14px;
}

/* "Ολοκλήρωση παραγγελίας" checkout button */
.mk-drawer-checkout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 52px;
  border-radius: 14px !important;
  background: var(--coral) !important;
  color: var(--paper) !important;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: opacity .15s, transform .15s;
  border: none !important;
  text-transform: none !important;
}

.mk-drawer-checkout-btn:hover {
  opacity: .9;
  transform: translateY(-1px);
  color: var(--paper) !important;
}

/* Payment note */
.mk-drawer-payment-note {
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

/* ── Prevent body scroll when drawer open ─────────────────────────────────── */
body.mk-drawer-open {
  overflow: hidden;
}
