/* Unamused Design System - Main Styles */
:root {
    --color-bg: #fafaf9;
    --color-text: #1c1917;
    --color-muted: #78716c;
    --color-accent: #dc2626;
    --color-border: #e7e5e4;
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-serif: 'Crimson Text', Georgia, serif;
}

* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.font-serif {
    font-family: var(--font-serif);
}

.text-display {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 6vw, 3.5rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.text-headline {
    font-family: var(--font-serif);
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    line-height: 1.2;
    font-weight: 600;
}

.text-lead {
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--color-muted);
    max-width: 65ch;
}

.container-editorial {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

@media (min-width: 640px) {
    .container-editorial {
        padding: 0 2rem;
    }
}

@media (min-width: 1024px) {
    .container-editorial {
        padding: 0 3rem;
    }
}

/* Navigation */
.nav-link {
    position: relative;
    color: var(--color-muted);
    transition: color 0.2s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--color-text);
    transform: scaleX(0);
    transition: transform 0.3s ease;
    transform-origin: right;
}

.nav-link:hover {
    color: var(--color-text);
}

.nav-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.nav-link.active {
    color: var(--color-text);
}

.nav-link.active::after {
    transform: scaleX(1);
}

/* Mobile Menu - Premium Animations */
.mobile-menu-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.4s;
    z-index: 35;
}

.mobile-menu-backdrop.open {
    opacity: 1;
    visibility: visible;
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(85vw, 400px);
    background: var(--color-bg);
    transform: translateX(100%);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 40;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.mobile-menu.open {
    transform: translateX(0);
}

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

.mobile-menu-close {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.mobile-menu-close:hover {
    background: var(--color-border);
    transform: rotate(90deg);
}

.mobile-menu-links {
    flex: 1;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-nav-link {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--color-text);
    padding: 1rem 0;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.2s;
}

.mobile-menu.open .mobile-nav-link {
    opacity: 1;
    transform: translateX(0);
}

.mobile-menu.open .mobile-nav-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu.open .mobile-nav-link:nth-child(2) { transition-delay: 0.15s; }
.mobile-menu.open .mobile-nav-link:nth-child(3) { transition-delay: 0.2s; }
.mobile-menu.open .mobile-nav-link:nth-child(4) { transition-delay: 0.25s; }

.mobile-nav-link:hover {
    color: var(--color-accent);
}

.mobile-nav-link i {
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

.mobile-nav-link:hover i {
    opacity: 1;
    transform: translateX(0);
}

.mobile-nav-link.active {
    color: var(--color-accent);
}

.mobile-menu-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--color-border);
    background: white;
}

/* Hamburger Animation */
.hamburger {
    width: 24px;
    height: 20px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    background: var(--color-text);
    color: white;
    font-weight: 500;
    font-size: 0.875rem;
    letter-spacing: 0.02em;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background: #292524;
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    background: transparent;
    color: var(--color-text);
    font-weight: 500;
    font-size: 0.875rem;
    border: 1px solid var(--color-border);
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-secondary:hover {
    border-color: var(--color-text);
    background: rgba(0,0,0,0.02);
}

/* Cart Styles */
.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--color-accent);
    color: white;
    font-size: 0.625rem;
    font-weight: 600;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.cart-drawer {
    position: fixed;
    inset: 0;
    z-index: 50;
    pointer-events: none;
}

.cart-drawer.open #cart-backdrop {
    opacity: 1;
    pointer-events: auto;
}

.cart-drawer.open #cart-panel {
    transform: translateX(0);
}

#cart-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

#cart-panel {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 100%;
    max-width: 28rem;
    background: white;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    transition: transform 0.3s ease-out;
    pointer-events: auto;
    display: flex;
    flex-direction: column;
}

.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border: 1px solid var(--color-border);
    border-radius: 0.5rem;
    transition: transform 0.2s ease;
}

.cart-item:hover {
    transform: translateX(-4px);
}

.cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 0.375rem;
    background: var(--color-bg);
}

.quantity-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-border);
    background: white;
    color: var(--color-text);
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 0.25rem;
}

