/* ============================================
   XAIPART - Main Stylesheet
   Apple-style Design System
   ============================================ */

:focus-visible {
    outline: 2px solid var(--blue-500, #007AFF);
    outline-offset: 2px;
}

:focus:not(:focus-visible) {
    outline: none;
}

/* Skip-to-content link (WCAG 2.4.1 Bypass Blocks) */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--blue-500, #007AFF);
    color: #fff;
    padding: 8px 16px;
    z-index: 9999;
    text-decoration: none;
    border-radius: 0 0 4px 0;
    transition: top 0.2s;
    font-weight: 600;
}

.skip-link:focus,
.skip-link:focus-visible {
    top: 0;
}

/* Language dropdown link hover (replaces inline onmouseover/onmouseout) */
.lang-dropdown-link:hover,
.lang-dropdown-link:focus {
    background: #f3f4f6;
}

/* CSS Variables */
:root {
    --blue-50: #f0f7ff;
    --blue-100: #dceaff;
    --blue-200: #b8d5ff;
    --blue-300: #85b8ff;
    --blue-400: #4a94fc;
    --blue-500: #007AFF;
    --blue-600: #0d5dc7;
    --blue-700: #0a4aa0;
    --blue-800: #083a7d;
    --blue-900: #062d5e;
    --gray-50: #fafafa;
    --gray-100: #f5f5f7;
    --gray-200: #e8e8ed;
    --gray-300: #d2d2d7;
    --gray-400: #aeaeb2;
    --gray-500: #8e8e93;
    --gray-600: #636366;
    --gray-700: #48484a;
    --gray-800: #363639;
    --gray-900: #1d1d1f;
    --white: #ffffff;
    --green: #34C759;
    --orange: #FF9500;
    --red: #FF3B30;
    --glass-bg: rgba(255, 255, 255, 0.68);
    --glass-border: rgba(255, 255, 255, 0.55);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06), 0 2px 6px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.1), 0 8px 20px rgba(0, 0, 0, 0.05);
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --radius-xl: 22px;
    --radius-2xl: 28px;
    --font-stack: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    --transition-fast: 0.18s cubic-bezier(0.25, 0.1, 0.25, 1);
    --transition-smooth: 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
    --transition-spring: 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-stack);
    background: var(--gray-50);
    color: var(--gray-900);
    line-height: 1.5;
    min-height: 100vh;
    letter-spacing: -0.01em;
    background-image:
        radial-gradient(ellipse at 15% 10%, rgba(0, 122, 255, 0.045) 0%, transparent 60%),
        radial-gradient(ellipse at 85% 75%, rgba(0, 122, 255, 0.035) 0%, transparent 55%),
        radial-gradient(ellipse at 50% 40%, rgba(0, 122, 255, 0.02) 0%, transparent 65%);
    background-attachment: fixed;
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--glass-bg);
    backdrop-filter: saturate(180%) blur(24px);
    -webkit-backdrop-filter: saturate(180%) blur(24px);
    border-bottom: 1px solid var(--glass-border);
    transition: all var(--transition-smooth);
    padding: 0 1.5rem;
}

.nav.scrolled {
    box-shadow: var(--shadow-md);
    background: rgba(255, 255, 255, 0.82);
}

.nav-inner {
    max-width: 1340px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 52px;
    gap: 1.5rem;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--blue-600);
    text-decoration: none;
    letter-spacing: -0.02em;
    flex-shrink: 0;
    transition: color var(--transition-fast);
}

.nav-logo:hover {
    color: var(--blue-700);
}

.nav-logo .logo-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: var(--blue-500);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.25);
}

.nav-search {
    flex: 1;
    max-width: 420px;
    position: relative;
}

.nav-search input {
    width: 100%;
    padding: 0.55rem 1rem 0.55rem 2.5rem;
    border-radius: 24px;
    border: 1.5px solid var(--gray-200);
    background: var(--gray-50);
    font-size: 0.9rem;
    font-family: var(--font-stack);
    transition: all var(--transition-smooth);
    color: var(--gray-900);
    outline: none;
    letter-spacing: -0.01em;
}

.nav-search input:focus {
    border-color: var(--blue-400);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.08);
}

.nav-search input::placeholder {
    color: var(--gray-400);
}

.nav-search .search-icon {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    pointer-events: none;
}

.nav-search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    display: none;
    margin-top: 4px;
    overflow: hidden;
}

.nav-search-suggestions.active {
    display: block;
}

.nav-suggestion-item {
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.15s ease;
    border-bottom: 1px solid var(--gray-100);
}

.nav-suggestion-item:last-child {
    border-bottom: none;
}

.nav-suggestion-item:hover {
    background: var(--gray-50);
}

.nav-suggestion-text {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-suggestion-text strong {
    font-size: 0.85rem;
    color: var(--gray-900);
}

.nav-suggestion-text span {
    font-size: 0.78rem;
    color: var(--gray-500);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-shrink: 0;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-btn span {
    width: 24px;
    height: 2px;
    background: var(--gray-700);
    border-radius: 2px;
    transition: all var(--transition-fast);
}

.mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow-lg);
    padding: 1rem;
}

