/* ═══════════════════════════════════════════════
   Sha2w Shop Essentials — Styles
   ═══════════════════════════════════════════════ */

/* ─────────────── WISHLIST HEART ─────────────── */

.sha2w-heart-btn {
    --sha2w-heart: #7a7a8c;
    --sha2w-heart-active: #e63757;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    background: none;
    cursor: pointer;
    padding: 0;
    color: var(--sha2w-heart);
    transition: color .2s, transform .15s, box-shadow .2s;
}
.sha2w-heart-btn.has-circle {
    background: #fff;
    border-radius: 999px;
    padding: 9px;
    box-shadow: 0 3px 14px rgba(0,0,0,.1);
}
/* circle off via prefix class */
.sha2w-circle- .sha2w-heart-btn.has-circle {
    background: none;
    padding: 0;
    box-shadow: none;
}
.sha2w-heart-btn:hover { transform: scale(1.12); }
.sha2w-heart-btn:active { transform: scale(.94); }

.sha2w-heart-svg { width: 22px; height: 22px; display: block; }
.sha2w-heart-path {
    fill: transparent;
    stroke: currentColor;
    stroke-width: 1.8;
    transition: fill .25s ease, stroke .25s ease;
}
.sha2w-heart-btn.in-wishlist { color: var(--sha2w-heart-active); }
.sha2w-heart-btn.in-wishlist .sha2w-heart-path {
    fill: var(--sha2w-heart-active);
    stroke: var(--sha2w-heart-active);
}

/* Pop animation when toggled on */
.sha2w-heart-btn.just-added .sha2w-heart-svg { animation: sha2wHeartPop .45s cubic-bezier(.17,.89,.32,1.49); }
@keyframes sha2wHeartPop {
    0%   { transform: scale(1); }
    35%  { transform: scale(.75); }
    70%  { transform: scale(1.28); }
    100% { transform: scale(1); }
}

/* Burst ring */
.sha2w-heart-burst {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    pointer-events: none;
}
.sha2w-heart-btn.just-added .sha2w-heart-burst { animation: sha2wBurst .5s ease-out; }
@keyframes sha2wBurst {
    0%   { box-shadow: 0 0 0 0 rgba(230,55,87,.45); }
    100% { box-shadow: 0 0 0 16px rgba(230,55,87,0); }
}

/* Loading state */
.sha2w-heart-btn.loading { opacity: .6; pointer-events: none; }

/* Label */
.sha2w-heart-label { font-size: 13.5px; font-weight: 600; white-space: nowrap; }

/* Tooltip */
.sha2w-heart-tip {
    position: absolute;
    bottom: calc(100% + 9px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: #1a1a2e;
    color: #fff;
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
    padding: 5px 10px;
    border-radius: 7px;
    opacity: 0;
    visibility: hidden;
    transition: opacity .18s, transform .18s, visibility .18s;
    pointer-events: none;
    z-index: 99;
}
.sha2w-heart-tip::after {
    content: '';
    position: absolute;
    top: 100%; left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #1a1a2e;
}
.sha2w-heart-btn.has-tooltip:hover .sha2w-heart-tip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Header wishlist counter */
.sha2w-wish-counter {
    position: relative;
    display: inline-flex;
    align-items: center;
    text-decoration: none !important;
}
.sha2w-wish-counter .sha2w-heart-btn.is-static { cursor: pointer; }
.sha2w-wish-count {
    position: absolute;
    top: -7px;
    inset-inline-end: -9px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #e63757;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: transform .2s;
}
.sha2w-wish-count.bump { animation: sha2wBump .3s ease; }

/* ─────────────── CART ICON ─────────────── */

.sha2w-cart-widget { display: inline-block; }

.sha2w-cart-trigger {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #1a1a2e;
    text-decoration: none !important;
    transition: color .2s, transform .15s;
}
.sha2w-cart-trigger:hover { transform: translateY(-1px); }

.sha2w-cart-icon-wrap { position: relative; display: inline-flex; }

.sha2w-cart-count {
    position: absolute;
    top: -8px;
    inset-inline-end: -10px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #6c63ff;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.sha2w-cart-count.bump { animation: sha2wBump .3s ease; }
@keyframes sha2wBump {
    0% { transform: scale(1); }
    50% { transform: scale(1.45); }
    100% { transform: scale(1); }
}

.sha2w-cart-subtotal-val { font-size: 14px; font-weight: 700; }

/* ─────────────── SIDE DRAWER ─────────────── */

.sha2w-drawer {
    --sha2w-accent: #6c63ff;
    position: fixed;
    inset: 0;
    z-index: 999999;
    visibility: hidden;
    pointer-events: none;
}
.sha2w-drawer.active { visibility: visible; pointer-events: auto; }

.sha2w-drawer-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10,10,20,.5);
    backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity .3s ease;
}
.sha2w-drawer.active .sha2w-drawer-overlay { opacity: 1; }

