.fg-as-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(12, 8, 18, 0.82);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.fg-as-overlay.is-open,
.fg-as-overlay:not([hidden]) {
    display: flex;
}

.fg-as-overlay[hidden] {
    display: none !important;
}

body.fg-as-lock {
    overflow: hidden;
}

.fg-as-dialog {
    width: min(920px, 100%);
    max-height: min(86vh, 820px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #24122c 0%, #1a0f22 100%);
    border: 1px solid rgba(255, 105, 180, 0.45);
    border-radius: 18px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
    color: #fff;
    position: relative;
}

.fg-as-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
    width: 34px;
    height: 34px;
    padding: 0;
    margin: 0;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    font-size: 14px;
    overflow: hidden;
    appearance: none;
    -webkit-appearance: none;
}

.fg-as-close i,
.fg-as-close svg {
    display: block;
    font-size: 14px;
    line-height: 1;
    width: 14px;
    height: 14px;
    text-align: center;
}

.fg-as-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 52px 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(135deg, rgba(255, 20, 147, 0.22), rgba(128, 0, 128, 0.18));
    flex-shrink: 0;
}

.fg-as-photo {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    object-fit: cover;
    border: 2px solid rgba(255, 105, 180, 0.7);
    background: #2a1633;
}

.fg-as-kicker {
    margin: 0 0 4px;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #f9a8d4;
    font-weight: 700;
}

.fg-as-name {
    margin: 0;
    font-size: 22px;
    line-height: 1.2;
    color: #fff;
}

.fg-as-body {
    padding: 18px 20px 8px;
    min-height: 180px;
    overflow: auto;
    flex: 1 1 auto;
}

.fg-as-loading,
.fg-as-error {
    margin: 28px 0;
    text-align: center;
    color: #f9a8d4;
    font-weight: 600;
}

.fg-as-empty {
    text-align: center;
    padding: 36px 16px 28px;
    color: #f3d4ea;
}

.fg-as-empty-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: rgba(255, 20, 147, 0.16);
    color: #ff69b4;
}

.fg-as-empty-icon svg {
    display: block;
    width: 28px;
    height: 28px;
}

.fg-as-empty i {
    font-size: 42px;
    color: #ff69b4;
    opacity: 0.85;
    margin-bottom: 12px;
    display: block;
}

.fg-as-empty-title {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}

.fg-as-empty-hint {
    margin: 0;
    font-size: 14px;
    color: #d7b8cc;
}

.fg-as-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
}

.fg-as-card {
    display: flex;
    flex-direction: column;
    text-decoration: none !important;
    color: #fff !important;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 105, 180, 0.22);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.fg-as-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 105, 180, 0.55);
    box-shadow: 0 10px 22px rgba(255, 20, 147, 0.18);
}

.fg-as-cover {
    position: relative;
    display: block;
    aspect-ratio: 4 / 5;
    background: #2a1633;
    overflow: hidden;
}

.fg-as-cover img,
.fg-as-cover-fallback {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.fg-as-cover-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff69b4;
    font-size: 28px;
}

.fg-as-type {
    position: absolute;
    left: 8px;
    top: 8px;
    background: rgba(255, 20, 147, 0.92);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 3px 7px;
    border-radius: 999px;
}

.fg-as-card-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 10px 12px;
}

.fg-as-card-name {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
}

.fg-as-card-price {
    font-size: 12px;
    color: #f9a8d4;
    font-weight: 700;
}

.fg-as-footer {
    padding: 8px 20px 18px;
    text-align: center;
    flex-shrink: 0;
}

.fg-as-browse {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 16px;
    border-radius: 999px;
    background: linear-gradient(135deg, #ff1493, #b10c9c);
    color: #fff !important;
    text-decoration: none !important;
    font-weight: 700;
    font-size: 13px;
}

.fg-as-browse:hover {
    color: #fff !important;
    filter: brightness(1.08);
}

.fg-as-cover img.fg-blurred {
    filter: blur(8px);
    transform: scale(1.12);
    transform-origin: center;
    pointer-events: none;
    user-select: none;
}

.fg-as-cover.is-locked::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(18, 8, 24, 0.22);
    pointer-events: none;
}

.fg-as-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0 10px 10px;
}

.fg-as-card .fg-action-buttons {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.fg-as-card .fg-add-to-cart-btn,
.fg-as-card .fg-buy-now-btn,
.fg-as-card .fg-add-story-to-cart-btn,
.fg-as-card .fg-buy-story-now-btn,
.fg-as-card .fg-view-btn {
    width: 100%;
    min-height: 32px;
    padding: 7px 8px;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    font-size: 11px;
    line-height: 1.2;
    color: #fff;
}

.fg-as-card .fg-add-to-cart-btn,
.fg-as-card .fg-add-story-to-cart-btn {
    background: linear-gradient(135deg, #6a0dad, #8b1aad);
}

.fg-as-card .fg-buy-now-btn,
.fg-as-card .fg-buy-story-now-btn {
    background: linear-gradient(135deg, #ff1493, #b10c9c);
}

.fg-as-card .fg-view-btn {
    background: linear-gradient(135deg, #16a34a, #15803d);
}

.fg-as-card .fg-add-to-cart-btn:disabled,
.fg-as-card .fg-add-story-to-cart-btn:disabled {
    opacity: 0.7;
    cursor: default;
}

.fg-as-card .fg-advisor-locked {
    text-align: center;
    padding: 6px 4px;
    color: #d7b8cc;
    font-size: 11px;
}

.fg-as-skel-card {
    pointer-events: none;
}

.fg-as-skel-card .fg-as-cover,
.fg-as-skel-line {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.06), rgba(255, 105, 180, 0.16), rgba(255, 255, 255, 0.06));
    background-size: 180% 100%;
    animation: fg-as-shimmer 1.1s ease-in-out infinite;
}

.fg-as-skel-line {
    display: block;
    height: 10px;
    border-radius: 6px;
    margin: 2px 0 6px;
}

.fg-as-skel-short {
    width: 42%;
}

@keyframes fg-as-shimmer {
    0% { background-position: 100% 0; }
    100% { background-position: -80% 0; }
}

body.fg-as-lock .swal2-container {
    z-index: 1000300 !important;
}

@media (max-width: 640px) {
    .fg-as-overlay {
        padding: 8px;
        align-items: flex-end;
    }

    .fg-as-dialog {
        max-height: 92vh;
        border-radius: 16px 16px 10px 10px;
    }

    .fg-as-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