.mobile-menu.open {
    display: block;
}

.mobile-menu-inner {
    max-width: 1340px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-nav-link {
    padding: 0.75rem 1rem;
    color: var(--gray-800);
    text-decoration: none;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.mobile-nav-link:hover {
    background: var(--gray-100);
    color: var(--blue-600);
}

.mobile-nav-actions {
    display: flex;
    gap: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--gray-200);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.5rem 1.1rem;
    border-radius: 22px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    font-family: var(--font-stack);
    transition: all var(--transition-smooth);
    text-decoration: none;
    white-space: nowrap;
    letter-spacing: -0.01em;
    position: relative;
    overflow: hidden;
}

.btn:active {
    transform: scale(0.96);
}

.btn-ghost {
    background: transparent;
    color: var(--gray-700);
}

.btn-ghost:hover {
    background: var(--gray-100);
    color: var(--gray-900);
}

.btn-primary {
    background: var(--blue-500);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(0, 122, 255, 0.22);
}

.btn-primary:hover {
    background: var(--blue-600);
    box-shadow: 0 4px 16px rgba(0, 122, 255, 0.3);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--green);
    color: #fff;
    font-weight: 600;
}

.btn-secondary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--blue-400);
    color: var(--blue-600);
    font-weight: 500;
}

.btn-outline:hover {
    background: var(--blue-50);
    border-color: var(--blue-500);
}

.btn-lg {
    padding: 0.7rem 1.5rem;
    border-radius: 26px;
    font-size: 0.95rem;
}

.btn-sm {
    padding: 0.35rem 0.85rem;
    border-radius: 18px;
    font-size: 0.8rem;
}

.btn-icon {
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 50%;
    font-size: 1.1rem;
}

.cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--red);
    color: #fff;
    font-size: 0.68rem;
    width: 19px;
    height: 19px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    box-shadow: 0 1px 4px rgba(255, 59, 48, 0.4);
    pointer-events: none;
    transition: transform var(--transition-spring);
}

.cart-badge.bump {
    transform: scale(1.35);
}

/* ============================================
   MAIN CONTAINER
   ============================================ */
.main-container {
    max-width: 1340px;
    margin: 0 auto;
    padding: 1.8rem 1.5rem 3rem;
    min-height: calc(100vh - 200px);
}

/* ============================================
   BREADCRUMB
   ============================================ */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--gray-500);
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.breadcrumb a {
    color: var(--blue-500);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.breadcrumb a:hover {
    color: var(--blue-700);
    text-decoration: underline;
}

.breadcrumb span {
    color: var(--gray-400);
}

/* ============================================
   CARDS
   ============================================ */
.card {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 1.6rem 1.8rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    transition: all var(--transition-smooth);
}

.card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--gray-300);
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.35rem;
    letter-spacing: -0.01em;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.65rem 0.9rem;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--gray-300);
    font-family: var(--font-stack);
    font-size: 0.88rem;
    outline: none;
    transition: all var(--transition-smooth);
    background: var(--gray-50);
    color: var(--gray-900);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--blue-400);
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.06);
    background: #fff;
}

.form-group input::placeholder {
    color: var(--gray-400);
}

.form-hint {
    display: block;
    font-size: 0.72rem;
    color: var(--gray-500);
    margin-top: 0.25rem;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: var(--gray-600);
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin-top: 0.15rem;
}

.checkbox-label a {
    color: var(--blue-500);
    text-decoration: none;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.78rem;
    margin-bottom: 1rem;
}

.forgot-link {
    color: var(--blue-500);
    text-decoration: none;
}

.forgot-link:hover {
    text-decoration: underline;
}

.password-strength {
    height: 4px;
    background: var(--gray-200);
    border-radius: 2px;
    margin-top: 0.35rem;
    overflow: hidden;
}

.strength-bar {
    height: 100%;
    width: 0;
    background: var(--red);
    transition: all var(--transition-smooth);
}

.strength-bar.weak { width: 33%; background: var(--red); }
.strength-bar.medium { width: 66%; background: var(--orange); }
.strength-bar.strong { width: 100%; background: var(--green); }

