/* Favorite Button on Cards */
.sth-favorite-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 8px 15px;
    margin-top: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: auto;
    height: auto;
}

.sth-favorite-btn svg {
    fill: none;
    stroke: #ff4b2b;
    stroke-width: 1.5;
    width: 24px;
    height: 24px;
    transition: all 0.3s ease;
    margin: 0;
}

.sth-favorite-btn.active svg {
    fill: #ff4b2b;
    stroke: #ff4b2b;
    transform: scale(1.1);
}

.sth-favorite-btn.active {
    background: #fff;
    border-color: #ff4b2b;
    box-shadow: 0 2px 8px rgba(255, 75, 43, 0.1);
}

.sth-favorite-btn:hover {
    background: #fdfdfd;
    border-color: #ff4b2b;
    transform: translateY(-2px);
}

/* Modal Styles */
.sth-login-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.sth-modal-content {
    background-color: #fff;
    margin: 15% auto;
    padding: 30px;
    border: none;
    width: 90%;
    max-width: 400px;
    border-radius: 12px;
    position: relative;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.sth-close-modal {
    color: #999;
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.sth-close-modal:hover {
    color: #333;
}

.sth-login-link {
    display: inline-block;
    padding: 12px 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff !important;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    margin-top: 20px;
    transition: opacity 0.3s ease;
}

.sth-login-link:hover {
    opacity: 0.9;
}

.sth-favorite-btn.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Favorites Section in Dashboard */
.sth-favorites-list {
    margin-top: 40px;
    padding-top: 20px;
}

.sth-dash-sep {
    margin: 40px 0;
    border: 0;
    border-top: 1px solid #eee;
}

.sth-favorites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.sth-fav-item {
    display: flex;
    align-items: center;
    background: #fff;
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: relative;
    border: 1px solid #f0f0f0;
}

.sth-fav-thumb {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    margin-right: 15px;
    flex-shrink: 0;
}

.sth-fav-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sth-no-thumb {
    width: 100%;
    height: 100%;
    background: #f5f5f5;
}

.sth-fav-info h4 {
    margin: 0 0 5px;
    font-size: 16px;
    color: #333;
}

.sth-fav-info a {
    font-size: 13px;
    color: #667eea;
    text-decoration: none;
}

.sth-remove-fav {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #eee;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #999;
}

.sth-remove-fav:hover {
    background: #ff4b2b;
    color: #fff;
}

.sth-no-favorites {
    color: #999;
    font-style: italic;
    background: #fdfdfd;
    padding: 20px;
    border-radius: 8px;
    border: 1px dashed #ddd;
    text-align: center;
}

/* ============================================
   Floating Favourite Icon (Mobile Only)
   ============================================ */

#sth-floating-fav {
        display: none;
    position: fixed;
    right: 1px;
    top: 300px;
    z-index: 9998;
    flex-direction: column;
    align-items: flex-end;
}

/* Show only on mobile screens */
@media (max-width: 768px) {
    #sth-floating-fav {
        display: flex;
    }
}

/* The FAB button */
.sth-floating-fav-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4),
        0 2px 6px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s cubic-bezier(.4, 0, .2, 1),
        box-shadow 0.25s ease;
    animation: sth-fab-pulse 2.5s ease-in-out infinite;
    -webkit-tap-highlight-color: transparent;
}

.sth-floating-fav-btn:active {
    transform: scale(0.92);
}

.sth-floating-fav-btn svg {
    fill: none;
    stroke: #fff;
    stroke-width: 1.8;
    width: 26px;
    height: 26px;
    transition: fill 0.3s ease, stroke 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

/* Active / Favourited state */
.sth-floating-fav-btn.active {
    background: linear-gradient(135deg, #ff4b2b 0%, #ff416c 100%);
    box-shadow: 0 4px 15px rgba(255, 75, 43, 0.45),
        0 2px 6px rgba(0, 0, 0, 0.15);
    animation: none;
}

.sth-floating-fav-btn.active svg {
    fill: #fff;
    stroke: #fff;
    transform: scale(1.15);
}

/* Loading state */
.sth-floating-fav-btn.loading {
    opacity: 0.65;
    pointer-events: none;
    animation: none;
}

/* Pulse animation */
@keyframes sth-fab-pulse {

    0%,
    100% {
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4), 0 2px 6px rgba(0, 0, 0, 0.15);
    }

    50% {
        box-shadow: 0 4px 22px rgba(102, 126, 234, 0.6), 0 2px 10px rgba(0, 0, 0, 0.2);
    }
}

/* Pop animation on toggle */
@keyframes sth-fab-pop {
    0% {
        transform: scale(1);
    }

    40% {
        transform: scale(1.25);
    }

    100% {
        transform: scale(1);
    }
}

.sth-floating-fav-btn.just-toggled {
    animation: sth-fab-pop 0.45s cubic-bezier(.4, 0, .2, 1);
}

/* ============================================
   Toast Notification
   ============================================ */

.sth-floating-toast {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    background: rgba(30, 30, 30, 0.92);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    padding: 10px 16px;
    border-radius: 10px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transform: translateX(120%);
    transition: transform 0.35s cubic-bezier(.4, 0, .2, 1),
        opacity 0.35s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.sth-floating-toast.show {
    opacity: 1;
    transform: translateX(0);
}

/* ============================================
   Card-Level Favourite Toast Popup
   ============================================ */

.sth-fav-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(30, 30, 30, 0.92);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    padding: 14px 28px;
    border-radius: 12px;
    z-index: 99999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease, transform 0.35s cubic-bezier(.4, 0, .2, 1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
}

.sth-fav-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}