/* =========================================================
   Asia Super Store – oldalsó kosár (side cart)
   Párja: mu-plugins/asia-minicart.php
          + asia-fixes-assets/woocommerce/cart/header-mini-cart.php

   Saját osztálynevek (asia-sc-*), a témának egyetlen szabálya
   sincs rájuk – ez a minta vált be a legjobban ezen az oldalon.
   ========================================================= */

.asia-sc-panel {
  --sc-ink:      #1C1917;
  --sc-ink-2:    #514B45;
  --sc-ink-3:    #857D74;
  --sc-line:     #E3DFD8;
  --sc-surface:  #FFFFFF;
  --sc-shelf:    #F4F2EE;
  --sc-orange:   #E8912F;
  --sc-orange-d: #C9761B;
  --sc-orange-b: #FDF3E6;
  --sc-jade:     #3F6B5C;
  --sc-jade-b:   #EAF1EE;
}

/* ---------------------------------------------------------
   1. A téma lenyíló mini kosara lekerül
   --------------------------------------------------------- */

.ld-module-cart .ld-module-dropdown { display: none !important; }

/* ---------------------------------------------------------
   2. Panel és háttér
   A mobilmenü z-indexe 999999, ezért kell efölé menni.
   --------------------------------------------------------- */

.asia-sc-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000000;
  background: rgba(28, 25, 23, .45);
  opacity: 0;
  transition: opacity .28s ease;
  cursor: pointer;
}

.asia-sc-backdrop.is-open { opacity: 1; }
.asia-sc-backdrop[hidden] { display: none; }

.asia-sc-panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 1000001;
  width: min(420px, 100vw);
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--sc-surface);
  box-shadow: -12px 0 40px rgba(28, 25, 23, .16);
  transform: translateX(102%);
  transition: transform .3s cubic-bezier(.32, .72, 0, 1);
  visibility: hidden;
  font-size: 15px;
  line-height: 1.45;
  color: var(--sc-ink);
}

.asia-sc-panel.is-open {
  transform: none;
  visibility: visible;
}

.asia-sc-panel.is-busy { pointer-events: none; }
.asia-sc-panel.is-busy .asia-sc-items { opacity: .5; }

body.asia-sc-locked { overflow: hidden; }

/* A fragment-burok és a sablon gyökere is teljes magasságú kell legyen,
   különben a lábléc nem tud a panel aljára ragadni. */
.asia-sc-panel > .header-quickcart,
.asia-sc-panel .asia-sc-inner {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
}

/* ---------------------------------------------------------
   3. Fejléc
   --------------------------------------------------------- */

.asia-sc-top {
  flex: 0 0 auto;
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--sc-line);
}

.asia-sc-title {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -.01em;
}

.asia-sc-count {
  font-size: 13px;
  color: var(--sc-ink-3);
}

.asia-sc-close {
  margin-left: auto;
  align-self: center;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: var(--sc-shelf);
  color: var(--sc-ink-2);
  cursor: pointer;
  padding: 0;
  transition: background .15s ease, color .15s ease;
}

.asia-sc-close:hover { background: #E8E4DD; color: var(--sc-ink); }

/* ---------------------------------------------------------
   4. Haladássáv
   --------------------------------------------------------- */

.asia-sc-bar { flex: 0 0 auto; padding: 16px 20px 0; }
.asia-sc-bar .asia-fsbar {
  background: var(--sc-jade-b);
  border-radius: 10px;
  padding: 12px 14px;
  margin: 0;
}
.asia-sc-bar .asia-fsbar-text { font-size: 13px; color: var(--sc-jade); line-height: 1.35; }
.asia-sc-bar .asia-fsbar-text .amount { font-weight: 700; }
.asia-sc-bar .asia-fsbar-track {
  height: 6px;
  border-radius: 99px;
  background: rgba(63, 107, 92, .18);
  margin-top: 8px;
  overflow: hidden;
}
.asia-sc-bar .asia-fsbar-track i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: var(--sc-jade);
  transition: width .4s ease;
}
.asia-sc-bar .asia-fsbar.is-min { background: var(--sc-orange-b); }
.asia-sc-bar .asia-fsbar.is-min .asia-fsbar-text { color: #8A5210; }
.asia-sc-bar .asia-fsbar.is-min .asia-fsbar-track { background: rgba(232, 145, 47, .2); }
.asia-sc-bar .asia-fsbar.is-min .asia-fsbar-track i { background: var(--sc-orange); }

/* ---------------------------------------------------------
   5. Tétellista – EZ görget, semmi más
   --------------------------------------------------------- */

.asia-sc-items {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 4px 20px 12px;
  transition: opacity .15s ease;
}

.asia-sc-item {
  display: grid;
  grid-template-columns: 64px 1fr 24px;
  gap: 12px;
  align-items: start;
  padding: 16px 0;
  border-bottom: 1px solid var(--sc-line);
}

.asia-sc-item:last-child { border-bottom: 0; }

.asia-sc-thumb {
  display: block;
  width: 64px;
  height: 64px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--sc-shelf);
}

