/* ============================================================
 * Amman Store — Smart Wishlist Stylesheet
 * ============================================================ */

/* ── Toast Notification ── */
.as-toast-container {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}
.as-toast {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    color: #1e293b;
    padding: 14px 20px;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0,0,0,.12);
    font-size: 14px;
    font-weight: 600;
    opacity: 0;
    transform: translateY(20px);
    animation: asToastIn .35s ease forwards;
    max-width: 360px;
    direction: rtl;
}
.as-toast.as-toast-out {
    animation: asToastOut .3s ease forwards;
}
.as-toast-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}
.as-toast-icon.success { color: #00b08a; }
.as-toast-icon.remove  { color: #ef4444; }

@keyframes asToastIn {
    to { opacity: 1; transform: translateY(0); }
}
@keyframes asToastOut {
    to { opacity: 0; transform: translateY(20px); }
}

/* ── Heart Button (Global) ── */
.as-wishlist-btn {
    position: relative;
    cursor: pointer;
    background: none;
    border: none;
    padding: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform .2s ease;
}
.as-wishlist-btn:hover {
    transform: scale(1.15);
}
.as-wishlist-btn svg {
    width: 22px;
    height: 22px;
    stroke: #6b7280;
    fill: none;
    stroke-width: 1.8;
    transition: fill .3s ease, stroke .3s ease;
}
.as-wishlist-btn:hover svg {
    fill: rgba(107,114,128,.12);
}
.as-wishlist-btn.active svg {
    fill: #00b08a;
    stroke: #00b08a;
}
/* Pop animation on toggle */
.as-wishlist-btn.as-pop {
    animation: asHeartPop .4s ease;
}
@keyframes asHeartPop {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.3); }
    70%  { transform: scale(.9); }
    100% { transform: scale(1); }
}
/* Loading spinner state */
.as-wishlist-btn.loading {
    pointer-events: none;
}
.as-wishlist-btn.loading svg {
    animation: asHeartLoadingPulse 0.6s infinite alternate;
    stroke: #00b08a; /* pulse green */
    opacity: 0.7;
}
@keyframes asHeartLoadingPulse {
    0%   { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(1.15); opacity: 1; }
}

/* ── Header Wishlist Badge ── */
.as-header-wishlist-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background-color: #00b08a;
    color: white;
    font-size: 11px;
    font-weight: bold;
    min-width: 18px;
    height: 18px;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 4px;
    line-height: 1;
    border: 2px solid #1e2530;
    pointer-events: none;
}
.as-header-wishlist-badge:empty,
.as-header-wishlist-badge[data-count="0"] {
    display: none;
}

