/* ============================================
   CRO & UX 2026 Enhancements
   shadowstyleshop.rs
   ============================================ */

/* ── Scroll Progress Bar ── */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--gradient-red);
    z-index: 9999;
    transition: width 0.1s linear;
    box-shadow: 0 0 8px rgba(194, 29, 39, 0.5);
}

/* ── Trust Badges Bar ── */
.trust-bar {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
    padding: 16px 0;
    overflow: hidden;
}

.trust-bar__inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    max-width: var(--container-lg);
    margin: 0 auto;
    padding: 0 20px;
    flex-wrap: wrap;
}

.trust-bar__item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-body);
    font-size: var(--fs-sm);
    font-family: var(--font-body);
    white-space: nowrap;
}

.trust-bar__icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--red-primary-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--red-primary);
    font-size: 16px;
    flex-shrink: 0;
}

.trust-bar__label strong {
    display: block;
    color: var(--text-primary);
    font-weight: 600;
    font-size: var(--fs-sm);
    line-height: 1.3;
}

.trust-bar__label span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ── Floating Action Buttons ── */
.fab-container {
    position: fixed;
    bottom: 24px;
    bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    right: 24px;
    right: calc(24px + env(safe-area-inset-right, 0px));
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 500;
}

.fab {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
    transition: transform var(--transition-base), box-shadow var(--transition-base), opacity var(--transition-base);
    text-decoration: none;
    color: #fff;
}

.fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(0,0,0,0.5);
}

.fab:active {
    transform: scale(0.95);
}

.fab--instagram {
    background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.fab--top {
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    font-size: 20px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
}

.fab--top.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

/* Fab tooltip */
.fab[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    right: 68px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg-elevated);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: var(--fs-xs);
    font-family: var(--font-body);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-fast);
    border: 1px solid var(--border-subtle);
}

.fab[data-tooltip]:hover::before {
    opacity: 1;
}










/* Mobile: adjust fab position above sticky CTA */
@media (max-width: 768px) {
    .fab-container {
        bottom: calc(16px + env(safe-area-inset-bottom, 0px));
        right: 16px;
    }
    .fab {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }
    .fab--top { font-size: 18px; }
    .fab[data-tooltip]::before { display: none; }
    /* When sticky CTA is visible, push fabs up */
    body:has(.sticky-mobile-cta.visible) .fab-container {
        bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    }
}

/* ── Sticky Mobile CTA ── */
.sticky-mobile-cta {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-light);
    padding: 12px 16px;
    z-index: 499;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.5);
}

.sticky-mobile-cta.visible {
    transform: translateY(0);
}

.sticky-mobile-cta__inner {
    display: flex;
    gap: 10px;
    max-width: 600px;
    margin: 0 auto;
}

.sticky-mobile-cta .btn {
    flex: 1;
    text-align: center;
    padding: 12px 16px;
    font-size: var(--fs-sm);
    font-weight: 600;
    border-radius: var(--radius-sm);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.sticky-mobile-cta .btn--primary {
    background: var(--red-primary);
    color: #fff;
    border: none;
}

.sticky-mobile-cta .btn--outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}

/* ── Button Ripple Effect ── */
.btn,
.product-card__cart-btn {
    position: relative;
    overflow: hidden;
}

.btn .ripple,
.product-card__cart-btn .ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transform: scale(0);
    animation: rippleAnim 0.6s ease-out;
    pointer-events: none;
}

@keyframes rippleAnim {
    to { transform: scale(4); opacity: 0; }
}

/* ── Add to Cart Success Animation ── */
.cart-success-anim {
    position: fixed;
    z-index: 10000;
    pointer-events: none;
    animation: cartFly 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cartFly {
    0% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(0.3) translateY(-200px); }
}

/* ── Product Card Hover Enhancements ── */
.product-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    box-shadow: 0 8px 40px rgba(194, 29, 39, 0.15), 0 4px 20px rgba(0,0,0,0.4);
}

.product-card__cart-btn {
    transition: background 0.3s ease, transform 0.15s ease, box-shadow 0.3s ease;
}

.product-card__cart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(194, 29, 39, 0.3);
}

.product-card__cart-btn:active {
    transform: translateY(0) scale(0.97);
}

/* ── Smooth page-load fade-in ── */
body {
    animation: pageLoad 0.5s ease;
}

@keyframes pageLoad {
    from { opacity: 0; }
    to { opacity: 1; }
}



/* ── Recently Viewed Strip ── */
.recently-viewed {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-subtle);
    padding: 30px 0;
}

.recently-viewed__title {
    font-family: var(--font-heading);
    font-size: var(--fs-lg);
    color: var(--text-primary);
    margin-bottom: 16px;
    text-align: center;
}

.recently-viewed__grid {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 0 20px 10px;
    max-width: var(--container-lg);
    margin: 0 auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border-light) transparent;
}

.recently-viewed__item {
    flex-shrink: 0;
    width: 140px;
    text-decoration: none;
    color: var(--text-primary);
    text-align: center;
    transition: transform var(--transition-fast);
}

.recently-viewed__item:hover {
    transform: translateY(-4px);
}

.recently-viewed__img {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    margin-bottom: 8px;
}

.recently-viewed__name {
    font-size: var(--fs-xs);
    color: var(--text-body);
    line-height: 1.3;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .announcement-bar {
        font-size: 0.75rem;
        padding: 8px 40px 8px 12px;
    }

    .trust-bar__inner {
        gap: 20px;
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding: 0 16px;
        scrollbar-width: none;
    }

    .trust-bar__inner::-webkit-scrollbar { display: none; }

    .fab-container {
        bottom: 80px;
        bottom: calc(80px + env(safe-area-inset-bottom, 0px));
        right: 16px;
        right: calc(16px + env(safe-area-inset-right, 0px));
    }

    .fab {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }

    .fab[data-tooltip]::before { display: none; }

    .sticky-mobile-cta {
        display: block;
    }
}

@media (max-width: 480px) {
    .announcement-bar__highlight {
        display: none;
    }
}


/* Extra-small floating buttons */
@media (max-width: 400px) {
    .fab-container { bottom: 12px; right: 12px; gap: 8px; }
    .fab-container .fab { width: 38px; height: 38px; font-size: 0.85rem; }
    .sticky-mobile-cta { padding: 8px var(--space-sm); }
    .sticky-mobile-cta .btn { font-size: 0.75rem; padding: 8px 12px; min-height: 36px; }
}
