/* ========================================
   COSMIC PORTFOLIO - Main Stylesheet
   Phong cách: Vũ trụ tương lai (Cosmic Futuristic Dark)
   Font: Be Vietnam Pro
   ======================================== */

/* ===== CSS CUSTOM PROPERTIES (BIẾN CSS) ===== */
:root {
    /* Màu nền chính */
    --bg-primary: #060611;
    --bg-secondary: #0c0c1d;
    --bg-tertiary: #12122a;
    --bg-card: rgba(12, 12, 30, 0.8);
    --bg-card-hover: rgba(20, 20, 50, 0.95);
    --bg-glass: rgba(12, 12, 30, 0.6);

    /* Màu nhấn */
    --accent-purple: #7c3aed;
    --accent-blue: #3b82f6;
    --accent-cyan: #06b6d4;
    --accent-pink: #ec4899;
    --accent-indigo: #6366f1;

    /* Gradient */
    --gradient-primary: linear-gradient(135deg, #7c3aed, #3b82f6);
    --gradient-cosmic: linear-gradient(135deg, #7c3aed, #06b6d4);
    --gradient-text: linear-gradient(135deg, #a78bfa, #60a5fa, #22d3ee);
    --gradient-card: linear-gradient(145deg, rgba(124, 58, 237, 0.08), rgba(59, 130, 246, 0.05));
    --gradient-bg: linear-gradient(180deg, #060611 0%, #0c0c1d 30%, #0f0a2e 60%, #0c0c1d 80%, #060611 100%);

    /* Chữ */
    --text-primary: #f1f5f9;
    --text-secondary: rgba(241, 245, 249, 0.65);
    --text-muted: rgba(241, 245, 249, 0.35);

    /* Hiệu ứng phát sáng */
    --glow-purple: 0 0 30px rgba(124, 58, 237, 0.35);
    --glow-blue: 0 0 30px rgba(59, 130, 246, 0.35);
    --glow-cyan: 0 0 30px rgba(6, 182, 212, 0.35);
    --glow-pink: 0 0 30px rgba(236, 72, 153, 0.35);

    /* Viền */
    --border-subtle: rgba(124, 58, 237, 0.12);
    --border-glow: rgba(124, 58, 237, 0.35);

    /* Khoảng cách */
    --section-padding: 7rem 0;
    --container-max: 1200px;
    --container-padding: 0 1.5rem;

    /* Chuyển đổi */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);

    /* Font */
    --font-primary: 'Be Vietnam Pro', sans-serif;

    /* Bo góc */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --radius-xl: 30px;
    --radius-full: 50%;

    /* Navbar height */
    --navbar-height: 70px;
}

/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--navbar-height);
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.loading {
    overflow: hidden;
}

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    cursor: pointer;
    border: none;
    outline: none;
    font-family: var(--font-primary);
    background: none;
}

input,
textarea,
select {
    font-family: var(--font-primary);
    outline: none;
}

::selection {
    background: rgba(124, 58, 237, 0.35);
    color: var(--text-primary);
}

/* ===== UTILITY CLASSES ===== */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: var(--container-padding);
}

.text-gradient {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.required {
    color: var(--accent-pink);
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.8rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
    border: none;
    cursor: pointer;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(124, 58, 237, 0.5);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1.5px solid var(--border-glow);
}

.btn-outline:hover {
    background: rgba(124, 58, 237, 0.12);
    border-color: var(--accent-purple);
    transform: translateY(-2px);
    box-shadow: var(--glow-purple);
}

.btn-full {
    width: 100%;
    justify-content: center;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.btn-danger:hover {
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.4);
}

/* ===== LOADING SCREEN ===== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader {
    position: relative;
    width: 120px;
    height: 120px;
    margin-bottom: 2rem;
}

.loader-orbit {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 1.5px solid rgba(124, 58, 237, 0.15);
    border-radius: 50%;
    animation: loader-spin 3s linear infinite;
}

.loader-orbit-2 {
    width: 80%;
    height: 80%;
    top: 10%;
    left: 10%;
    border-color: rgba(59, 130, 246, 0.15);
    animation: loader-spin 2s linear infinite reverse;
}

.loader-orbit-3 {
    width: 60%;
    height: 60%;
    top: 20%;
    left: 20%;
    border-color: rgba(6, 182, 212, 0.15);
    animation: loader-spin 1.5s linear infinite;
}

.loader-planet {
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 10px;
    background: var(--accent-purple);
    border-radius: 50%;
    box-shadow: 0 0 15px var(--accent-purple), 0 0 30px rgba(124, 58, 237, 0.3);
}

.loader-planet-2 {
    background: var(--accent-blue);
    box-shadow: 0 0 15px var(--accent-blue), 0 0 30px rgba(59, 130, 246, 0.3);
    width: 8px;
    height: 8px;
}

.loader-planet-3 {
    background: var(--accent-cyan);
    box-shadow: 0 0 15px var(--accent-cyan), 0 0 30px rgba(6, 182, 212, 0.3);
    width: 6px;
    height: 6px;
}

.loader-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 18px;
    height: 18px;
    background: var(--gradient-primary);
    border-radius: 50%;
    box-shadow: 0 0 25px rgba(124, 58, 237, 0.5), 0 0 50px rgba(124, 58, 237, 0.2);
    animation: pulse-glow 2s ease-in-out infinite;
}

.loader-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 400;
    letter-spacing: 1px;
}

.loading-dots::after {
    content: '';
    animation: loading-dots 1.5s steps(4, end) infinite;
}

/* ===== STARFIELD CANVAS ===== */
#starfield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ===== CURSOR GLOW ===== */
#cursor-glow {
    position: fixed;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.06) 0%, transparent 70%);
    pointer-events: none;
    z-index: 1;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
    opacity: 0;
}

#cursor-glow.active {
    opacity: 1;
}

/* ===== HEADER / NAVBAR ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--navbar-height);
    z-index: 1000;
    transition: var(--transition-normal);
    background: transparent;
}

.header.scrolled {
    background: rgba(6, 6, 17, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 1.3rem;
    font-weight: 800;
    z-index: 1001;
    position: relative;
    text-decoration: none;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.brand-text {
    position: relative;
    background: linear-gradient(90deg,
            #f1f5f9 0%,
            #a78bfa 25%,
            #60a5fa 50%,
            #22d3ee 75%,
            #f1f5f9 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: brand-shimmer 4s ease-in-out infinite;
}

.brand-accent {
    font-weight: 800;
}

.brand-stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.brand-stars::before,
.brand-stars::after {
    content: '✦';
    position: absolute;
    font-size: 0.5rem;
    color: var(--accent-cyan);
    animation: brand-star-float 3s ease-in-out infinite;
    opacity: 0;
}

.brand-stars::before {
    top: -2px;
    right: -4px;
    animation-delay: 0s;
}

.brand-stars::after {
    content: '✧';
    bottom: -2px;
    left: 30%;
    font-size: 0.4rem;
    color: var(--accent-purple);
    animation-delay: 1.5s;
}

@keyframes brand-shimmer {

    0%,
    100% {
        background-position: 200% 0;
    }

    50% {
        background-position: -200% 0;
    }
}

@keyframes brand-star-float {

    0%,
    100% {
        opacity: 0;
        transform: translateY(0) scale(0.5);
    }

    30% {
        opacity: 1;
        transform: translateY(-4px) scale(1);
    }

    70% {
        opacity: 0.6;
        transform: translateY(-8px) scale(0.8);
    }
}

.nav-menu {
    display: none;
}

.nav-link {
    padding: 0.5rem 1.1rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition-normal);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
    background: rgba(124, 58, 237, 0.1);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

/* Sidebar Toggle (3 gạch) */
.sidebar-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 1001;
    padding: 8px;
    margin-right: 0.5rem;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.sidebar-toggle:hover {
    background: rgba(124, 58, 237, 0.1);
}

.sidebar-toggle .bar {
    display: block;
    width: 22px;
    height: 2.5px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition-normal);
}

