/* =========================================================================
   AsiaWatt — header cart button + slide-in mini-cart drawer (site-wide)
   Markup: [aw_minicart] + wp_footer drawer in inc/shop.php, list in woocommerce/cart/mini-cart.php
   ========================================================================= */

/* header button */
.awsh-mcbtn { position: relative; display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; color: var(--aw-navy) !important; background: var(--aw-paper); box-shadow: inset 0 0 0 1px rgba(19,34,58,.08); text-decoration: none !important; transition: background .3s var(--aw-ease), color .3s, transform .3s var(--aw-ease); }
.awsh-mcbtn:hover { background: var(--aw-navy); color: #fff !important; transform: translateY(-2px); }
.awsh-mcbtn .awsh-ic { width: 22px; height: 22px; }
.awsh-mcbtn .awsh-mc-count { position: absolute; top: -3px; inset-inline-end: -3px; display: grid; place-items: center; min-width: 21px; height: 21px; padding: 0 5px; border-radius: 999px; background: var(--aw-amber); color: var(--aw-ink); font: 800 11.5px/1 var(--aw-display, inherit); box-shadow: 0 0 0 2.5px #fff; transform: scale(1); transition: transform .35s cubic-bezier(.3,1.6,.5,1); }
.awsh-mcbtn .awsh-mc-count[data-count="0"] { transform: scale(0); }
.awsh-mcbtn.is-bump .awsh-mc-count { animation: awsh-bump .6s cubic-bezier(.3,1.6,.5,1); }
@keyframes awsh-bump { 0% { transform: scale(1); } 35% { transform: scale(1.45); } 100% { transform: scale(1); } }
.elementor-widget-shortcode:has(.awsh-mcbtn) { width: auto; flex: none; }

/* drawer */
.awsh-mc { position: fixed; inset: 0; z-index: 100000; visibility: hidden; pointer-events: none; }
.awsh-mc.is-open { visibility: visible; pointer-events: auto; }
.awsh-mc__overlay { position: absolute; inset: 0; background: rgba(6,14,28,.55); backdrop-filter: blur(3px); opacity: 0; transition: opacity .4s ease; }
.awsh-mc.is-open .awsh-mc__overlay { opacity: 1; }
.awsh-mc__panel { position: absolute; top: 0; bottom: 0; inset-inline-end: 0; width: min(420px, 100vw); display: flex; flex-direction: column; background: #fff; box-shadow: -30px 0 80px -30px rgba(6,14,28,.6); transform: translateX(105%); transition: transform .5s cubic-bezier(.2,.8,.2,1); outline: 0; font-family: var(--aw-font); color: var(--aw-text); }
.rtl .awsh-mc__panel { transform: translateX(-105%); box-shadow: 30px 0 80px -30px rgba(6,14,28,.6); }
.awsh-mc.is-open .awsh-mc__panel { transform: none; }
.awsh-mc__head { display: flex; align-items: center; gap: 12px; padding: 20px 22px; background: var(--aw-ink); color: #fff; position: relative; }
.awsh-mc__head::after { content: ""; position: absolute; inset: auto 0 0; height: 2px; background: linear-gradient(90deg, var(--aw-amber), var(--aw-electric), var(--aw-cyan)); }
.awsh-mc__hic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: rgba(255,194,26,.12); color: var(--aw-amber); }
.awsh-mc__hic .awsh-ic { width: 22px; height: 22px; }
.awsh-mc .awsh-mc__title { flex: 1; margin: 0; display: flex; align-items: center; gap: 10px; font: 800 18px/1.3 var(--aw-display, inherit); color: #fff; }
.awsh-mc__title .awsh-mc-count { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 8px; border-radius: 999px; background: rgba(255,255,255,.1); color: var(--aw-cyan); font-size: 13px; }
.awsh-mc .awsh-mc__close { all: unset; box-sizing: border-box; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; cursor: pointer; color: #C9D6EA; transition: background .25s, color .25s, transform .3s; }
.awsh-mc .awsh-mc__close:hover { background: rgba(255,255,255,.1); color: #fff; transform: rotate(90deg); }
.awsh-mc .awsh-mc__close:focus-visible { outline: 2px solid var(--aw-cyan); }
.awsh-mc .awsh-mc__close .awsh-ic { width: 20px; height: 20px; }
.awsh-mc .awsh-ic { width: 20px; height: 20px; flex: none; }

.awsh-mc__panel > .widget_shopping_cart_content { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 0; }
.awsh-mc__body.widget_shopping_cart_content { padding: 0; }
.awsh-mini { list-style: none; margin: 0 !important; padding: 8px 18px !important; flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.awsh-mini__item { display: flex !important; align-items: center; gap: 14px; padding: 14px 0 !important; margin: 0 !important; border-bottom: 1px solid #EDF1F7; position: relative; animation: awsh-in .45s cubic-bezier(.2,.8,.2,1) both; }
.awsh-mini__item:nth-child(2) { animation-delay: .05s; } .awsh-mini__item:nth-child(3) { animation-delay: .1s; } .awsh-mini__item:nth-child(4) { animation-delay: .15s; }
@keyframes awsh-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.awsh-mc .awsh-thumb { flex: none; width: 64px; height: 64px; border-radius: 12px; overflow: hidden; background: #F5F8FC; box-shadow: inset 0 0 0 1px #E3E9F2; }
.awsh-mc .awsh-thumb a { display: block; height: 100%; }
.awsh-mc .awsh-thumb img { width: 100% !important; height: 100% !important; object-fit: cover; margin: 0 !important; float: none !important; border-radius: 0; box-shadow: none; }
.awsh-mc .awsh-thumb__ph { display: grid; place-items: center; width: 100%; height: 100%; color: var(--aw-electric); background: linear-gradient(140deg, #EAF1FF, #F7FAFF); }
.awsh-mini__b { flex: 1; min-width: 0; display: grid; gap: 4px; }
.awsh-mini__t { font: 700 14.5px/1.6 var(--aw-display, inherit) !important; color: var(--aw-navy) !important; text-decoration: none !important; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
a.awsh-mini__t:hover { color: var(--aw-electric) !important; }
.awsh-mini__b .quantity { font-size: 13px; color: var(--aw-muted); }
.awsh-mini__b .quantity .amount { color: var(--aw-text); font-weight: 700; }
.awsh-mini__b dl.variation { margin: 0; font-size: 12px; color: var(--aw-muted); }
.awsh-mc a.remove.awsh-rm { position: static !important; display: grid !important; place-items: center; flex: none; width: 36px !important; height: 36px !important; border-radius: 10px !important; color: #94A3B8 !important; background: transparent !important; font-size: 0 !important; line-height: 1 !important; transition: background .25s, color .25s; }
.awsh-mc a.remove.awsh-rm:hover { background: #FFF1F3 !important; color: #E11D48 !important; }
.awsh-mc a.remove.awsh-rm .awsh-ic { width: 18px; height: 18px; }

.awsh-mini__foot { padding: 18px 22px 22px; border-top: 1px solid #E3E9F2; background: #FBFCFE; }
.awsh-mc .awsh-mini__total { display: flex; align-items: center; justify-content: space-between; margin: 0 0 14px !important; padding: 0 !important; border: 0 !important; font-size: 14px; color: var(--aw-muted); }
.awsh-mc .awsh-mini__total strong { font-weight: 600; }
.awsh-mc .awsh-mini__total .amount { font: 900 20px/1.2 var(--aw-display, inherit); color: var(--aw-navy); }
.awsh-mc .awsh-mini__btns { display: grid; gap: 10px; margin: 0 !important; }
.awsh-mc .awsh-btn { display: flex !important; align-items: center; justify-content: center; gap: 9px; width: 100%; min-height: 50px; padding: 0 22px !important; margin: 0 !important; border-radius: 999px !important; border: 1.5px solid transparent !important; font: 800 15px/1.2 var(--aw-display, inherit) !important; text-decoration: none !important; transition: transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .3s, background .3s, border-color .3s; }
.awsh-mc .awsh-btn--amber { background: var(--aw-amber) !important; color: var(--aw-ink) !important; }
.awsh-mc .awsh-btn--amber:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -14px rgba(245,158,11,.85); }
.awsh-mc .awsh-btn--line { background: #fff !important; color: var(--aw-navy) !important; border-color: #CFD9E8 !important; }
.awsh-mc .awsh-btn--line:hover { border-color: var(--aw-navy) !important; }
.awsh-mc .awsh-btn:not(.awsh-btn--block) { display: inline-flex !important; width: auto; }

.awsh-mc .awsh-empty { margin: auto; padding: 40px 28px; text-align: center; }
.awsh-mc .awsh-empty__ic { display: inline-grid; place-items: center; width: 84px; height: 84px; border-radius: 26px; background: linear-gradient(140deg, #EAF1FF, #F7FAFF); color: var(--aw-electric); box-shadow: inset 0 0 0 1px #DCE7FB; margin-bottom: 16px; }
.awsh-mc .awsh-empty__ic .awsh-ic { width: 38px; height: 38px; stroke-width: 1.5; }
.awsh-mc .awsh-empty p { margin: 0 0 20px; color: var(--aw-muted); font-size: 15px; }

.awsh-mc .blockUI.blockOverlay { background: rgba(255,255,255,.65) !important; }
html.awsh-locked, html.awsh-locked body { overflow: hidden; }

@media (max-width: 767px) {
	.awsh-mcbtn { width: 42px; height: 42px; }
	.awsh-mcbtn .awsh-ic { width: 20px; height: 20px; }
	.awsh-mc__panel { width: 100vw; }
}
@media (prefers-reduced-motion: reduce) {
	.awsh-mc__panel, .awsh-mc__overlay, .awsh-mini__item { transition: none !important; animation: none !important; }
}

/* Persian digits inside the display font (Estedad has Latin numerals): a digits-only face from Vazirmatn FaNum */
@font-face { font-family: 'AW FaNum'; src: url('../fonts/vazirmatn-fanum.woff2') format('woff2'); font-weight: 100 900; font-display: swap; unicode-range: U+0030-0039, U+002C, U+002E; }
html[dir="rtl"] .awsh, html[dir="rtl"] .awsh-mc, html[dir="rtl"] .awsh-mcbtn { --aw-display: 'AW FaNum', 'Estedad', 'Vazirmatn', Tahoma, sans-serif; --aw-font: 'AW FaNum', 'Vazirmatn', Tahoma, system-ui, sans-serif; }
