/*!
 * Valgusallikad — mini-cart v2.0
 * Mobile: bottom-sheet (slides up). Desktop: right-side drawer.
 * Single file, no overrides needed.
 */

/* ── Overlay container ─────────────────────────────────────── */
.vlg-mini-cart-drawer {
  position: fixed;
  inset: 0;
  z-index: 9990;
}
.vlg-mini-cart-drawer[hidden] { display: none; }

/* ── Backdrop ──────────────────────────────────────────────── */
.vlg-mini-cart-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 18, 36, 0);
  transition: background 220ms ease;
  cursor: pointer;
}
.vlg-mini-cart-drawer.is-open .vlg-mini-cart-backdrop {
  background: rgba(7, 18, 36, 0.52);
}

/* ── Panel — desktop: right drawer ───────────────────────── */
.vlg-mini-cart-panel {
  position: absolute;
  top: 0; right: 0;
  width: min(400px, 96vw);
  height: 100%;
  background: #fff;
  display: flex;
  flex-direction: column;
  transform: translateX(110%);
  transition: transform 280ms cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
  box-shadow: -12px 0 40px rgba(7,18,36,.14);
}
.vlg-mini-cart-drawer.is-open .vlg-mini-cart-panel {
  transform: translateX(0);
}

/* ── Panel — mobile: bottom sheet ────────────────────────── */
@media (max-width: 767px) {
  .vlg-mini-cart-panel {
    top: auto; bottom: 0; right: 0; left: 0;
    width: 100%;
    height: auto;
    max-height: 82dvh;
    border-radius: 20px 20px 0 0;
    transform: translateY(110%);
    box-shadow: 0 -8px 32px rgba(7,18,36,.14);
  }
  .vlg-mini-cart-drawer.is-open .vlg-mini-cart-panel {
    transform: translateY(0);
  }
}

/* ── Drag handle (mobile only) ────────────────────────────── */
.vlg-mini-cart-handle {
  display: none;
}
@media (max-width: 767px) {
  .vlg-mini-cart-handle {
    display: flex;
    justify-content: center;
    padding: 10px 0 4px;
    flex-shrink: 0;
  }
  .vlg-mini-cart-handle span {
    width: 36px; height: 4px;
    border-radius: 999px;
    background: #d1d5db;
  }
}

/* ── Header ───────────────────────────────────────────────── */
.vlg-mini-cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid #eef0f4;
  flex-shrink: 0;
}
.vlg-mini-cart-header h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -.01em;
}
.vlg-mini-cart-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background 140ms, color 140ms;
}
.vlg-mini-cart-close:hover { background: #fee2e2; color: #b91c1c; border-color: #fecaca; }
.vlg-mini-cart-close:focus-visible { outline: 2px solid #f28a00; outline-offset: 2px; }

/* ── Scrollable body ─────────────────────────────────────── */
.vlg-mini-cart-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 14px 16px;
}

/* ── Cart items ──────────────────────────────────────────── */
.vlg-mini-cart-body .woocommerce-mini-cart,
.vlg-mini-cart-body .cart_list,
.vlg-mini-cart-body .product_list_widget {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.vlg-mini-cart-body .woocommerce-mini-cart-item,
.vlg-mini-cart-body .mini_cart_item {
  display: grid;
  grid-template-columns: 52px 1fr 28px;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #eef0f4;
}
.vlg-mini-cart-body .woocommerce-mini-cart-item img,
.vlg-mini-cart-body .mini_cart_item img {
  width: 52px; height: 52px;
  object-fit: contain;
  border-radius: 10px;
  background: #fff;
}
.vlg-mini-cart-body .woocommerce-mini-cart-item a:not(.remove),
.vlg-mini-cart-body .mini_cart_item a:not(.remove) {
  color: #0f172a;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  display: block;
}
.vlg-mini-cart-body .quantity {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  color: #64748b;
  font-weight: 600;
}
.vlg-mini-cart-body .quantity .woocommerce-Price-amount {
  color: #0f172a;
  font-weight: 800;
}
.vlg-mini-cart-body .remove,
.vlg-mini-cart-body a.remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #94a3b8 !important;
  font-size: 16px;
  text-decoration: none;
  font-weight: 700;
  transition: background 140ms, color 140ms;
}
.vlg-mini-cart-body .remove:hover,
.vlg-mini-cart-body a.remove:hover {
  background: #fee2e2; color: #b91c1c !important;
}
.vlg-mini-cart-body .woocommerce-mini-cart__empty-message {
  text-align: center;
  padding: 48px 20px;
  color: #94a3b8;
  font-size: 15px;
  margin: 0;
}

/* ── Total + actions footer ──────────────────────────────── */
.vlg-mini-cart-footer {
  padding: 14px 16px;
  border-top: 1px solid #eef0f4;
  flex-shrink: 0;
  background: #fff;
}
.vlg-mini-cart-body .total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 12px;
  font-size: 15px;
}
.vlg-mini-cart-body .total strong { color: #0f172a; font-weight: 800; }
.vlg-mini-cart-body .total .woocommerce-Price-amount {
  color: #f28a00;
  font-weight: 900;
  font-size: 17px;
}
.vlg-mini-cart-body .buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.vlg-mini-cart-body .buttons a,
.vlg-mini-cart-body .buttons .button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  transition: background 150ms, color 150ms, border-color 150ms;
}
.vlg-mini-cart-body .buttons .button:first-child,
.vlg-mini-cart-body .buttons a:first-child {
  background: #fff;
  border: 1px solid #cbd5e1;
  color: #334155;
  min-height: 40px;
  font-size: 13px;
  font-weight: 700;
}
.vlg-mini-cart-body .buttons .button:first-child:hover,
.vlg-mini-cart-body .buttons a:first-child:hover {
  border-color: #94a3b8;
}
.vlg-mini-cart-body .buttons .checkout,
.vlg-mini-cart-body .buttons a.checkout {
  background: #f28a00;
  color: #fff;
  border: none;
  box-shadow: 0 8px 20px rgba(242,138,0,.22);
}
.vlg-mini-cart-body .buttons .checkout:hover,
.vlg-mini-cart-body .buttons a.checkout:hover {
  background: #e07800;
}

/* ── Body scroll lock ────────────────────────────────────── */
body.vlg-mini-cart-open { overflow: hidden; }
