/* ==========================================
   HERO SECTION
   ========================================== */

#hero {
    position: relative;
    width: 100%;
    min-height: calc(100vh - 40px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    overflow: hidden;
}

#hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(to right, var(--color-grid-line) 1px, transparent 1px),
        linear-gradient(to bottom, var(--color-grid-line) 1px, transparent 1px);
    background-size: 55px 55px;
    background-position: center;
    mask-image: radial-gradient(circle at center, black 25%, transparent 75%);
    -webkit-mask-image: radial-gradient(circle at center, black 25%, transparent 75%);
    z-index: 0;
    pointer-events: none;
}

.hero-content {
    flex: 1;
    max-width: 50%;
    z-index: 1;
}

#hero .hero-content h1 {
    font-size: var(--large-font-size);
}

.hero-highlight {
    color: var(--color-accent);
    font-style: italic;
    text-decoration: underline;
}

.hero-line-wrap {
    display: inline-block;
    white-space: nowrap;
}

.hero-content p:first-of-type {
    color: var(--color-accent);
}

.hero-content p:last-of-type {
    margin-bottom: 30px;
    text-align: justify;
}

.hero-buttons {
    display: flex;
    gap: 20px;
}

.hero-buttons .btn {
    font-size: var(--font-size-hero-btn);
}

.hero-buttons .btn:last-of-type {
    background: var(--color-background);
    color: var(--color-text-main);
}

.hero-model {
    flex: 1;
    max-width: 45%;
    height: 550px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-model model-viewer {
    width: 100%;
    height: 100%;
    outline: none;
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 2;
}

.hero-model model-viewer.ready {
    opacity: 1;
    transform: scale(1);
}

.hero-model model-viewer::part(default-progress-bar) {
    display: none;
}

.model-shadow {
    position: absolute;
    width: 280px;
    height: 24px;
    background: radial-gradient(ellipse at center, var(--color-model-shadow) 0%, transparent 70%);
    bottom: 85px;
    left: 50%;
    transform: translateX(-50%) scale(0.8);
    opacity: 0;
    filter: blur(3px);
    z-index: 3;
    pointer-events: none;
    transition: opacity 0.8s ease;
}

.hero-model model-viewer.ready~.model-shadow {
    opacity: 1;
}

.hero-model model-viewer.floating {
    animation: floatModel 4.5s ease-in-out infinite alternate;
}

.hero-model model-viewer.floating~.model-shadow {
    animation: floatShadow 4.5s ease-in-out infinite alternate;
}

@keyframes floatModel {
    0% {
        transform: translateY(-15px);
    }

    100% {
        transform: translateY(15px);
    }
}

@keyframes floatShadow {
    0% {
        transform: translateX(-50%) scale(0.7);
        filter: blur(5px);
        opacity: 0.35;
    }

    100% {
        transform: translateX(-50%) scale(1.0);
        filter: blur(3px);
        opacity: 0.7;
    }
}

/* ==========================================
   MARQUEE SECTION
   ========================================== */

.marquee {
    width: 100%;
    height: 40px;
    display: flex;
    align-items: center;
    background: var(--color-primary);
    overflow: hidden;
}

.marquee-content {
    display: flex;
    white-space: nowrap;
    gap: 100px;
    padding-right: 100px;
    animation: marquee 25s linear infinite;
    flex-shrink: 0;
}

.marquee-content span {
    font-size: var(--normal-font-size);
    color: var(--color-background);
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-100%);
    }
}

/* ==========================================
   SHOWCASE SECTION
   ========================================== */

#showcase {
    min-height: 100vh;
    background-color: var(--color-background);
}

.showcase-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 50px;
}


.showcase-filter {
    display: flex;
    /* gap: 5px; */
}

.filter-btn {
    background: transparent;
    border: none;
    padding: 10px;
    border-radius: var(--border-radius);
    font-size: var(--font-size-filter);
    font-weight: 600;
    color: var(--color-text-muted);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

@media (hover: hover) and (pointer: fine) {
    .filter-btn:hover {
        color: var(--color-primary);
    }
}

.filter-btn.active {
    background-color: var(--color-primary);
    color: var(--color-background);
    box-shadow: 0 4px 12px rgba(26, 17, 11, 0.12);
}

#showcase-masonry {
    column-count: 4;
    column-gap: 30px;
    width: 100%;
}

.showcase-item {
    break-inside: avoid;
    position: relative;
    width: 100%;
    margin-bottom: 30px;
    background: var(--color-card-bg);
    border: 1px solid var(--color-card-border);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.4s ease, border-color 0.4s ease;
    display: flex;
    flex-direction: column;
    animation: fadeInCard 0.6s cubic-bezier(0.25, 1, 0.5, 1) both;
    container-type: inline-size;
}

.showcase-item.no-anim {
    animation: none;
}

@keyframes fadeInCard {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.showcase-item img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    background: var(--color-card-bg);
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

@media (hover: hover) and (pointer: fine) {
    .showcase-item:hover {
        transform: translateY(-6px);
        box-shadow: var(--box-shadow-card-hover);
        border-color: var(--color-card-hover-border);
    }

    .showcase-item:hover img {
        transform: scale(1.05);
    }
}

.item-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: var(--color-card-gradient);
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 3;
    pointer-events: none;
}

.item-info h3,
.item-info p,
.item-info .item-meta {
    pointer-events: auto;
}

.item-info p:first-of-type {
    font-size: var(--font-size-card-category);
    color: var(--color-accent);
    font-weight: 700;
    margin: 0;
    line-height: 1.25;
}