.sidebar-toggle.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.sidebar-toggle.active .bar:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.sidebar-toggle.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Nav Search Bar */
.nav-search {
    flex: 1;
    max-width: 420px;
    position: relative;
    margin: 0 1rem;
}

.nav-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.85rem;
    pointer-events: none;
}

.nav-search input {
    width: 100%;
    padding: 0.6rem 1rem 0.6rem 2.5rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-family: var(--font-primary);
    transition: var(--transition-fast);
}

.nav-search input:focus {
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
    background: var(--bg-secondary);
}

.nav-search input::placeholder {
    color: var(--text-muted);
}

/* Search toggle (mobile only - hidden on desktop) */
.nav-search-toggle {
    display: none;
}

/* Search close button (hidden on desktop) */
.nav-search-close {
    display: none;
}

/* ===== SIDEBAR PANEL ===== */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 260px;
    height: 100vh;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-subtle);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 4px 0 30px rgba(0, 0, 0, 0.3);
}

.sidebar.active {
    left: 0;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
    font-family: var(--font-heading);
}

.sidebar-header .brand-icon {
    font-size: 1.5rem;
}

.sidebar-header .brand-text {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-primary);
}

.sidebar-header .brand-accent {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-label {
    padding: 1rem 1.5rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.sidebar-menu {
    list-style: none;
    padding: 0.3rem 0.8rem;
    flex: 1;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition-fast);
    margin-bottom: 0.15rem;
}

.sidebar-link:hover {
    background: rgba(124, 58, 237, 0.08);
    color: var(--text-primary);
}

.sidebar-link.active {
    background: rgba(124, 58, 237, 0.15);
    color: var(--accent-purple);
    font-weight: 600;
}

.sidebar-link i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

.sidebar-bottom {
    padding: 1rem 0.8rem;
    border-top: 1px solid var(--border-subtle);
    margin-top: auto;
}

.sidebar-logout {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    color: #f87171;
    font-size: 0.88rem;
    font-weight: 500;
    transition: var(--transition-fast);
    font-family: var(--font-primary);
    text-align: left;
}

.sidebar-logout:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.sidebar-logout i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

/* ===== SHARE TUT FREE - EMPTY STATE ===== */
.share-tut-empty {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-card);
    border: 1px dashed var(--border-subtle);
    border-radius: var(--radius-lg);
}

.share-tut-empty .empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(124, 58, 237, 0.08);
    border-radius: 50%;
    color: var(--text-muted);
    font-size: 2rem;
}

.share-tut-empty p {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.3rem;
}

.share-tut-empty span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Share Tut — căn giữa lưới & nội dung thẻ */
.section.share-tut .container {
    max-width: 960px;
    margin-left: auto;
    margin-right: auto;
}

.section.share-tut .section-header {
    text-align: center;
}

.share-tut-grid.products-grid,
.share-tut #tuts-display-grid.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 340px));
    justify-content: center;
    justify-items: stretch;
    gap: 1.8rem;
    margin-top: 1.5rem;
    width: 100%;
}

.tut-card-click {
    cursor: pointer;
    transition: var(--transition-normal);
}

.tut-card-click:focus-visible {
    outline: 2px solid var(--accent-cyan);
    outline-offset: 3px;
}

.tut-card-inner {
    padding-top: 1.5rem !important;
    text-align: center;
}

.tut-card-badge-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    color: var(--accent-cyan);
}

.tut-card-badge-row span {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.tut-card-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.65rem;
    margin-bottom: 0.5rem;
}

.tut-card-click .tut-card-external-link {
    margin-top: 0.85rem;
}

/* Modal bảng ghi chú tut */
.tut-notes-modal-inner {
    max-width: 520px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 2.25rem 1.85rem 1.75rem;
}

.tut-notes-modal-head {
    text-align: center;
    margin-bottom: 1.25rem;
    padding-right: 2rem;
}

.tut-notes-modal-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--accent-cyan);
    margin-bottom: 0.75rem;
}

.tut-notes-modal-title {
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.3;
}

.tut-notes-modal-body {
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.7;
    color: var(--text-secondary);
    padding: 1rem 1.1rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    text-align: left;
}

.tut-notes-modal-body.is-empty {
    display: none;
}

.tut-notes-modal-actions {
    margin-top: 1.25rem;
}

.tut-notes-modal-actions:empty {
    display: none;
}

/* ===== NAV TOOLS AREA ===== */
.nav-tools {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 1rem;
}

.nav-tool-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    background: rgba(124, 58, 237, 0.06);
    border: 1px solid transparent;
    transition: var(--transition-normal);
    font-size: 1rem;
}

.nav-tool-btn:hover {
    color: var(--text-primary);
    background: rgba(124, 58, 237, 0.15);
    border-color: var(--border-subtle);
    transform: translateY(-1px);
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    background: rgba(124, 58, 237, 0.06);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 0.25rem 0.5rem;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.5rem;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    transition: var(--transition-fast);
}

.lang-btn.active {
    color: var(--text-primary);
    background: rgba(124, 58, 237, 0.2);
}

.lang-btn:hover:not(.active) {
    color: var(--text-secondary);
}

.lang-btn i {
    font-size: 0.85rem;
    color: var(--accent-purple);
}

.lang-divider {
    color: var(--text-muted);
    font-size: 0.75rem;
    opacity: 0.4;
    user-select: none;
}

/* Cart Button */
.cart-tool-btn {
    position: relative;
}

.cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-pink);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: 50%;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(236, 72, 153, 0.4);
}

.cart-badge:empty,
.cart-badge[data-count="0"] {
    display: none;
}

.cart-badge.badge-pulse {
    animation: badge-bounce 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes badge-bounce {
    0% {
        transform: scale(1);
    }

    30% {
        transform: scale(1.5);
    }

    50% {
        transform: scale(0.85);
    }

    70% {
        transform: scale(1.15);
    }

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

/* ===== SYNC STATUS INDICATOR ===== */
.sync-status {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.65rem;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: var(--transition-normal);
    cursor: default;
    white-space: nowrap;
}

.sync-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    transition: background 0.3s ease, box-shadow 0.3s ease;
    flex-shrink: 0;
}

.sync-status.sync-online .sync-dot {
    background: #10b981;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
    animation: sync-pulse 2s ease-in-out infinite;
}

.sync-status.sync-online .sync-text {
    color: #10b981;
}

.sync-status.sync-offline .sync-dot {
    background: #f59e0b;
    box-shadow: 0 0 6px rgba(245, 158, 11, 0.4);
}

.sync-status.sync-offline .sync-text {
    color: #f59e0b;
}

.sync-text {
    transition: color 0.3s ease;
}

@keyframes sync-pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Nav Profile / Avatar */
.nav-profile-wrap {
    position: relative;
}

.nav-avatar-btn {
    position: relative;
    width: 42px;
    height: 42px;
    border-radius: var(--radius-full);
    overflow: visible;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--border-glow);
    background: var(--bg-tertiary);
    transition: var(--transition-normal);
    cursor: pointer;
}

.nav-avatar-btn:hover {
    border-color: var(--accent-purple);
    box-shadow: 0 0 15px rgba(124, 58, 237, 0.3);
    transform: scale(1.05);
}

.nav-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-full);
    display: none;
}

.nav-avatar-img.has-avatar {
    display: block;
}

.nav-avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border-radius: var(--radius-full);
    color: var(--accent-purple);
    font-size: 1.1rem;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.15), rgba(59, 130, 246, 0.1));
}

.nav-avatar-fallback.hidden {
    display: none;
}

.nav-online-dot {
    position: absolute;
    bottom: 1px;
    right: 1px;
    width: 10px;
    height: 10px;
    background: #22c55e;
    border-radius: 50%;
    border: 2px solid var(--bg-primary);
    z-index: 2;
}

/* User Dropdown */
.user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 260px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.97);
    transition: all 0.25s ease;
    overflow: hidden;
}

.user-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.dropdown-user-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem;
    background: rgba(124, 58, 237, 0.06);
}

