/**
 * LinksRobo - Main Stylesheet
 * B2B Robotics & Smart Manufacturing
 * Theme: Professional Tech / Space Tech
 */

/* ================================
   CSS Variables
   ================================ */
:root {
    /* Background Colors - Deep Space Theme */
    --bg-primary: #0a0e27;
    --bg-secondary: #111936;
    --bg-tertiary: #1a2342;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.06);
    --bg-glass: rgba(17, 25, 54, 0.8);

    /* Accent Colors - Tech Blue & Cyan */
    --accent-primary: #3b82f6;
    --accent-secondary: #06b6d4;
    --accent-tertiary: #8b5cf6;
    --accent-success: #10b981;
    --accent-warning: #f59e0b;
    --accent-danger: #ef4444;

    /* Gradient Definitions */
    --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
    --gradient-secondary: linear-gradient(135deg, #8b5cf6 0%, #3b82f6 100%);
    --gradient-accent: linear-gradient(135deg, #06b6d4 0%, #10b981 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --gradient-dark: linear-gradient(180deg, #0a0e27 0%, #111936 100%);
    --gradient-glow: radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.15) 0%, transparent 70%);

    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.8);
    --text-muted: rgba(255, 255, 255, 0.5);
    --text-disabled: rgba(255, 255, 255, 0.3);

    /* Border & Divider */
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);
    --divider: rgba(255, 255, 255, 0.05);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 40px rgba(59, 130, 246, 0.2);
    --shadow-glow-cyan: 0 0 40px rgba(6, 182, 212, 0.2);

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* Layout */
    --header-height: 72px;
    --container-max: 1280px;
}

/* ================================
   Base Reset
   ================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Background Grid Pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(59, 130, 246, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: -1;
}

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

a:hover {
    color: var(--accent-secondary);
}

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

ul, ol {
    list-style: none;
}

button, input, textarea, select {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

/* ================================
   Layout
   ================================ */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

main {
    min-height: calc(100vh - var(--header-height) - 400px);
    padding-top: var(--header-height);
}

/* ================================
   Glass Card Effect
   ================================ */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: var(--transition-normal);
}

.glass-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* ================================
   Buttons
   ================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition-normal);
    border: none;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--text-primary);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
    color: var(--text-primary);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-hover);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.btn-accent {
    background: var(--gradient-accent);
    color: var(--text-primary);
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow-cyan);
    color: var(--text-primary);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 16px;
    border-radius: var(--radius-lg);
}

/* ================================
   Forms
   ================================ */
.form-group {
    margin-bottom: var(--space-lg);
}

.form-group label {
    display: block;
    margin-bottom: var(--space-sm);
    font-weight: 500;
    font-size: 14px;
    color: var(--text-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    outline: none;
    transition: var(--transition-normal);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group select option {
    background-color: #1a1a2e;
    color: #ffffff;
}

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

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
}

/* Custom Select */
.custom-select-wrapper {
    position: relative;
    width: 100%;
}

.custom-select {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-normal);
}

.custom-select:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.custom-select-value {
    color: var(--text-muted);
}

.custom-select i {
    font-size: 12px;
    color: var(--text-muted);
    transition: transform 0.2s;
}

.custom-select-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 250px;
    overflow-y: auto;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-top: 4px;
    z-index: 100;
    box-shadow: var(--shadow-lg);
}

.custom-select-dropdown.active {
    display: block;
}

.custom-select-option {
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s;
    color: var(--text-primary);
}

.custom-select-option:hover {
    background: rgba(255, 255, 255, 0.1);
}

.custom-select-option.selected {
    background: rgba(59, 130, 246, 0.2);
    color: var(--accent-primary);
}

/* ================================
   Header & Navigation
   ================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: var(--transition-normal);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
}

.logo i {
    color: var(--accent-primary);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.nav-menu > li > a {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 10px 16px;
    border: 1px solid transparent;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 14px;
    border-radius: var(--radius-md);
    transition: var(--transition-normal);
}

.nav-menu > li > a:hover,
.nav-menu > li > a.active {
    color: var(--text-primary);
    background: var(--bg-card);
}

.nav-menu > li > a.active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(6, 182, 212, 0.14) 100%);
    border: 1px solid rgba(59, 130, 246, 0.38);
    box-shadow: 0 0 0 1px rgba(6, 182, 212, 0.12) inset, 0 8px 20px rgba(59, 130, 246, 0.12);
}

.nav-menu > li.active-parent > a {
    color: var(--text-primary);
}

.nav-menu > li {
    position: relative;
}

/* Dropdown */
.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    margin-top: var(--space-sm);
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-sm);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition-normal);
    z-index: 100;
}

