/* assets/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');

:root {
    --primary-color: #6d28d9; /* Deep Purple */
    --secondary-color: #8b5cf6;
    --accent-color: #f472b6; /* Pink accent */
    --text-main: #1f2937;
    --text-muted: #4b5563;
    --bg-light: #f3f4f6;
    --surface-color: rgba(255, 255, 255, 0.4);
    --border-color: rgba(255, 255, 255, 0.4);
    --shadow-sm: 0 4px 6px rgba(0,0,0,0.05);
    --shadow-md: 0 10px 15px rgba(0,0,0,0.1);
    --shadow-lg: 0 25px 50px rgba(0,0,0,0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
}

body {
    background: linear-gradient(45deg, #e0e7ff, #fae8ff, #f3e8ff, #eef2ff);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

main {
    flex: 1;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

h1, h2, h3, h4, h5, h6 {
    color: var(--primary-color);
}

/* Glassmorphism Classes */
.glass-panel {
    background: var(--surface-color);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    padding: 2rem;
}

/* Navbar */
@keyframes navSlideDown3D {
    0% {
        transform: perspective(800px) rotateX(-90deg) translateY(-100%);
        opacity: 0;
        transform-origin: top center;
    }
    60% {
        transform: perspective(800px) rotateX(8deg) translateY(0);
        opacity: 1;
    }
    80% {
        transform: perspective(800px) rotateX(-3deg);
    }
    100% {
        transform: perspective(800px) rotateX(0deg);
        opacity: 1;
    }
}

@keyframes navLinkFadeIn {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes iconPop {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.25) rotate(-8deg); }
    70%  { transform: scale(0.95) rotate(4deg); }
    100% { transform: scale(1) rotate(0deg); }
}

@keyframes shimmerBorder {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes logoPulse {
    0%, 100% { filter: drop-shadow(0 0 6px rgba(109, 40, 217, 0.4)); }
    50%       { filter: drop-shadow(0 0 18px rgba(244, 114, 182, 0.7)); }
}

header.navbar {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(240, 240, 250, 0.85));
    backdrop-filter: blur(15px);
    border-bottom: 2px solid rgba(255, 255, 255, 0.8);
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    margin: 0;
    border-radius: 0;
    z-index: 1000;
    box-shadow: 
        0 10px 25px rgba(109, 40, 217, 0.15),
        0 3px 5px rgba(0, 0, 0, 0.05),
        inset 0 4px 8px rgba(255, 255, 255, 1),
        inset 0 -4px 8px rgba(109, 40, 217, 0.05);
    animation: navSlideDown3D 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-style: preserve-3d;
}

header.navbar.scrolled {
    background: linear-gradient(145deg, rgba(139, 92, 246, 0.95), rgba(236, 72, 153, 0.95));
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    top: 0;
    margin: 0;
}

header.navbar.scrolled .logo,
header.navbar.scrolled .nav-links a,
header.navbar.scrolled .icon-btn {
    color: #ffffff;
    text-shadow: 1px 2px 4px rgba(0,0,0,0.3);
}

header.navbar.scrolled .icon-btn:hover {
    color: #ffffff;
    transform: scale(1.1) rotate(-5deg);
    text-shadow: 0 0 10px rgba(255,255,255,0.8);
}

header.navbar.scrolled .nav-links a::after {
    background: linear-gradient(90deg, #ffffff, #ffe4e6, #ffffff);
    box-shadow: 0 0 8px rgba(255,255,255,0.8);
}

header.navbar.scrolled .icon-btn::before {
    background: rgba(255, 255, 255, 0.2);
}

.nav-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 1rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Resin Crystal CSS Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -0.5px;
    text-transform: uppercase;
    text-shadow: none;
    background: none;
    -webkit-background-clip: border-box;
    background-clip: border-box;
    z-index: 2;
    /* Split animations: fadeIn uses forwards (not both) so it doesn't freeze at opacity:0 before start */
    animation:
        navLinkFadeIn 0.7s 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards,
        logoPulse 3s 1s ease-in-out infinite;
    opacity: 0; /* Will be set to 1 by navLinkFadeIn forwards */
}

/* Logo text span — explicit style for safety */
.logo-text {
    display: inline;
    font-size: inherit;
    color: inherit;
    font-weight: inherit;
}

.logo:hover {
    transform: scale(1.04);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-logo-img {
    height: 50px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 6px rgba(109, 40, 217, 0.4));
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.logo:hover .nav-logo-img {
    transform: scale(1.1) rotate(-5deg);
    filter: drop-shadow(0 0 12px rgba(244, 114, 182, 0.6));
}

.resin-crystal {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0) 100%), linear-gradient(45deg, #a855f7, #ec4899);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    animation: crystalFloat 4s ease-in-out infinite alternate, crystalSpin 10s linear infinite;
    box-shadow: 0 0 15px rgba(236, 72, 153, 0.6), inset 2px 2px 5px rgba(255,255,255,0.8);
    position: relative;
    flex-shrink: 0;
}
.resin-crystal::before {
    content: '';
    position: absolute;
    top: 5px; left: 5px; right: 10px; bottom: 10px;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0) 100%);
    z-index: 2;
}
@keyframes crystalFloat {
    0% { transform: translateY(-3px); }
    100% { transform: translateY(3px); }
}
@keyframes crystalSpin {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

/* Staggered entrance for each nav item */
.nav-links li:nth-child(1) { animation: navLinkFadeIn 0.5s 0.15s both; }
.nav-links li:nth-child(2) { animation: navLinkFadeIn 0.5s 0.25s both; }
.nav-links li:nth-child(3) { animation: navLinkFadeIn 0.5s 0.35s both; }
.nav-links li:nth-child(4) { animation: navLinkFadeIn 0.5s 0.45s both; }
.nav-links li:nth-child(5) { animation: navLinkFadeIn 0.5s 0.55s both; }

.nav-links a {
    font-weight: 600;
    font-size: 1.05rem;
    position: relative;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
    display: inline-block;
}

/* Hidden underline for 3D look */
.nav-links a::after {
    display: none;
}

.nav-links a:hover {
    color: var(--primary-color);
    background: linear-gradient(145deg, rgba(255,255,255,1), rgba(240,240,250,0.9));
    box-shadow: 
        0 5px 15px rgba(109, 40, 217, 0.2),
        inset 0 2px 4px rgba(255,255,255,1),
        inset 0 -2px 4px rgba(0,0,0,0.05);
    transform: translateY(-3px) translateZ(10px) rotateX(5deg);
}

header.navbar.scrolled .nav-links a:hover {
    color: var(--primary-color);
    background: linear-gradient(145deg, #ffffff, #f3e8ff);
    box-shadow: 
        0 8px 20px rgba(0, 0, 0, 0.3),
        inset 0 2px 4px rgba(255,255,255,1),
        inset 0 -2px 4px rgba(0,0,0,0.1);
}

/* Icons */
.nav-icon-group {
    display: flex;
    gap: 1rem;
    align-items: center;
    animation: navLinkFadeIn 0.5s 0.6s both;
}

.icon-btn {
    font-size: 1.25rem;
    color: var(--text-main);
    transition: color 0.25s, transform 0.25s;
    position: relative;
    display: inline-flex;
    border-radius: 50%;
    padding: 0.3rem;
}

.icon-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(109, 40, 217, 0.08);
    transform: scale(0);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.icon-btn:hover {
    color: var(--accent-color);
    animation: iconPop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.icon-btn:hover::before {
    transform: scale(1);
}

/* Buttons */
.btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-block;
}

.btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(109, 40, 217, 0.3);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}
.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.btn-danger {
    background: #ef4444;
}
.btn-danger:hover {
    background: #dc2626;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 0;
}
.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}
.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.product-card {
    background: var(--surface-color);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}
