/* ============================================
   Dongsheng B2B — Visual Enhancements
   ============================================ */

/* ---------- Additional CSS Variables ---------- */
:root {
    --gold: #c9a84c; --navy: #1a3a5c; --navy-light: #2c5f8a; --navy-dark: #0f2640;
    --gold-light: #e8d48b;
    --gold-dark: #a07d2e;
}

/* ---------- Preloader ---------- */
.preloader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: linear-gradient(135deg, #0f1923 0%, #1a3a5c 50%, #0f2640 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 24px;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}
.preloader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.preloader-logo {
    font-size: 3rem;
    animation: preloaderPulse 1.2s ease-in-out infinite;
}
.preloader-bar {
    width: 120px;
    height: 3px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    overflow: hidden;
}
.preloader-bar::after {
    content: '';
    display: block;
    width: 40%;
    height: 100%;
    background: linear-gradient(90deg, var(--navy), var(--navy-light));
    border-radius: 3px;
    animation: preloaderSlide 1s ease-in-out infinite;
}
.preloader-text {
    color: rgba(255,255,255,0.5);
    font-family: var(--font-display);
    font-size: 1.2rem;
    letter-spacing: 3px;
}
@keyframes preloaderPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.15); opacity: 0.7; }
}
@keyframes preloaderSlide {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(400%); }
}

/* ---------- Hero Enhancements ---------- */

/* Particle / floating dots */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(2px 2px at 10% 20%, rgba(255,255,255,0.15) 50%, transparent 50%),
        radial-gradient(2px 2px at 30% 65%, rgba(255,255,255,0.1) 50%, transparent 50%),
        radial-gradient(1.5px 1.5px at 50% 10%, rgba(255,255,255,0.12) 50%, transparent 50%),
        radial-gradient(2px 2px at 70% 80%, rgba(255,255,255,0.08) 50%, transparent 50%),
        radial-gradient(1.5px 1.5px at 90% 30%, rgba(255,255,255,0.1) 50%, transparent 50%),
        radial-gradient(2px 2px at 15% 85%, rgba(255,255,255,0.06) 50%, transparent 50%),
        radial-gradient(1px 1px at 40% 40%, rgba(255,255,255,0.15) 50%, transparent 50%),
        radial-gradient(1.5px 1.5px at 60% 55%, rgba(255,255,255,0.08) 50%, transparent 50%),
        radial-gradient(2px 2px at 85% 15%, rgba(255,255,255,0.1) 50%, transparent 50%),
        radial-gradient(1px 1px at 25% 45%, rgba(255,255,255,0.12) 50%, transparent 50%),
        radial-gradient(1.5px 1.5px at 75% 50%, rgba(255,255,255,0.06) 50%, transparent 50%),
        radial-gradient(2px 2px at 55% 90%, rgba(255,255,255,0.1) 50%, transparent 50%);
    animation: floatingDots 20s linear infinite;
    z-index: 0;
    pointer-events: none;
}

@keyframes floatingDots {
    0% { transform: translateY(0) translateX(0); }
    25% { transform: translateY(-15px) translateX(10px); }
    50% { transform: translateY(-5px) translateX(-5px); }
    75% { transform: translateY(-20px) translateX(15px); }
    100% { transform: translateY(0) translateX(0); }
}

