/**
 * Artmatter High-Performance Wishlist Engine Stylesheet
 * 100% Aligned with Artmatter Luxury Museum Gallery Design System
 */

/* ==========================================================================
   Bookmark Toggle Button Component
   ========================================================================== */
.artmatter-wishlist-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(18, 18, 22, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #e4e4e7;
    border-radius: 9999px;
    padding: 8px 14px;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    font-size: 12.5px;
    font-weight: 500;
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.artmatter-wishlist-btn:hover {
    background: rgba(28, 28, 36, 0.95);
    border-color: rgba(169, 255, 93, 0.4);
    color: #ffffff;
    transform: translateY(-1px);
}

.artmatter-wishlist-btn:active {
    transform: scale(0.94);
}

/* Icon / Logo Only Mode */
.artmatter-wishlist-btn.icon-only {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
    gap: 0;
}

.artmatter-wishlist-btn.icon-only .artmatter-wishlist-label {
    display: none !important;
}

.artmatter-bookmark-icon {
    width: 16px;
    height: 16px;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), fill 0.2s ease, stroke 0.2s ease;
    flex-shrink: 0;
}

/* Active Wishlist State (Bookmarked) */
.artmatter-wishlist-btn.is-active {
    border-color: rgba(169, 255, 93, 0.5);
    background: rgba(169, 255, 93, 0.12);
    color: #a9ff5d;
    box-shadow: 0 4px 16px rgba(169, 255, 93, 0.18);
}

.artmatter-wishlist-btn.is-active .artmatter-bookmark-icon {
    fill: #a9ff5d;
    stroke: #a9ff5d;
    animation: artmatter-bookmark-pop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes artmatter-bookmark-pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.35); }
    100% { transform: scale(1); }
}

/* Live Wishlist Count Badge */
.artmatter-wishlist-count {
    display: inline-block;
    font-variant-numeric: tabular-nums;
    transition: transform 0.2s ease;
}

.artmatter-wishlist-count.bump {
    animation: artmatter-count-bump 0.3s ease;
}

@keyframes artmatter-count-bump {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.25); color: #a9ff5d; }
}

/* ==========================================================================
   Wishlist Gallery Archive Page Layout
   ========================================================================== */
.artmatter-wishlist-wrapper {
    max-width: 1320px;
    margin: 0 auto;
    padding: 30px 20px 80px 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #ffffff;
    box-sizing: border-box;
}

.artmatter-wishlist-wrapper * {
    box-sizing: border-box;
}

/* Header */
.artmatter-wishlist-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.artmatter-wishlist-title {
    margin: 0 0 6px;
    font-size: clamp(26px, 4vw, 34px);
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.02em;
}

.artmatter-wishlist-subtitle {
    margin: 0;
    font-size: 14px;
    color: #a1a1aa;
    line-height: 1.5;
}

.artmatter-wishlist-badge {
    background: rgba(169, 255, 93, 0.10);
    border: 1px solid rgba(169, 255, 93, 0.25);
    color: #a9ff5d;
    padding: 5px 12px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

/* Controls Bar (Matching Museum Shop Gallery) */
.artmatter-wishlist-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 30px;
}

/* Orientation Switcher Pill (Matching class-product-archive.php) */
.artmatter-results-orient-bar {
    display: inline-flex;
    align-items: center;
    background: #0e0e11;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 9999px;
    padding: 3px;
    gap: 2px;
}

.artmatter-orient-btn {
    height: 32px;
    padding: 0 14px;
    border-radius: 9999px;
    background: transparent;
    border: 1px solid transparent;
    color: #a1a1aa;
    font-size: 11.5px;
    font-weight: 400;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    font-family: inherit;
}

.artmatter-orient-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

.artmatter-orient-btn.active {
    background: #1e1e24;
    border-color: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    font-weight: 500;
}

.artmatter-orient-icon {
    stroke: currentColor;
    flex-shrink: 0;
}

.artmatter-orient-count {
    font-size: 9.5px;
    background: rgba(255, 255, 255, 0.08);
    padding: 1px 6px;
    border-radius: 9999px;
    color: #a1a1aa;
    font-weight: 500;
}