/* ── Guest Wishlist Landing Page ── */
.as-guest-wishlist {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    min-height: 50vh;
}
.as-guest-heart-wrap {
    position: relative;
    width: 120px;
    height: 120px;
    margin-bottom: 28px;
}
.as-guest-heart-svg {
    width: 80px;
    height: 80px;
    fill: #00b08a;
    animation: asGuestPulse 2s ease-in-out infinite;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
}
@keyframes asGuestPulse {
    0%, 100% { transform: translate(-50%,-50%) scale(1); }
    50%      { transform: translate(-50%,-50%) scale(1.08); }
}
/* Floating sparkles around heart */
.as-sparkle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #fbbf24;
    border-radius: 50%;
    opacity: 0;
    animation: asSparkle 3s ease-in-out infinite;
}
.as-sparkle:nth-child(2) { top: 10%; left: 15%; animation-delay: .4s; background: #00b08a; }
.as-sparkle:nth-child(3) { top: 5%;  right: 20%; animation-delay: .8s; background: #f472b6; }
.as-sparkle:nth-child(4) { bottom: 15%; left: 10%; animation-delay: 1.2s; background: #60a5fa; }
.as-sparkle:nth-child(5) { bottom: 10%; right: 12%; animation-delay: 1.6s; }
@keyframes asSparkle {
    0%, 100% { opacity: 0; transform: scale(0); }
    50%      { opacity: 1; transform: scale(1); }
}
.as-guest-wishlist h1 {
    font-size: 24px;
    font-weight: 800;
    color: #1e2530;
    margin: 0 0 12px;
}
.as-guest-wishlist p {
    font-size: 15px;
    color: #64748b;
    max-width: 480px;
    line-height: 1.7;
    margin: 0 0 28px;
}
.as-guest-buttons {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
}
.as-guest-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #00b08a;
    color: #fff;
    padding: 13px 28px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    border: none;
    cursor: pointer;
    transition: background .2s, transform .2s;
}
.as-guest-btn-primary:hover {
    background: #009b79;
    transform: translateY(-1px);
}
.as-guest-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: #475569;
    padding: 13px 28px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    border: 2px solid #e2e8f0;
    cursor: pointer;
    transition: border-color .2s, color .2s, transform .2s;
}
.as-guest-btn-secondary:hover {
    border-color: #94a3b8;
    color: #1e293b;
    transform: translateY(-1px);
}

/* ── Wishlist Dashboard Grid (Horizontal Cards) ── */
.as-wl-grid {
    display: grid;
    grid-template-columns: 1fr; /* Full width! */
    gap: 20px;
}

/* ── Wishlist Card ── */
.as-wl-card {
    display: flex;
    align-items: stretch;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e1e8f0;
    overflow: hidden;
    position: relative;
    transition: box-shadow .25s ease, transform .25s ease, opacity .3s ease;
}
.as-wl-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,.04);
}
/* Removing & Shrink animation on delete */
.as-wl-card.as-wl-removing {
    opacity: 0.65;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}
.as-wl-card.as-wl-shrink {
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
    opacity: 0 !important;
    transform: translateY(-8px) scale(0.97) !important;
    max-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border-width: 0 !important;
    overflow: hidden !important;
}

/* ── Inline Button Spinner ── */
.as-btn-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(239, 68, 68, 0.25);
    border-top-color: #ef4444;
    border-radius: 50%;
    animation: asBtnSpin 0.6s linear infinite;
    vertical-align: middle;
}
@keyframes asBtnSpin {
    to { transform: rotate(360deg); }
}

/* Horizontal Style Image */
.as-wl-card-img {
    position: relative;
    overflow: hidden;
    width: 160px;
    flex-shrink: 0;
    background: #f8fafc;
    border-left: 1px solid #e1e8f0;
}
.as-wl-card-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform .4s ease;
    padding: 15px;
}
.as-wl-card:hover .as-wl-card-img img {
    transform: scale(1.05);
}

