:root {
    /* Typography */
    --font-heading: "Nunito", sans-serif; /* Modern, bold, very popular */
    --font-body: "Montserrat", sans-serif;
    --font-accent: "Manrope", sans-serif;

    --scale: 1;

    --size-header: min(4vh, 40px);
    --size-nav: min(6vh, 60px);
    --size-hero: min(60vh, 600px);
    --size-advantages: min(30vh, 300px);

    --font-size-base: clamp(16px, 2vw, 18px);
    --font-size-h1: clamp(2rem, 5vw, 2.5rem);
    --font-size-h2: clamp(1.75rem, 4vw, 2.25rem);
    --font-size-h3: clamp(1.5rem, 3.5vw, 2rem);
    --font-size-h4: clamp(1.25rem, 3vw, 1.75rem);
    --font-size-h5: calc(clamp(1.1rem, 2.5vw, 1.5rem) * var(--scale));
    --font-size-h6: clamp(1rem, 2vw, 1.25rem);

    --section-padding: 1.5rem 1rem;

    --boreder-radius: 2rem;

    --color-pr1: #606c5d;
    --color-pr2: #f1c376;
    --color-fg1: #222222;
    --color-fg2: #666666;
    --color-bg1: white;
    --color-bg2: #eeeeee;
    --color-bg3: #dddddd;

    --color-body-fg: var(--color-fg1);
    --color-body-bg: var(--color-bg2);

    --color-header-fg: var(--color-fg1);
    --color-header-bg: var(--color-bg2);

    --color-nav-fg: var(--color-fg1);
    --color-nav-bg: var(--color-bg1);

    --color-footer-fg: var(--color-fg1);
    --color-footer-bg: var(--color-bg3);

    --color-link: var(--color-fg1);
    --color-link-hovered: var(--color-fg2);

    --color-card-fg: var(--color-fg1);
    --color-card-bg: var(--color-bg1);

    --heading-padding: 3rem;

    --olive-break-margin: 1rem;

    --mobile-hero-card-height: 26vh;
}

@media (max-width: 1024px) {
    --scale: 2;
}

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

body {
    font-family: var(--font-body);
    font-size: var(--font-size-base);
    min-height: 100vh;

    color: var(--color-body-fg);
    background: var(--color-body-bg);
}
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
}
h1 {
    font-size: var(--font-size-h1);
}
h2 {
    font-size: var(--font-size-h2);
}
h3 {
    font-size: var(--font-size-h3);
}
h4 {
    font-size: var(--font-size-h4);
}
h5 {
    font-size: var(--font-size-h5);
}
h6 {
    font-size: var(--font-size-h6);
}

.container {
    padding: 1rem;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
}

/* TOP */
#top {
    top: 0;
    position: sticky;
    z-index: 1000;
}

/* TOP | HEADER COMPONENT */

header {
    height: var(--size-header);
    background: var(--color-header-bg);
    color: var(--color-header-fg);
}
header a {
    display: flex;
    gap: 0.25rem;
    vertical-align: middle;
    color: var(--color-header-fg);
    text-decoration: none;
}
header a:hover {
    color: var(--color-pr1);
}
.header-container {
    display: flex;
    height: 100%;
    justify-content: space-between;
    align-items: center;
}
.header-right {
    display: flex;
    gap: 20px;
    align-items: center;
}
.social-links {
    display: flex;
    gap: 10px;
}
.header-icon {
}
.header-icon-fg {
    fill: var(--color-header-fg);
}
.header-icon:hover .header-icon-fg {
    fill: var(--color-pr1);
}
.header-icon-bg {
    fill: var(--color-header-bg);
}
@media (max-width: 1024px) {
    header {
        display: none;
    }
}

