/**
 * Tyralix Theme - Common Styles
 * Shared styles for navigation, footer, buttons, and base elements
 */

:root {
    --color-bg: #ffffff;
    --color-bg-elevated: #f8fafc;
    --color-bg-card: #ffffff;
    --color-bg-input: #f1f5f9;
    --color-border: #e2e8f0;
    --color-border-hover: #cbd5e1;
    --color-text: #0f172a;
    --color-text-muted: #475569;
    --color-text-subtle: #94a3b8;
    --color-accent: #00A3B4;
    --color-accent-dark: #008da0;
    --color-accent-gradient: linear-gradient(135deg, #00bcd4 0%, #008ba3 100%);
    --color-accent-glow: rgba(0, 163, 180, 0.15);
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-danger: #ef4444;
    --font-display: 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 32px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Base Reset - Only apply to elements that need it */
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    margin: 0;
    padding: 0;
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid var(--color-border);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.nav-logo-icon {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-logo-text {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--color-text);
    letter-spacing: -0.02em;
    text-transform: uppercase;
}

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

.nav-logo-img {
    height: 40px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 40px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--color-accent);
}

.nav-actions {
    display: flex;
    gap: 16px;
    align-items: center;
}

/* Header Cart Icon */
.header-cart-link {
    position: relative;
    border: none !important;
    padding: 12px !important;
}

.header-cart-link:hover {
    color: var(--color-accent);
    background: transparent;
}

.header-cart-link svg {
    transition: all 0.3s ease;
}

.header-cart-link:hover svg {
    stroke: var(--color-accent);
}

.header-cart-count {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--color-accent-gradient);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px var(--color-accent-glow);
    transition: all 0.3s ease;
    border: 2px solid var(--color-bg);
}

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

.header-cart-link:hover .header-cart-count {
    transform: scale(1.1);
    box-shadow: 0 4px 12px var(--color-accent-glow);
}

/* Cart count animation when updated */
@keyframes cart-bounce {
    0% { transform: scale(1); }
    25% { transform: scale(1.3); }
    50% { transform: scale(0.9); }
    75% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

.header-cart-count.updated {
    animation: cart-bounce 0.4s ease;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    box-sizing: border-box;
}

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

.btn-ghost:hover {
    border-color: var(--color-border-hover);
    background: var(--color-bg-elevated);
}

.btn-primary {
    background: var(--color-accent-gradient);
    border: none;
    color: white;
    box-shadow: 0 4px 12px var(--color-accent-glow);
}

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

.btn-lg {
    padding: 16px 32px;
    font-size: 1rem;
}

/* Footer */
.footer {
    background: var(--color-bg-elevated);
    border-top: 1px solid var(--color-border);
    padding: 80px 40px 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(4, 1fr);
    gap: 60px;
    max-width: 1400px;
    margin: 0 auto 60px;
}

.footer-brand {
    max-width: 280px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.footer-logo-img {
    height: 60px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
}

.footer-desc {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    line-height: 1.7;
    margin: 0;
}

.footer-column h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text);
    font-weight: 700;
    margin-bottom: 20px;
    margin-top: 0;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0;
    padding: 0;
}

.footer-links a {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--color-accent);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 40px;
    border-top: 1px solid var(--color-border);
    max-width: 1400px;
    margin: 0 auto;
}

.footer-copy {
    color: var(--color-text-subtle);
    font-size: 0.85rem;
    margin: 0;
}

.footer-socials {
    display: flex;
    gap: 16px;
}

.footer-socials a {
    width: 40px;
    height: 40px;
    border: 1px solid var(--color-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    transition: all 0.3s;
    background: var(--color-bg);
    text-decoration: none;
}

.footer-socials a:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    box-shadow: var(--shadow-sm);
}

/* Main Content Area - Add padding for fixed nav */
.main-content {
    padding-top: 80px;
}

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

@media (max-width: 768px) {
    .nav {
        padding: 16px 20px;
    }

    .nav-links {
        display: none;
    }

    .footer {
        padding: 60px 20px 30px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}