/* Shoe silhouette pattern overlay */
.hero-overlay {
    background:
        radial-gradient(ellipse at 20% 80%, rgba(26,58,92,0.2) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(26,58,92,0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(212,175,55,0.08) 0%, transparent 60%);
}

/* Improved hero gradient */
.hero {
    background: linear-gradient(135deg, #0f1923 0%, #152a3d 30%, #1a3a5c 60%, #0f1923 100%);
}

/* Typing animation for highlight text */
.highlight {
    background: linear-gradient(135deg, var(--navy-light), var(--navy), var(--navy-light));
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmerText 3s ease-in-out infinite;
    position: relative;
}

@keyframes shimmerText {
    0% { background-position: 0% center; }
    50% { background-position: 100% center; }
    100% { background-position: 0% center; }
}

/* Parallax-lite (JS will add transform) */
.hero-content {
    transition: transform 0.1s linear;
    will-change: transform;
}

/* Hero stats counter animation */
.stat-num {
    color: rgba(255,255,255,0.9);
    letter-spacing: 0.5px;
}

/* ---------- Improved Color & Typography ---------- */
.section-tag {
    letter-spacing: 3px;
    font-weight: 700;
    background: var(--navy);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-title {
    letter-spacing: -0.5px;
    font-weight: 700;
}

/* Contact section tag override to stay visible */
.contact .section-tag {
    background: var(--navy-light);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ---------- Product Cards Enhancements ---------- */
.product-card {
    position: relative;
    border: 2px solid transparent;
    background-clip: padding-box;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.4s ease;
}

.product-card::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: calc(var(--radius) + 2px);
    background: linear-gradient(135deg, var(--navy-dark), var(--navy), var(--navy-light));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.product-card:hover::before {
    opacity: 1;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(26,58,92,0.12);
}

/* Quick-view overlay */
.product-img {
    position: relative;
    overflow: hidden;
}

.product-img::after {
    content: 'View Details';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    opacity: 0;
    transition: opacity 0.35s ease;
    border-radius: 0;
    z-index: 2;
}

.product-card:hover .product-img::after {
    opacity: 1;
}

/* Hide "View Details" overlay on product listing pages (horizontal cards) */
.product-listing .product-img::after {
    display: none;
}

/* Disable gradient border effect on product listing cards */
.product-listing .product-card::before {
    display: none;
}

.product-emoji {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover .product-emoji {
    transform: scale(1.15) rotate(-5deg);
}

/* Badge accent */
.product-badge {
    background: var(--navy-dark);
    letter-spacing: 1px;
}

/* ---------- Category Filter Animation ---------- */
.product-card {
    animation: none;
}

.product-card.filter-fade-in {
    animation: filterFadeScale 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.product-card.filter-fade-out {
    animation: filterFadeOut 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes filterFadeScale {
    from {
        opacity: 0;
        transform: scale(0.85) translateY(15px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes filterFadeOut {
    from {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    to {
        opacity: 0;
        transform: scale(0.85) translateY(15px);
    }
}

/* ---------- Staggered Scroll Animations ---------- */
.fade-in {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays via CSS custom property */
.fade-in.stagger-1 { transition-delay: 0.05s; }
.fade-in.stagger-2 { transition-delay: 0.1s; }
.fade-in.stagger-3 { transition-delay: 0.15s; }
.fade-in.stagger-4 { transition-delay: 0.2s; }
.fade-in.stagger-5 { transition-delay: 0.25s; }
.fade-in.stagger-6 { transition-delay: 0.3s; }
.fade-in.stagger-7 { transition-delay: 0.35s; }
.fade-in.stagger-8 { transition-delay: 0.4s; }
.fade-in.stagger-9 { transition-delay: 0.45s; }
.fade-in.stagger-10 { transition-delay: 0.5s; }
.fade-in.stagger-11 { transition-delay: 0.55s; }
.fade-in.stagger-12 { transition-delay: 0.6s; }

/* Process steps smooth reveal */
.step {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.step.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}
.step-arrow {
    opacity: 0;
    transition: opacity 0.5s ease 0.3s;
}
.step-arrow.visible {
    opacity: 1;
}

/* ---------- Alternating Section Backgrounds ---------- */
.products {
    background: var(--bg-alt);
    position: relative;
}
.products::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 10% 10%, rgba(26,58,92,0.03) 0%, transparent 50%),
        radial-gradient(circle at 90% 90%, rgba(26,58,92,0.03) 0%, transparent 50%);
    pointer-events: none;
}

.why-us {
    position: relative;
}
.why-us::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(60deg, transparent 40%, rgba(26,58,92,0.02) 50%, transparent 60%),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 80px,
            rgba(26,58,92,0.015) 80px,
            rgba(26,58,92,0.015) 81px
        );
    pointer-events: none;
}

.process {
    position: relative;
    background: var(--bg-alt);
}
.process::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 0%, rgba(26,58,92,0.04) 0%, transparent 40%),
        radial-gradient(circle at 50% 100%, rgba(26,58,92,0.03) 0%, transparent 40%);
    pointer-events: none;
}

.testimonials {
    position: relative;
}
.testimonials::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(26,58,92,0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(26,58,92,0.03) 0%, transparent 50%);
    pointer-events: none;
}

/* ---------- WhatsApp Float Pulse ---------- */
.whatsapp-float {
    animation: whatsappPulse 2s ease-in-out infinite;
}

@keyframes whatsappPulse {
    0% { box-shadow: 0 4px 20px rgba(37,211,102,0.4), 0 0 0 0 rgba(37,211,102,0.4); }
    50% { box-shadow: 0 4px 20px rgba(37,211,102,0.4), 0 0 0 12px rgba(37,211,102,0); }
    100% { box-shadow: 0 4px 20px rgba(37,211,102,0.4), 0 0 0 0 rgba(37,211,102,0); }
}

.whatsapp-float:hover {
    animation: none;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 30px rgba(37,211,102,0.5);
}

/* ---------- Cookie Consent Banner ---------- */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9998;
    background: rgba(10, 10, 10, 0.97);
    backdrop-filter: blur(12px);
    color: #fff;
    padding: 20px 0;
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border-top: 1px solid rgba(26,58,92,0.2);
}
.cookie-banner.show {
    transform: translateY(0);
}
.cookie-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}
.cookie-text {
    font-size: 0.88rem;
    color: rgba(255,255,255,0.7);
    line-height: 1.6;
    flex: 1;
    min-width: 280px;
}
.cookie-text a {
    color: rgba(255,255,255,0.9);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.cookie-actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}
.cookie-btn {
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}
.cookie-btn-accept {
    background: var(--navy);
    color: #fff;
    font-weight: 700;
}
.cookie-btn-accept:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(26,58,92,0.3);
}
.cookie-btn-decline {
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.7);
    border: 1px solid rgba(255,255,255,0.15);
}
.cookie-btn-decline:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
}