.product-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
}
.product-info {
    padding: 1.5rem;
}
.product-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}
.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}
.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 8px;
    background: rgba(255,255,255,0.8);
    transition: var(--transition);
    font-size: 1rem;
}
.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(109, 40, 217, 0.2);
    background: white;
}
textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}
.alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}
.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Modern Compact Footer */
footer {
    position: relative;
    background: rgba(15, 15, 25, 0.95);
    backdrop-filter: blur(20px);
    padding: 1.5rem 1.5rem 0.8rem;
    margin-top: auto;
    border-top: 2px solid rgba(139, 92, 246, 0.3);
    color: rgba(255,255,255,0.8);
    box-shadow: 0 -10px 30px rgba(0,0,0,0.15);
    z-index: 100;
}

.liquid-layer {
    display: none; /* Removed for cleaner compact design */
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    position: relative;
    z-index: 2;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: rgba(255,255,255,0.7);
    font-size: 1.5rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-block;
}

.footer-links a:hover {
    transform: scale(1.3) rotate(5deg) translateY(-2px);
    color: var(--accent-color);
    filter: drop-shadow(0 0 10px rgba(244, 114, 182, 0.6));
}

.footer-bottom {
    flex-basis: 100%;
    text-align: center;
    color: rgba(255,255,255,0.4);
    font-size: 0.8rem;
    margin-top: 0.5rem;
    padding-top: 0.8rem;
    border-top: 1px solid rgba(255,255,255,0.05);
}

/* 3D Animated Cards for Profile */
.profile-container {
    background: linear-gradient(145deg, rgba(255,255,255,0.7), rgba(255,255,255,0.3));
    backdrop-filter: blur(20px);
    box-shadow: 
        0 25px 50px rgba(109, 40, 217, 0.15),
        inset 0 4px 8px rgba(255,255,255,0.9),
        inset 0 -4px 8px rgba(0,0,0,0.05);
    border: 1px solid rgba(255,255,255,0.8);
    position: relative;
    overflow: hidden;
}

.profile-container::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: conic-gradient(from 0deg, transparent, rgba(244, 114, 182, 0.2), rgba(109, 40, 217, 0.3), transparent);
    animation: profileSpin 15s linear infinite;
    z-index: -1;
    pointer-events: none;
}

@keyframes profileSpin {
    100% { transform: rotate(360deg); }
}

.card-3d {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.card-3d:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 
        0 15px 35px rgba(109, 40, 217, 0.2),
        inset 0 2px 5px rgba(255,255,255,1),
        inset 0 -2px 5px rgba(244, 114, 182, 0.1);
    z-index: 10;
}

.profile-info-box {
    background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(245,240,255,0.8));
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid rgba(255,255,255,0.9);
    box-shadow: 
        0 8px 20px rgba(109,40,217,0.08),
        inset 0 2px 5px rgba(255,255,255,1);
    position: relative;
}

.profile-info-box small {
    color: var(--primary-color);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
    display: block;
}

.profile-info-box div {
    font-size: 1.1rem;
    color: var(--text-main);
    font-weight: 500;
}

.tab-btn {
    background: linear-gradient(145deg, rgba(255,255,255,0.9), rgba(240,240,250,0.6));
    border: 1px solid rgba(255,255,255,0.9);
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 
        0 4px 10px rgba(0,0,0,0.05),
        inset 0 2px 4px rgba(255,255,255,1);
    position: relative;
    overflow: hidden;
}

.tab-btn:hover {
    transform: translateY(-4px);
    color: var(--primary-color);
    box-shadow: 
        0 8px 20px rgba(109, 40, 217, 0.2),
        inset 0 2px 4px rgba(255,255,255,1);
    background: linear-gradient(145deg, #ffffff, #f5efff);
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.3);
    box-shadow: 
        0 8px 25px rgba(109, 40, 217, 0.5),
        inset 0 2px 5px rgba(255,255,255,0.4),
        inset 0 -3px 5px rgba(0,0,0,0.2);
    transform: translateY(-4px);
}

/* ===== Auth Container (Login / Signup) - Premium Animated Card ===== */
@keyframes authSlideUp {
    0% {
        opacity: 0;
        transform: perspective(1000px) rotateX(12deg) translateY(50px);
    }
    100% {
        opacity: 1;
        transform: perspective(1000px) rotateX(0deg) translateY(0);
    }
}

@keyframes authSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Staggered field entrance */
@keyframes fieldFadeIn {
    0% { opacity: 0; transform: translateY(16px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Gentle floating for the icon */
@keyframes iconFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.auth-container {
    max-width: 480px;
    margin: 4rem auto;
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(109, 40, 217, 0.15);
    box-shadow:
        0 25px 50px rgba(109, 40, 217, 0.12),
        inset 0 2px 8px rgba(255, 255, 255, 0.9);
    border-radius: 24px;
    padding: 3rem;
    position: relative;
    overflow: hidden;
    animation: authSlideUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
    transform-origin: bottom center;
}

/* Rotating gradient border accent */
.auth-container::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: conic-gradient(from 0deg, transparent 60%, rgba(109,40,217,0.15), rgba(244,114,182,0.2), transparent 80%);
    animation: authSpin 8s linear infinite;
    z-index: 0;
    pointer-events: none;
}

/* Top accent bar */
.auth-container::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color), var(--secondary-color));
    border-radius: 24px 24px 0 0;
}

/* Ensure all content inside is above the pseudo-element */
.auth-container > * {
    position: relative;
    z-index: 1;
}