.artmatter-orient-btn.active .artmatter-orient-count {
    background: rgba(169, 255, 93, 0.18);
    color: #a9ff5d;
}

/* Actions Group */
.artmatter-dir-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Custom Sort Dropdown (Matching class-product-archive.php) */
.artmatter-dir-sort-wrap {
    position: relative;
}

.artmatter-dir-sort-btn {
    height: 36px;
    padding: 0 14px;
    border-radius: 9999px;
    background: #111114;
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 12px;
    font-weight: 400;
    color: #ececec;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: inherit;
    transition: all 0.2s ease;
    user-select: none;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.artmatter-dir-sort-btn:hover {
    background: #18181c;
    border-color: rgba(169, 255, 93, 0.35);
    color: #a9ff5d;
}

.artmatter-sort-icon {
    stroke: #a1a1aa;
    flex-shrink: 0;
    transition: transform 0.3s ease, stroke 0.2s ease;
}

.artmatter-dir-sort-btn:hover .artmatter-sort-icon {
    stroke: #a9ff5d;
}

.artmatter-dir-sort-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #141417;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    padding: 6px;
    z-index: 500;
    min-width: 175px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.85);
    flex-direction: column;
    gap: 2px;
}

.artmatter-dir-sort-wrap.open .artmatter-dir-sort-menu {
    display: flex;
}

.artmatter-sort-option {
    background: transparent;
    border: none;
    color: #a1a1aa;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 400;
    text-align: left;
    cursor: pointer;
    transition: all 0.15s ease;
    width: 100%;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.artmatter-sort-option:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
}

.artmatter-sort-option.active {
    background: rgba(169, 255, 93, 0.10);
    color: #a9ff5d;
    font-weight: 500;
}

/* Clear List Button */
.artmatter-wishlist-clear-btn {
    height: 36px;
    padding: 0 14px;
    border-radius: 9999px;
    background: #111114;
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 12px;
    font-weight: 400;
    color: #71717a;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
}

.artmatter-wishlist-clear-btn:hover {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.35);
    color: #ef4444;
}

/* ==========================================================================
   Product Card Grid
   ========================================================================== */
.artmatter-wishlist-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    position: relative;
    min-height: 280px;
}

.artmatter-wishlist-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.artmatter-wishlist-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.artmatter-wishlist-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
    .artmatter-wishlist-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px;
    }
}

@media (max-width: 640px) {
    .artmatter-wishlist-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px;
    }
    .artmatter-wishlist-wrapper {
        padding: 20px 12px 60px 12px;
    }
    .artmatter-wishlist-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Product Card with Museum Mat Backing */
.artmatter-wishlist-card {
    position: relative;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.artmatter-wishlist-card .artmatter-museum-mat-card {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    background: radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.38) 0%, rgba(255, 255, 255, 0.12) 40%, rgba(0, 0, 0, 0.06) 75%, rgba(0, 0, 0, 0.15) 100%), #c6c5c2;
    border-radius: 2px;
    padding: 48px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.32);
    transition: background 0.4s ease, box-shadow 0.4s ease;
    overflow: visible;
    text-decoration: none;
}

.artmatter-wishlist-card:hover .artmatter-museum-mat-card {
    background: radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.46) 0%, rgba(255, 255, 255, 0.16) 42%, rgba(0, 0, 0, 0.05) 75%, rgba(0, 0, 0, 0.13) 100%), #c6c5c2;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.48);
}

.artmatter-wishlist-card .artmatter-museum-art-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    background: transparent;
    line-height: 0;
    border: none;
    border-radius: 0 !important;
    overflow: hidden;
    box-shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.18), 
                0 2.5px 1.5px 0 rgba(0, 0, 0, 0.38), 
                0 3.5px 4px 0 rgba(0, 0, 0, 0.45);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.artmatter-wishlist-card:hover .artmatter-museum-art-wrap {
    transform: scale(1.015) translateZ(0);
    box-shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.25), 
                -2px 14px 16px -2px rgba(0, 0, 0, 0.22), 
                2px 14px 16px -2px rgba(0, 0, 0, 0.22), 
                0px 6px 8px -2px rgba(0, 0, 0, 0.48), 
                0px 14px 20px -3px rgba(0, 0, 0, 0.55);
}