.asia-sc-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  mix-blend-mode: multiply;
}

.asia-sc-info { min-width: 0; }

.asia-sc-name {
  display: block;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--sc-ink);
  text-decoration: none;
}

.asia-sc-name:hover { color: var(--sc-orange-d); }

.asia-sc-info .variation,
.asia-sc-info dl.variation {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--sc-ink-3);
}

.asia-sc-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
}

.asia-sc-qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--sc-line);
  border-radius: 8px;
  overflow: hidden;
}

.asia-sc-qtybtn {
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  color: var(--sc-ink-2);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  transition: background .15s ease;
}

.asia-sc-qtybtn:hover:not(:disabled) { background: var(--sc-shelf); }
.asia-sc-qtybtn:disabled { opacity: .35; cursor: default; }

.asia-sc-qtyval {
  min-width: 28px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.asia-sc-price {
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.asia-sc-remove {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: var(--sc-ink-3);
  cursor: pointer;
  padding: 0;
  border-radius: 50%;
  transition: background .15s ease, color .15s ease;
}

.asia-sc-remove:hover { background: #FBEDEA; color: #A93B26; }

/* üres állapot */
.asia-sc-empty {
  padding: 48px 12px;
  text-align: center;
  color: var(--sc-ink-3);
}

.asia-sc-empty p { margin: 12px 0 20px; font-size: 15px; }

.asia-sc-shop {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 8px;
  background: var(--sc-orange);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
}

.asia-sc-shop:hover { background: var(--sc-orange-d); color: #fff; }

/* ---------------------------------------------------------
   6. Lábléc – mindig látszik, ez volt a hiba lényege
   --------------------------------------------------------- */

.asia-sc-foot {
  flex: 0 0 auto;
  padding: 16px 20px calc(16px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--sc-line);
  background: var(--sc-surface);
  box-shadow: 0 -6px 20px rgba(28, 25, 23, .06);
}

.asia-sc-sum {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 15px;
}

.asia-sc-sum strong { font-size: 19px; font-weight: 700; }

.asia-sc-note {
  margin: 4px 0 12px;
  font-size: 12px;
  color: var(--sc-ink-3);
}

.asia-sc-checkout {
  display: block;
  width: 100%;
  padding: 15px 18px;
  border-radius: 10px;
  background: var(--sc-orange);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  transition: background .15s ease;
}

.asia-sc-checkout:hover { background: var(--sc-orange-d); color: #fff; }

.asia-sc-cartlink {
  display: block;
  margin-top: 10px;
  text-align: center;
  font-size: 14px;
  color: var(--sc-ink-2);
  text-decoration: underline;
}

.asia-sc-cartlink:hover { color: var(--sc-ink); }

/* ---------------------------------------------------------
   7. Mobil
   --------------------------------------------------------- */

@media (max-width: 480px) {
  .asia-sc-panel { width: 100vw; }
  .asia-sc-top { padding: 16px 16px 14px; }
  .asia-sc-bar { padding: 12px 16px 0; }
  .asia-sc-items { padding: 4px 16px 12px; }
  .asia-sc-foot { padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); }
  .asia-sc-item { grid-template-columns: 56px 1fr 24px; gap: 10px; }
  .asia-sc-thumb { width: 56px; height: 56px; }
}