.dropdown-avatar-wrap {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid var(--border-glow);
    background: var(--bg-tertiary);
}

.dropdown-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.dropdown-avatar-img.has-avatar {
    display: block;
}

.dropdown-avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--accent-purple);
    font-size: 1.2rem;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.15), rgba(59, 130, 246, 0.1));
}

.dropdown-avatar-fallback.hidden {
    display: none;
}

.dropdown-user-info {
    flex: 1;
    min-width: 0;
}

.dropdown-username {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-role-badge {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    border-radius: 20px;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-top: 0.2rem;
}

.dropdown-role-badge.admin {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    color: white;
    box-shadow: 0 2px 10px rgba(124, 58, 237, 0.3);
}

.dropdown-role-badge.guest {
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent-blue);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-subtle);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    width: 100%;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 500;
    transition: var(--transition-fast);
    text-align: left;
}

.dropdown-item:hover {
    background: rgba(124, 58, 237, 0.1);
    color: var(--text-primary);
}

.dropdown-item i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

.dropdown-item-logout {
    color: #f87171;
}

.dropdown-item-logout:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* ===== SECTIONS COMMON ===== */
.section {
    padding: var(--section-padding);
    position: relative;
    z-index: 2;
}

.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-tag {
    display: inline-block;
    padding: 0.4rem 1.2rem;
    background: rgba(124, 58, 237, 0.1);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    font-size: 0.85rem;
    color: var(--accent-purple);
    margin-bottom: 1rem;
    font-weight: 500;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.section-desc {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 550px;
    margin: 0 auto;
}

/* ===== WELCOME / HERO SECTION ===== */
.welcome-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: left;
    position: relative;
    z-index: 2;
    padding-top: calc(var(--navbar-height) + 2rem);
    padding-bottom: 2rem;
    overflow: hidden;
}

.welcome-container {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 1.5rem;
    align-items: start;
    position: relative;
    z-index: 3;
}

/* Welcome Main Card */
.welcome-main-card {
    position: relative;
    background: linear-gradient(145deg, rgba(15, 23, 50, 0.95), rgba(12, 12, 30, 0.9));
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 3rem;
    display: flex;
    gap: 2rem;
    align-items: center;
    overflow: hidden;
    backdrop-filter: blur(20px);
}

.welcome-card-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-cosmic);
}

.welcome-content {
    flex: 1;
    min-width: 0;
}

.welcome-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: var(--radius-xl);
    font-size: 0.75rem;
    font-weight: 700;
    color: #22c55e;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.online-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5);
    }

    50% {
        box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
    }
}

.welcome-title {
    font-size: clamp(1.6rem, 4vw, 2.8rem);
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.welcome-username {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: clamp(1.8rem, 4.5vw, 3.2rem);
}

.welcome-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    max-width: 480px;
}

.welcome-desc strong {
    color: var(--accent-purple);
    font-weight: 700;
}

.welcome-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Welcome Illustration */
.welcome-illustration {
    width: 280px;
    flex-shrink: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.welcome-chart-wrap {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 160px;
    padding: 1rem;
    position: relative;
}

.chart-bar {
    width: 28px;
    height: var(--h, 50%);
    background: linear-gradient(to top, var(--accent-purple), var(--accent-cyan));
    border-radius: 6px 6px 2px 2px;
    opacity: 0.7;
    animation: chart-grow 1s ease-out forwards;
    animation-delay: var(--delay, 0s);
    transform-origin: bottom;
    transform: scaleY(0);
}

@keyframes chart-grow {
    to {
        transform: scaleY(1);
    }
}

.chart-line-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.8;
}

/* Welcome Stats */
.welcome-stats {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition-normal);
    backdrop-filter: blur(20px);
}

.stat-card:hover {
    border-color: var(--border-glow);
    transform: translateY(-3px);
    box-shadow: var(--glow-purple);
}

.stat-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.15), rgba(6, 182, 212, 0.1));
    border-radius: 14px;
    color: var(--accent-purple);
    font-size: 1.2rem;
}

.stat-card h4 {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
}

.stat-role {
    font-size: 1.2rem;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ===== PROFILE MODAL ===== */
.profile-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 1rem;
}

.profile-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.profile-modal {
    width: 100%;
    max-width: 520px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    transform: scale(0.92) translateY(20px);
    transition: transform 0.35s ease;
    max-height: 90vh;
    overflow-y: auto;
}

.profile-modal-overlay.active .profile-modal {
    transform: scale(1) translateY(0);
}

.profile-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border-radius: 50%;
    font-size: 1rem;
    z-index: 10;
    transition: var(--transition-fast);
}

.profile-modal-close:hover {
    background: rgba(239, 68, 68, 0.8);
    transform: rotate(90deg);
}

/* Cover Photo */
.pm-cover-section {
    position: relative;
    height: 180px;
    overflow: hidden;
    background: linear-gradient(135deg, #1a1a3e, #0e0e2a);
}

.pm-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.pm-cover-img.has-cover {
    display: block;
}

.pm-cover-fallback {
    position: absolute;
    inset: 0;
}

.pm-cover-fallback.hidden {
    display: none;
}

.pm-cover-pattern {
    width: 100%;
    height: 100%;
    background:
        linear-gradient(135deg, rgba(124, 58, 237, 0.3) 0%, transparent 50%),
        linear-gradient(225deg, rgba(6, 182, 212, 0.2) 0%, transparent 50%),
        repeating-linear-gradient(45deg, transparent, transparent 20px, rgba(124, 58, 237, 0.03) 20px, rgba(124, 58, 237, 0.03) 40px);
}

.pm-change-cover-btn {
    position: absolute;
    bottom: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    color: white;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.pm-change-cover-btn:hover {
    background: rgba(124, 58, 237, 0.8);
}

/* Avatar Section */
.pm-avatar-section {
    display: flex;
    justify-content: center;
    margin-top: -55px;
    position: relative;
    z-index: 5;
}

.pm-avatar-wrap {
    position: relative;
    width: 110px;
    height: 110px;
}

.pm-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--bg-secondary);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    display: none;
}

.pm-avatar-img.has-avatar {
    display: block;
}

.pm-avatar-fallback {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
    color: white;
    font-size: 2.5rem;
    border: 4px solid var(--bg-secondary);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.pm-avatar-fallback.hidden {
    display: none;
}

.pm-change-avatar-btn {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-purple);
    color: white;
    border-radius: 50%;
    font-size: 0.75rem;
    cursor: pointer;
    transition: var(--transition-fast);
    border: 3px solid var(--bg-secondary);
    z-index: 6;
}

.pm-change-avatar-btn:hover {
    background: var(--accent-blue);
    transform: scale(1.1);
}

.pm-avatar-online {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 14px;
    height: 14px;
    background: #22c55e;
    border-radius: 50%;
    border: 3px solid var(--bg-secondary);
    z-index: 6;
}

/* Profile Info */
.pm-info-section {
    text-align: center;
    padding: 1rem 2rem 0;
}

.pm-username {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.3rem;
}

.pm-email {
    color: var(--text-secondary);
    font-size: 0.88rem;
    margin-bottom: 0.8rem;
}

.pm-role-badge {
    display: inline-block;
    padding: 0.25rem 1rem;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.pm-role-badge.admin {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    color: white;
    box-shadow: 0 2px 15px rgba(124, 58, 237, 0.4);
}

.pm-role-badge.guest {
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent-blue);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.pm-meta {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 1rem 0;
    border-top: 1px solid var(--border-subtle);
}

.pm-meta p {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.pm-meta i {
    color: var(--accent-purple);
    width: 18px;
    text-align: center;
}

.pm-status-active {
    color: #22c55e !important;
    font-weight: 600;
}

/* URL Inputs for avatar/cover */
.pm-url-section {
    padding: 1rem 1.5rem 1.5rem;
    border-top: 1px solid var(--border-subtle);
    margin-top: 0.5rem;
}

.pm-url-group {
    margin-bottom: 0.8rem;
}

.pm-url-group:last-child {
    margin-bottom: 0;
}

.pm-url-group label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
}

.pm-url-group label i {
    color: var(--accent-purple);
}

.pm-url-row {
    display: flex;
    gap: 0.4rem;
}

.pm-url-row input {
    flex: 1;
    padding: 0.6rem 0.8rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.82rem;
    transition: var(--transition-fast);
}

.pm-url-row input:focus {
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.pm-url-row input::placeholder {
    color: var(--text-muted);
}

.pm-url-save {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    color: white;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    transition: var(--transition-fast);
    flex-shrink: 0;
}

.pm-url-save:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.4);
}