.nav-menu > li:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown li a {
    display: block;
    padding: 10px 14px;
    border: 1px solid transparent;
    color: var(--text-secondary);
    font-size: 14px;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.dropdown li a:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.dropdown li a.active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.18) 0%, rgba(6, 182, 212, 0.12) 100%);
    color: var(--text-primary);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.cart-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid transparent;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    transition: var(--transition-normal);
}

.cart-icon:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.cart-icon.active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.22) 0%, rgba(6, 182, 212, 0.16) 100%);
    color: var(--text-primary);
    border: 1px solid rgba(59, 130, 246, 0.35);
    box-shadow: 0 8px 18px rgba(59, 130, 246, 0.14);
}

.cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 20px;
    height: 20px;
    background: var(--accent-danger);
    color: var(--text-primary);
    font-size: 11px;
    font-weight: 600;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-floating-cart {
    display: none;
}

/* User Dropdown */
.user-dropdown {
    position: relative;
}

.user-dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    height: 40px;
    padding: 0 12px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-normal);
}

.user-dropdown-toggle:hover {
    background: var(--bg-card-hover);
}

.user-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 200px;
    margin-top: var(--space-sm);
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-sm);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition-normal);
    z-index: 100;
}

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

.user-dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    min-height: 40px;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.2;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.user-dropdown-menu a i {
    width: 18px;
    flex: 0 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 14px;
    line-height: 1;
}

.user-dropdown-menu a span {
    display: inline-block;
    line-height: 1.2;
}

.user-dropdown-menu a:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    width: 40px;
    height: 40px;
    background: var(--bg-card);
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition-normal);
}

.mobile-menu-btn:hover {
    background: var(--bg-card-hover);
}

/* Mobile Nav */
.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-normal);
}

.mobile-nav.active {
    display: flex;
    opacity: 1;
    visibility: visible;
}

.mobile-nav-content {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 320px;
    max-width: 85vw;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-color);
    padding: 0;
    transform: translateX(-100%);
    transition: var(--transition-normal);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.mobile-nav.active .mobile-nav-content {
    transform: translateX(0);
}

.mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg) var(--space-xl);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.mobile-nav-logo {
    display: flex;
    align-items: center;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition-fast);
}

.mobile-nav-logo:hover {
    color: var(--accent-primary);
    transform: translateX(4px);
}

.mobile-nav-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.mobile-nav-close:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.mobile-nav-menu {
    list-style: none;
    padding: var(--space-lg) 0;
    margin: 0;
    flex: 1;
    overflow-y: auto;
}

.mobile-nav-menu li a {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-xl);
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
    transition: var(--transition-fast);
    border-left: 3px solid transparent;
}

.mobile-nav-menu li a:hover,
.mobile-nav-menu li a:active {
    background: var(--bg-card);
    color: var(--text-primary);
    border-left-color: var(--accent-primary);
}

.mobile-nav-menu li a.active {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.22) 0%, rgba(6, 182, 212, 0.12) 100%);
    color: var(--text-primary);
    border-left-color: var(--accent-primary);
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.2);
}

.mobile-nav-menu li a i {
    width: 20px;
    text-align: center;
    color: var(--accent-primary);
}

.mobile-nav-menu li.submenu a {
    padding-left: calc(var(--space-xl) + 20px + var(--space-md));
    font-size: 14px;
    color: var(--text-muted);
}

.mobile-nav-menu li.submenu a.active {
    color: var(--text-primary);
    background: rgba(59, 130, 246, 0.12);
}

.mobile-nav-footer {
    padding: var(--space-xl);
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
}

.mobile-nav-footer .btn {
    width: 100%;
    justify-content: center;
}

.mobile-nav-footer .btn i {
    width: 18px;
    flex: 0 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1;
}

.mobile-nav-footer .btn span {
    line-height: 1.2;
}

/* ================================
   Footer
   ================================ */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: var(--space-3xl) 0 var(--space-xl);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: var(--space-2xl);
    margin-bottom: var(--space-2xl);
}

.footer-col h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: var(--space-lg);
    color: var(--text-primary);
}

.footer-col p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.8;
}

.footer-col ul li {
    margin-bottom: var(--space-sm);
}

