/* =====================================================================
 * CodeBazaar — Master Theme CSS
 * Liquid Blur / Glassmorphism — extracted 1:1 from original HTML mockups
 * =====================================================================
 */

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    color: #ffffff;
    background-color: #0c2000;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ---------------------------------------------------------------------
 * 1. LIQUID MESH BACKGROUND  (the signature look — body wrapper)
 * ------------------------------------------------------------------- */
.liquid-mesh {
    background-color: #0c2000;
    background-image:
        radial-gradient(at 0%   0%,   #2f6c00 0px, transparent 50%),
        radial-gradient(at 100% 0%,   #9fe870 0px, transparent 50%),
        radial-gradient(at 100% 100%, #163300 0px, transparent 50%),
        radial-gradient(at 0%   100%, #2f6c00 0px, transparent 50%),
        radial-gradient(at 50%  50%,  #47672d 0px, transparent 50%);
    background-attachment: fixed;
    min-height: 100vh;
}

/* Animated variant (used on cart, checkout) */
.liquid-bg {
    background: linear-gradient(135deg, #092100 0%, #163300 25%, #2d3229 50%, #47672d 75%, #2f6c00 100%);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
}
@keyframes gradientBG {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Floating mesh spheres (decorative) */
.mesh-sphere {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
    opacity: 0.6;
    pointer-events: none;
}
.mesh-sphere.s1 { width: 400px; height: 400px; background: #9fe870; top: -100px; left: -100px;  }
.mesh-sphere.s2 { width: 500px; height: 500px; background: #2f6c00; bottom: -150px; right: -100px; }
.mesh-sphere.s3 { width: 300px; height: 300px; background: #47672d; top: 40%; left: 50%; transform: translate(-50%,-50%); }

/* ---------------------------------------------------------------------
 * 2. ULTRA GLASS PANELS
 * ------------------------------------------------------------------- */
.ultra-glass {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(60px);
    -webkit-backdrop-filter: blur(60px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
}

.glass-panel {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(80px);
    -webkit-backdrop-filter: blur(80px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.05),
                0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.glass-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 24px 0 rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}
.glass-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(159, 232, 112, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px 0 rgba(0,0,0,0.35), 0 0 20px rgba(159,232,112,0.15);
}

.glass-input {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    transition: all 0.25s ease;
}
.glass-input::placeholder { color: rgba(255,255,255,0.4); }
.glass-input:focus {
    outline: none;
    border-color: rgba(159, 232, 112, 0.6);
    background: rgba(255, 255, 255, 0.09);
    box-shadow: 0 0 0 3px rgba(159, 232, 112, 0.15);
}

/* ---------------------------------------------------------------------
 * 3. GRADIENT BORDER (decorative ring around glass cards)
 * ------------------------------------------------------------------- */
.glass-border-gradient {
    position: relative;
}
.glass-border-gradient::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1.5px;
    background: linear-gradient(135deg,
        rgba(255,255,255,0.4),
        rgba(255,255,255,0.05),
        rgba(159, 232, 112, 0.3));
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
}

/* ---------------------------------------------------------------------
 * 4. CTA BUTTONS
 * ------------------------------------------------------------------- */
.cta-gradient {
    background: linear-gradient(90deg, #9FE870 0%, #acf67c 100%);
    color: #092100;
    font-weight: 700;
    border: none;
    box-shadow: 0 0 20px rgba(159, 232, 112, 0.4);
    transition: all 0.25s ease;
    cursor: pointer;
}
.cta-gradient:hover {
    box-shadow: 0 0 32px rgba(159, 232, 112, 0.7);
    transform: translateY(-1px);
}
.cta-gradient:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-glass {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-weight: 600;
    transition: all 0.25s ease;
    cursor: pointer;
}
.btn-glass:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(159, 232, 112, 0.4);
}

.btn-outline {
    background: transparent;
    border: 1.5px solid rgba(159, 232, 112, 0.6);
    color: #9FE870;
    font-weight: 600;
    transition: all 0.25s ease;
}
.btn-outline:hover {
    background: rgba(159, 232, 112, 0.1);
    border-color: #9FE870;
}

.btn-danger {
    background: linear-gradient(90deg, #ba1a1a 0%, #e63946 100%);
    color: #fff; font-weight: 700; border: none;
    box-shadow: 0 0 20px rgba(186,26,26,0.4);
}

/* ---------------------------------------------------------------------
 * 5. MATERIAL SYMBOLS DEFAULTS
 * ------------------------------------------------------------------- */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    vertical-align: middle;
    user-select: none;
}
.material-symbols-outlined.fill { font-variation-settings: 'FILL' 1; }

/* ---------------------------------------------------------------------
 * 6. SCROLLBAR
 * ------------------------------------------------------------------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.05); }
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.35); }

/* ---------------------------------------------------------------------
 * 7. ANIMATIONS
 * ------------------------------------------------------------------- */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50%      { transform: translateY(-20px); }
}
.float-animation { animation: float 6s ease-in-out infinite; }

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(159, 232, 112, 0.4); }
    50%      { box-shadow: 0 0 32px rgba(159, 232, 112, 0.7); }
}
.pulse-glow { animation: pulse-glow 2.5s ease-in-out infinite; }

@keyframes marquee {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.marquee-track {
    display: flex;
    width: max-content;
    animation: marquee 30s linear infinite;
    gap: 3rem;
}
.marquee-fast .marquee-track { animation-duration: 18s; }

.fade-in        { animation: fadeIn 0.6s ease-out both; }
.fade-in-up     { animation: fadeInUp 0.7s ease-out both; }
@keyframes fadeIn   { from {opacity:0} to {opacity:1} }
@keyframes fadeInUp { from {opacity:0; transform: translateY(20px)} to {opacity:1; transform: none} }

/* ---------------------------------------------------------------------
 * 8. FORM ELEMENTS (dark glass inputs)
 * ------------------------------------------------------------------- */
input, textarea, select {
    color-scheme: dark;
}
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="search"],
input[type="url"],
input[type="date"],
input[type="datetime-local"],
textarea,
select {
    width: 100%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    padding: 12px 16px;
    border-radius: 12px;
    backdrop-filter: blur(20px);
    transition: all 0.25s ease;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
}
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: rgba(159, 232, 112, 0.6);
    background: rgba(255, 255, 255, 0.09);
    box-shadow: 0 0 0 3px rgba(159, 232, 112, 0.15);
}
label.form-label {
    display: block;
    color: rgba(255,255,255,0.85);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
}

/* OTP boxes */
.otp-box {
    width: 48px; height: 56px;
    text-align: center;
    font-size: 24px; font-weight: 700;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: #fff;
}
.otp-box:focus {
    border-color: #9FE870;
    box-shadow: 0 0 0 3px rgba(159,232,112,0.25);
}

/* ---------------------------------------------------------------------
 * 9. NAVBAR
 * ------------------------------------------------------------------- */
.cb-navbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(12, 32, 0, 0.6);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-link {
    color: rgba(255,255,255,0.75);
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 8px;
    transition: all 0.2s ease;
}
.nav-link:hover, .nav-link.active {
    color: #9FE870;
    background: rgba(159, 232, 112, 0.08);
}

/* ---------------------------------------------------------------------
 * 10. PRODUCT CARDS
 * ------------------------------------------------------------------- */
.product-card {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(40px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}
.product-card:hover {
    transform: translateY(-4px);
    border-color: rgba(159, 232, 112, 0.4);
    box-shadow: 0 16px 48px rgba(0,0,0,0.4), 0 0 28px rgba(159,232,112,0.15);
}
.product-card img { transition: transform 0.45s ease; }
.product-card:hover img { transform: scale(1.05); }

.badge {
    display: inline-block;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-radius: 999px;
}
.badge-primary { background: rgba(159,232,112,0.18); color: #c6f49b; border: 1px solid rgba(159,232,112,0.35); }
.badge-sale    { background: rgba(255,80,80,0.2);   color: #ffb3b3; border: 1px solid rgba(255,80,80,0.4); }
.badge-new     { background: rgba(56,189,248,0.2);  color: #93e0ff; border: 1px solid rgba(56,189,248,0.4); }
.badge-best    { background: rgba(251,191,36,0.2);  color: #ffe089; border: 1px solid rgba(251,191,36,0.4); }

/* ---------------------------------------------------------------------
 * 11. TABLES (admin / dashboard)
 * ------------------------------------------------------------------- */
.cb-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    color: rgba(255,255,255,0.9);
}
.cb-table thead th {
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.55);
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.02);
}
.cb-table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    font-size: 14px;
}
.cb-table tbody tr { transition: background 0.2s ease; }
.cb-table tbody tr:hover { background: rgba(255,255,255,0.03); }

/* ---------------------------------------------------------------------
 * 12. STATUS PILLS
 * ------------------------------------------------------------------- */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}
.status-active,
.status-approved,
.status-paid,
.status-completed,
.status-success    { background: rgba(126,211,33,0.18);  color: #c6f49b; }
.status-pending    { background: rgba(251,191,36,0.18);  color: #ffd267; }
.status-rejected,
.status-blocked,
.status-failed,
.status-cancelled  { background: rgba(255,80,80,0.18);   color: #ffb3b3; }
.status-draft,
.status-hidden     { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.7); }

/* ---------------------------------------------------------------------
 * 13. FLASH MESSAGES / TOASTS
 * ------------------------------------------------------------------- */
.flash-wrap {
    position: fixed;
    top: 80px; right: 20px;
    z-index: 9999;
    display: flex; flex-direction: column; gap: 12px;
    max-width: 380px;
}
.flash {
    padding: 14px 18px;
    border-radius: 12px;
    backdrop-filter: blur(40px);
    border: 1px solid rgba(255,255,255,0.2);
    font-weight: 500;
    color: #fff;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    animation: fadeInUp 0.4s ease-out;
}
.flash-success { background: rgba(126,211,33,0.2);  border-color: rgba(126,211,33,0.4); }
.flash-error   { background: rgba(186,26,26,0.25);  border-color: rgba(186,26,26,0.5); }
.flash-warning { background: rgba(251,191,36,0.2);  border-color: rgba(251,191,36,0.4); }
.flash-info    { background: rgba(56,189,248,0.2);  border-color: rgba(56,189,248,0.4); }

/* ---------------------------------------------------------------------
 * 14. FLOATING BUTTONS
 * ------------------------------------------------------------------- */
.float-btn {
    position: fixed;
    right: 24px;
    z-index: 60;
    width: 52px; height: 52px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(30px);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
}
.float-btn:hover { background: rgba(159,232,112,0.18); border-color: rgba(159,232,112,0.5); }
.float-btn.whatsapp { bottom: 24px; background: rgba(37, 211, 102, 0.85); border-color: rgba(37,211,102,0.4); }
.float-btn.telegram { bottom: 90px; background: rgba(34, 158, 217, 0.85); border-color: rgba(34,158,217,0.4); }
.float-btn.back-top { bottom: 156px; opacity: 0; pointer-events: none; transition: opacity 0.3s, background 0.25s; }
.float-btn.back-top.visible { opacity: 1; pointer-events: auto; }

/* ---------------------------------------------------------------------
 * 15. COOKIE BANNER
 * ------------------------------------------------------------------- */
.cookie-banner {
    position: fixed;
    bottom: 20px; left: 20px; right: 20px;
    max-width: 720px; margin: 0 auto;
    padding: 16px 20px;
    z-index: 70;
    background: rgba(12, 32, 0, 0.85);
    backdrop-filter: blur(40px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 16px;
    display: flex; flex-wrap: wrap; align-items: center; gap: 16px;
    color: rgba(255,255,255,0.9);
    box-shadow: 0 12px 48px rgba(0,0,0,0.4);
}

/* ---------------------------------------------------------------------
 * 16. UTILITIES
 * ------------------------------------------------------------------- */
.container-cb { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 768px) { .container-cb { padding: 0 16px; } }

.text-gradient {
    background: linear-gradient(90deg, #9FE870, #ffffff);
    -webkit-background-clip: text;
            background-clip: text;
    color: transparent;
}

.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
    margin: 32px 0;
}

a { color: inherit; text-decoration: none; }
a:hover { color: #9FE870; }

/* Skeleton shimmer */
.skeleton {
    background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.12) 50%, rgba(255,255,255,0.05) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}
@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Responsive helpers */
@media (max-width: 768px) {
    .hide-mobile { display: none !important; }
}
@media (min-width: 769px) {
    .show-mobile { display: none !important; }
}