/* Upload Button for Profile Modal */
.pm-upload-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.pm-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: var(--gradient-primary);
    color: white;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    white-space: nowrap;
}

.pm-upload-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.4);
}

.pm-upload-btn i {
    font-size: 0.9rem;
}

.upload-filename {
    font-size: 0.78rem;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 160px;
}

/* ===== ABOUT / PROFILE SECTION ===== */
.about-container {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 3rem;
    align-items: start;
}

/* Profile Card */
.profile-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    text-align: center;
    overflow: hidden;
    transition: var(--transition-normal);
}

.profile-card:hover {
    border-color: var(--border-glow);
    transform: translateY(-4px);
    box-shadow: var(--glow-purple);
}

.profile-card-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
}

.avatar-wrapper {
    position: relative;
    width: 130px;
    height: 130px;
    margin: 0 auto 1.5rem;
}

.avatar-ring {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: var(--gradient-cosmic);
    animation: rotate 6s linear infinite;
    z-index: 0;
}

.avatar-ring::after {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: var(--bg-card);
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    position: relative;
    z-index: 1;
}

.avatar-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-card);
    border-radius: 50%;
    font-size: 3rem;
    color: var(--accent-purple);
    z-index: 1;
}

.avatar-fallback.hidden {
    display: none;
}

.profile-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
}

.profile-bio {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.7;
    margin-bottom: 1.2rem;
}

.profile-skills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem;
    margin-bottom: 1.5rem;
}

.skill-tag {
    padding: 0.3rem 0.8rem;
    background: rgba(124, 58, 237, 0.1);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    font-size: 0.78rem;
    color: var(--accent-purple);
    font-weight: 500;
    transition: var(--transition-fast);
}

.skill-tag:hover {
    background: rgba(124, 58, 237, 0.2);
    border-color: var(--accent-purple);
    box-shadow: var(--glow-purple);
}

.profile-social {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.social-link {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: rgba(124, 58, 237, 0.08);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: 1.1rem;
    transition: var(--transition-normal);
}

.social-link:hover {
    background: var(--accent-purple);
    border-color: var(--accent-purple);
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--glow-purple);
}

.profile-contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.contact-item i {
    color: var(--accent-purple);
    width: 16px;
}

/* About Details */
.about-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.detail-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.8rem;
    transition: var(--transition-normal);
}

.detail-card:hover {
    border-color: var(--border-glow);
    transform: translateY(-4px);
    box-shadow: var(--glow-purple);
}

.detail-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(124, 58, 237, 0.1);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    font-size: 1.3rem;
    color: var(--accent-purple);
}

.detail-card h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.detail-card p {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.6;
}

.custom-note {
    grid-column: 1 / -1;
    background: var(--gradient-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.8rem 2rem;
    position: relative;
}

.quote-icon {
    color: var(--accent-purple);
    font-size: 1.5rem;
    opacity: 0.5;
    margin-bottom: 0.5rem;
    display: block;
}

.custom-note p {
    color: var(--text-secondary);
    font-style: italic;
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ===== PRODUCTS SECTION (Redesigned Horizontal Cards) ===== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.8rem;
}

/* ── Product Card: Horizontal Layout ── */
.product-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: linear-gradient(135deg, rgba(12, 12, 35, 0.95) 0%, rgba(6, 6, 20, 0.98) 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    gap: 1.5rem;
}

.product-card:hover {
    background: linear-gradient(135deg, rgba(18, 18, 50, 0.98) 0%, rgba(10, 10, 30, 1) 100%);
    border-color: rgba(59, 130, 246, 0.2);
    box-shadow: 0 4px 24px rgba(59, 130, 246, 0.08);
}

/* ── Left Side: Product Info ── */
.product-info-left {
    flex: 1;
    min-width: 0;
}

.product-name {
    font-size: 1rem;
    font-weight: 700;
    color: #FFFFFF;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
    line-height: 1.4;
}

.product-desc {
    color: #8A93A6;
    font-size: 0.82rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
    margin: 0;
}

/* ── Right Side: Price + Action Buttons ── */
.product-actions-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.product-price {
    font-size: 1.15rem;
    font-weight: 800;
    color: #3B82F6;
    white-space: nowrap;
    -webkit-text-fill-color: #3B82F6;
    background: none;
}

/* Add to Cart — outline style */
.product-cart-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: transparent;
    color: #FFFFFF;
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: var(--font-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.product-cart-btn i {
    font-size: 0.85rem;
}

.product-cart-btn:hover {
    border-color: rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-1px);
}

.product-cart-btn.added {
    border-color: #10b981;
    color: #34d399;
    background: rgba(16, 185, 129, 0.08);
}

/* Buy Now — filled blue */
.product-buy-now-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 20px;
    background: #2563EB;
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    font-family: var(--font-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.product-buy-now-btn:hover {
    background: #1d4ed8;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
    transform: translateY(-1px);
}

/* ── Legacy styles kept for compatibility (modal, admin) ── */
.product-image-wrapper {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: var(--bg-tertiary);
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-image-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-card);
    font-size: 3rem;
    color: var(--accent-purple);
    opacity: 0.4;
}

.product-body {
    padding: 1.5rem;
}

.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid var(--border-subtle);
}

.product-buy-btn {
    padding: 0.5rem 1.2rem;
    background: var(--gradient-primary);
    color: white;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    transition: var(--transition-normal);
    border: none;
    cursor: pointer;
}

.product-buy-btn:hover {
    box-shadow: var(--glow-purple);
    transform: scale(1.05);
}

.no-products {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--text-muted);
}

.no-products i {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}



/* ===== CONTACT SECTION ===== */
.contact-container {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 3rem;
    align-items: start;
}

.contact-form {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
}

.form-group {
    margin-bottom: 1.3rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.8rem 1rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: var(--transition-normal);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
    background: rgba(255, 255, 255, 0.06);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%237c3aed' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
}

.form-group select option {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.form-error {
    display: block;
    color: #f87171;
    font-size: 0.78rem;
    margin-top: 0.3rem;
    min-height: 1rem;
}

.form-group.error input,
.form-group.error textarea {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-success {
    margin-top: 1.5rem;
    padding: 1.2rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--radius-md);
    text-align: center;
    color: #34d399;
    animation: fade-in-up 0.5s ease;
}

.form-success i {
    font-size: 1.5rem;
    margin-bottom: 0.3rem;
    display: block;
}

/* Contact Info */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.8rem;
    transition: var(--transition-normal);
}

.info-card:hover {
    border-color: var(--border-glow);
    transform: translateY(-3px);
    box-shadow: var(--glow-purple);
}

.info-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(124, 58, 237, 0.1);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    font-size: 1.2rem;
    color: var(--accent-purple);
}

.info-card h4 {
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.info-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    word-break: break-all;
}