/* FOOTER */
footer {
    color: var(--color-footer-fg);
    background: var(--color-footer-bg);
    margin-top: auto;
}
.footer-container {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}
.footer-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.footer-logo {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.footer-logo img {
    width: 100%;
}
.footer-logo h3 {
    font-size: 1.5rem;
    color: var(--color-link);
    margin-bottom: 0.5rem;
}
.footer-column h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}
.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.footer-links a {
    color: var(--color-link);
    text-decoration: none;
}
.footer-links a:hover {
    color: var(--color-link-hovered);
}
.footer-office {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.office-address,
.office-hours {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.footer-contacts {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.footer-contacts .contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.footer-contacts a {
    color: var(--color-link);
    text-decoration: none;
}
.footer-contacts a:hover {
    color: var(--color-link-hovered);
}
.footer-contacts .social-links {
    display: flex;
    gap: 1rem;
}
.footer-bottom {
    text-align: center;
    padding: 1rem 0;
    border-top: 1px solid var(--color-fg2);
}

@media (max-width: 1024px) {
    .footer-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* TOP | NAVIGATION COMPONENT */

nav {
    height: var(--size-nav);
    background: var(--color-nav-bg);
    color: var(--color-nav-fg);
    border-bottom: 1px solid var(--color-body-bg);
}
nav a {
    color: var(--color-link);
    text-decoration: none;
    font-weight: bold;
}
nav a:hover {
    color: var(--color-link-hovered);
    text-decoration: none;
}
.nav-container {
    display: flex;
    height: 100%;
    justify-content: space-between;
    align-items: center;
}
.nav-left,
.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.nav-center {
    float: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
.nav-icon {
    overflow: hidden;
    height: var(--size-nav);
    width: auto;
}
.nav-cross-container {
    display: inline-block;
    cursor: pointer;
}
.nav-cross-bar1,
.nav-cross-bar2 {
    width: 1.5rem;
    height: 0.2rem;
    background-color: var(--color-nav-fg);
    margin: 0.5rem 0;
    transition: 0.1s;
    border-radius: 1rem;
}
.change .nav-cross-bar1 {
    transform: translate(0, 0.35rem) rotate(-45deg);
}
.change .nav-cross-bar2 {
    transform: translate(0, -0.35rem) rotate(45deg);
}

/* NAV-OVERLAY */

#nav-overlay {
    height: 100%;
    width: 0;
    position: fixed;
    left: 0;
    top: var(--size-nav);
    background-color: var(--color-bg1);
    overflow-x: hidden;
    overflow-y: auto;
    transition: 0.2s;
}
.no-scroll {
    overflow: hidden;
}

/* INDEX */

#index section {
    width: 100%;
    padding: var(--section-padding);
}

/* INDEX | HERO GALLERY */

#hero-gallery {
    height: var(--size-hero);
}
.hero-row {
    display: flex;
    box-sizing: border-box;
    height: 100%;
    gap: 1rem;
}
.hero-column {
    display: flex;
    flex-direction: column;
    flex: 1;
    width: 100%;
    gap: 1rem;
}
.hero-card {
    flex: 1;
    background: var(--color-card-bg);
    overflow: hidden;
    border-radius: var(--boreder-radius);
}
.hero-card.wide {
    flex: 1.25;
}
.hero-card-content {
    position: relative;
    width: 100%;
    height: 100%;
}
.hero-card-content img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    transition: transform 0.1s ease;
}
.hero-card:hover .hero-card-content img {
    transform: scale(1.05);
}
.hero-card-text {
    position: absolute;
    bottom: 2rem;
    left: 2rem;
    color: var(--color-fg1);
}
.hero-card:hover .hero-card-text {
    color: var(--color-fg2);
}
@media (max-width: 1024px) {
    /* Adjust breakpoint as needed */
    #hero-gallery {
        height: auto;
    }
    .hero-row {
        flex-direction: column;
        height: auto;
    }
    .hero-column {
        gap: 1rem;
    }
    .hero-card,
    .hero-card-content {
        min-height: var(--mobile-hero-card-height);
    }
    .hero-card-text {
        bottom: 1rem;
        left: 1rem;
    }
    .hero-card-text h2 {
        font-size: 1.75rem;
    }
    .hero-card-text h4 {
        font-size: 1.25rem;
    }
}

/* INDEX | ADVANTAGES */

#advantages {
    height: var(--size-advantages);
    background-color: var(--color-body-bg);

    text-align: center;
}
.advantages-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 1rem;
}
.advantage-card {
    text-align: center;
    padding: 1rem;
    border-radius: var(--boreder-radius);
}
.advantage-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}
.advantage-card h2 {
    color: var(--color-body-fg);
    margin-bottom: 0.5rem;
}
.advantage-card p {
    color: var(--color-body-fg);
    line-height: 1.6;
}

/* Responsive design */
@media (max-width: 1024px) {
    #advantages {
        height: auto;
    }
    .advantages-grid {
        grid-template-columns: 1fr;
    }
    .advantage-card {
        padding: 1.5rem;
    }
}

/* INDEX | FEATURED PRODUCTS */