/* ---------- Improved Form Focus States ---------- */
.form-group {
    position: relative;
}

.form-group input,
.form-group select,
.form-group textarea {
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease, transform 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(26,58,92,0.08), 0 2px 8px rgba(26,58,92,0.06);
    transform: translateY(-1px);
}

/* Floating label effect */
.form-group input::placeholder,
.form-group textarea::placeholder {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.form-group input:focus::placeholder,
.form-group textarea:focus::placeholder {
    opacity: 0.4;
    transform: translateX(4px);
}

/* File upload enhanced */
.file-upload {
    transition: border-color 0.3s ease, background 0.3s ease, transform 0.2s ease;
}
.file-upload:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(26,58,92,0.02);
    transform: translateY(-1px);
}

/* Checkbox enhanced hover */
.checkbox-label {
    transition: color 0.3s ease;
    padding: 4px 8px;
    border-radius: 6px;
}
.checkbox-label:hover {
    color: var(--primary);
    background: rgba(26,58,92,0.04);
}

/* ---------- Micro-interactions for all clickable elements ---------- */
.filter-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.filter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26,58,92,0.1);
}
.filter-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 4px 16px rgba(26,58,92,0.25);
}

.advantage-card {
    border: 1px solid transparent;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.advantage-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(0,0,0,0.1);
    border-color: rgba(26,58,92,0.2);
}
.advantage-card:hover .adv-icon {
    transform: scale(1.15);
}
.adv-icon {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.testimonial-card {
    border: 1px solid transparent;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.08);
    border-color: rgba(26,58,92,0.15);
}

.highlight-item {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    transition: background 0.3s ease, transform 0.3s ease;
}
.highlight-item:hover {
    background: rgba(26,58,92,0.03);
    transform: translateX(4px);
}