.contact-social-links {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.contact-social-links .social-link {
    width: 38px;
    height: 38px;
    font-size: 1rem;
}

/* ===== FOOTER ===== */
.footer {
    position: relative;
    z-index: 2;
    padding: 3rem 0;
    border-top: 1px solid var(--border-subtle);
}

.footer-glow {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 2px;
    background: var(--gradient-primary);
    filter: blur(2px);
}

.footer-content {
    text-align: center;
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    margin-bottom: 1.2rem;
}

.footer-social .social-link {
    width: 38px;
    height: 38px;
    font-size: 0.95rem;
}

.footer-copy {
    color: var(--text-muted);
    font-size: 0.82rem;
}

/* ===== BACK TO TOP BUTTON ===== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    color: white;
    border-radius: var(--radius-md);
    font-size: 1rem;
    z-index: 900;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition-normal);
    box-shadow: var(--glow-purple);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 40px rgba(124, 58, 237, 0.5);
}

/* ===== ADMIN BUTTON ===== */
.admin-btn {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    font-size: 1.1rem;
    z-index: 900;
    transition: var(--transition-normal);
}

.admin-btn:hover {
    background: var(--accent-purple);
    border-color: var(--accent-purple);
    color: white;
    box-shadow: var(--glow-purple);
    transform: rotate(90deg);
}

/* ===== ADMIN PANEL ===== */
.admin-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-normal);
}

.admin-overlay.active {
    opacity: 1;
    visibility: visible;
}

.admin-panel {
    position: fixed;
    top: 0;
    right: -440px;
    width: 420px;
    max-width: 90vw;
    height: 100vh;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-subtle);
    z-index: 2000;
    overflow-y: auto;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding-bottom: 2rem;
}

.admin-panel.active {
    right: 0;
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 1.5rem 1rem;
    border-bottom: 1px solid var(--border-subtle);
}

.admin-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-header h3 i {
    color: var(--accent-purple);
}

.admin-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    transition: var(--transition-fast);
    font-size: 1.1rem;
}

.admin-close:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

/* Admin Tabs */
.admin-tabs {
    display: flex;
    padding: 1rem 1.5rem 0;
    gap: 0.5rem;
}

.admin-tab {
    flex: 1;
    padding: 0.7rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.admin-tab:hover {
    color: var(--text-primary);
    background: rgba(124, 58, 237, 0.08);
}

.admin-tab.active {
    background: rgba(124, 58, 237, 0.15);
    color: var(--accent-purple);
}

.admin-tab-content {
    display: none;
    padding: 1.5rem;
}

.admin-tab-content.active {
    display: block;
    animation: fade-in-up 0.3s ease;
}

.admin-form .form-group {
    margin-bottom: 1rem;
}

.admin-form .form-group label {
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.admin-divider {
    border: none;
    border-top: 1px solid var(--border-subtle);
    margin: 1.5rem 0;
}

.admin-section-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-purple);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* Admin Products List */
.admin-products-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.admin-product-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.admin-product-item:hover {
    border-color: var(--border-glow);
}

.admin-product-thumb {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: var(--bg-tertiary);
    flex-shrink: 0;
}

.admin-product-info {
    flex: 1;
    min-width: 0;
}

.admin-product-info h5 {
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-product-info span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.admin-product-actions {
    display: flex;
    gap: 0.4rem;
    flex-shrink: 0;
}

.admin-product-actions button {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    transition: var(--transition-fast);
}

.admin-product-actions .edit-btn {
    color: var(--accent-blue);
    background: rgba(59, 130, 246, 0.1);
}

.admin-product-actions .edit-btn:hover {
    background: var(--accent-blue);
    color: white;
}

.admin-product-actions .delete-btn {
    color: #f87171;
    background: rgba(239, 68, 68, 0.1);
}

.admin-product-actions .delete-btn:hover {
    background: #ef4444;
    color: white;
}

/* ===== MODALS ===== */
.modal {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-normal);
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
}

.modal-content {
    position: relative;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 1;
    animation: modal-enter 0.4s ease;
}

.modal.active .modal-content {
    animation: modal-enter 0.4s ease;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
    z-index: 2;
    transition: var(--transition-fast);
    font-size: 1rem;
}

.modal-close:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

/* Product Detail Modal */
.product-detail-modal .modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.modal-image-wrapper {
    height: 100%;
    min-height: 350px;
    overflow: hidden;
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.modal-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-info {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.modal-name {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.modal-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.modal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
}

.modal-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.9rem;
    border-radius: var(--radius-xl);
    font-size: 0.78rem;
    font-weight: 600;
}

.warranty-badge {
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.2);
    color: var(--accent-cyan);
}

.status-badge.in-stock {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.status-badge.out-of-stock {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.modal-price {
    font-size: 2rem;
    font-weight: 900;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
}

.modal-buy-btn {
    text-align: center;
}

/* ===== Modal Actions Wrap ===== */
.modal-actions-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* ===== Cart Row (Qty + Add to Cart) ===== */
.modal-cart-row {
    display: flex;
    align-items: stretch;
    gap: 0.75rem;
}

/* Quantity Selector */
.qty-selector {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
    flex-shrink: 0;
    transition: border-color 0.3s ease;
}

.qty-selector:hover {
    border-color: var(--accent-purple);
}

.qty-btn {
    width: 38px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.qty-btn:hover {
    background: rgba(124, 58, 237, 0.15);
    color: var(--accent-purple);
}

.qty-btn:active {
    transform: scale(0.9);
}

.qty-value {
    width: 36px;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    user-select: none;
    font-family: var(--font-primary);
}

/* Add to Cart Button */
.btn-cart-add {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(6, 182, 212, 0.15));
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    font-weight: 700;
    font-family: var(--font-primary);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn-cart-add::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #10b981, #06b6d4);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-cart-add:hover {
    border-color: #10b981;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
}

.btn-cart-add:hover::before {
    opacity: 1;
}

.btn-cart-add i,
.btn-cart-add span {
    position: relative;
    z-index: 1;
}

.btn-cart-add:active {
    transform: translateY(0) scale(0.98);
}

/* Cart Added Success State */
.btn-cart-add.cart-added {
    background: linear-gradient(135deg, #10b981, #06b6d4) !important;
    border-color: #10b981 !important;
    color: white !important;
    pointer-events: none;
}

.btn-cart-add.cart-added::before {
    opacity: 1;
}

/* Disabled state for out-of-stock */
.btn-cart-add.disabled,
.modal-buy-btn.disabled {
    opacity: 0.4;
    pointer-events: none;
    filter: grayscale(0.5);
}

/* Cart success fly animation */
@keyframes cart-fly {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    50% {
        opacity: 0.8;
        transform: translateY(-30px) scale(0.6);
    }

    100% {
        opacity: 0;
        transform: translateY(-60px) scale(0.3);
    }
}

.cart-fly-icon {
    position: fixed;
    font-size: 1.4rem;
    color: #34d399;
    pointer-events: none;
    z-index: 9999;
    animation: cart-fly 0.7s ease-out forwards;
    filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.5));
}

/* Product Form Modal */
.modal-form-content {
    max-width: 550px;
    padding: 2.5rem;
}

.modal-form-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* ===== SCROLL REVEAL ANIMATION ===== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ===== KEYFRAME ANIMATIONS ===== */
@keyframes loader-spin {
    0% {
        transform: rotate(0deg);
    }

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

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(124, 58, 237, 0.4), 0 0 40px rgba(124, 58, 237, 0.15);
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        box-shadow: 0 0 35px rgba(124, 58, 237, 0.6), 0 0 60px rgba(124, 58, 237, 0.25);
        transform: translate(-50%, -50%) scale(1.1);
    }
}

@keyframes loading-dots {
    0% {
        content: '';
    }

    25% {
        content: '.';
    }

    50% {
        content: '..';
    }

    75% {
        content: '...';
    }

    100% {
        content: '';
    }
}

@keyframes float-slow {

    0%,
    100% {
        transform: translateY(0) translateX(0);
    }

    25% {
        transform: translateY(-25px) translateX(10px);
    }

    50% {
        transform: translateY(-10px) translateX(-15px);
    }

    75% {
        transform: translateY(-30px) translateX(5px);
    }
}

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

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

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes modal-enter {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

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

    100% {
        background-position: 200% 0;
    }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: rgba(124, 58, 237, 0.3);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(124, 58, 237, 0.5);
}

/* ===== SETTINGS MODAL ===== */
.settings-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-tertiary);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.settings-header i {
    font-size: 1.3rem;
    color: var(--accent-purple);
}

.settings-header h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.settings-body {
    padding: 1.5rem 2rem 2rem;
}