.sha2w-drawer-panel {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 400px;
    max-width: 92vw;
    background: #fff;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 60px rgba(0,0,0,.22);
    transition: transform .35s cubic-bezier(.25,.8,.3,1);
}
.sha2w-drawer.side-right .sha2w-drawer-panel { right: 0; transform: translateX(102%); }
.sha2w-drawer.side-left  .sha2w-drawer-panel { left: 0;  transform: translateX(-102%); }
.sha2w-drawer.active .sha2w-drawer-panel { transform: translateX(0); }

/* Head */
.sha2w-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid #f0f0f5;
    flex-shrink: 0;
}
.sha2w-drawer-title {
    margin: 0;
    font-size: 17px;
    font-weight: 800;
    color: #1a1a2e;
    display: flex;
    align-items: center;
    gap: 9px;
}
.sha2w-drawer-count-badge {
    background: var(--sha2w-accent);
    color: #fff;
    font-size: 11.5px;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.sha2w-drawer-close {
    width: 34px; height: 34px;
    border: none;
    background: #f3f3f7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #888;
    transition: background .18s, color .18s, transform .15s;
}
.sha2w-drawer-close:hover { background: #e8e8f0; color: #333; transform: rotate(90deg); }

/* Body */
.sha2w-drawer-body {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    scrollbar-width: thin;
}
.sha2w-drawer-body::-webkit-scrollbar { width: 5px; }
.sha2w-drawer-body::-webkit-scrollbar-thumb { background: #ddd; border-radius: 10px; }
.sha2w-drawer-body.loading { opacity: .55; pointer-events: none; transition: opacity .15s; }

/* Free shipping bar */
.sha2w-fs-bar {
    padding: 14px 22px;
    background: #f8f8fd;
    border-bottom: 1px solid #f0f0f5;
    flex-shrink: 0;
}
.sha2w-fs-msg { font-size: 12.5px; color: #555; margin-bottom: 9px; }
.sha2w-fs-msg strong { color: var(--sha2w-accent); }
.sha2w-fs-bar.is-complete .sha2w-fs-msg { color: #009268; font-weight: 700; }
.sha2w-fs-check {
    display: inline-flex;
    width: 16px; height: 16px;
    background: #00b894;
    color: #fff;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    margin-inline-end: 3px;
}
.sha2w-fs-track {
    height: 6px;
    background: #e8e8f0;
    border-radius: 10px;
    overflow: hidden;
}
.sha2w-fs-fill {
    height: 100%;
    background: var(--sha2w-accent);
    border-radius: 10px;
    transition: width .5s cubic-bezier(.25,.8,.3,1);
}
.sha2w-fs-bar.is-complete .sha2w-fs-fill { background: #00b894; }

/* Items */
.sha2w-drawer-items {
    list-style: none;
    margin: 0;
    padding: 6px 14px;
    flex: 1;
}
.sha2w-drawer-item {
    display: flex;
    gap: 13px;
    padding: 14px 8px;
    border-bottom: 1px solid #f4f4f8;
    position: relative;
    align-items: flex-start;
}
.sha2w-drawer-item:last-child { border-bottom: none; }
.sha2w-drawer-item.removing { opacity: .35; }

.sha2w-di-thumb { flex-shrink: 0; width: 64px; }
.sha2w-di-thumb img {
    width: 64px !important;
    height: 64px !important;
    object-fit: cover;
    border-radius: 10px;
    display: block;
}

.sha2w-di-info { flex: 1; min-width: 0; }
.sha2w-di-name {
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 6px;
    padding-inline-end: 18px;
}
.sha2w-di-name a { color: #1a1a2e; text-decoration: none !important; transition: color .18s; }
.sha2w-di-name a:hover { color: var(--sha2w-accent); }

.sha2w-di-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 6px;
}
.sha2w-di-price { font-size: 13.5px; font-weight: 700; color: #1a1a2e; }
.sha2w-di-qty-single { font-size: 13px; color: #999; font-weight: 600; }

/* Qty stepper */
.sha2w-di-stepper {
    display: inline-flex;
    align-items: center;
    border: 1.5px solid #e8e8f0;
    border-radius: 999px;
    overflow: hidden;
}
.sha2w-qty-btn {
    width: 27px; height: 27px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 15px;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s, color .15s;
    line-height: 1;
}
.sha2w-qty-btn:hover { background: #f5f4ff; color: var(--sha2w-accent); }
.sha2w-qty-val {
    min-width: 26px;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: #1a1a2e;
}

/* Remove */
.sha2w-di-remove {
    position: absolute;
    top: 12px;
    inset-inline-end: 6px;
    width: 26px; height: 26px;
    border: none;
    background: none;
    border-radius: 50%;
    cursor: pointer;
    color: #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s, color .15s;
}
.sha2w-di-remove:hover { background: #fff2f2; color: #e74c3c; }

/* Variation data */
.sha2w-drawer-item dl.variation {
    margin: 0 0 4px;
    font-size: 11.5px;
    color: #999;
    display: flex;
    flex-wrap: wrap;
    gap: 2px 10px;
}
.sha2w-drawer-item dl.variation dt,
.sha2w-drawer-item dl.variation dd { margin: 0; display: inline; }

/* Empty state */
.sha2w-drawer-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 30px;
    color: #d5d5e0;
}
.sha2w-drawer-empty-title { font-size: 16px; font-weight: 800; color: #555; margin: 18px 0 4px; }
.sha2w-drawer-empty-sub   { font-size: 13px; color: #a0a0b0; margin: 0 0 22px; }
.sha2w-drawer-shop-btn {
    background: var(--sha2w-accent);
    color: #fff !important;
    padding: 12px 30px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none !important;
    transition: opacity .2s, transform .15s;
}
.sha2w-drawer-shop-btn:hover { opacity: .9; transform: translateY(-1px); }

/* Footer */
.sha2w-drawer-footer {
    border-top: 1px solid #f0f0f5;
    padding: 16px 22px 20px;
    flex-shrink: 0;
    background: #fff;
}

/* Coupon */
.sha2w-drawer-coupon { display: flex; gap: 8px; margin-bottom: 6px; }
.sha2w-coupon-input {
    flex: 1;
    padding: 10px 14px;
    background: #f7f7fb;
    border: 1.5px solid #e2e2ec;
    border-radius: 9px;
    font-size: 13px;
    outline: none;
    transition: border-color .2s;
    min-width: 0;
}
.sha2w-coupon-input:focus { border-color: var(--sha2w-accent); background: #fff; }
.sha2w-coupon-btn {
    padding: 10px 18px;
    background: #1a1a2e;
    color: #fff;
    border: none;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity .2s;
}
.sha2w-coupon-btn:hover { opacity: .85; }
.sha2w-coupon-msg { font-size: 12px; min-height: 0; transition: all .2s; }
.sha2w-coupon-msg:not(:empty) { padding: 6px 2px; }
.sha2w-coupon-msg.error   { color: #e74c3c; }
.sha2w-coupon-msg.success { color: #00b894; }
.sha2w-coupon-applied { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 2px; }
.sha2w-coupon-tag {
    background: #f0fff7;
    color: #009268;
    border: 1px dashed #7fd8b6;
    font-size: 11.5px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
    text-transform: uppercase;
}

/* Subtotal + actions */
.sha2w-drawer-subtotal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 15px;
    font-weight: 800;
    color: #1a1a2e;
    padding: 12px 0;
}
.sha2w-drawer-actions { display: flex; gap: 10px; }
.sha2w-drawer-btn {
    flex: 1;
    text-align: center;
    padding: 13px;
    border-radius: 11px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none !important;
    transition: opacity .2s, transform .15s, background .2s;
}
.sha2w-drawer-btn:hover { transform: translateY(-1px); }
.sha2w-drawer-btn-cart {
    background: #f0f0f5;
    color: #1a1a2e !important;
}
.sha2w-drawer-btn-cart:hover { background: #e6e6ee; }
.sha2w-drawer-btn-checkout {
    background: var(--sha2w-accent);
    color: #fff !important;
}
.sha2w-drawer-btn-checkout:hover { opacity: .9; }

/* Body scroll lock */
body.sha2w-drawer-open { overflow: hidden; }

/* Responsive */
@media (max-width: 480px) {
    .sha2w-drawer-panel { width: 100vw !important; max-width: 100vw; }
}

@media (prefers-reduced-motion: reduce) {
    .sha2w-drawer-panel, .sha2w-drawer-overlay, .sha2w-heart-svg,
    .sha2w-fs-fill, .sha2w-cart-count, .sha2w-wish-count { transition: none; animation: none; }
}