.social-link {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.social-link:hover {
    background: var(--navy-dark);
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 4px 16px rgba(26,58,92,0.3);
}

.nav-link {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--navy-dark), var(--navy));
    transition: width 0.3s ease, left 0.3s ease;
    border-radius: 2px;
}
.nav-link:hover::after,
.nav-link.active::after {
    width: 60%;
    left: 20%;
}
.nav-link.cta-nav::after {
    display: none;
}
.nav-link.cta-nav {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    transition: all 0.3s ease;
}
.nav-link.cta-nav:hover {
    background: linear-gradient(135deg, var(--primary-dark), #6a0032);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26,58,92,0.3);
}

.inquire-link {
    position: relative;
    transition: all 0.3s ease;
}
.inquire-link:hover {
    color: var(--navy);
    transform: translateX(4px);
}

.btn {
    position: relative;
    overflow: hidden;
}
.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    transition: width 0.5s ease, height 0.5s ease, top 0.3s ease, left 0.3s ease;
    transform: translate(-50%, -50%);
}
.btn:active::after {
    width: 300px;
    height: 300px;
}

.back-to-top {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--navy-dark);
}
.back-to-top:hover {
    background: var(--navy-dark);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(26,58,92,0.3);
}

/* ---------- Contact Section Improved Gradient ---------- */
.contact {
    background: linear-gradient(160deg, #0f1923 0%, #152a3d 40%, #0f2640 70%, #0f1923 100%) !important;
    position: relative;
}
.contact::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 10% 90%, rgba(26,58,92,0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 90% 10%, rgba(26,58,92,0.06) 0%, transparent 50%);
    pointer-events: none;
}

/* Form wrap improvement */
.contact-form-wrap {
    border: 1px solid rgba(26,58,92,0.1);
    transition: box-shadow 0.4s ease;
}
.contact-form-wrap:hover {
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

/* Submit button gradient */
.inquiry-form .btn-primary {
    background: var(--navy-dark);
    border-color: transparent;
    letter-spacing: 0.5px;
}
.inquiry-form .btn-primary:hover {
    background: var(--navy-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(26,58,92,0.3);
}

/* ---------- Footer Improvements ---------- */
.footer {
    background: linear-gradient(180deg, #0f1923 0%, #152a3d 100%);
    position: relative;
}
.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--navy-dark), var(--navy), var(--navy-dark), transparent);
}

.footer-links a {
    transition: all 0.3s ease;
    display: inline-block;
}
.footer-links a:hover {
    color: rgba(255,255,255,0.9);
    transform: translateX(4px);
}

/* ---------- Hero Stats improved ---------- */
.stat {
    padding: 16px 0;
    border-right: 1px solid rgba(255,255,255,0.08);
    padding-right: 40px;
}
.stat:last-child {
    border-right: none;
    padding-right: 0;
}

/* ---------- About Badge accent ---------- */
.about-badge {
    background: var(--navy-dark);
}

/* ---------- Process step number ---------- */
.step-num {
    background: var(--navy);
    box-shadow: 0 4px 16px rgba(26,58,92,0.25);
}

/* ---------- Selection Color ---------- */
::selection {
    background: rgba(26,58,92,0.2);
    color: var(--text);
}

/* ---------- Scrollbar Styling ---------- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-alt);
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--navy-light), var(--navy-dark));
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--navy-dark), var(--navy));
}

/* ---------- Hero Tag Gold Accent ---------- */
.hero-tag {
    border-color: rgba(26,58,92,0.3);
    background: rgba(26,58,92,0.1);
}

/* ---------- Stars Gold ---------- */
.stars {
    color: var(--navy-light);
}

/* ---------- Responsive Adjustments ---------- */
@media (max-width: 768px) {
    .stat {
        border-right: none;
        padding-right: 0;
    }
    .cookie-inner {
        flex-direction: column;
        text-align: center;
    }
    .cookie-actions {
        width: 100%;
        justify-content: center;
    }
}