.settings-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.settings-section h3 i {
    color: var(--accent-purple);
    font-size: 0.9rem;
}

.settings-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.settings-form .pm-url-group label {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.3rem;
    display: block;
}

.settings-form .pm-url-group input {
    width: 100%;
    padding: 0.7rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: var(--font-primary);
    transition: var(--transition-fast);
}

.settings-form .pm-url-group input:focus {
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

/* ===== HERO ORBS ===== */
.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.18;
    pointer-events: none;
    z-index: 1;
}

.hero-orb-1 {
    width: 450px;
    height: 450px;
    background: var(--accent-purple);
    top: 10%;
    right: -10%;
    animation: float-slow 8s ease-in-out infinite;
}

.hero-orb-2 {
    width: 350px;
    height: 350px;
    background: var(--accent-blue);
    bottom: 15%;
    left: -8%;
    animation: float-slow 10s ease-in-out infinite 2s;
}

.hero-orb-3 {
    width: 250px;
    height: 250px;
    background: var(--accent-cyan);
    top: 60%;
    right: 20%;
    animation: float-slow 7s ease-in-out infinite 4s;
}

/* ===== RESPONSIVE (TABLET) ===== */
@media (max-width: 992px) {
    .welcome-container {
        grid-template-columns: 1fr;
    }

    .welcome-main-card {
        flex-direction: column;
    }

    .welcome-illustration {
        width: 100%;
    }

    .welcome-stats {
        flex-direction: row;
    }

    .about-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .profile-card {
        max-width: 420px;
        margin: 0 auto;
    }

    .about-details {
        grid-template-columns: 1fr 1fr;
    }

    .contact-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .product-detail-modal .modal-body {
        grid-template-columns: 1fr;
    }

    .modal-image-wrapper {
        min-height: 250px;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    }

    .modal-info {
        padding: 1.8rem;
    }
}

/* ===== RESPONSIVE (MOBILE) ===== */
@media (max-width: 768px) {
    :root {
        --section-padding: 5rem 0;
        --navbar-height: 60px;
    }

    body {
        overflow-x: hidden;
    }

    .nav-tools {
        gap: 0.3rem;
        flex-shrink: 0;
    }

    .nav-tools .lang-switcher {
        display: none;
    }

    .nav-search {
        display: none;
        position: fixed;
        top: var(--navbar-height);
        left: 0;
        right: 0;
        max-width: 100%;
        margin: 0;
        padding: 0.75rem 1rem;
        background: var(--bg-secondary);
        border-bottom: 1px solid var(--border-subtle);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
        z-index: 1000;
        flex: none;
        animation: search-slide-down 0.25s ease-out;
    }

    .nav-search.active {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .nav-search input {
        font-size: 0.9rem;
        padding: 0.6rem 1rem 0.6rem 2.5rem;
        flex: 1;
    }

    .nav-search-icon {
        left: 24px;
        font-size: 0.85rem;
    }

    .nav-search-close {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        border-radius: var(--radius-sm);
        color: var(--text-muted);
        background: rgba(124, 58, 237, 0.1);
        border: none;
        cursor: pointer;
        flex-shrink: 0;
        transition: var(--transition-fast);
    }

    .nav-search-close:hover {
        color: var(--text-primary);
        background: rgba(124, 58, 237, 0.2);
    }

    .nav-search-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        border-radius: var(--radius-sm);
        color: var(--text-secondary);
        background: rgba(124, 58, 237, 0.06);
        border: 1px solid transparent;
        cursor: pointer;
        transition: var(--transition-fast);
        font-size: 0.9rem;
        margin-left: auto;
    }

    .nav-search-toggle:hover {
        color: var(--text-primary);
        background: rgba(124, 58, 237, 0.15);
        border-color: var(--border-subtle);
    }

    @keyframes search-slide-down {
        from {
            opacity: 0;
            transform: translateY(-8px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .nav-brand {
        font-size: 1.05rem;
        flex-shrink: 0;
    }

    .welcome-hero {
        padding-top: calc(var(--navbar-height) + 1rem);
        min-height: auto;
    }

    .welcome-container {
        grid-template-columns: 1fr;
    }

    .welcome-main-card {
        padding: 2rem 1.5rem;
        flex-direction: column;
    }

    .welcome-title {
        font-size: clamp(1.4rem, 6vw, 2rem);
    }

    .welcome-username {
        font-size: clamp(1.5rem, 7vw, 2.2rem);
    }

    .welcome-stats {
        flex-direction: row;
    }

    .welcome-stats .stat-card {
        min-width: 0;
        flex: 1;
    }

    .section-title {
        font-size: 1.7rem;
    }

    .about-details {
        grid-template-columns: 1fr;
    }

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

    .contact-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .contact-form {
        padding: 1.5rem;
    }

    .admin-panel {
        width: 100%;
        right: -100%;
    }

    .admin-tabs {
        flex-wrap: wrap;
        gap: 0.4rem;
    }

    .admin-tab {
        flex: 1 1 calc(50% - 0.4rem);
        max-width: calc(50% - 0.2rem);
        font-size: 0.78rem;
        padding: 0.6rem 0.5rem;
    }

    .modal-form-content {
        padding: 1.5rem;
    }

    .modal-content {
        max-height: 95vh;
        max-height: 95dvh;
    }

    .hero-orb {
        display: none;
    }

    .back-to-top {
        bottom: 1.2rem;
        right: 1.2rem;
        width: 42px;
        height: 42px;
    }

    .admin-btn {
        bottom: 1.2rem;
        left: 1.2rem;
        width: 42px;
        height: 42px;
    }

    .pm-cover-section {
        height: 140px;
    }

    .pm-avatar-wrap {
        width: 90px;
        height: 90px;
    }

    .pm-info-section {
        padding: 0.8rem 1.2rem 0;
    }

    .pm-url-section {
        padding: 1rem 1.2rem 1.2rem;
    }

    /* Services grid - 2 cols on mobile */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    a.service-card {
        padding: 1.2rem 1rem;
    }

    .service-desc {
        font-size: 0.78rem;
        margin-bottom: 0.6rem;
        -webkit-line-clamp: 3;
    }

    .service-icon-wrap {
        width: 42px;
        height: 42px;
        font-size: 1rem;
        margin-bottom: 0.6rem;
    }

    .service-name {
        font-size: 0.9rem;
    }

    .service-number {
        font-size: 1.4rem;
    }

    /* Product detail modal */
    .product-detail-modal .modal-body {
        grid-template-columns: 1fr;
    }

    .modal-image-wrapper {
        min-height: 200px;
        max-height: 250px;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    }

    .modal-info {
        padding: 1.5rem;
    }

    .modal-name {
        font-size: 1.3rem;
    }

    .modal-price {
        font-size: 1.6rem;
    }

    /* User dropdown fix */
    .user-dropdown {
        right: -1rem;
        width: 240px;
    }
}

/* ===== RESPONSIVE (SMALL MOBILE) ===== */
@media (max-width: 480px) {
    :root {
        --section-padding: 4rem 0;
        --container-padding: 0 0.85rem;
    }

    .navbar {
        gap: 0;
    }

    .nav-brand {
        font-size: 0.95rem;
    }

    .welcome-title {
        font-size: 1.3rem;
    }

    .welcome-username {
        font-size: 1.5rem;
    }

    .welcome-main-card {
        padding: 1.5rem 1.2rem;
    }

    .welcome-badge {
        font-size: 0.68rem;
        padding: 0.3rem 0.8rem;
        margin-bottom: 1rem;
    }

    .stat-card {
        padding: 1rem 0.7rem;
    }

    .stat-value {
        font-size: 1.3rem;
    }

    .stat-card h4 {
        font-size: 0.72rem;
    }

    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }

    .profile-card {
        padding: 1.5rem;
    }

    .avatar-wrapper {
        width: 100px;
        height: 100px;
    }

    .section-title {
        font-size: 1.4rem;
    }

    .section-header {
        margin-bottom: 2.5rem;
    }

    .modal-info {
        padding: 1.2rem;
    }

    .modal-name {
        font-size: 1.2rem;
    }

    .modal-price {
        font-size: 1.5rem;
    }

    .nav-avatar-btn {
        width: 34px;
        height: 34px;
    }

    .nav-tool-btn {
        width: 34px;
        height: 34px;
        font-size: 0.9rem;
    }

    .modal-cart-row {
        flex-direction: column;
    }

    .qty-selector {
        align-self: flex-start;
    }

    /* Services */
    .services-title {
        font-size: 1.15rem;
    }

    .service-name {
        font-size: 0.95rem;
    }

    .service-number {
        font-size: 1.5rem;
    }

    /* Contact form */
    .contact-form {
        padding: 1.2rem;
    }

    .info-card {
        padding: 1.2rem;
    }

    /* Category products grid - vertical list (mobile) */
    .category-products-grid {
        display: flex;
        flex-direction: column;
        gap: 8px;
        padding: 0.75rem;
        overflow-x: visible;
        scroll-snap-type: none;
    }

    .category-products-grid::-webkit-scrollbar {
        display: none;
    }

    .category-products-grid .product-card {
        flex: none;
        scroll-snap-align: unset;
    }

    /* Keep card horizontal on mobile, just tighter */
    .product-card {
        flex-direction: row;
        align-items: center;
        padding: 12px 14px;
        gap: 10px;
    }

    .product-info-left {
        flex: 1;
        min-width: 0;
    }

    .product-name {
        font-size: 0.82rem;
    }

    .product-desc {
        font-size: 0.72rem;
    }

    .product-actions-right {
        flex-shrink: 0;
        gap: 6px;
        flex-wrap: nowrap;
    }

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

    /* Icon only on mobile — hide text */
    .product-cart-btn {
        padding: 7px 9px;
        font-size: 0;
        gap: 0;
        border-radius: 6px;
    }

    .product-cart-btn i {
        font-size: 0.85rem;
    }

    .product-buy-now-btn {
        padding: 7px 12px;
        font-size: 0.68rem;
    }

    .category-filter-nav {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 0.4rem;
        padding: 0.6rem;
    }

    .cat-filter-btn {
        font-size: 0.68rem;
        padding: 0.35rem 0.5rem;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .user-dropdown {
        right: -0.5rem;
        width: 220px;
    }
}

/* ===== DỊCH VỤ NỔI BẬT (thẻ mở tab chỉ một mục) ===== */
.services-highlight {
    grid-column: 1 / -1;
}

.services-title {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    margin-bottom: 1.25rem;
    text-align: center;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
}

@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
}

a.service-card {
    display: block;
    position: relative;
    text-decoration: none;
    color: inherit;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.75rem 1.5rem;
    overflow: hidden;
    transition: var(--transition-normal);
    backdrop-filter: blur(20px);
}

a.service-card:hover {
    border-color: var(--border-glow);
    transform: translateY(-4px);
    box-shadow: var(--glow-purple);
}

.service-number {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    font-size: 2rem;
    font-weight: 800;
    opacity: 0.12;
    line-height: 1;
}

.service-icon-wrap {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.2), rgba(6, 182, 212, 0.12));
    color: var(--accent-cyan);
    font-size: 1.35rem;
    margin-bottom: 1rem;
}

