@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&display=swap');

:root {
    --primary: hsl(12, 88%, 68%);
    /* Coral */
    --primary-dark: hsl(12, 88%, 58%);
    --secondary: hsl(210, 80%, 50%);
    /* Soft Blue */
    --bg-light: hsl(0, 0%, 98%);
    --text-main: hsl(220, 20%, 15%);
    --text-muted: hsl(220, 10%, 45%);
    --glass: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.4);
    --card-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Glassmorphism Utilities */
.glass {
    background: var(--glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

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

header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: var(--transition);
}

header.scrolled {
    padding: 10px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 48px;
    width: auto;
}

/* Hero Section */
.hero {
    padding: 180px 0 80px;
    text-align: center;
    background: radial-gradient(circle at top right, hsla(12, 88%, 68%, 0.1), transparent 40%),
        radial-gradient(circle at bottom left, hsla(210, 80%, 50%, 0.1), transparent 40%);
}

@media (max-width: 768px) {
    .hero {
        padding: 120px 0 60px;
    }
}

.hero h1 {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    background: linear-gradient(135deg, var(--text-main), var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 40px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    padding: 14px 32px;
    border-radius: 100px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 10px 20px -5px hsla(12, 88%, 68%, 0.4);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 15px 25px -5px hsla(12, 88%, 68%, 0.5);
}

/* Controls (Filters & Search) */
.controls {
    margin-bottom: 40px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    justify-content: center;
}

.search-wrapper {
    position: relative;
    flex: 1;
    min-width: 300px;
}

.search-input {
    width: 100%;
    padding: 16px 24px 16px 52px;
    border-radius: 100px;
    border: none;
    background: white;
    box-shadow: var(--card-shadow);
    font-size: 1rem;
    font-family: inherit;
    outline: none;
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.filter-chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.chip {
    padding: 10px 20px;
    border-radius: 100px;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
    border: 1px solid transparent;
}

.chip:hover {
    background: var(--primary);
    color: white;
}

.chip.active {
    background: var(--primary);
    color: white;
}

/* Catalog Grid */
.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 32px;
    padding-bottom: 80px;
}

.card {
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.15);
}

.card-img {
    width: 100%;
    aspect-ratio: 4/5;
    object-fit: cover;
    object-position: center top;
    /* Preserve heads */
}

.card-content {
    padding: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.card-price {
    font-size: 1.1rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 16px;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}

.tag {
    font-size: 0.75rem;
    padding: 4px 12px;
    border-radius: 100px;
    background: hsl(220, 10%, 95%);
    color: var(--text-muted);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: white;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    border-radius: 32px;
    overflow-y: auto;
    position: relative;
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .modal-content {
        flex-direction: row;
    }
}

.modal-img {
    width: 100%;
    height: auto;
    max-height: 400px;
    /* Limit height on mobile */
    object-fit: cover;
    object-position: center top;
    /* Preserve heads */
}

@media (min-width: 768px) {
    .modal-img {
        width: 45%;
        height: auto;
    }
}

.modal-body {
    padding: 40px;
    flex: 1;
}

.modal-close {
    position: sticky;
    top: 20px;
    margin-top: 20px;
    margin-right: 20px;
    margin-left: auto;
    margin-bottom: -60px;
    /* Offset its height + margin to float over content */
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: none;
    z-index: 10;
}

.modal-title {
    font-size: min(2rem, 8vw);
    margin-bottom: 16px;
    font-weight: 800;
}

.modal-description {
    color: var(--text-muted);
    margin-bottom: 24px;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 32px;
}

.info-item label {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.info-item span {
    font-weight: 600;
}

#modal-cta {
    position: sticky;
    bottom: 20px;
    margin-top: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 5;
    /* Ensure it stands out against scroling text */
    backdrop-filter: blur(4px);
}

footer {
    padding: 80px 0 40px;
    text-align: center;
    background: white;
}

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

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

.animate-up {
    animation: fadeInUp 0.8s ease forwards;
}