#featured {
    padding: var(--section-padding);
}
#featured h2 {
    text-align: center;
    padding: var(--heading-padding);
}
.featured-container {
    position: relative;
}
.featured-slider {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding: 1rem 0;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}
.featured-item {
    flex: 0 0 300px; /* Fixed width for product cards */
}
.featured-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 4rem;
    height: 4rem;
    border: none;
    border-radius: 50%;
    background: var(--color-bg1);
    color: var(--color-fg1);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.1s ease-in;
}
.featured-container:hover .featured-btn {
    opacity: 1;
}
.featured-btn:hover {
    background: var(--color-bg2);
    color: var(--color-fg2);
}
.featured-btn.prev {
    left: 2rem;
}
.featured-btn.next {
    right: 2rem;
}
@media (max-width: 768px) {
    .featured-btn {
        display: none;
    }
    .featured-item {
        scroll-snap-align: start;
    }
}

/* INDEX | HOW WE WORK */
#how-we-work {
    text-align: center;
    padding: var(--section-padding);
}
#how-we-work h4 {
    padding: var(--heading-padding);
}
.steps-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}
.step-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    padding: 2rem;
    height: 8rem;
    background: var(--color-bg1);
    text-align: center;
    gap: 1rem;
}
.step-card:nth-child(1) {
    background: linear-gradient(145deg, #dfa17780, #bd794580);
    box-shadow: 0 4px 15px #dfa17720;
}
.step-card:nth-child(3) {
    background: linear-gradient(145deg, #e5e5e580, #b4b4b480);
    box-shadow: 0 4px 15px #e5e5e520;
}
.step-card:nth-child(5) {
    background: linear-gradient(145deg, #ffd70080, #daa52080);
    box-shadow: 0 4px 15px #ffd70020;
}
.step-card h5 {
}
.step-card p {
}
.step-arrow {
    font-size: 2rem;
    color: var(--color-fg2);
}
@media (max-width: 1024px) {
    .steps-container {
        flex-direction: column;
        gap: 1rem;
    }
    .step-card {
        width: 100%;
        max-width: none;
    }
    .step-arrow {
        display: none;
    }
}

/* INDEX | CONTACTS */

#contacts {
    margin-top: 2rem;
}
.contacts-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}
.contacts-info-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.contacts-info-container .address {
    margin-bottom: 2rem;
}
.contacts-info {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    justify-content: space-between;
}
.contacts-info h6 {
    margin-bottom: 0.75rem;
}
.contact-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.contact-links a {
    text-decoration: none;
    color: var(--color-link);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.contact-links a:hover {
    color: var(--color-link-hovered);
}
.work-time,
.transport-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.work-time {
    flex-direction: column;
}
.transport-list {
    flex-direction: column;
}
.transport-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.transport-icon {
    height: 1rem;
}

.contacts-map {
    background: var(--color-body-bg);
    overflow: hidden;
}
#map-container {
    height: 100%;
    min-height: 400px;
}
@media (max-width: 1024px) {
    .contacts-container {
        grid-template-columns: 1fr;
    }
    .contact-links {
    }
}
@media (max-width: 768px) {
    .contacts-info {
        flex-direction: column;
    }
    .transport-list {
        flex-direction: row;
        gap: 1.5rem;
    }
}
@media (max-width: 540px) {
    .transport-list {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* SUBSCRIBE FORM */

@media (max-width: 1024px) {
    .subscribe-form {
        flex-direction: column;
        padding: 0 var(--space-md);
    }

    .subscribe-form button {
        width: 100%;
    }
}

/* CATALOG */

#catalog #catalog-heading {
    text-align: center;
    vertical-align: middle;
    padding: var(--heading-padding);
}
#catalog .catalog-container {
    padding: 1rem;
    margin: 0 auto;
    width: 100%;
}

/* INDEX | GALLERY */
#gallery {
    padding: var(--section-padding);
    margin-bottom: 2rem;
}
#gallery h2 {
    text-align: center;
    padding: var(--heading-padding);
}
.gallery-container {
    position: relative;
}
.gallery-slider {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding: 1rem 0;
    -webkit-overflow-scrolling: touch; /* for smoother scrolling on iOS */
}
/* Hide scrollbar but keep functionality */
/* .gallery-slider::-webkit-scrollbar {
    display: none;
}
.gallery-slider {
    -ms-overflow-style: none;
    scrollbar-width: none;
} */
.gallery-item {
    /* flex: 0 0 400px; */
    /* aspect-ratio: 4/3; */
    scroll-snap-align: start;
    border-radius: var(--boreder-radius);
    /* overflow: hidden; */
    height: 400px;
}
.gallery-item img {
    /* width: 100%; */
    height: 100%;
    object-fit: cover;
}