.auth-container:hover {
    transform: translateY(-6px);
    box-shadow:
        0 30px 60px rgba(109, 40, 217, 0.18),
        inset 0 2px 8px rgba(255, 255, 255, 0.9);
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.auth-container h2 {
    color: var(--primary-color) !important;
    text-shadow: none !important;
    font-weight: 800;
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.auth-container .auth-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

/* Auth icon on top of form */
.auth-container .auth-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
    animation: iconFloat 3s ease-in-out infinite;
}

.auth-container .auth-icon svg {
    color: var(--primary-color);
    filter: drop-shadow(0 4px 8px rgba(109, 40, 217, 0.25));
}

/* Staggered form-group animations */
.auth-container .form-group {
    animation: fieldFadeIn 0.5s ease both;
}
.auth-container .form-group:nth-child(1) { animation-delay: 0.15s; }
.auth-container .form-group:nth-child(2) { animation-delay: 0.25s; }
.auth-container .form-group:nth-child(3) { animation-delay: 0.35s; }
.auth-container .form-group:nth-child(4) { animation-delay: 0.45s; }
.auth-container .form-group:nth-child(5) { animation-delay: 0.55s; }
.auth-container .form-group:nth-child(6) { animation-delay: 0.65s; }
.auth-container .form-group:nth-child(7) { animation-delay: 0.75s; }

.auth-container h2 {
    color: var(--primary-color) !important;
    text-shadow: none !important;
    letter-spacing: 0.5px;
    font-weight: 800;
}

.auth-container label {
    color: #334155;
    font-weight: 600;
    text-shadow: none;
    margin-bottom: 0.5rem;
    display: block;
}

.auth-container .form-control {
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02) !important;
    padding: 0.9rem 1rem !important;
    border-radius: 10px;
    font-size: 1.05rem;
}

.auth-container .form-control:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(109, 40, 217, 0.12) !important;
    background: #ffffff !important;
    border-left: 3px solid var(--primary-color) !important;
    padding-left: calc(1rem - 2px) !important;
}

.auth-container .btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) !important;
    border: none !important;
    box-shadow: 0 6px 15px rgba(109, 40, 217, 0.3) !important;
    color: #fff !important;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    margin-top: 1.5rem;
    padding: 1rem !important;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.auth-container .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(109, 40, 217, 0.4) !important;
}

.auth-container a {
    color: var(--primary-color) !important;
    text-shadow: none !important;
    transition: all 0.3s ease;
    font-weight: 700;
    text-decoration: underline;
}

.auth-container a:hover {
    color: var(--accent-color) !important;
}

.auth-container p {
    color: #475569;
    font-size: 0.95rem;
}

/* Tables for User Profile & Admin */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}
table th, table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}
table th {
    background: rgba(0,0,0,0.02);
    font-weight: 600;
}
table tr:hover {
    background: rgba(255,255,255,0.4);
}

/* Cart & Wishlist Styles */
.cart-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}
.cart-item-img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}
.cart-item-details {
    flex: 1;
}
.cart-item-title {
    font-weight: 600;
    font-size: 1.1rem;
}
.cart-item-price {
    color: var(--primary-color);
    font-weight: 700;
}

/* ===================================================== */
/* ===== MOBILE SIDEBAR DRAWER (Phone / Tablet)     ===== */
/* ===================================================== */

/* Overlay behind sidebar */
.mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1100;
    backdrop-filter: blur(2px);
}
.mobile-overlay.active {
    display: block;
}

/* Hamburger button — hidden on desktop */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--primary-color);
    padding: 4px;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
header.navbar.scrolled .mobile-menu-btn { color: #fff; }

/* Desktop auth icon — hidden on mobile */
.desktop-only-auth { display: inline-flex; }

/* Sidebar Drawer */
.mobile-sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: 280px;
    max-width: 85vw;
    height: 100vh;
    background: linear-gradient(160deg, #1e1035 0%, #2d1b69 50%, #3b0764 100%);
    z-index: 1200;
    transition: left 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    box-shadow: 5px 0 30px rgba(0,0,0,0.6);
}
.mobile-sidebar.open {
    left: 0;
}

/* Sidebar header row */
.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.2rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    background: rgba(0,0,0,0.2);
}
.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
}
.sidebar-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(255,255,255,0.7);
    padding: 4px;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}
.sidebar-close-btn:hover { color: #f472b6; }

/* Sidebar nav links */
.sidebar-links, .sidebar-auth-links {
    list-style: none;
    padding: 0.75rem 0;
    margin: 0;
}
.sidebar-links li a, .sidebar-auth-links li a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.5rem;
    color: rgba(255,255,255,0.85);
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s, color 0.2s, padding-left 0.2s;
    border-radius: 0;
}
.sidebar-links li a:hover {
    background: rgba(255,255,255,0.08);
    color: #f472b6;
    padding-left: 2rem;
}
.sidebar-divider {
    height: 1px;
    background: rgba(255,255,255,0.1);
    margin: 0.25rem 1.2rem;
}
/* Auth buttons in sidebar */
.sidebar-auth-btn {
    color: rgba(255,255,255,0.9) !important;
}
.sidebar-signup {
    color: #a78bfa !important;
}
.sidebar-logout {
    color: #f87171 !important;
}

/* ===== FULL MOBILE RESPONSIVENESS ===== */