.service-name {
    font-size: 1.05rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: 0.02em;
}

.service-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin-bottom: 1.25rem;
}

.service-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent-cyan);
    letter-spacing: 0.04em;
}

a.service-card:hover .service-link {
    gap: 0.65rem;
}

@keyframes cosmicEmbedIn {
    from {
        opacity: 0;
        transform: translateY(22px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: no-preference) {

    html.embed-only[data-embed="share-tut"] main>section#share-tut,
    html.embed-only[data-embed="about"] main>section#about,
    html.embed-only[data-embed="products"] main>section#products {
        animation: cosmicEmbedIn 0.62s cubic-bezier(0.22, 1, 0.36, 1) both;
    }
}

/* Trang chủ: ẩn section Share Tut Free; tab ?embed=share-tut vẫn hiện bình thường */
html:not(.embed-only) main>section#share-tut {
    display: none !important;
}

/* Chỉ xem một mục: ẩn khung trang, chỉ giữ nội dung section tương ứng */
html.embed-only #starfield,
html.embed-only #cursor-glow,
html.embed-only #footer,
html.embed-only #back-to-top,
html.embed-only #admin-btn {
    display: none !important;
}

html.embed-only #loading-screen {
    display: none !important;
}

html.embed-only main>section {
    display: none !important;
}

html.embed-only[data-embed="share-tut"] main>section#share-tut,
html.embed-only[data-embed="about"] main>section#about,
html.embed-only[data-embed="products"] main>section#products {
    display: block !important;
}

html.embed-only main>section#share-tut,
html.embed-only main>section#about,
html.embed-only main>section#products {
    min-height: 100vh;
    padding-top: 5rem;
    padding-bottom: 3rem;
}

html.embed-only {
    scroll-padding-top: 0;
}


/* ===== PRINT STYLES ===== */
@media print {

    .header,
    .back-to-top,
    .admin-btn,
    .admin-panel,
    .admin-overlay,
    .modal,
    #starfield,
    #cursor-glow,
    .loading-screen,
    .hero-orb,
    .profile-modal-overlay {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }
}

/* ===== CATEGORY SYSTEM ===== */

/* Category filter nav bar */
.category-filter-nav {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 14px;
    position: relative;
}

.cat-filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.45rem 0.6rem;
    border-radius: 999px;
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.02em;
    white-space: nowrap;
    text-transform: uppercase;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cat-filter-btn img {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
}

.cat-filter-btn:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.4);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.cat-filter-btn.active {
    background: linear-gradient(135deg, #1d4ed8, #3b82f6);
    border-color: #3b82f6;
    color: #fff;
    box-shadow: 0 0 14px rgba(59, 130, 246, 0.4);
}

.cat-filter-btn .cat-count {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    padding: 0 6px;
    font-size: 0.72rem;
    font-weight: 700;
}

.cat-filter-btn.active .cat-count {
    background: rgba(255, 255, 255, 0.3);
}

/* Products grouped container */
.products-by-category {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

/* Category section block */
.category-section {
    scroll-margin-top: 150px;
}

/* Blue header bar */
.category-section-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.75rem 1.2rem;
    background: linear-gradient(90deg, #1d4ed8 0%, #2563eb 60%, #3b82f6 100%);
    border-radius: 10px 10px 0 0;
    margin-bottom: 0;
}

.category-section-header .cat-header-img {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
}

.category-section-header .cat-header-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    color: #fff;
    flex-shrink: 0;
}

.category-section-header h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
    flex: 1;
}

.category-section-header .cat-product-count {
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.75);
    background: rgba(255, 255, 255, 0.15);
    padding: 2px 10px;
    border-radius: 999px;
}

/* Products grid inside category — vertical list for horizontal cards */
.category-products-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-top: none;
    border-radius: 0 0 10px 10px;
}

/* Admin categories list item */
.admin-category-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border-radius: 10px;
    margin-bottom: 0.6rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-category-thumb {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1rem;
    flex-shrink: 0;
}

.admin-category-info {
    flex: 1;
    min-width: 0;
}

.admin-category-info h5 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 2px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-category-info span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

@media (max-width: 600px) {
    .category-products-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 0.9rem;
        padding: 0.9rem;
    }

    .category-filter-nav {
        gap: 0.4rem;
        padding: 0.75rem;
    }
}

/* ===== COSMIC CONFIRM DIALOG ===== */

.cosmic-confirm-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.cosmic-confirm-overlay.active {
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    pointer-events: all;
    opacity: 1;
    visibility: visible;
}

