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

*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --primary-color: #062354;
    --accent-color: #062354;
    --text-color: #2d3436;
    --bg-color: #f5f6fa;
    --white: #ffffff;
    --footer-bg: #062354;
}

body {
    font-family: 'Outfit', sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: var(--bg-color);
    color: var(--text-color);
}

main {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

main.page-catalog {
    max-width: 100%;
    margin: 0;
    padding: 2rem 4rem;
    /* Wider padding for aesthetic */
}

/* ------------------
    Header
------------------ */
header {
    background-color: var(--white);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

header img {
    height: 70px;
    width: auto;
}

.search-bar {
    display: flex;
    gap: 0.5rem;
    flex: 1;
    max-width: 400px;
    margin: 0 2rem;
}

.search-bar input {
    width: 100%;
    padding: 0.8rem 1.2rem;
    border: 1px solid #dfe6e9;
    border-radius: 50px;
    outline: none;
    transition: all 0.3s ease;
    background: #f1f2f6;
}

.search-bar input:focus {
    border-color: var(--accent-color);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(6, 35, 84, 0.1);
}

.search-bar button {
    padding: 0 1.5rem;
    background-color: var(--accent-color);
    color: var(--white);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-bar button .search-icon {
    display: none;
}

.search-bar button:hover {
    background-color: #0a3d8f;
}

.header-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.header-links a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

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

.cart-badge {
    position: absolute;
    top: -19px;
    right: -15px;
    background-color: #d63031;
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1px 4px;
    border: 2px solid var(--white);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

@keyframes cartBounce {
    0% {
        transform: scale(1);
    }

    40% {
        transform: scale(1.4);
    }

    60% {
        transform: scale(0.9);
    }

    100% {
        transform: scale(1);
    }
}

.cart-bounce {
    animation: cartBounce 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* ------------------
    Navigation
------------------ */
nav.main-nav {
    background-color: var(--primary-color);
    padding: 0.8rem 0;
    width: 100%;
}

nav.main-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 3rem;
}

nav.main-nav a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
    position: relative;
    padding-bottom: 5px;
    transition: all 0.3s;
}

nav.main-nav a:hover {
    color: var(--white);
}

nav.main-nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: var(--accent-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

nav.main-nav a:hover::after {
    width: 100%;
}

/* ------------------
    Carousel
------------------ */
.carousel {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 auto 3rem;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 0;
}

.carousel-inner {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.carousel-item {
    min-width: 100%;
    height: 400px;
    background-color: #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #555;
    position: relative;
    overflow: hidden;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 1rem;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.3s;
    z-index: 10;
    font-size: 1.2rem;
    line-height: 1;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-control:hover {
    background: rgba(0, 0, 0, 0.8);
}

.carousel-control.prev {
    left: 10px;
}

.carousel-control.next {
    right: 10px;
}

/* ------------------
    Products Grid
------------------ */
/* ------------------
    Category Filter
------------------ */
.category-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.filter-btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    background-color: var(--white);
    color: var(--primary-color);
    border: 1px solid #dfe6e9;
    border-radius: 50px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.filter-btn:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    transform: translateY(-2px);
}

.filter-btn.active {
    background-color: var(--accent-color);
    color: var(--white);
    border-color: var(--accent-color);
    box-shadow: 0 4px 10px rgba(6, 35, 84, 0.3);
}

.section-title {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Horizontal Scroll Container */
.products-grid {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    padding-bottom: 2rem;
    /* Space for scrollbar and shadow */
    margin-bottom: 3rem;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    /* iOS momentum scrolling */
}

/* Hide scrollbar for cleaner look but keep functionality */
.products-grid::-webkit-scrollbar {
    height: 8px;
}

.products-grid::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.products-grid::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.products-grid::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

.product-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
    cursor: pointer;

    /* Horizontal Layout Specifics */
    min-width: 280px;
    max-width: 280px;
    /* Fixed width for items */
    scroll-snap-align: start;
    /* Snap to start of card */
    flex-shrink: 0;
    /* Prevent shrinking */
    display: flex;
    flex-direction: column;
}

.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.info-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.info-link:hover .product-title {
    color: var(--accent-color);
}

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

.product-image {
    height: 250px;
    background-color: #dfe6e9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b2bec3;
    font-size: 1.2rem;
    overflow: hidden;
    padding: 1rem;
    text-align: center;
    /* Ensure image zoom stays within bounds */
    position: relative;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
}

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

/* Catalogue Grid Layout (Desktop & General) */
/* Catalogue Grid Layout (Desktop & General) */
.catalog-layout {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
}

.catalog-sidebar {
    width: 250px;
    flex-shrink: 0;
    position: sticky;
    top: 100px;
    background: var(--white);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    /* Independent scrolling */
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    scrollbar-width: thin;
}

.catalog-sidebar::-webkit-scrollbar {
    width: 6px;
}

.catalog-sidebar::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.catalog-sidebar::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.catalog-sidebar::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.catalog-main {
    flex-grow: 1;
    min-width: 0;
    /* Fix flex overflow */
}

.catalogue-grid {
    display: grid;
    /* Forces more items per row (roughly 3-4 items/row on 1200px) */
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
    overflow-x: visible;
    padding-bottom: 2rem;
    scroll-snap-type: none;
    justify-content: start;
}

/* Ensure cards fill the grid cells */
.catalogue-grid .product-card {
    min-width: 0;
    max-width: none;
    width: 100%;
    border-radius: 4px;
    /* More square like the image */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.catalogue-grid .product-card:hover {
    transform: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

/* New Product Card Content */
.product-content {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #333;
    line-height: 1.3;
}

.product-title a {
    text-decoration: none;
    color: inherit;
}

.product-meta {
    font-size: 0.8rem;
    color: #777;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.meta-value {
    color: #333;
}

.product-price-box {
    margin-top: auto;
    margin-bottom: 1rem;
}

.price-val {
    font-size: 1.4rem;
    color: #e74c3c;
    /* Red price */
    font-weight: 700;
}

.stock-status {
    font-size: 0.75rem;
    color: #27ae60;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #27ae60;
    display: inline-block;
}

.btn-block-cart {
    width: 100%;
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.btn-block-cart:hover {
    background-color: #c0392b;
}

/* Catalog Header (Top Bar) */
.catalog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.catalog-count {
    color: #777;
    font-size: 0.95rem;
}

.badge-count {
    font-weight: bold;
    color: #333;
}

.catalog-sort {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.catalog-sort label {
    font-size: 0.9rem;
    color: #777;
}

.img-hidden {
    opacity: 0;
}

.img-loaded {
    opacity: 1;
    transition: opacity 0.5s;
}

/* Sidebar Widgets (OSF Style) */
.sidebar-widget {
    background: #fff;
    border: 1px solid #eee;
    margin-bottom: 1rem;
    border-radius: 4px;
    overflow: hidden;
}

.widget-title {
    font-size: 1rem;
    font-weight: 700;
    padding: 1rem;
    margin: 0;
    background: #fff;
    border-bottom: 1px solid #f5f5f5;
    color: #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.widget-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget-list li a {
    display: flex;
    align-items: center;
    padding: 0.8rem 1rem;
    text-decoration: none;
    color: #555;
    font-size: 0.9rem;
    transition: background 0.2s;
    border-bottom: 1px solid #fcfcfc;
    gap: 0.5rem;
}

.widget-list li a:hover,
.widget-list li a.active {
    background: #f9f9f9;
    color: #c0392b;
    /* Red accent */
    font-weight: 600;
}

.sidebar-search-form {
    padding: 1rem;
}

.search-input-wrapper {
    display: flex;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.search-input-wrapper input {
    border: none;
    padding: 0.5rem;
    width: 100%;
    outline: none;
}

.search-input-wrapper button {
    background: #f5f5f5;
    border: none;
    padding: 0 0.8rem;
    cursor: pointer;
    color: #777;
}

.widget-content {
    padding: 1rem;
}

/* Remove old sidebar styles if any conflict */
.catalog-sidebar {
    background: transparent;
    box-shadow: none;
    padding: 0;
}

.filter-group {
    display: none;
}

/* Hide old filter group if still present */

/* Filters */
.filter-group {
    margin-bottom: 2rem;
    border-bottom: 1px solid #f1f2f6;
    padding-bottom: 1.5rem;
}

.filter-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.filter-group h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.filter-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.filter-list li {
    margin-bottom: 0.5rem;
}

.filter-list a {
    text-decoration: none;
    color: #636e72;
    transition: color 0.3s;
    display: block;
    padding: 0.2rem 0;
}

.filter-list a:hover,
.filter-list a.active {
    color: var(--accent-color);
    font-weight: 600;
}

.filter-select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #dfe6e9;
    border-radius: 8px;
    background: #f9f9f9;
    font-family: inherit;
    color: var(--text-color);
    cursor: pointer;
}

.checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #636e72;
    font-size: 0.95rem;
    cursor: pointer;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.5rem;
    background-color: var(--white);
    color: var(--primary-color);
    border: 1px solid #dfe6e9;
    border-radius: 50%;
    /* Circle */
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.page-link:hover,
.page-link.active {
    background-color: var(--accent-color);
    color: var(--white);
    border-color: var(--accent-color);
    box-shadow: 0 4px 10px rgba(6, 35, 84, 0.3);
}

.dots {
    display: flex;
    align-items: center;
    color: #b2bec3;
    padding: 0 0.5rem;
}

/* Animations */
.fade-in-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.9s ease-out, transform 0.9s ease-out;
    will-change: opacity, transform;
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: none;
}

/* Responsive Sidebar */
@media (max-width: 900px) {
    .catalog-layout {
        flex-direction: column;
    }

    .catalog-sidebar {
        width: 100%;
        position: static;
        box-shadow: none;
        border-bottom: 1px solid #dfe6e9;
        margin-bottom: 2rem;
    }

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

.product-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-category {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
    color: var(--primary-color);

    /* Truncate text after 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 2.8rem;
    /* Fixed height for consistency (approx 2 lines) */
    line-height: 1.4rem;
}

.btn-quick-add {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.btn-quick-add:hover {
    background-color: var(--accent-color);
    transform: scale(1.1);
    box-shadow: 0 4px 10px rgba(6, 35, 84, 0.4);
}

.price-action-row {
    margin-top: auto;
}

/* ------------------
    Footer
------------------ */
footer {
    background-color: var(--footer-bg);
    color: rgba(255, 255, 255, 0.7);
    padding: 3rem 2rem 1.5rem;
    margin-top: auto;
    text-align: center;
}

footer p {
    margin: 0;
    font-size: 0.9rem;
}

/* Cart Page Layout */
.cart-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.cart-items-container {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.cart-summary-sticky {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 100px;
}

.quote-history-item {
    background: var(--white);
    padding: 1.5rem;
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    box-sizing: border-box;
    /* Ensure padding doesn't overflow width */
}

.quote-info {
    flex: 1;
    min-width: 0;
    /* Helper for text truncation if needed */
}

.quote-action {
    flex-shrink: 0;
}

/* Skeleton Loading Animation */
@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.skeleton-loading {
    position: relative;
    overflow: hidden;
    background: #f0f0f0;
    /* Base color */
}

.skeleton-loading::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite linear;
    z-index: 10;
}

.img-hidden {
    opacity: 0;
    transition: opacity 0.3s ease-in;
}

.img-loaded {
    opacity: 1;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.7);
    z-index: 9999;
    display: none;
    /* Hidden by default */
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.loading-overlay.active {
    display: flex;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #e74c3c;
    /* Red accent */
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

.loading-text {
    font-weight: 600;
    color: #333;
    font-size: 1.1rem;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: var(--accent-color);
    color: var(--white);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(6, 35, 84, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: 90;
}

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

.scroll-to-top:hover {
    background-color: #0a3d8f;
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(6, 35, 84, 0.4);
}

.scroll-to-top .material-icons-outlined {
    font-size: 24px;
}

/* =========================================
   404 Page Styles
   ========================================= */
.error-page-container {
    position: relative;
    height: 80vh;
    /* Fits within main layout */
    background: linear-gradient(to bottom, #062354 0%, #020b1c 100%);
    overflow: hidden;
    border-radius: 20px;
    margin: 20px 0;
    color: white;
    font-family: 'Outfit', sans-serif;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.error-content {
    z-index: 10;
    position: relative;
}

.error-content h1 {
    font-size: 8rem;
    margin: 0;
    font-weight: 800;
    letter-spacing: 10px;
    color: #fff;
    text-shadow: 4px 4px 0px #e74c3c;
    position: relative;
}

.error-content h2 {
    font-size: 2rem;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.error-content p {
    font-size: 1.1rem;
    opacity: 0.8;
    margin-bottom: 2rem;
}

.btn-home {
    display: inline-block;
    background: #e74c3c;
    color: white;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.3s, background 0.3s;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
}

.btn-home:hover {
    transform: translateY(-2px);
    background: #c0392b;
}

/* Glitch Animation */
@keyframes glitch {
    0% {
        transform: translate(0)
    }

    20% {
        transform: translate(-2px, 2px)
    }

    40% {
        transform: translate(-2px, -2px)
    }

    60% {
        transform: translate(2px, 2px)
    }

    80% {
        transform: translate(2px, -2px)
    }

    100% {
        transform: translate(0)
    }
}

.glitch-text:hover {
    animation: glitch 0.3s cubic-bezier(.25, .46, .45, .94) both infinite;
}

/* Stars */
.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    opacity: 0.8;
    animation: twinkle 3s infinite;
}

@keyframes twinkle {

    0%,
    100% {
        opacity: 0.8;
        transform: scale(1);
    }

    50% {
        opacity: 0.3;
        transform: scale(0.5);
    }
}

.star1 {
    top: 10%;
    left: 20%;
    width: 3px;
    height: 3px;
    animation-duration: 2s;
}

.star2 {
    top: 20%;
    left: 80%;
    width: 4px;
    height: 4px;
    animation-duration: 3s;
}

.star3 {
    top: 60%;
    left: 10%;
    width: 2px;
    height: 2px;
    animation-duration: 1.5s;
}

.star4 {
    top: 80%;
    left: 70%;
    width: 3px;
    height: 3px;
    animation-duration: 2.5s;
}

.star5 {
    top: 40%;
    left: 50%;
    width: 5px;
    height: 5px;
    animation-duration: 4s;
}

/* Moon */
.moon {
    position: absolute;
    top: 50px;
    right: 50px;
    width: 100px;
    height: 100px;
    background: #e6e6e6;
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.crater {
    position: absolute;
    background: #ccc;
    border-radius: 50%;
    opacity: 0.5;
}

.crater1 {
    top: 20px;
    right: 20px;
    width: 20px;
    height: 20px;
}

.crater2 {
    top: 50px;
    right: 40px;
    width: 10px;
    height: 10px;
}

.crater3 {
    top: 60px;
    right: 20px;
    width: 15px;
    height: 15px;
}

/* Astronaut Animation */
.astronaut-container {
    position: absolute;
    top: 10%;
    left: 10%;
    animation: floatAstro 15s infinite ease-in-out;
    z-index: 1;
    opacity: 0.8;
}

.astronaut {
    width: 60px;
    height: 100px;
    position: relative;
}

.astronaut-body {
    width: 50px;
    height: 70px;
    background: #fff;
    border-radius: 10px;
    position: absolute;
    top: 20px;
    left: 5px;
}

.astronaut-head {
    width: 40px;
    height: 40px;
    background: #fff;
    border-radius: 10px;
    position: absolute;
    top: -10px;
    left: 10px;
}

.astronaut-visor {
    width: 30px;
    height: 20px;
    background: #333;
    border-radius: 5px;
    position: absolute;
    top: 10px;
    left: 5px;
}

.astronaut-backpack {
    width: 60px;
    height: 50px;
    background: #ccc;
    border-radius: 10px;
    position: absolute;
    top: 20px;
    left: 0;
    z-index: -1;
}

.astronaut-arm {
    width: 15px;
    height: 40px;
    background: #fff;
    border-radius: 10px;
    position: absolute;
    top: 30px;
}

.astronaut-arm-left {
    left: -10px;
    transform: rotate(20deg);
}

.astronaut-arm-right {
    right: -10px;
    transform: rotate(-20deg);
}

.astronaut-leg {
    width: 15px;
    height: 40px;
    background: #fff;
    border-radius: 10px;
    position: absolute;
    bottom: -30px;
}

.astronaut-leg-left {
    left: 5px;
    transform: rotate(10deg);
}

.astronaut-leg-right {
    right: 5px;
    transform: rotate(-10deg);
}

@keyframes floatAstro {
    0% {
        transform: translateY(0) rotate(0deg);
        left: 10%;
    }

    50% {
        transform: translateY(-30px) rotate(10deg);
        left: 15%;
    }

    100% {
        transform: translateY(0) rotate(0deg);
        left: 10%;
    }
}

/* Media Queries */
@media (max-width: 600px) {
    .error-content h1 {
        font-size: 5rem;
    }

    .error-content h2 {
        font-size: 1.5rem;
    }

    .astronaut-container {
        display: none;
    }
}

/* PC Background Image - Soft Transparent Effect */
@media (min-width: 1024px) {
    body {
        /* Overlay #f5f6fa (site bg) with 92% opacity to make the image appear soft/faint */
        background-image:
            linear-gradient(rgba(245, 246, 250, 0.79), rgba(245, 246, 250, 0.79)),
            url('../images/cuisine_fond.jpg');
        background-repeat: no-repeat;
        background-position: center;
        background-size: cover;
        background-attachment: fixed;
    }
}

/* Show More / Show Less Filter Buttons */
.hidden-item {
    display: none !important;
}

.show-more-btn {
    display: block;
    width: 100%;
    text-align: left;
    padding: 8px 0;
    background: none;
    border: none;
    color: var(--accent-color);
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
    margin-top: 5px;
    transition: color 0.2s;
}

.show-more-btn:hover {
    color: #c0392b;
    text-decoration: underline;
}