/* Tablet */
@media screen and (max-width: 992px) {
    .nav-container {
        padding: 1rem 1.5rem;
    }

    .mobile-menu-btn {
        display: inline-flex !important;
        z-index: 1001;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(245, 240, 255, 0.98));
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        padding: 4rem 2rem;
        transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        box-shadow: -10px 0 30px rgba(109, 40, 217, 0.1);
        z-index: 1000;
        gap: 2rem;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        width: 100%;
        text-align: center;
        animation: none !important;
    }

    .nav-links a {
        font-size: 1.2rem;
        width: 100%;
        padding: 1rem;
    }

    .nav-logo-img {
        height: 40px;
    }

    .logo {
        font-size: 1.5rem;
    }

    .hero {
        padding: 1.5rem 0;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    main {
        padding: 0.75rem;
    }

    .glass-panel {
        padding: 1.25rem;
        border-radius: 12px;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .product-image {
        height: 180px;
    }

    .product-info {
        padding: 1rem;
    }

    .product-title {
        font-size: 1rem;
    }

    .product-price {
        font-size: 1.2rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .cart-item {
        flex-direction: column;
        text-align: center;
    }

    .cart-item-img {
        width: 100%;
        height: 180px;
        max-width: 220px;
    }

    .cart-item-details {
        margin: 0.5rem 0;
    }

    /* Profile page */
    .profile-container {
        padding: 1rem;
    }

    .profile-tabs {
        gap: 0.3rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .tab-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.9rem;
        white-space: nowrap;
    }

    .address-grid {
        grid-template-columns: 1fr;
    }

    /* Checkout */
    .checkout-container {
        padding: 1.25rem !important;
        margin: 1rem auto !important;
    }

    .checkout-progress {
        max-width: 100% !important;
    }

    .checkout-progress .step-circle {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }

    table, thead, tbody, th, td, tr {
        display: block;
    }
    
    table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    
    table tr {
        margin-bottom: 1rem;
        border: 1px solid var(--border-color);
        border-radius: 8px;
        background: rgba(255,255,255,0.2);
    }
    
    table td {
        border: none;
        position: relative;
        padding-left: 50%;
        text-align: right;
    }
    
    table td::before {
        content: attr(data-label);
        position: absolute;
        left: 1rem;
        width: 45%;
        text-align: left;
        font-weight: 600;
    }
}

/* Phone - Small */
@media screen and (max-width: 480px) {
    .nav-container {
        padding: 0.5rem 0.75rem;
    }

    .logo {
        font-size: 1.2rem;
        gap: 0.5rem;
    }

    .resin-crystal {
        width: 28px;
        height: 28px;
    }

    .nav-links {
        gap: 0.3rem;
    }

    .nav-links a {
        font-size: 0.8rem;
        padding: 0.3rem 0.15rem;
    }

    .hero h1 {
        font-size: 1.6rem;
    }

    .hero p {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }

    main {
        padding: 0.5rem;
    }

    .glass-panel {
        padding: 1rem;
        border-radius: 10px;
    }

    .products-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .product-image {
        height: 200px;
    }

    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    /* Profile grids go single column on phone */
    .profile-container div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    /* Checkout payment cards stacked */
    .checkout-container div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    .checkout-progress .step div:last-child {
        font-size: 0.75rem;
    }

    /* Order history responsive */
    .order-card div[style*="display: flex; justify-content: space-between"] {
        flex-direction: column !important;
        gap: 0.5rem;
    }

    .footer-content {
        padding: 0.2rem 0.5rem;
    }

    .footer-links a {
        font-size: 1.1rem;
    }

    .footer-bottom {
        font-size: 0.6rem;
    }
}

/* Profile Tabs & Address Book */
.profile-container {
    padding: 2rem;
}
.profile-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid rgba(0,0,0,0.05);
}
.tab-btn {
    background: transparent;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}
.tab-btn::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--primary-color);
    transition: var(--transition);
    border-radius: 3px 3px 0 0;
}
.tab-btn:hover {
    color: var(--primary-color);
}
.tab-btn.active {
    color: var(--primary-color);
}
.tab-btn.active::after {
    width: 100%;
}

/* Advanced 3D Animations & Reveal Logistics */
.animated {
    animation-duration: 0.6s;
    animation-fill-mode: both;
}
@keyframes fadeUp3D {
    from { opacity: 0; transform: perspective(1000px) rotateX(15deg) translateY(40px); }
    to { opacity: 1; transform: perspective(1000px) rotateX(0) translateY(0); }
}
.fade-in {
    animation-name: fadeUp3D;
    transform-origin: bottom center;
}

.reveal {
    opacity: 1; /* Always visible by default */
    transform: none;
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    animation: cardReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.reveal.on-screen {
    opacity: 1;
    transform: perspective(1000px) rotateX(0) translateY(0);
}

@keyframes cardReveal {
    0% { opacity: 0; transform: perspective(1000px) rotateX(15deg) translateY(40px); }
    100% { opacity: 1; transform: perspective(1000px) rotateX(0) translateY(0); }
}

.product-card {
    /* Default: always visible — no opacity:0 trap */
    opacity: 1;
    transform: none;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    animation: cardReveal 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.product-card.on-screen {
    opacity: 1;
    transform: perspective(1000px) rotateX(0) translateY(0);
    animation: levitate 6s ease-in-out infinite alternate;
}
.product-card.on-screen:hover {
    animation-play-state: paused;
    transform: perspective(1000px) rotateX(0) translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(109, 40, 217, 0.2);
}

@keyframes levitate {
    0% { transform: translateY(0); box-shadow: var(--shadow-sm); }
    100% { transform: translateY(-8px); box-shadow: var(--shadow-md); }
}

/* Profile Info Box */
.profile-info-box {
    background: rgba(255,255,255,0.6);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.8);
    transition: var(--transition);
}
.profile-info-box:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
    background: rgba(255,255,255,0.9);
}
.profile-info-box small {
    display: block;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
    font-weight: 600;
}
.profile-info-box div {
    font-size: 1.1rem;
}

/* Address Grid */
.address-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}
.address-card {
    transition: var(--transition);
    border: 1px solid var(--border-color);
}
.address-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(109, 40, 217, 0.15);
    border-color: rgba(109, 40, 217, 0.3);
}