.quantity-btn:hover:not(:disabled) {
    background: var(--color-text);
    color: white;
    border-color: var(--color-text);
}

.quantity-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.quantity-input {
    width: 40px;
    text-align: center;
    border: none;
    font-weight: 500;
    font-size: 14px;
    background: transparent;
}

/* Toast */
#toast {
    position: fixed;
    bottom: 6rem;
    right: 6px;
    background: var(--color-text);
    color: white;
    padding: 1rem 1.5rem;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

#toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* Focus Styles */
*:focus-visible {
    outline: 2px solid var(--color-text);
    outline-offset: 4px;
}

/* Scroll to Top Button */
#scroll-to-top {
    position: fixed;
    bottom: 6rem;
    left: 1.5rem;
    width: 3rem;
    height: 3rem;
    background: var(--color-text);
    color: white;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

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

#scroll-to-top:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

#scroll-to-top:active {
    transform: translateY(0);
}

/* Loading Screen */
#loader {
    position: fixed;
    inset: 0;
    background: var(--color-bg);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.6s;
}

#loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-spinner {
    width: 40px;
    height: 40px;
    opacity: 0;
    animation: fadeIn 0.6s ease-out 0.4s forwards, spinnerPulse 2s ease-in-out infinite 1s;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

@keyframes spinnerPulse {
    0%, 100% { 
        transform: scale(1);
        opacity: 1;
    }
    50% { 
        transform: scale(0.95);
        opacity: 0.8;
    }
}

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

@keyframes gentlePulse {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1);
    }
    50% { 
        opacity: 0.7; 
        transform: scale(0.95);
    }
}

/* Product Cards */
.product-card {
    position: relative;
    background: white;
    border: 1px solid var(--color-border);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.01);
}

.product-image-container {
    position: relative;
    overflow: hidden;
    background: #f5f5f4;
    aspect-ratio: 1/1;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* FAQ Styles */
.faq-item {
    border-bottom: 1px solid var(--color-border);
}

.faq-question {
    width: 100%;
    text-align: left;
    padding: 1.5rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
    transition: color 0.2s ease;
}

.faq-question:hover {
    color: var(--color-accent);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    color: var(--color-muted);
    padding: 0;
}

.faq-item.open .faq-answer {
    max-height: 500px;
    padding-bottom: 1.5rem;
}

.faq-item.open .faq-icon {
    transform: rotate(45deg);
}

.faq-icon {
    transition: transform 0.3s ease;
}

/* Legal Styles */
.legal-section {
    background: white;
    border: 1px solid var(--color-border);
    padding: 3rem;
    margin-bottom: 2rem;
}

.legal-section h2 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--color-text);
}

.legal-section h3 {
    font-family: var(--font-serif);
    font-size: 1.125rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.legal-section p, .legal-section li {
    color: var(--color-muted);
    font-size: 0.9375rem;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.legal-section ul {
    list-style-type: disc;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.legal-section li {
    margin-bottom: 0.5rem;
}

.notice-box {
    background: var(--color-bg);
    border-left: 4px solid var(--color-text);
    padding: 1.5rem;
    margin: 2rem 0;
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.125rem;
}

.warning-box {
    background: #fef2f2;
    border: 1px solid #fecaca;
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0;
}

.warning-box strong {
    color: var(--color-accent);
    font-weight: 600;
}

/* Support Cards */
.support-card {
    background: white;
    border: 1px solid var(--color-border);
    padding: 2rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.support-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05);
}

/* Tab Buttons */
.tab-btn {
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--color-border);
    background: white;
    color: var(--color-muted);
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.tab-btn:hover {
    border-color: var(--color-text);
    color: var(--color-text);
}

.tab-btn.active {
    background: var(--color-text);
    color: white;
    border-color: var(--color-text);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Filter Tags */
.filter-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid var(--color-border);
    border-radius: 9999px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-tag:hover, .filter-tag.active {
    background: var(--color-text);
    color: white;
    border-color: var(--color-text);
}