/* ============================================
   MODAL
   ============================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-smooth);
}

.modal-overlay.open {
    display: flex;
    opacity: 1;
    pointer-events: auto;
}

.modal {
    background: var(--white);
    border-radius: var(--radius-2xl);
    padding: 2rem;
    max-width: 440px;
    width: 92%;
    box-shadow: var(--shadow-xl);
    animation: modalIn 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--gray-300) transparent;
}

.modal::-webkit-scrollbar {
    width: 6px;
}

.modal::-webkit-scrollbar-track {
    background: transparent;
    margin: 8px 0;
    border-radius: 3px;
}

.modal::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 3px;
    transition: background var(--transition-fast);
}

.modal::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

.modal::-webkit-scrollbar-corner {
    background: transparent;
}

.modal {
    scrollbar-width: thin;
    scrollbar-color: var(--gray-300, #D1D5DB) transparent;
}

@keyframes modalIn {
    from {
        transform: translateY(30px) scale(0.94);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--gray-100);
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-600);
}

.modal-close:hover {
    background: var(--gray-200);
    color: var(--gray-900);
}

.modal h3 {
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: -0.02em;
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.modal-divider {
    text-align: center;
    color: var(--gray-400);
    font-size: 0.8rem;
    margin: 0.8rem 0;
    position: relative;
}

.modal-divider::before,
.modal-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 35%;
    height: 1px;
    background: var(--gray-200);
}

.modal-divider::before {
    left: 0;
}

.modal-divider::after {
    right: 0;
}

.modal-switch {
    text-align: center;
    font-size: 0.82rem;
    color: var(--gray-500);
    margin-top: 1rem;
}

.modal-switch a {
    color: var(--blue-500);
    text-decoration: none;
    font-weight: 500;
}

.modal-switch a:hover {
    text-decoration: underline;
}

.google-fallback-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 42px;
    border: 1px solid #dadce0;
    border-radius: 26px;
    background: #fff;
    color: #3c4043;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.google-fallback-btn:hover {
    background-color: #f7f8f8;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.google-fallback-btn:active {
    background-color: #e8eaed;
}

.google-fallback-btn svg {
    flex-shrink: 0;
}

#loginGoogleBtnContainer,#registerGoogleBtnContainer{max-width:100%;margin-top:0.5rem}
#loginGoogleBtn,#registerGoogleBtn{max-width:100%}
#loginGoogleBtn>div,#registerGoogleBtn>div{max-width:100%!important;min-width:0!important}

/* ============================================
   TOAST
   ============================================ */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(120px);
    background: var(--gray-900);
    color: #fff;
    padding: 0.8rem 1.6rem;
    border-radius: 26px;
    font-weight: 500;
    font-size: 0.9rem;
    z-index: 3000;
    box-shadow: var(--shadow-xl);
    transition: transform var(--transition-spring);
    pointer-events: none;
    letter-spacing: -0.01em;
    white-space: nowrap;
    display: none; /* hidden by default */
    opacity: 0;
    visibility: hidden;
}

.toast.show {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

/* ============================================
   BACK TO TOP
   ============================================ */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--white);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-600);
    transition: all var(--transition-smooth);
    opacity: 0;
    pointer-events: none;
    z-index: 100;
}

.back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
}

.back-to-top:hover {
    background: var(--blue-500);
    color: #fff;
    border-color: var(--blue-500);
    transform: translateY(-2px);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--white);
    border-top: 1px solid var(--gray-200);
    padding: 3rem 1.5rem 1.5rem;
    margin-top: auto;
}

.footer-inner {
    max-width: 1340px;
    margin: 0 auto;
}

.footer-main {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 4rem;
    margin-bottom: 2rem;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--blue-600);
}

.footer-logo .logo-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: var(--blue-500);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 800;
}

.footer-tagline {
    font-size: 0.85rem;
    color: var(--gray-500);
}

.footer-social {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.footer-social a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-600);
    transition: all var(--transition-fast);
}

.footer-social a:hover {
    background: var(--blue-500);
    color: #fff;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.footer-col h4 {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 0.5rem;
}

.footer-col a {
    font-size: 0.8rem;
    color: var(--gray-500);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-col a:hover {
    color: var(--blue-500);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
    font-size: 0.75rem;
    color: var(--gray-400);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ============================================
   100% Safe fix: force all overlays hidden by default
   ============================================ */
.modal-overlay:not(.open),
#loginModalOverlay:not(.open),
#registerModalOverlay:not(.open),
#miniDetailOverlay:not(.open),
#cartExpandOverlay:not(.active),
.rfq-expand-overlay:not(.active),
.lightbox:not(.active),
.toast:not(.show) {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
}

/* Also fix any potential full-screen black elements */
div[style*="inset: 0"],
div[style*="position: fixed"][style*="background"],
div[style*="position: fixed"][style*="black"],
div[style*="position: fixed"][style*="#000"] {
    /* Only show when they have the correct open class */
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1100px) {
    .footer-main {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-links {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-inner {
        height: 48px;
        gap: 0.6rem;
    }
    
    .nav-search {
        max-width: 160px;
    }
    
    .nav-search input {
        font-size: 0.8rem;
        padding: 0.45rem 0.8rem 0.45rem 2rem;
    }
    
    .nav-actions {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .btn {
        padding: 0.4rem 0.7rem;
        font-size: 0.78rem;
        border-radius: 18px;
    }
    
    .btn-lg {
        padding: 0.55rem 1.1rem;
        font-size: 0.85rem;
        border-radius: 22px;
    }
    
    .main-container {
        padding: 1rem 0.8rem 2rem;
    }
    
    .card {
        padding: 1.2rem 1rem;
        border-radius: var(--radius-lg);
    }
    
    .modal {
        padding: 1.4rem;
        border-radius: var(--radius-xl);
    }
    
    .footer-links {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .nav-logo {
        font-size: 1rem;
    }
    
    .nav-logo .logo-icon {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
        border-radius: 7px;
    }
    
    .nav-search {
        max-width: 100px;
    }
    
    .nav-search input {
        font-size: 0.75rem;
        padding: 0.4rem 0.6rem 0.4rem 1.7rem;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