.artmatter-wishlist-card .artmatter-museum-art-wrap img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    border-radius: 0 !important;
}

/* Remove button on top-right of museum mat */
.artmatter-wishlist-remove-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #111114;
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #a9ff5d;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    outline: none;
}

.artmatter-wishlist-remove-btn:hover {
    background: #1c1c24;
    border-color: rgba(239, 68, 68, 0.5);
    color: #ef4444;
    transform: scale(1.1);
}

.artmatter-wishlist-card-body {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding-top: 14px;
}

.artmatter-wishlist-card-title {
    margin: 0 0 4px;
    font-size: 14.5px;
    font-weight: 600;
    line-height: 1.35;
}

.artmatter-wishlist-card-title a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.2s ease;
}

.artmatter-wishlist-card-title a:hover {
    color: #a9ff5d;
}

.artmatter-wishlist-card-artist {
    margin: 0 0 10px;
    font-size: 12px;
    color: #a1a1aa;
    font-weight: 400;
}

.artmatter-wishlist-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    gap: 8px;
}

.artmatter-wishlist-card-price {
    font-size: 13.5px;
    font-weight: 600;
    color: #ffffff;
}

.artmatter-wishlist-card-price del {
    color: #71717a;
    font-size: 11.5px;
    margin-right: 4px;
}

.artmatter-wishlist-card-price ins {
    text-decoration: none;
    color: #a9ff5d;
}

.artmatter-wishlist-card-btn-cart {
    background: #ffffff;
    color: #111111;
    border: none;
    border-radius: 9999px;
    padding: 7px 14px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.artmatter-wishlist-card-btn-cart:hover {
    background: #a9ff5d;
    transform: translateY(-1px);
}

.artmatter-wishlist-remove-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(14, 14, 18, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #a9ff5d;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(8px);
}

.artmatter-wishlist-remove-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    color: #ef4444;
    transform: scale(1.1);
}

/* Loading Spinner */
.artmatter-wishlist-loader {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 240px;
    gap: 14px;
    color: #a1a1aa;
    font-size: 13.5px;
}

.artmatter-wishlist-spinner {
    width: 34px;
    height: 34px;
    border: 2.5px solid rgba(255, 255, 255, 0.12);
    border-top-color: #a9ff5d;
    border-radius: 50%;
    animation: artmatter-spin 0.8s linear infinite;
}

@keyframes artmatter-spin {
    to { transform: rotate(360deg); }
}

/* Empty State */
.artmatter-wishlist-empty {
    text-align: center;
    padding: 60px 20px;
    max-width: 440px;
    margin: 0 auto;
}

.artmatter-wishlist-empty-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(169, 255, 93, 0.08);
    border: 1px solid rgba(169, 255, 93, 0.25);
    color: #a9ff5d;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 8px 24px rgba(169, 255, 93, 0.12);
}

.artmatter-wishlist-empty-title {
    margin: 0 0 10px;
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
}

.artmatter-wishlist-empty-desc {
    margin: 0 0 24px;
    font-size: 14px;
    color: #a1a1aa;
    line-height: 1.5;
}

.artmatter-wishlist-empty-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    color: #111111;
    padding: 12px 26px;
    border-radius: 9999px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.artmatter-wishlist-empty-btn:hover {
    background: #a9ff5d;
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(169, 255, 93, 0.3);
}

/* Toast Notifications */
.artmatter-wishlist-toast {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 9999999;
    background: rgba(14, 14, 18, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 9999px;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transform: translateY(30px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.artmatter-wishlist-toast.is-visible {
    transform: translateY(0);
    opacity: 1;
}

.artmatter-wishlist-toast svg {
    color: #a9ff5d;
    flex-shrink: 0;
}