.footer-col ul li a {
    font-size: 14px;
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.footer-col ul li a:hover {
    color: var(--accent-primary);
}

.social-links {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    transition: var(--transition-normal);
}

.social-links a:hover {
    background: var(--gradient-primary);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.footer-bottom {
    padding-top: var(--space-xl);
    border-top: 1px solid var(--divider);
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
}

/* ================================
   Floating Social Icons
   ================================ */
.floating-social {
    position: fixed;
    right: var(--space-lg);
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    z-index: 999;
}

.floating-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 18px;
    transition: var(--transition-normal);
    position: relative;
}

.floating-social a:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: var(--text-primary);
    transform: translateX(-4px);
}

.floating-social a::before {
    content: attr(title);
    position: absolute;
    right: 55px;
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transform: translateX(10px);
    transition: var(--transition-normal);
}

.floating-social a:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

/* ================================
   Back To Top
   ================================ */
.back-to-top-btn {
    position: fixed;
    right: var(--space-lg);
    bottom: var(--space-lg);
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(59, 130, 246, 0.35);
    border-radius: 50%;
    background: rgba(17, 25, 54, 0.92);
    color: #ffffff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    cursor: pointer;
    z-index: 1190;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity 0.22s ease, transform 0.22s ease, background 0.22s ease, border-color 0.22s ease;
}

.back-to-top-btn i {
    font-size: 16px;
}

.back-to-top-btn:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.95) 0%, rgba(6, 182, 212, 0.95) 100%);
    border-color: rgba(59, 130, 246, 0.6);
    color: #ffffff;
}

.back-to-top-btn.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

/* ================================
   Page Banner
   ================================ */
.page-banner {
    background: var(--gradient-glow), var(--bg-secondary);
    padding: var(--space-3xl) 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 70% 50%, rgba(6, 182, 212, 0.1) 0%, transparent 50%);
}

.page-banner .container {
    position: relative;
    z-index: 1;
}

.page-banner h1 {
    font-size: 40px;
    font-weight: 700;
    margin-bottom: var(--space-sm);
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-banner p {
    font-size: 16px;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* ================================
   Section Styles
   ================================ */
.section {
    padding: var(--space-3xl) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.section-header h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: var(--space-sm);
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-header p {
    font-size: 16px;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* ================================
   Product Cards
   ================================ */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
}

.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition-normal);
}

.product-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.product-image {
    position: relative;
    aspect-ratio: 1;
    background: #ffffff !important;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #ffffff !important;
    transition: var(--transition-slow);
}

.product-card .product-image,
.product-card .product-image img,
.product-card .product-image video {
    background: #ffffff !important;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: var(--space-sm);
    left: var(--space-sm);
    padding: 4px 10px;
    background: var(--gradient-accent);
    color: var(--text-primary);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: var(--radius-full);
}

.product-info {
    padding: var(--space-md);
}

.product-brand {
    font-size: 11px;
    color: var(--accent-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.product-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-sku {
    font-size: 12px;
    color: var(--text-muted);
}

.product-actions {
    padding: 0 var(--space-md) var(--space-md);
}

.product-actions .btn {
    width: 100%;
}

/* ================================
   Category Cards
   ================================ */
.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--space-xl);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: var(--transition-normal);
}

.category-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-primary);
    transform: translateY(-8px);
    box-shadow: var(--shadow-glow);
}

.category-card i {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    font-size: 28px;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
}

.category-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: var(--space-xs);
    color: var(--text-primary);
}

.category-card p {
    font-size: 13px;
    color: var(--text-muted);
}

/* ================================
   Blog Cards
   ================================ */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
}

.blog-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition-normal);
}

.blog-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.blog-image {
    aspect-ratio: 16/9;
    width: 100%;
    background: #ffffff;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: var(--transition-slow);
}

.blog-card:hover .blog-image img {
    transform: scale(1.05);
}

.blog-content {
    padding: var(--space-lg);
}

.blog-meta {
    display: flex;
    gap: var(--space-md);
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: var(--space-sm);
}

.blog-title {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
}

.blog-title a {
    color: inherit;
}

.blog-title a:hover {
    color: var(--accent-primary);
}

.blog-summary {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}

.blog-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    margin-top: var(--space-md);
}