/* Card Body Split Layout */
.as-wl-card-body {
    flex: 1;
    padding: 24px;
    display: flex;
    flex-direction: row; /* Horizontal split: Info on right, Actions left */
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.as-wl-card-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 8px;
}
.as-wl-card-name {
    font-size: 17px;
    font-weight: 700;
    color: #1e2530;
    text-decoration: none;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.as-wl-card-name:hover { color: #00b08a; }
.as-wl-card-stock {
    font-size: 14px;
    font-weight: 600;
}
.as-wl-card-stock.in-stock  { color: #00b08a; }
.as-wl-card-stock.out-stock { color: #ef4444; }
.as-wl-card-price {
    font-size: 19px;
    font-weight: 800;
    color: #0f172a;
    margin-top: 8px;
}
.as-wl-card-price del {
    color: #94a3b8;
    font-weight: 500;
    font-size: 15px;
    margin-right: 8px;
}
.as-wl-card-price ins {
    text-decoration: none;
    color: #00b08a;
}

/* Actions Section */
.as-wl-card-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 170px; /* Force buttons to align nicely */
    flex-shrink: 0;
}
.as-wl-atc-btn {
    width: 100%;
    padding: 12px 20px;
    background: #00b08a;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background .2s, transform .2s;
}
.as-wl-atc-btn:hover {
    background: #009b79;
}
.as-wl-atc-btn:disabled {
    opacity: .6;
    cursor: not-allowed;
}

.as-wl-remove-btn {
    width: 100%;
    padding: 12px 20px;
    background: transparent;
    color: #ef4444;
    border: 1.5px solid #fee2e2;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background .2s, border-color .2s;
}
.as-wl-remove-btn:hover {
    background: #fef2f2;
    border-color: #fca5a5;
}
.as-wl-remove-btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    stroke-width: 2.5;
    fill: none;
}

/* Responsive */
@media (max-width: 768px) {
    .as-wl-card { flex-direction: column; }
    .as-wl-card-img { width: 100%; height: min(250px, 60vw); border-left: none; border-bottom: 1px solid #e1e8f0; }
    .as-wl-card-body { flex-direction: column; align-items: stretch; gap: 20px; padding: 20px; }
    .as-wl-card-actions { flex-direction: row; min-width: auto; }
    .as-wl-atc-btn { flex: 2; }
    .as-wl-remove-btn { flex: 1; }
}
@media (max-width: 480px) {
    .as-wl-card-actions { flex-direction: column; }
}

/* ── Skeleton Cards (Horizontal) ── */
.as-wl-skeleton-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}
.as-wl-skeleton-card {
    display: flex;
    align-items: stretch;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e1e8f0;
    overflow: hidden;
}
.as-wl-skel-img {
    width: 160px;
    min-height: 160px;
    flex-shrink: 0;
    background: #f1f5f9;
    background-image: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: asShimmer 1.5s infinite;
}
.as-wl-skel-body {
    flex: 1;
    padding: 24px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}
.as-wl-skel-info-wrap {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}
.as-wl-skel-line {
    height: 14px;
    border-radius: 6px;
    background: #f1f5f9;
    background-image: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: asShimmer 1.5s infinite;
}
.as-wl-skel-actions-wrap {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 170px;
}
.as-wl-skel-btn {
    height: 48px;
    width: 100%;
    border-radius: 10px;
    background: #f1f5f9;
    background-image: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: asShimmer 1.5s infinite;
}
@media (max-width: 768px) {
    .as-wl-skeleton-card { flex-direction: column; }
    .as-wl-skel-img { width: 100%; height: 250px; }
    .as-wl-skel-body { flex-direction: column; align-items: stretch; gap: 20px; padding: 20px; }
    .as-wl-skel-actions-wrap { flex-direction: row; }
}
@media (max-width: 480px) {
    .as-wl-skel-actions-wrap { flex-direction: column; }
}
@keyframes asShimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ── Pagination ── */
.as-wl-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 28px;
    flex-wrap: wrap;
}
.as-wl-page-btn {
    min-width: 38px;
    height: 38px;
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
}
.as-wl-page-btn:hover {
    border-color: #00b08a;
    color: #00b08a;
}
.as-wl-page-btn.active {
    background: #00b08a;
    color: #fff;
    border-color: #00b08a;
}
.as-wl-page-btn:disabled {
    opacity: .4;
    cursor: not-allowed;
}

/* ── Empty State ── */
.as-wl-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 50px 20px;
}
.as-wl-empty-icon {
    width: 80px;
    height: 80px;
    background: #f0fdf9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
}
.as-wl-empty-icon svg {
    width: 36px;
    height: 36px;
    stroke: #00b08a;
    fill: none;
    stroke-width: 1.5;
}
.as-wl-empty h3 {
    font-size: 20px;
    font-weight: 800;
    color: #1e2530;
    margin: 0 0 10px;
}
.as-wl-empty p {
    color: #64748b;
    font-size: 14px;
    margin: 0 0 22px;
}
.as-wl-empty-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #00b08a;
    color: #fff;
    padding: 12px 28px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    transition: background .2s;
}
.as-wl-empty-btn:hover {
    background: #009b79;
}
