/* ==========================================================================
   Luxury Aesthetics v2.0 — Enhanced Glassmorphism & Animations
   ========================================================================== */

/* 1. Fluid Animated Background */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: linear-gradient(45deg,
        rgba(var(--ut-primary-rgb, 15, 23, 42), 0.85),
        rgba(var(--ut-secondary-rgb, 56, 189, 248), 0.08),
        rgba(var(--ut-primary-rgb, 15, 23, 42), 0.9));
    background-size: 400% 400%;
    z-index: -1;
    animation: utFluidGradient 20s ease infinite;
    pointer-events: none;
}
@keyframes utFluidGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 2. Custom Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--ut-primary); }
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover { background: var(--ut-secondary); }

/* 3. Preloader */
#ut-preloader {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 999999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}
#ut-preloader.ut-loaded { opacity: 0; visibility: hidden; pointer-events: none; }
.ut-diamond-loader {
    width: 50px;
    height: 50px;
    border: 2px solid rgba(255,255,255,0.08);
    border-top-color: var(--ut-secondary);
    border-radius: 50%;
    animation: utSpin 0.8s linear infinite;
    box-shadow: 0 0 20px var(--ut-secondary-glow);
}
@keyframes utSpin { to { transform: rotate(360deg); } }

/* 4. Scroll Reveal */
.ut-reveal-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.7s cubic-bezier(0.5, 0, 0, 1);
}
.ut-reveal-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* 5. Glass Image Wrapper */
.ut-glass-image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: var(--ut-radius-lg);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
.ut-glass-image-wrapper img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}
.ut-glass-image-wrapper::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.4) 100%);
    pointer-events: none;
    z-index: 1;
}
.ut-glass-image-wrapper:hover img { transform: scale(1.05); }

/* 6. Product Card Enhanced Hover */
.ut-product-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at 50% 0%, var(--ut-secondary-glow) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
    z-index: 0;
    border-radius: inherit;
}
.ut-product-card:hover::before { opacity: 1; }

/* 7. Shine sweep on product image */
.ut-product-card__image::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
    z-index: 3;
    transition: left 0.6s ease;
}
.ut-product-card:hover .ut-product-card__image::before {
    left: 100%;
}

/* 8. Glow text for prices */
.ut-price-current {
    text-shadow: 0 0 20px var(--ut-secondary-glow);
}

/* 9. Interactive link underline */
.ut-link-animated {
    position: relative;
    display: inline-block;
}
.ut-link-animated::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--ut-secondary);
    transition: width 0.3s;
}
.ut-link-animated:hover::after { width: 100%; }

/* 10. Smooth selection */
::selection {
    background: var(--ut-secondary);
    color: var(--ut-primary);
}

/* 11. Focus outline */
:focus-visible {
    outline: 2px solid var(--ut-secondary);
    outline-offset: 2px;
}

/* 12. Brand Logo Card glow on hover */
.ut-product-card__brand-logo {
    transition: all 0.3s;
}
.ut-product-card:hover .ut-product-card__brand-logo {
    box-shadow: 0 0 12px var(--ut-secondary-glow);
    border-color: rgba(56, 189, 248, 0.3);
}
.ut-product-card:hover .ut-product-card__brand-logo img {
    filter: brightness(1.5) !important;
}

/* 13. Store Hero shimmer */
.ut-store-hero::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.03), transparent);
    animation: utStoreShimmer 4s ease-in-out infinite;
    pointer-events: none;
}
@keyframes utStoreShimmer {
    0% { left: -50%; }
    100% { left: 150%; }
}

/* 14. Brand chip subtle animation */
.ut-brand-chip {
    animation: utBrandFade 0.6s ease backwards;
}
.ut-brand-chip:nth-child(1) { animation-delay: 0.1s; }
.ut-brand-chip:nth-child(2) { animation-delay: 0.2s; }
.ut-brand-chip:nth-child(3) { animation-delay: 0.3s; }
.ut-brand-chip:nth-child(4) { animation-delay: 0.4s; }
.ut-brand-chip:nth-child(5) { animation-delay: 0.5s; }
.ut-brand-chip:nth-child(6) { animation-delay: 0.6s; }
.ut-brand-chip:nth-child(7) { animation-delay: 0.7s; }
.ut-brand-chip:nth-child(8) { animation-delay: 0.8s; }
@keyframes utBrandFade {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 0.8; transform: scale(1); }
}

/* 15. Glass card double border on hover */
.ut-product-card::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, transparent 30%, var(--ut-secondary) 50%, transparent 70%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
    z-index: 1;
}
.ut-product-card:hover::after {
    opacity: 0.6;
}

/* 16. Spec chip hover glow */
.ut-spec-chip:hover {
    background: var(--ut-secondary-glow);
    border-color: var(--ut-secondary);
    color: var(--ut-secondary);
}

/* 17. Action button hover pulse */
.ut-product-card__actions .ut-btn-primary:hover {
    box-shadow: 0 0 20px var(--ut-secondary-glow);
}

/* 18. Rating stars animation */
.ut-stars {
    display: inline-flex;
    gap: 1px;
}