.gallery-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 4rem;
    height: 4rem;
    border: none;
    border-radius: 50%;
    background: var(--color-bg1);
    color: var(--color-fg1);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.1s ease-in;
}
.gallery-container:hover .gallery-btn {
    opacity: 1;
}
.gallery-btn:hover {
    background: var(--color-bg2);
    color: var(--color-fg2);
}
.gallery-btn.prev {
    left: 2rem;
}
.gallery-btn.next {
    right: 2rem;
}
@media (max-width: 768px) {
    .gallery-btn {
        display: none;
    }
    /* .gallery-slider {
        scroll-snap-type: x mandatory;
    } */
}

/* PRODUCTS */

.products-row {
    display: flex;
    gap: 20px;
    margin: 0 auto;
}
.products-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1rem;
}
.product-card {
    flex: 1;
    color: var(--color-card-fg);
    background: var(--color-card-bg);
    border-radius: var(--boreder-radius);
    overflow: hidden;
    padding: 1.5rem;
    height: 100%;
}
.product-image {
    position: relative;
    width: 100%;
    padding-bottom: 100%;
    overflow: hidden;
}
.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    aspect-ratio: 1;
}
.product-info {
    margin-top: 1rem;
}
.product-name {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}
.product-price {
    font-family: var(--font-accent);
    font-weight: var(--font-weight-medium); /* 500 */
}

/* PRODUCT PREVIEW */

#product-preview {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
}
#product-preview.hidden {
    display: none;
}
.preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
}
.preview-content {
    position: relative;
    background: var(--color-bg1);
    padding: 2rem;
    border-radius: var(--boreder-radius);
    width: 90%;
    max-width: 32rem;
    z-index: 2001;
}
.preview-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--color-fg2);
}
.preview-close:hover {
    color: var(--color-fg1);
}
.preview-close-icon {
    width: 24px;
    height: 24px;
}
.preview-image {
    width: 100%;
    margin-bottom: 1.5rem;
}
.preview-image img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
}
.preview-info {
    text-align: left;
}
.preview-name {
    margin-bottom: 1rem;
}
.preview-price {
    font-family: var(--font-accent);
    font-size: 1.25rem;
    margin-bottom: 1rem;
}
.preview-description {
    color: var(--color-fg2);
    line-height: 1.6;
}
.product-preview-trigger {
    width: 100%;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
}
.product-preview-trigger:hover {
    opacity: 0.9;
}

/* HEADINGS */

.heading-center {
    text-align: center;
    vertical-align: middle;
}

/* OLIVE BRANCH */

.olive-decoration {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    width: 100%;
    margin: var(--olive-break-margin) 0;
}
.decoration-line {
    flex: 1;
    height: 1px;
    border: none;
    background: var(--color-pr1);
    opacity: 0.25;
}
.olive-wrapper {
    display: flex;
    align-items: center;
}
.olive-branch {
    width: 32px;
    height: 32px;
    fill: var(--color-pr1);
}

/* OTHERS */

.inverted-corner {
    mask-image: radial-gradient(
            circle at top left,
            transparent 0,
            transparent 20px,
            black 21px
        ),
        radial-gradient(
            circle at top right,
            transparent 0,
            transparent 20px,
            black 21px
        ),
        radial-gradient(
            circle at bottom left,
            transparent 0,
            transparent 20px,
            black 21px
        ),
        radial-gradient(
            circle at bottom right,
            transparent 0,
            transparent 20px,
            black 21px
        );
    mask-position:
        top left,
        top right,
        bottom left,
        bottom right;
    mask-repeat: no-repeat;
    mask-size: 50% 50%;
}
.mirror {
    transform: scaleX(-1);
}

@media (max-width: 1024px) {
    .hide-mobile {
        display: none;
    }
}
@media (min-width: 1024px) {
    .hide-desktop {
        display: none;
    }
}

/* NOT FOUND */
#not-found {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.not-found-content {
    max-width: 600px;
}

.not-found-content h1 {
    font-size: 6rem;
    color: var(--color-pr1);
    margin-bottom: 1rem;
}

.not-found-content h2 {
    margin-bottom: 1rem;
}

.not-found-content p {
    margin-bottom: 2rem;
    color: var(--color-fg2);
}

.not-found-content a {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--color-pr1);
    color: white;
    text-decoration: none;
    border-radius: var(--boreder-radius);
}

.not-found-content a:hover {
    background: var(--color-pr2);
}