.item-info h3 {
    font-family: "Zalando Sans Expanded", sans-serif;
    font-size: var(--font-size-card-title);
    font-weight: 700;
    color: var(--color-text-main);
    margin: 0;
    line-height: 1.2;
}

.item-info p:last-of-type {
    font-size: var(--font-size-card-desc);
    color: var(--color-text-subtle);
    margin: 0;
    text-align: justify;
    line-height: 1.25;
}

.item-info p:last-of-type:empty {
    display: none;
}

.showcase-item .price-container {
    gap: 2px;
}

.item-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
}

.showcase-item .btn,
.showcase-item .btn * {
    color: var(--color-background);
}

.showcase-item .add-to-cart-btn {
    display: inline-flex;
    white-space: nowrap;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1;
    width: fit-content;
    padding: 6px 12px;
}

.showcase-item .add-to-cart-btn .btn-chunk {
    display: inline;
    white-space: nowrap;
    color: inherit;
}

@container (max-width: 310px) {
    .showcase-item .add-to-cart-btn {
        flex-direction: column;
        padding: 5px 12px;
        line-height: 1.15;
    }

    .showcase-item .add-to-cart-btn .btn-chunk {
        display: block;
    }
}

.price {
    font-size: var(--font-size-price);
    font-weight: 700;
    color: var(--color-text-main);
}


/* ==========================================
   CUSTOM FORM SECTION
   ========================================== */

#custom {
    background-color: var(--color-surface);
}

.custom-title {
    text-align: center;
}

.custom-form {
    display: flex;
    flex-direction: column;
    max-width: 800px;
    margin: 30px auto;
    padding: 30px;
    background-color: var(--color-background);
    border-radius: 20px;
}

.custom-form>div {
    width: 100%;
    display: flex;
    flex-direction: row;
    gap: 20px;
}

.custom-form>div>div {
    flex: 1;
}

.custom-form textarea {
    height: 150px;
    resize: none;
}

.custom-form button {
    width: fit-content;
    margin: 20px auto;
}

/* ==========================================
   RESPONSIVE MEDIA QUERIES
   ========================================== */

@media (max-width: 1400px) {
    #hero {
        padding: 0 100px;
        gap: 30px;
    }

    .hero-model {
        height: 480px;
    }

    .model-shadow {
        bottom: 60px;
    }

    #showcase-masonry {
        column-count: 3;
        column-gap: 25px;
    }
}

@media (max-width: 1024px) {
    #hero {
        padding: 0 80px;
        gap: 20px;
    }

    .hero-model {
        height: 420px;
    }

    .model-shadow {
        bottom: 40px;
    }

    #showcase-masonry {
        column-count: 2;
        column-gap: 20px;
    }

    .hero-buttons {
        display: flex;
        flex-direction: column;
        gap: 12px;
        width: 100%;
        align-items: flex-start;
    }

    .hero-buttons .btn {
        width: 190px;
        padding: 12px 20px;
        text-align: center;
    }
}

@media (max-width: 768px) {

    #hero {
        flex-direction: column;
        justify-content: flex-end;
        align-items: stretch;
        padding: 85px 24px 60px 24px;
        height: calc(100vh - 40px);
        height: calc(100svh - 40px);
        min-height: calc(100vh - 40px);
        min-height: calc(100svh - 40px);
        gap: 15px;
    }

    .hero-content {
        max-width: 100%;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        margin-top: auto;
        z-index: 2;
    }

    #hero .hero-content h1 {
        line-height: 1.25;
        text-align: left;
    }

    .hero-content p {
        max-width: 100%;
        text-align: left;
    }

    .hero-model {
        max-width: 100%;
        width: 100%;
        flex: 1;
        min-height: 200px;
        display: flex;
        justify-content: center;
        align-items: center;
        order: -1;
        position: relative;
        z-index: 1;
    }

    .hero-model model-viewer {
        width: 100%;
        height: 100%;
    }

    .model-shadow {
        bottom: 5px;
        width: 180px;
    }

    .showcase-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0px;
        margin-bottom: 30px;
        text-align: left;
    }

    .showcase-filter {
        flex-wrap: wrap;
        justify-content: flex-start;
        /* gap: 8px; */
    }

    #showcase-masonry {
        column-count: 2;
        column-gap: 20px;
    }

    .showcase-item {
        margin-bottom: 20px;
    }

    .showcase-item .item-info {
        position: static;
        background: transparent;
        padding: 15px;
        pointer-events: auto;
        gap: 4px;
    }

    .showcase-item .item-meta {
        flex-direction: column;
        align-items: stretch;
        gap: 5px;
        margin-top: 2px;
    }

    .showcase-item .btn {
        display: block;
        box-sizing: border-box;
        width: 100%;
        text-align: center;
        padding: 8px 0;
    }

    .showcase-item .add-to-cart-btn .btn-chunk {
        display: inline;
    }

    .custom-form {
        padding: 20px;
    }

    .custom-form>div {
        flex-direction: column;
        gap: 0px;
    }

}

@media (max-width: 480px) {
    #showcase-masonry {
        column-count: 2;
        column-gap: 12px;
    }

    .showcase-item {
        margin-bottom: 12px;
    }

    .showcase-item .item-info {
        padding: 10px;
        gap: 4px;
    }

    .showcase-item .item-meta {
        gap: 5px;
    }

    .showcase-item .discount-badge {
        padding: 1px 4px;
    }

    .showcase-item .custom-btn {
        padding: 6px 0;
    }

    .custom-form {
        padding: 16px;
        margin: 20px auto;
    }

    .custom-form textarea {
        height: 120px;
    }
}