.cosmic-confirm-dialog {
    position: relative;
    background: linear-gradient(145deg, rgba(20, 22, 40, 0.97), rgba(12, 14, 28, 0.98));
    border: 1px solid rgba(139, 92, 246, 0.25);
    border-radius: 20px;
    padding: 2.5rem 2rem 2rem;
    max-width: 420px;
    width: 90%;
    text-align: center;
    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(139, 92, 246, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transform: scale(0.7) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.35s ease;
    opacity: 0;
    overflow: hidden;
}

.cosmic-confirm-overlay.active .cosmic-confirm-dialog {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.cosmic-confirm-glow {
    position: absolute;
    top: -30%;
    left: -30%;
    width: 160%;
    height: 160%;
    background: radial-gradient(ellipse at center,
            rgba(99, 102, 241, 0.08) 0%,
            rgba(139, 92, 246, 0.04) 40%,
            transparent 70%);
    animation: cosmicConfirmGlow 4s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes cosmicConfirmGlow {
    from {
        opacity: 0.6;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1.05);
    }
}

.cosmic-confirm-icon {
    position: relative;
    z-index: 1;
    width: 72px;
    height: 72px;
    margin: 0 auto 1.2rem;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.15));
    border: 2px solid rgba(99, 102, 241, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: cosmicIconFloat 3s ease-in-out infinite;
}

.cosmic-confirm-icon i {
    font-size: 1.8rem;
    background: linear-gradient(135deg, #6366f1, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@keyframes cosmicIconFloat {

    0%,
    100% {
        transform: translateY(0);
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.2);
    }

    50% {
        transform: translateY(-4px);
        box-shadow: 0 6px 20px rgba(99, 102, 241, 0.15);
    }
}

.cosmic-confirm-title {
    position: relative;
    z-index: 1;
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.5rem;
}

.cosmic-confirm-msg {
    position: relative;
    z-index: 1;
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.6;
    margin: 0 0 1.8rem;
}

.cosmic-confirm-actions {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 0.8rem;
    justify-content: center;
}

.cosmic-confirm-btn {
    padding: 0.7rem 1.6rem;
    border-radius: 12px;
    font-size: 0.88rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.cosmic-btn-no {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cosmic-btn-no:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.cosmic-btn-yes {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    color: #fff;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
}

.cosmic-btn-yes:hover {
    background: linear-gradient(135deg, #b91c1c, #dc2626);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.45);
}

.cosmic-btn-yes:active,
.cosmic-btn-no:active {
    transform: translateY(0) scale(0.97);
}

.cosmic-confirm-overlay.closing .cosmic-confirm-dialog {
    transform: scale(0.85) translateY(10px);
    opacity: 0;
}

.cosmic-confirm-overlay.closing {
    opacity: 0;
}

@media (max-width: 480px) {
    .cosmic-confirm-dialog {
        padding: 2rem 1.2rem 1.5rem;
    }

    .cosmic-confirm-actions {
        flex-direction: column-reverse;
    }

    .cosmic-confirm-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ===== CART DRAWER ===== */
.cart-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.cart-drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: -420px;
    width: 400px;
    max-width: 92vw;
    height: 100vh;
    height: 100dvh;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-subtle);
    z-index: 2001;
    display: flex;
    flex-direction: column;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.5);
}

.cart-drawer.active {
    right: 0;
}

/* Header */
.cart-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
    background: rgba(12, 12, 30, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    flex-shrink: 0;
}

.cart-drawer-title {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.cart-drawer-title i {
    font-size: 1.15rem;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.cart-drawer-title h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.cart-drawer-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    background: var(--gradient-primary);
    color: white;
    font-size: 0.72rem;
    font-weight: 700;
    border-radius: 12px;
    line-height: 1;
}

.cart-drawer-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 1rem;
    transition: all 0.2s ease;
    background: transparent;
    border: none;
    cursor: pointer;
}

.cart-drawer-close:hover {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
    transform: rotate(90deg);
}

/* Body (scrollable items) */
.cart-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-purple) transparent;
}

.cart-drawer-body::-webkit-scrollbar {
    width: 5px;
}

.cart-drawer-body::-webkit-scrollbar-track {
    background: transparent;
}

.cart-drawer-body::-webkit-scrollbar-thumb {
    background: rgba(124, 58, 237, 0.3);
    border-radius: 10px;
}

/* Cart Item */
.cart-item {
    display: flex;
    gap: 0.85rem;
    padding: 0.85rem;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    margin-bottom: 0.6rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    animation: cartItemSlideIn 0.35s ease backwards;
}

.cart-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cart-item:hover {
    border-color: rgba(124, 58, 237, 0.25);
    background: var(--bg-card-hover);
    transform: translateX(-2px);
}

.cart-item:hover::before {
    opacity: 1;
}

@keyframes cartItemSlideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Cart Item Image */
.cart-item-img {
    width: 65px;
    height: 65px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
}

.cart-item-img-fallback {
    width: 65px;
    height: 65px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    font-size: 1.3rem;
    flex-shrink: 0;
}

/* Cart Item Info */
.cart-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.cart-item-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-price {
    font-size: 0.82rem;
    font-weight: 700;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Cart Item Controls */
.cart-item-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.15rem;
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    overflow: hidden;
}

.cart-item-qty-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cart-item-qty-btn:hover {
    background: rgba(124, 58, 237, 0.15);
    color: var(--accent-purple);
}

.cart-item-qty-btn:active {
    transform: scale(0.85);
}

.cart-item-qty-value {
    width: 28px;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-primary);
    user-select: none;
}

/* Remove Button */
.cart-item-remove {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.78rem;
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.25s ease;
}

.cart-item-remove:hover {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.25);
    color: #f87171;
    transform: scale(1.1);
}

.cart-item-remove:active {
    transform: scale(0.9);
}

/* Cart Item Remove Animation */
.cart-item.removing {
    animation: cartItemRemove 0.35s ease forwards;
}

@keyframes cartItemRemove {
    to {
        opacity: 0;
        transform: translateX(60px) scale(0.8);
        max-height: 0;
        padding: 0;
        margin: 0;
        border-width: 0;
        overflow: hidden;
    }
}

/* Empty State */
.cart-drawer-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
}

.cart-empty-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(124, 58, 237, 0.08);
    margin-bottom: 1.25rem;
    animation: emptyCartBounce 2s ease-in-out infinite;
}

.cart-empty-icon i {
    font-size: 2rem;
    color: var(--text-muted);
}

@keyframes emptyCartBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

.cart-drawer-empty p {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.3rem;
}

.cart-drawer-empty span {
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* Footer */
.cart-drawer-footer {
    padding: 1rem 1.25rem 1.25rem;
    border-top: 1px solid var(--border-subtle);
    background: rgba(12, 12, 30, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.cart-summary {
    padding: 0.75rem 0;
}

.cart-summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.25rem 0;
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.cart-summary-row span:last-child {
    font-weight: 700;
    color: var(--text-primary);
}

.cart-summary-total {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-style: italic;
    justify-content: center;
    margin-top: 0.25rem;
}

.cart-summary-total span {
    color: var(--text-muted) !important;
    font-weight: 500 !important;
}

.cart-checkout-btn {
    padding: 0.9rem 1.5rem;
    font-size: 0.92rem;
}

.cart-clear-btn {
    padding: 0.65rem 1rem;
    font-size: 0.82rem;
    border-color: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.cart-clear-btn:hover {
    background: rgba(239, 68, 68, 0.1) !important;
    border-color: rgba(239, 68, 68, 0.4) !important;
    color: #ef4444;
}

/* Responsive */
@media (max-width: 480px) {
    .cart-drawer {
        width: 100%;
        max-width: 100vw;
        right: -105vw;
    }

    .cart-drawer.active {
        right: 0;
    }

    .cart-item-img,
    .cart-item-img-fallback {
        width: 55px;
        height: 55px;
    }

    .cart-drawer-header {
        padding: 1rem 1.25rem;
    }

    .cart-drawer-footer {
        padding: 0.85rem 1rem 1rem;
    }
}

/* Sync status responsive */
@media (max-width: 600px) {
    .sync-text {
        display: none;
    }

    .sync-status {
        padding: 0.3rem;
    }
}