/* ============================================
   MAIN.CSS — Global Styles & Design System
   ============================================ */

/* Reset */
*, *::before, *::after {
    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-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--bg-primary);
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

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

ul, ol {
    list-style: none;
}

/* Container */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
    width: 100%;
}

/* Section */
.hm-section {
    padding: var(--section-spacing) 0;
}

/* Section Titles */
.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text);
    margin-bottom: 12px;
}

.section-title .accent {
    color: var(--accent);
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-normal);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--accent);
    color: var(--text);
    border-color: var(--accent);
}

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

.btn-secondary {
    background: transparent;
    color: var(--text);
    border-color: var(--text);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 10px 20px;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 18px 40px;
    font-size: 1.1rem;
}

.btn-cart {
    background: var(--accent);
    color: var(--text);
    border-color: var(--accent);
    width: 100%;
    padding: 12px 20px;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
}

.btn-cart:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: var(--text);
    box-shadow: var(--shadow-accent);
}

/* Grid System */
.grid {
    display: grid;
    gap: 24px;
}

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

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

@media (max-width: 768px) {
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .grid-2 { grid-template-columns: 1fr; }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.animate-fade-up {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.animate-fade-in {
    animation: fadeIn 0.6s ease forwards;
    opacity: 0;
}

/* Stagger children */
.stagger-children > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.5s; }
.stagger-children > *:nth-child(6) { animation-delay: 0.6s; }
.stagger-children > *:nth-child(7) { animation-delay: 0.7s; }
.stagger-children > *:nth-child(8) { animation-delay: 0.8s; }

/* Skeleton Loader */
.skeleton {
    background: linear-gradient(90deg, #1F2937 25%, #374151 50%, #1F2937 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

.skeleton-text {
    height: 16px;
    margin-bottom: 8px;
    width: 80%;
}

.skeleton-title {
    height: 24px;
    margin-bottom: 12px;
    width: 60%;
}

.skeleton-image {
    aspect-ratio: 1;
    width: 100%;
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--bg-secondary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4B5563;
}

/* Selection */
::selection {
    background: var(--accent);
    color: var(--text);
}

/* Screen reader text */
.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;
}

/* Responsive text */
@media (max-width: 768px) {
    .hm-section {
        padding: 48px 0;
    }

    .section-title {
        font-size: 1.75rem;
    }
}
