/* Base Layout */
html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: var(--line-height-normal);
    color: var(--color-text);
    background: linear-gradient(180deg,
        #faf5ff 0%,
        #fce7f3 20%,
        #ccfbf1 40%,
        #fef3c7 60%,
        #faf5ff 80%,
        #f0fdfa 100%);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.main {
    flex: 1;
    position: relative;
}

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

/* Sections */
.section {
    padding: var(--space-16) 0;
}

.section__header {
    text-align: center;
    margin-bottom: var(--space-12);
}

.section__title {
    font-family: var(--font-family-display);
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-primary);
    margin-bottom: var(--space-4);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.section__description {
    font-size: var(--font-size-lg);
    color: var(--color-gray-600);
    max-width: 600px;
    margin: 0 auto;
    line-height: var(--line-height-relaxed);
}

.page-title {
    font-family: var(--font-family-display);
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-primary);
    margin-bottom: var(--space-8);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Product Grid - Responsive */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-8);
}

/* Two Column Layout */
.two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-12);
    align-items: start;
}

/* Flexbox utilities */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }

/* Text utilities */
.text-center { text-align: center; }
.text-muted { color: var(--color-text-muted); }
.text-danger { color: var(--color-danger); }

/* Spacing utilities */
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-auto { margin-top: auto; }
.mb-0 { margin-bottom: 0; }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }

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

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.animate-fadeInUp {
    animation: fadeInUp 0.6s ease-out forwards;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* Stagger animation for grid items */
.product-grid > * {
    animation: fadeInUp 0.5s ease-out backwards;
}

.product-grid > *:nth-child(1) { animation-delay: 0.05s; }
.product-grid > *:nth-child(2) { animation-delay: 0.1s; }
.product-grid > *:nth-child(3) { animation-delay: 0.15s; }
.product-grid > *:nth-child(4) { animation-delay: 0.2s; }
.product-grid > *:nth-child(5) { animation-delay: 0.25s; }
.product-grid > *:nth-child(6) { animation-delay: 0.3s; }

/* Mobile Responsive Layout */
@media (max-width: 1024px) {
    .container {
        padding: 0 var(--space-4);
    }

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

    .section__title {
        font-size: var(--font-size-3xl);
    }

    .page-title {
        font-size: var(--font-size-3xl);
        margin-bottom: var(--space-6);
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: var(--space-6);
    }

    .two-column {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }
}

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

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

    .section__header {
        margin-bottom: var(--space-8);
    }

    .section__title {
        font-size: var(--font-size-2xl);
    }

    .section__description {
        font-size: var(--font-size-base);
    }

    .page-title {
        font-size: var(--font-size-2xl);
        margin-bottom: var(--space-4);
        text-align: center;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: var(--space-4);
    }
}

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

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

    .section__title {
        font-size: var(--font-size-xl);
    }

    .page-title {
        font-size: var(--font-size-xl);
    }

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