.blog-tag {
    padding: 4px 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 12px;
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.blog-tag:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

/* ================================
   Pagination
   ================================ */
.pagination {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    margin-top: var(--space-2xl);
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 var(--space-sm);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.pagination a:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.pagination a.active {
    background: var(--gradient-primary);
    border-color: transparent;
    color: var(--text-primary);
}

/* ================================
   Modal
   ================================ */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 3000;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    width: 36px;
    height: 36px;
    background: var(--bg-card);
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.modal-close:hover {
    background: var(--accent-danger);
    color: var(--text-primary);
}

/* ================================
   Alerts
   ================================ */
.alert {
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
    font-size: 14px;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: var(--accent-success);
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--accent-danger);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: var(--accent-warning);
}

/* ================================
   Utility Classes
   ================================ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: var(--space-sm); }
.mt-2 { margin-top: var(--space-md); }
.mt-3 { margin-top: var(--space-lg); }
.mt-4 { margin-top: var(--space-xl); }

.mb-1 { margin-bottom: var(--space-sm); }
.mb-2 { margin-bottom: var(--space-md); }
.mb-3 { margin-bottom: var(--space-lg); }
.mb-4 { margin-bottom: var(--space-xl); }

.p-1 { padding: var(--space-sm); }
.p-2 { padding: var(--space-md); }
.p-3 { padding: var(--space-lg); }
.p-4 { padding: var(--space-xl); }

/* Gradient Text */
.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glow Effect */
.glow {
    box-shadow: var(--shadow-glow);
}

/* ================================
   Responsive Design
   ================================ */
@media (max-width: 1200px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    :root {
        --header-height: 64px;
    }

    .nav-menu,
    .nav {
        display: none !important;
    }

    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-nav {
        display: block;
    }

    .mobile-nav.active {
        display: flex;
    }

    .user-name {
        display: none !important;
    }

    .header .container {
        position: relative !important;
    }

    .logo {
        position: absolute !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
    }

    .header-actions .desktop-cart-icon {
        display: none !important;
    }

    /* Dedicated floating cart button on mobile */
    .mobile-floating-cart {
        display: flex !important;
        position: fixed;
        right: 16px;
        bottom: calc(34px + env(safe-area-inset-bottom, 0px));
        width: 52px;
        height: 52px;
        border-radius: 50%;
        border: 1px solid rgba(59, 130, 246, 0.35);
        background: linear-gradient(135deg, rgba(59, 130, 246, 0.92) 0%, rgba(6, 182, 212, 0.92) 100%);
        color: #ffffff;
        box-shadow: 0 10px 28px rgba(59, 130, 246, 0.35);
        z-index: 1200;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }

    .mobile-floating-cart:hover,
    .mobile-floating-cart.active {
        color: #ffffff;
        transform: translateY(-2px);
        box-shadow: 0 14px 32px rgba(59, 130, 246, 0.45);
    }

    .mobile-floating-cart .cart-badge {
        top: -5px;
        right: -5px;
        min-width: 20px;
        height: 20px;
        padding: 0 4px;
        border: 1px solid rgba(255, 255, 255, 0.6);
    }

    /* Mobile stacking: cart is the primary action at bottom, back-to-top stays above it */
    .back-to-top-btn {
        right: 16px;
        bottom: calc(98px + env(safe-area-inset-bottom, 0px));
        width: 48px;
        height: 48px;
    }

    .product-grid,
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

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

    .floating-social {
        display: none;
    }

    .page-banner h1 {
        font-size: 32px;
    }

    .section-header h2 {
        font-size: 28px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 var(--space-md);
    }

    .product-grid,
    .category-grid,
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-md);
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }

    .page-banner {
        padding: var(--space-2xl) 0;
    }

    .page-banner h1 {
        font-size: 28px;
    }

    .section {
        padding: var(--space-2xl) 0;
    }

    .section-header h2 {
        font-size: 24px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .mobile-floating-cart {
        right: 12px;
        bottom: calc(30px + env(safe-area-inset-bottom, 0px));
        width: 50px;
        height: 50px;
    }

    .back-to-top-btn {
        right: 12px;
        bottom: calc(90px + env(safe-area-inset-bottom, 0px));
        width: 46px;
        height: 46px;
    }

    .product-grid,
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-sm);
    }

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

    .category-card {
        padding: var(--space-md);
    }

    .category-card i {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }

    .btn-lg {
        padding: 14px 24px;
        font-size: 15px;
    }
}

/* ================================
   Animations
   ================================ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease;
}

.animate-slide-up {
    animation: slideUp 0.5s ease;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--border-hover);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}