/* ========================================================= */
/* ===== COMPREHENSIVE PHONE RESPONSIVE (≤768px)       ===== */
/* ===================================================== */
@media screen and (max-width: 768px) {
    /* -- Prevent horizontal scroll globally -- */
    *, *::before, *::after { -webkit-tap-highlight-color: transparent; }
    html, body { width: 100%; overflow-x: hidden; }
    body { padding-top: 60px !important; }

    /* -- NAVBAR: compact strip -- */
    header.navbar {
        position: fixed !important;
        top: 0; left: 0; right: 0;
        height: 56px !important;
        padding: 0 !important;
        display: flex;
        align-items: center;
        z-index: 1000;
        /* Keep existing animations stripped for perf */
        animation: none !important;
        background: linear-gradient(135deg, rgba(109,40,217,0.97), rgba(139,92,246,0.97)) !important;
        backdrop-filter: blur(12px);
        border-bottom: 2px solid rgba(244,114,182,0.4) !important;
        box-shadow: 0 4px 15px rgba(0,0,0,0.25) !important;
        transform: none !important;
    }
    .nav-container {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        flex-wrap: nowrap !important;
        padding: 0 0.75rem !important;
        width: 100%;
        height: 56px;
    }

    /* Logo: smaller on mobile — MUST override base opacity:0 */
    .logo {
        font-size: 0.9rem !important;
        gap: 0.35rem !important;
        color: #fff !important;
        flex-shrink: 0;
        text-shadow: none !important;
        animation: none !important;
        white-space: nowrap;
        min-width: 0;
        opacity: 1 !important;           /* Base CSS has opacity:0 for animation — reset it here */
        transform: none !important;
    }
    .logo-text {
        display: inline !important;
        font-size: 0.88rem !important;
        color: #ffffff !important;
        font-weight: 700 !important;
        letter-spacing: 0 !important;
        white-space: nowrap;
        opacity: 1 !important;
        visibility: visible !important;
    }
    .nav-logo-img { height: 26px !important; width: auto; flex-shrink: 0; }

    /* Desktop nav-links: hide completely on mobile */
    .nav-links { display: none !important; }

    /* Icon group: compact, with gap so search doesn't overlap cart */
    .nav-icon-group {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 0.1rem !important;
        flex-shrink: 0;
    }
    .icon-btn {
        padding: 5px !important;
        color: #fff !important;
        min-width: 32px;
        min-height: 32px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .icon-btn svg { width: 20px; height: 20px; }

    /* Hide desktop auth icon on mobile (it's in the sidebar) */
    .desktop-only-auth { display: none !important; }

    /* Show hamburger on mobile */
    .mobile-menu-btn {
        display: flex !important;
        color: #fff !important;
    }

    /* -- SEARCH: compact dropdown, aligned to right edge -- */
    .nav-search-container {
        position: static !important;
    }
    .search-toggle-btn { display: inline-flex !important; }
    .nav-search-form {
        position: fixed !important;
        top: 58px !important;
        left: 8px !important;
        right: 8px !important;
        width: auto !important;
        background: #fff !important;
        border: 2px solid var(--primary-color);
        border-radius: 12px;
        padding: 0.5rem 0.75rem;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
        z-index: 1050;
        animation: none !important;
    }
    .nav-search-form.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    .nav-search-input {
        width: 100% !important;
        color: #1e293b !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
    }
    .nav-search-submit {
        color: var(--primary-color) !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        animation: none !important;
    }

    /* -- MAIN content area -- */
    main {
        padding: 0.75rem !important;
        margin: 0 auto !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* -- HERO section -- */
    .hero {
        padding: 2rem 1rem !important;
        min-height: auto !important;
    }
    .hero h1 {
        font-size: 1.7rem !important;
        color: #fff !important;
        opacity: 1 !important;
        visibility: visible !important;
        display: block !important;
        text-shadow: 0 2px 6px rgba(0,0,0,0.4) !important;
    }
    .hero p {
        font-size: 0.95rem !important;
        color: rgba(255,255,255,0.92) !important;
        opacity: 1 !important;
        visibility: visible !important;
        display: block !important;
    }

    /* -- PRODUCT GRID -- */
    .products-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
    }

    /* -- PRODUCT CARD: fix image loading and visibility -- */
    .product-card {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
        transition: box-shadow 0.2s ease !important;
        border-radius: 12px !important;
        /* Override KHATARNAK dark transparent background */
        background: #ffffff !important;
        background-image: none !important;
        backdrop-filter: none !important;
        border: 1px solid rgba(109,40,217,0.12) !important;
        box-shadow: 0 4px 16px rgba(109,40,217,0.1) !important;
        overflow: hidden !important;
    }
    .product-card:hover {
        transform: translateY(-2px) !important;
        box-shadow: 0 8px 20px rgba(109,40,217,0.18) !important;
    }
    /* Product info text: dark on white card */
    .product-card .product-info {
        background: #ffffff !important;
        padding: 0.75rem !important;
    }
    .product-card .product-title {
        color: #1e293b !important;
        font-size: 0.9rem !important;
        opacity: 1 !important;
    }
    .product-card .product-price {
        color: #6d28d9 !important;
        opacity: 1 !important;
        font-size: 1rem !important;
    }
    .product-card p {
        color: #4b5563 !important;
        opacity: 1 !important;
    }
    /* Product image — direct img tag (no wrapper div) */
    .product-image {
        height: 160px !important;
        width: 100% !important;
        object-fit: cover !important;
        display: block !important;
        border-radius: 0 !important;       /* card border-radius handles corners */
        background: #f3f4f6 !important;   /* placeholder bg when image loads */
        min-height: 120px !important;
    }
    /* If product-image is inside an <a> tag wrapper */
    .product-card a .product-image,
    .product-card > a > .product-image {
        width: 100% !important;
        height: 160px !important;
        display: block !important;
    }

    /* -- GLASS PANELS: override dark KHATARNAK transparency on mobile -- */
    .glass-panel {
        background: rgba(255, 255, 255, 0.92) !important;
        backdrop-filter: blur(8px) !important;
        border: 1px solid rgba(109,40,217,0.15) !important;
        box-shadow: 0 4px 20px rgba(0,0,0,0.08) !important;
        padding: 1rem !important;
        border-radius: 12px !important;
        color: #1e293b !important;
    }
    .auth-container, .profile-container, .checkout-container {
        width: 94% !important;
        margin: 1rem auto !important;
        padding: 1.25rem !important;
        box-sizing: border-box;
        border-radius: 14px;
    }
    .auth-container h2 { font-size: 1.4rem !important; }
    .auth-container .auth-subtitle { font-size: 0.85rem !important; }

    /* -- SECTIONS: force visibility -- */
    h1, h2, h3, h4, .section-title {
        opacity: 1 !important;
        visibility: visible !important;
        color: var(--primary-color) !important;
        text-shadow: none !important;
    }
    p, span, label, li, a {
        opacity: 1 !important;
        visibility: visible !important;
    }

    /* -- REVEAL animations: disable on mobile (they cause invisible content) -- */
    .reveal {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    .reveal.on-screen {
        opacity: 1 !important;
        transform: none !important;
    }
    .animated {
        animation: none !important;
    }

    /* -- PROFILE tabs -- */
    .profile-container { padding: 1rem !important; }
    .profile-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .tab-btn { padding: 0.5rem 0.8rem; font-size: 0.85rem; white-space: nowrap; }
    .address-grid { grid-template-columns: 1fr; }

    /* -- CHECKOUT -- */
    .checkout-container { padding: 1rem !important; margin: 0.75rem auto !important; }
    .checkout-progress .step-circle { width: 30px; height: 30px; font-size: 0.9rem; }

    /* -- CART items -- */
    .cart-item { flex-direction: column; text-align: center; }
    .cart-item-img { width: 100%; height: 160px; max-width: 200px; margin: 0 auto; }

    /* -- FOOTER -- */
    .footer-content { flex-direction: column; text-align: center; gap: 1.2rem; }
    .animated-footer { padding-top: 1.5rem; }
    .footer-note { font-size: 0.72rem !important; padding: 10px !important; margin: 5px 12px !important; }
    .footer-bottom { font-size: 0.65rem !important; }
    .footer-social .facebook-3d-btn { width: 42px !important; height: 42px !important; font-size: 1.8rem !important; }

    /* -- BUTTONS: full width on small screens -- */
    .btn { box-sizing: border-box; }

    /* -- Disable heavy navbar animations -- */
    .navbar, .navbar *, .navbar-rope {
        animation: none !important;
    }
    .navbar-rope { display: none !important; }

    /* -- CARD 3D hover: soften -- */
    .card-3d:hover { transform: translateY(-2px) !important; }

    /* -- Tables: card layout -- */
    table, thead, tbody, th, td, tr { display: block; }
    table thead tr { position: absolute; top: -9999px; left: -9999px; }
    table tr { margin-bottom: 0.75rem; border: 1px solid rgba(109,40,217,0.15); border-radius: 8px; background: rgba(255,255,255,0.5); }
    table td { border: none; position: relative; padding-left: 50%; text-align: right; }
    table td::before { content: attr(data-label); position: absolute; left: 0.75rem; width: 45%; text-align: left; font-weight: 600; }
}

/* Very small phones */
@media screen and (max-width: 420px) {
    .products-grid { grid-template-columns: 1fr !important; }
    .product-image { height: 180px !important; }
    /* Logo text: show but smaller on very small phones */
    .logo-text {
        display: inline !important;
        font-size: 0.78rem !important;
        color: #fff !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    .nav-logo-img { height: 24px !important; }
    .hero h1 { font-size: 1.45rem !important; }
    .hero p { font-size: 0.88rem !important; }
    .auth-container { padding: 1rem !important; }
    .footer-social .facebook-3d-btn { width: 36px !important; height: 36px !important; font-size: 1.5rem !important; }
    .footer-note { font-size: 0.6rem !important; }
    .footer-bottom { font-size: 0.55rem !important; }
    .animated-footer { padding-top: 3rem !important; }
    .liquid-layer { height: 55px !important; bottom: -18px !important; }
}




/* ========================================================= */
/* ===== KHATARNAK 3D COLORFUL ANIMATION OVERHAUL 2026 ===== */
/* ========================================================= */

/* 1. Global Colorful Animations */
@keyframes ultimateGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes spin3DLevelUp {
    0% { transform: perspective(800px) rotateY(0deg) rotateX(0deg) translateZ(0); filter: drop-shadow(0 0 10px #f472b6); }
    50% { transform: perspective(800px) rotateY(180deg) rotateX(20deg) translateZ(30px); filter: drop-shadow(0 0 25px #06b6d4); }
    100% { transform: perspective(800px) rotateY(360deg) rotateX(0deg) translateZ(0); filter: drop-shadow(0 0 10px #f472b6); }
}

@keyframes glowingBorderPulse {
    0% { box-shadow: 0 0 15px rgba(236,72,153,0.6), inset 0 0 15px rgba(236,72,153,0.3); border-color: rgba(236,72,153,0.8); }
    50% { box-shadow: 0 0 45px rgba(6,182,212,0.9), inset 0 0 30px rgba(6,182,212,0.6); border-color: rgba(6,182,212,1); }
    100% { box-shadow: 0 0 15px rgba(236,72,153,0.6), inset 0 0 15px rgba(236,72,153,0.3); border-color: rgba(236,72,153,0.8); }
}

@keyframes neonTextGlow {
    0% { text-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 20px #f472b6, 0 0 30px #f472b6; }
    50% { text-shadow: 0 0 10px #fff, 0 0 20px #06b6d4, 0 0 40px #06b6d4, 0 0 60px #06b6d4; }
    100% { text-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 20px #f472b6, 0 0 30px #f472b6; }
}

/* 2. Header & Logo Upgrade inside .navbar */
.navbar {
    background: linear-gradient(270deg, rgba(88,28,135,0.85), rgba(157,23,77,0.85), rgba(30,58,138,0.85), rgba(88,28,135,0.85)) !important;
    background-size: 800% 800% !important;
    animation: ultimateGradient 15s ease infinite !important;
    backdrop-filter: blur(20px) !important;
    border-bottom: 5px solid transparent !important;
    border-image: linear-gradient(90deg, #f472b6, #06b6d4, #10b981) 1 !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 40px rgba(236, 72, 153, 0.6) !important;
}

.logo .resin-crystal {
    animation: spin3DLevelUp 4s infinite linear !important;
}

.logo:hover {
    animation: neonTextGlow 1s infinite alternate !important;
}

/* Header Buttons & Nav Links (Physical 3D Push effect) */
.navbar .logo,
.navbar .nav-links a, 
.navbar .icon-btn, 
.navbar .tab-btn {
    color: #ffffff !important;
    text-shadow: 0 2px 5px rgba(0,0,0,0.4) !important;
    position: relative;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

.nav-links a:hover, .icon-btn:hover, .tab-btn.active {
    transform: translateY(-5px) scale(1.05) !important;
    color: #ffffff !important;
    text-shadow: 0 0 15px #f472b6, 0 0 30px #06b6d4 !important;
    background: rgba(255, 255, 255, 0.2) !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 25px rgba(236, 72, 153, 0.6), inset 0 2px 5px rgba(255,255,255,0.6) !important;
}

.nav-links a:active, .icon-btn:active {
    transform: translateY(5px) scale(0.95) !important;
    box-shadow: inset 0 5px 15px rgba(0,0,0,0.5), 0 0 10px rgba(0,0,0,0.2) !important;
}

/* 3. Global Buttons (Khatarnak 3D Buttons) */
/* Exclude nav control buttons from 3D effect */
.btn,
button:not(.mobile-menu-btn):not(.search-toggle-btn):not(.nav-search-submit):not(.sidebar-close-btn):not(.icon-btn),
input[type="submit"] {
    background: linear-gradient(45deg, #f472b6, #8b5cf6, #06b6d4) !important;
    background-size: 300% 300% !important;
    animation: ultimateGradient 4s ease infinite !important;
    border: none !important;
    color: white !important;
    font-weight: 900 !important;
    letter-spacing: 1px !important;
    box-shadow: 0 12px 0 #5b21b6, 0 15px 25px rgba(0,0,0,0.6), inset 0 3px 5px rgba(255,255,255,0.6) !important;
    transform: translateY(0) !important;
    transition: all 0.15s ease-out !important;
    text-transform: uppercase !important;
    border-radius: 12px !important;
}

.btn:hover,
button:not(.mobile-menu-btn):not(.search-toggle-btn):not(.nav-search-submit):not(.sidebar-close-btn):not(.icon-btn):hover,
input[type="submit"]:hover {
    transform: translateY(4px) !important;
    box-shadow: 0 8px 0 #5b21b6, 0 10px 15px rgba(0,0,0,0.5), inset 0 3px 5px rgba(255,255,255,0.6), 0 0 30px rgba(6, 182, 212, 0.8) !important;
    color: #fff !important;
}

.btn:active,
button:not(.mobile-menu-btn):not(.search-toggle-btn):not(.nav-search-submit):not(.sidebar-close-btn):not(.icon-btn):active,
input[type="submit"]:active {
    transform: translateY(12px) !important;
    box-shadow: 0 0 0 #5b21b6, 0 5px 10px rgba(0,0,0,0.4), inset 0 8px 15px rgba(0,0,0,0.7), 0 0 50px rgba(244, 114, 182, 1) !important;
}

/* Nav control buttons: clean flat style like wishlist/cart icons */
.mobile-menu-btn,
.search-toggle-btn,
.nav-search-submit,
.sidebar-close-btn {
    background: none !important;
    background-image: none !important;
    box-shadow: none !important;
    border: none !important;
    animation: none !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    font-weight: normal !important;
    transform: none !important;
    border-radius: 0 !important;
    padding: 6px !important;
    color: #fff !important;
}

/* 4. Glass Panels & Section Containers (Profile, Details, Address, Tables) */
.glass-panel, .profile-info-box, .address-card, .cart-item, .checkout-container, .product-card, .order-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.03)) !important;
    backdrop-filter: blur(25px) !important;
    border: 2px solid rgba(255, 255, 255, 0.25) !important;
    box-shadow: 0 25px 50px rgba(0,0,0,0.6), inset 0 2px 15px rgba(255,255,255,0.5), 20px 20px 60px rgba(139, 92, 246, 0.3) !important;
    border-radius: 20px !important;
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
    transform-style: preserve-3d;
}

/* Subtle Float on Hover */
.glass-panel:hover, .profile-info-box:hover, .address-card:hover, .cart-item:hover, .checkout-container:hover, .product-card:hover, .order-card:hover {
    transform: translateY(-4px) !important;
    border: 2px solid rgba(255,255,255,0.6) !important;
    box-shadow: 0 30px 60px rgba(0,0,0,0.5), inset 0 2px 15px rgba(255,255,255,0.5), 20px 20px 60px rgba(139, 92, 246, 0.4) !important;
    z-index: 10;
}

.profile-info-box div, .address-card h3, .order-card h4, .cart-item-title {
    text-shadow: 2px 5px 10px rgba(0,0,0,0.6) !important;
}

/* Global dark inputs for dark-background sections (profile, about, etc.) */
/* NOTE: auth-container inputs are overridden below to stay readable */
input[type="text"], input[type="email"], input[type="password"], input[type="number"], textarea, select {
    background: rgba(0,0,0,0.3) !important;
    border: 2px solid rgba(255,255,255,0.3) !important;
    color: #fff !important;
    box-shadow: inset 0 5px 15px rgba(0,0,0,0.6) !important;
    transition: all 0.3s ease !important;
    border-radius: 8px !important;
}

/* OVERRIDE: Auth container inputs must be readable (light background) */
.auth-container input[type="text"],
.auth-container input[type="email"],
.auth-container input[type="password"],
.auth-container textarea,
.auth-container select {
    background: #f8fafc !important;
    border: 1.5px solid #cbd5e1 !important;
    color: #0f172a !important;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.04) !important;
    padding: 0.9rem 1rem !important;
    font-size: 1rem !important;
}
.auth-container input[type="text"]:focus,
.auth-container input[type="email"]:focus,
.auth-container input[type="password"]:focus,
.auth-container textarea:focus {
    background: #ffffff !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(109, 40, 217, 0.15), inset 0 2px 4px rgba(0,0,0,0.04) !important;
    color: #0f172a !important;
}
.auth-container label {
    color: #334155 !important;
    text-shadow: none !important;
    font-weight: 600 !important;
}

input:focus, textarea:focus, select:focus {
    border-color: #06b6d4 !important;
    box-shadow: inset 0 5px 15px rgba(0,0,0,0.6), 0 0 25px rgba(6, 182, 212, 0.7) !important;
}

/* 5. Footer Full 3D Colorful Overhaul */
.animated-footer {
    background: linear-gradient(135deg, #1e1b4b, #312e81, #4c1d95, #831843, #1e1b4b) !important;
    background-size: 500% 500% !important;
    animation: ultimateGradient 10s ease infinite !important;
    border-top: 5px solid transparent !important;
    border-image: linear-gradient(90deg, #10b981, #06b6d4, #8b5cf6, #f472b6) 1 !important;
    box-shadow: 0 -20px 50px rgba(0,0,0,0.9), inset 0 5px 20px rgba(255,255,255,0.3) !important;
    transform-style: preserve-3d;
}

.footer-social .facebook-3d-btn {
    animation: spin3DLevelUp 5s infinite linear !important;
    box-shadow: 0 15px 30px rgba(0,0,0,0.9), inset 0 -5px 15px rgba(0,0,0,0.6), inset 0 5px 15px rgba(255,255,255,0.6) !important;
    border: 2px solid rgba(255,255,255,0.9) !important;
    transform-style: preserve-3d;
}

.footer-social .facebook-3d-btn:hover {
    animation-play-state: paused !important;
    transform: perspective(600px) scale(1.3) !important;
    box-shadow: 0 20px 50px rgba(24, 119, 242, 0.9), inset 0 -5px 15px rgba(0,0,0,0.6), inset 0 5px 15px rgba(255,255,255,0.9) !important;
}

.footer-links a:hover {
    color: #06b6d4 !important;
    transform: translateX(10px) !important;
    text-shadow: 0 0 20px #06b6d4 !important;
}

/* Glowing Form Elements for Custom Order & Contact */
form label {
    text-shadow: 0 0 10px rgba(255,255,255,0.5) !important;
    font-weight: 700;
}

/* Headings pop out */
h1, h2, h3, .section-title {
    text-shadow: 0 0 10px rgba(6, 182, 212, 0.5) !important;
}

/* ======================================================== */
/* Chat & Button mobile overrides (non-conflicting)          */
/* ======================================================== */
@media (max-width: 768px) {
    /* Ensure logo is always visible — opacity reset for animation freeze fix */
    .logo, .navbar .logo {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
        color: #fff !important;
    }

    /* Chat widget */
    #userChatWidget #toggleChatBtn,
    #toggleChatBtn {
        background: #06b6d4 !important;
        animation: none !important;
        box-shadow: 0 4px 10px rgba(0,0,0,0.2) !important;
    }
    #chatBox {
        backdrop-filter: none !important;
        background: #ffffff !important;
        box-shadow: 0 -5px 20px rgba(0,0,0,0.1) !important;
        border: 1px solid #e2e8f0 !important;
    }

    /* Hide rope decorations */
    .navbar-rope { display: none !important; }

    /* Hide heavy pseudo-elements on product cards */
    .product-card::before, .product-card::after { display: none !important; }
}


/* Navbar Glow Animation */
@keyframes stableGlow {
    0% { box-shadow: 0 10px 25px rgba(109, 40, 217, 0.2), 0 -2px 10px rgba(236, 72, 153, 0.1); }
    50% { box-shadow: 0 15px 35px rgba(109, 40, 217, 0.4), 0 -2px 15px rgba(236, 72, 153, 0.3); }
    100% { box-shadow: 0 10px 25px rgba(109, 40, 217, 0.2), 0 -2px 10px rgba(236, 72, 153, 0.1); }
}

header.navbar {
    animation: navSlideDown3D 0.8s cubic-bezier(0.16, 1, 0.3, 1) both, stableGlow 4s ease-in-out infinite alternate !important;
    perspective: 1200px;
    transform-style: preserve-3d;
    transform-origin: top center;
}

header.navbar:hover {
    transform: translateY(-2px) translateZ(8px) !important;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

.nav-search-container {
    display: flex;
    align-items: center;
    position: relative;
    margin-left: auto; /* push to right edge */
    margin-right: 8px;
}
.search-toggle-btn {
    display: none;
}
@keyframes borderDance {
    0% { border-color: #6d28d9; box-shadow: 0 0 15px #6d28d9, inset 0 0 10px #6d28d9; }
    33% { border-color: #ec4899; box-shadow: 0 0 25px #ec4899, inset 0 0 15px #ec4899; }
    66% { border-color: #06b6d4; box-shadow: 0 0 25px #06b6d4, inset 0 0 15px #06b6d4; }
    100% { border-color: #6d28d9; box-shadow: 0 0 15px #6d28d9, inset 0 0 10px #6d28d9; }
}

.nav-search-form {
    display: flex;
    align-items: center;
    background: rgba(20, 10, 40, 0.85); /* Dark high-tech background */
    border: 2px solid transparent;
    border-radius: 30px;
    padding: 0.3rem 0.6rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.nav-search-form::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%; width: 200%; height: 200%;
    background: conic-gradient(from 0deg, transparent, #ec4899, #06b6d4, transparent);
    animation: authSpin 4s linear infinite;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 0;
}

.nav-search-form:hover::before, .nav-search-form:focus-within::before {
    opacity: 1;
}

.nav-search-form::after {
    content: '';
    position: absolute;
    inset: 3px;
    background: rgba(20, 10, 40, 0.95);
    border-radius: 27px;
    z-index: 1;
}

.nav-search-input, .nav-search-submit {
    z-index: 2; /* Put above the pseudo backgrounds */
    position: relative;
}

.nav-search-form:hover, .nav-search-form:focus-within {
    transform: scale(1.03) translateZ(20px);
    animation: borderDance 3s linear infinite;
}

.nav-search-input {
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    padding: 0.3rem 0.5rem;
    font-size: 0.95rem;
    color: #ffffff;
    width: 160px;
    transition: width 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-weight: 500;
    margin: 0;
}
.nav-search-input::placeholder {
    color: rgba(255,255,255,0.6);
}
.nav-search-input:focus {
    width: 250px;
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}
.nav-search-submit {
    background: transparent;
    border: none !important;
    outline: none !important;
    color: #f472b6;
    cursor: pointer;
    padding: 0.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, color 0.2s, filter 0.2s;
    font-size: 1.3rem; /* Made icon slightly larger for better fit */
    margin: 0;
    line-height: 1;
}
.nav-search-submit:hover {
    transform: scale(1.3) rotate(15deg);
    color: #06b6d4;
    filter: drop-shadow(0 0 10px #06b6d4);
}

@media screen and (max-width: 900px) {
    .nav-search-container {
        position: absolute;
        right: 15px;
        top: 15px;
    }
    .search-toggle-btn {
        display: inline-flex;
    }
    .nav-search-form {
        position: absolute;
        top: 45px;
        right: -10px;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(15px);
        box-shadow: 0 10px 25px rgba(0,0,0,0.2);
        border: 2px solid var(--primary-color);
        padding: 0.5rem;
        border-radius: 12px;
        opacity: 0;
        visibility: hidden;
        transform: perspective(600px) rotateX(-15deg) translateY(-15px);
        transform-origin: top right;
        z-index: 1050;
        width: 280px;
        transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }
    .nav-search-form.active {
        opacity: 1;
        visibility: visible;
        transform: perspective(600px) rotateX(0deg) translateY(0);
    }
    .nav-search-input {
        width: 100%;
    }
    .nav-search-input:focus {
        width: 100%;
    }
}


/* ===== MOBILE SIMPLE MODE (NO 3D/ANIMATIONS) ===== */
@media (max-width: 768px) {
    * {
        animation: none !important;
        transition: none !important;
        transform: none !important;
        box-shadow: none !important;
        text-shadow: none !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        perspective: none !important;
        transform-style: flat !important;
    }
    
    body {
        background: #f8fafc !important; /* Flat background */
    }
    
    header.navbar, header.navbar.scrolled {
        background: #6d28d9 !important; /* Flat solid color */
        border: none !important;
    }
    
    .glass-panel, .product-card, .auth-container, .profile-container, .profile-info-box {
        background: #ffffff !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 8px !important;
    }
    
    .glass-panel::before, .glass-panel::after,
    .auth-container::before, .auth-container::after,
    .profile-container::before, .profile-container::after {
        display: none !important; /* Remove decorative background rings/gradients */
    }

    .nav-links a, .icon-btn, .tab-btn {
        background: transparent !important;
        border: 1px solid #e2e8f0 !important;
        color: inherit;
    }
    
    .btn,
    button:not(.mobile-menu-btn):not(.search-toggle-btn):not(.nav-search-submit):not(.sidebar-close-btn):not(.icon-btn):not(.quote-close-btn):not(#toggleChatBtn),
    input[type="submit"],
    .auth-container .btn {
        background: #6d28d9 !important;
        color: white !important;
        border: none !important;
        border-radius: 8px !important;
        box-shadow: none !important;
        transform: none !important;
        padding: 0.8rem 1.5rem !important;
        font-weight: 600 !important;
        letter-spacing: normal !important;
        text-shadow: none !important;
        font-size: 1rem !important;
    }
    
    .btn:active,
    button:not(.mobile-menu-btn):not(.search-toggle-btn):not(.nav-search-submit):not(.sidebar-close-btn):not(.icon-btn):not(.quote-close-btn):not(#toggleChatBtn):active,
    input[type="submit"]:active,
    .auth-container .btn:active {
        transform: none !important;
        box-shadow: none !important;
    }
    
    .auth-container .btn {
        margin-top: 1rem !important;
        width: 100% !important;
        display: block !important;
    }
    
    .resin-crystal, .logo .nav-logo-img {
        filter: none !important;
    }
    
    .hero h1 {
        background: none !important;
        -webkit-text-fill-color: #6d28d9 !important;
        color: #6d28d9 !important;
    }
    
    .hero p {
        color: #4b5563 !important;
    }
    
    footer {
        background: #1e293b !important;
        border-top: none !important;
    }
}
