/* =====================
   1) FONTS
===================== */
@font-face {
    font-family: "Firago";
    src:
        url("../fonts/FiraGO-Regular.woff2") format("woff2"),
        url("../fonts/FiraGO-Regular.woff") format("woff");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Firago";
    src:
        url("../fonts/FiraGO-Bold.woff2") format("woff2"),
        url("../fonts/FiraGO-Bold.woff") format("woff");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* =====================
   2) TOKENS (Variables)
===================== */
:root {
    --font-main: "FiraGO", "Helvetica Neue", Arial, sans-serif;

    --c-dark: #111;
    --c-white: #fff;

    --c-text: #111;
    --c-muted: rgba(0, 0, 0, 0.65);

    --c-white-soft: rgba(255, 255, 255, 0.88);
    --c-white-muted: rgba(255, 255, 255, 0.82);

    --c-primary: #2f5ea8;
    --c-primary-hover: #254c86;

    --c-surface: #ffffff;
    --c-surface-2: #f3f3f3;

    --search-bg: rgba(255, 255, 255, 0.45);
    --search-border: rgba(255, 255, 255, 0.12);

    --lang-bg: rgba(255, 255, 255, 0.08);
    --lang-active-bg: rgba(255, 255, 255, 0.18);

    --container: min(1400px, 100% - 32px);
    --header-h: clamp(56px, 6vw, 72px);

    --s-1: clamp(6px, 0.8vw, 10px);
    --s-2: clamp(10px, 1.2vw, 14px);
    --s-3: clamp(14px, 1.8vw, 18px);
    --s-4: clamp(18px, 2.4vw, 26px);
    --s-5: clamp(24px, 3.2vw, 34px);

    --r-sm: 10px;
    --r-md: 14px;
    --r-lg: 18px;

    --fs-xs: clamp(12px, 1.2vw, 13px);
    --fs-sm: clamp(13px, 1.4vw, 14px);
    --fs-md: clamp(15px, 1.6vw, 16px);
    --fs-lg: clamp(18px, 2.2vw, 22px);
    --fs-xl: clamp(24px, 3.2vw, 40px);

    --sh-1: 0 10px 22px rgba(0, 0, 0, 0.06);
    --sh-2: 0 14px 30px rgba(0, 0, 0, 0.1);

    --b: 1px solid rgba(0, 0, 0, 0.1);
    --b-soft: 1px solid rgba(0, 0, 0, 0.08);

    --section-gap: var(--s-2);

    --content-narrow: min(1480px, 100% - 40px);
}

/* =====================
   3) BASE / RESET
===================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: var(--font-main);
    color: var(--c-text);
    background: var(--c-surface-2);
    line-height: 1.4;
}
img {
    max-width: 100%;
    display: block;
}
a {
    color: inherit;
}
.container {
    width: var(--container);
    margin-inline: auto;
}

/* =====================
   4) HEADER
===================== */
.site-header {
    background: var(--c-dark);
    position: sticky; /* თუ გინდა რომ ზედა იყოს */
    top: 0;
    z-index: 1000;
}
.header-row {
    min-height: var(--header-h);
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: var(--s-3);

    width: 100%;
    max-width: none;
    margin-inline: 0;

    padding-inline: clamp(24px, 4vw, 60px); /* აი ეს ხაზია მთავარი */
}

.header-logo {
    display: flex;
    align-items: center;
}
.header-logo img {
    max-height: clamp(40px, 5vw, 65px);
    width: auto;
    object-fit: contain;
}

.burger {
    display: none;
    width: 42px;
    height: 38px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    cursor: pointer;
    padding: 10px;
}
.burger span {
    display: block;
    height: 2px;
    background: rgba(255, 255, 255, 0.88);
    border-radius: 99px;
}
.burger span + span {
    margin-top: 6px;
}

.header-nav {
    display: flex;
    justify-content: center;
    gap: clamp(14px, 2.2vw, 28px);
}
.header-link {
    color: var(--c-white-soft);
    text-decoration: none;
    font-size: var(--fs-sm);
    padding: var(--s-1) var(--s-2);
    border-radius: var(--r-sm);
    transition:
        color 0.2s ease,
        background-color 0.2s ease;
}
.header-link:hover {
    color: var(--c-white);
    background: rgba(255, 255, 255, 0.06);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--s-2);
}

.header-search {
    display: flex;
    align-items: center;
    gap: var(--s-1);
    padding: var(--s-1) var(--s-2);
    background: var(--search-bg);
    border: 1px solid var(--search-border);
    border-radius: var(--r-md);
}
.search-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.9);
}
.search-icon svg {
    display: block;
}
.search-input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--c-white);
    width: clamp(140px, 16vw, 190px);
    font-size: var(--fs-sm);
}
.search-input::placeholder {
    color: var(--c-white-muted);
}

.header-lang {
    display: flex;
    overflow: hidden;
    border-radius: var(--r-md);
    border: 1px solid var(--search-border);
    background: var(--lang-bg);
}
.lang-btn {
    border: none;
    background: transparent;
    color: var(--c-white-soft);
    padding: var(--s-1) var(--s-2);
    font-size: var(--fs-xs);
    cursor: pointer;
}
.lang-btn.is-active {
    background: var(--lang-active-bg);
    color: var(--c-white);
    font-weight: 700;
}

/* =====================
   MEGA MENU (ONLY ADD)
===================== */

.nav-item {
    position: relative;
    padding: var(--s-1) var(--s-2);
}

/* DROPDOWN */
.mega-menu {
    position: fixed;

    top: var(--header-h);
    left: 0;

    width: 100vw;
    height: 350px;

    padding: 40px 0;
    background: #f5f6f8;

    display: flex;
    justify-content: center;

    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);

    transition: 0.25s ease;

    z-index: 1200;
}
.mega-menu-inner {
    width: min(1200px, 100%);
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 40px;
}

/* SHOW */
.nav-item:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* COLUMN */
.mega-column img {
    background: transparent;
}
.mega-column h4 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
}

.mega-column a {
    display: block;
    font-size: 18px;
    color: #555;
    text-decoration: none;
    margin-bottom: 10px;
}

.mega-column a:hover {
    color: #000;
}

/* =====================
   5) HERO / SLIDER
===================== */
.slider {
    position: relative;
    overflow: hidden;
    background: #000;
    box-shadow: var(--sh-2);
}
.slides {
    position: relative;
    min-height: clamp(240px, 30vw, 380px);
}
.slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: center;
    padding: var(--s-5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
    background-size: cover;
    background-position: center;
}
.slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.slide__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0.1));
}
.slide__content {
    position: relative;
    z-index: 1;
    max-width: 560px;
    padding-left: clamp(10px, 3vw, 54px);
}
.slide__title {
    color: var(--c-white);
    font-size: var(--fs-xl);
    line-height: 1.05;
    margin-bottom: 10px;
}
.slide__subtitle {
    color: var(--c-white-soft);
    font-size: var(--fs-md);
    margin-bottom: 16px;
}

.slide__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 26px;
    border-radius: var(--r-sm);
    text-decoration: none;
    background-color: var(--c-primary);
    color: var(--c-white);
    font-size: var(--fs-sm);
    font-weight: 700;
    transition:
        transform 0.2s ease,
        background-color 0.2s ease,
        box-shadow 0.2s ease;
}
.slide__btn:hover {
    background-color: var(--c-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22);
}

.slider__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.18);
    color: var(--c-white);
    cursor: pointer;
    display: grid;
    place-items: center;
    font-size: 24px;
    z-index: 2;
    backdrop-filter: blur(4px);
    transition:
        background 0.2s ease,
        transform 0.2s ease;
}
.slider__arrow:hover {
    background: rgba(255, 255, 255, 0.28);
    transform: translateY(-50%) scale(1.05);
}
.slider__arrow--prev {
    left: 12px;
}
.slider__arrow--next {
    right: 12px;
}

.slider__dots {
    position: absolute;
    left: 50%;
    bottom: 12px;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 2;
}
.dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    border: none;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    transition:
        transform 0.2s ease,
        background 0.2s ease;
}
.dot.is-active {
    background: rgba(255, 255, 255, 0.92);
    transform: scale(1.2);
}

/* =====================
   6) CATEGORIES (carousel 4 visible)
===================== */
.section-head {
    background: var(--c-surface);
    border: var(--b-soft);
    border-bottom: none;
    padding: 14px 16px;
}
.section-head--with-arrows {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.section-title {
    font-size: var(--fs-lg);
    font-weight: 700;
}

.categories-arrows {
    display: flex;
    gap: 8px;
}
.cat-arrow {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: var(--b-soft);
    background: var(--c-surface-2);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}
.cat-arrow:hover {
    background: rgba(159, 23, 23, 0.04);
}

.categories-carousel {
    width: 100%;
    overflow: hidden;
    background: var(--c-surface);
    border: var(--b-soft);
}
.categories-row {
    display: flex;
    transition: transform 0.35s ease;
    will-change: transform;
}
.category-card {
    flex: 0 0 20%;
    display: grid;
    place-items: center;
    gap: 10px;
    padding: 22px 10px;
    text-decoration: none;
    color: var(--c-text);
    border-right: 1px solid rgba(0, 0, 0, 0.08);
    transition:
        transform 0.2s ease,
        background 0.2s ease;
}
.category-card:last-child {
    border-right: none;
}
.category-card:hover {
    background: #fff;
    transform: translateY(-3px);
}
.category-icon {
    width: clamp(72px, 8vw, 170px);
    height: clamp(72px, 8vw, 170px);
    object-fit: contain;
}
.category-name {
    font-size: var(--fs-sm);
    opacity: 0.85;
}

/* =====================
   7) PRODUCTS (carousel 4 visible)
===================== */
.products__head {
    background: var(--c-surface);
    border: var(--b);
    border-bottom: none;
    padding: 14px 16px;
}
.products__head--with-arrows {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.products__title {
    font-size: var(--fs-lg);
    font-weight: 700;
}

.products-carousel {
    width: 100%;
    overflow: hidden;
    background: var(--c-surface);
    border: var(--b-soft);
}

.products-arrows {
    display: flex;
    gap: 8px;
}
.p-arrow {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: var(--b-soft);
    background: var(--c-surface-2);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}
.p-arrow:hover {
    background: rgba(0, 0, 0, 0.05);
}

.products__grid {
    display: flex; /* ✅ carousel track */
    gap: var(--s-3);
    background: var(--c-surface);
    border: var(--b);
    padding: var(--s-3);
    border-radius: 0 0 var(--r-md) var(--r-md);
    transition: transform 0.35s ease;
    will-change: transform;
}

.p-card {
    flex: 0 0 calc((100% - (var(--s-3) * 3)) / 4); /* ✅ 4 visible */
    min-width: 0;

    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: var(--r-md);
    overflow: hidden;
    background: var(--c-surface);
    box-shadow: var(--sh-1);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}
.p-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.12);
}

.p-card__badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #b11a1a;
    color: #fff;
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 8px;
    font-weight: 700;
    z-index: 2;
}

.p-card__media {
    background: transparent;
    padding: var(--s-3);
    display: grid;
    place-items: center;
    min-height: 160px;
}
.p-card__media img {
    width: min(230px, 100%);
    height: 120px;
    object-fit: contain;
    background: transparent;
}

.p-card__body {
    padding: var(--s-3);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    display: grid;
    gap: 10px;
    justify-items: center;
    text-align: center;
    background: var(--c-surface-2);
}

.p-card__title {
    font-size: 16px;
    font-weight: 700;
    color: #111;
    line-height: 1.3;
}
.p-card__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 100px;
    padding: 10px 14px;
    border-radius: var(--r-sm);
    background: var(--c-primary);
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    font-size: 12px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    transition:
        transform 0.15s ease,
        background-color 0.2s ease;
}
.p-card__btn:hover {
    background: var(--c-primary-hover);
    transform: translateY(-2px);
}
/* =====================
   FOOTER (CLEAN)
===================== */
.footer {
    background: #2f343b;
    color: rgba(255, 255, 255, 0.85);
    margin-top: var(--section-gap);
}

/* Full-width bg, centered content */
.footer__inner {
    width: var(--container);
    margin-inline: auto;
    padding-inline: 16px; /* safety padding */
}

/* Main grid */
.footer__grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: var(--s-4);
    align-items: start;
    padding: 18px 0 var(--s-4);
}

/* Columns */
.footer__col {
    min-width: 0;
}

/* Brand column: center logo both ways */
.footer__brand {
    display: flex;
    justify-content: center; /* horizontal */
    align-items: center; /* vertical */
}

/* Logo link (keeps image centered even if PNG has empty space) */
.footer__logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 110px; /* helps vertical centering */
}

.footer__logo img {
    max-height: clamp(64px, 6vw, 96px);
    width: auto;
    display: block;
    object-fit: contain;
}

/* Links columns drop slightly lower */
.footer__links {
    margin-top: 12px;
    border-left: 1px solid rgba(255, 255, 255, 0.14);
    padding-left: 26px;
}

/* Titles */
.footer__title {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
    position: relative;
}

.footer__title::after {
    content: "";
    display: block;
    width: 110px;
    height: 2px;
    background: rgba(255, 255, 255, 0.18);
    margin-top: 8px;
}

/* List */
.footer__list {
    list-style: disc;
    padding-left: 18px;
    display: grid;
    gap: 10px;
}

.footer__link {
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer__link:hover {
    color: #fff;
}

/* Bottom bar */
.footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.12);
    padding: 14px 0;
    text-align: center;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.65);
}
/* =====================
   GLOBAL SECTION SPACING
===================== */
.slider {
    margin-top: 0;
}
.categories,
.products,
.footer {
    margin-top: var(--section-gap);
}

.categories .section-head,
.categories .categories-carousel,
.products .products__head,
.products .products-carousel {
    width: var(--content-narrow);
    margin-inline: auto;
}
.section-title,
.products__title {
    position: relative;
    padding-left: 14px; /* ადგილი ხაზისთვის */
}

.section-title::before,
.products__title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);

    width: 4px; /* ხაზის სისქე */
    height: 28px; /* სიმაღლე */
    background: var(--c-primary); /* ლურჯი ფერი */
    border-radius: 2px;
}

/* =====================
   9) responsive
=/* ==================== RESPONSIVE ==================== */
@media (max-width: 900px) {
    .mega-menu {
        display: none !important;
    }
    .burger {
        display: inline-grid;
        align-content: center;
    }

    /* grid სტრუქტურა შენსავით */
    .header-row {
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "logo actions"
            ".    nav";
        row-gap: 10px;
        align-items: center;
        position: relative; /* overlay nav-ის საყრდენი */
    }

    .header-logo {
        grid-area: logo;
    }

    .header-actions {
        grid-area: actions;
        justify-self: end;
        gap: 10px;
    }

    /* ✅ NAV overlay dropdown */
    .header-nav {
        grid-area: nav;
        justify-self: end;

        /* overlay */
        display: none;
        position: absolute;
        top: calc(100% + 10px);
        right: 0;

        width: min(320px, calc(100vw - 24px));
        padding: 14px;

        background: rgba(17, 17, 17, 0.98);
        border: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: 16px;
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);

        /* ზომა იმდენი, რამდენიც სჭირდება */
        height: auto;

        /* თუ ბევრი პუნქტია -> მაქს სიმაღლე + scroll */
        max-height: calc(100vh - var(--header-h) - 24px);
        overflow: auto;

        /* შენს სტილი */
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;

        z-index: 1100;
    }

    .site-header.is-open .header-nav {
        display: flex;
    }

    /* ✅ backdrop (ზემოდან ეფარება კონტენტს) */
    .site-header {
        position: sticky;
        top: 0;
        z-index: 1000;
    }
    .site-header::after {
        content: "";
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.45);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease;
        z-index: 1050;
    }
    .site-header.is-open::after {
        opacity: 1;
        pointer-events: auto;
    }

    /* 3 visible on tablet */
    .category-card {
        flex-basis: 33.333%;
    }
    .p-card {
        flex-basis: calc((100% - (var(--s-3) * 2)) / 3);
    }

    .footer__grid {
        grid-template-columns: 1fr;
    }
    .footer__col:not(:first-child) {
        border-left: none;
        padding-left: 0;
    }
}

@media (max-width: 768px) {
    .mega-menu {
        display: none !important;
    }
    /* 2 visible */
    .category-card {
        flex-basis: 50%;
    }
    .p-card {
        flex-basis: calc((100% - var(--s-3)) / 2);
    }
}

@media (max-width: 600px) {
    .mega-menu {
        display: none !important;
    }
    .slide__content {
        padding-left: 18px;
        padding-right: 18px;
        max-width: 100%;
    }
    .slider__arrow {
        width: 32px;
        height: 32px;
        font-size: 20px;
        opacity: 0.9;
    }
    .slider__arrow--prev {
        left: 8px;
    }
    .slider__arrow--next {
        right: 8px;
    }
    .slide {
        padding-left: 54px;
        padding-right: 54px;
    }

    /* 1 + peek */
    .category-card {
        flex-basis: 70%;
    }
    .p-card {
        flex-basis: 70%;
    }
}

@media (max-width: 400px) {
    .mega-menu {
        display: none !important;
    }
    .header-search {
        flex: 0 1 auto;
    }
    .search-input {
        width: 70px;
        min-width: 50px;
    }
}
@media (max-width: 300px) {
    .mega-menu {
        display: none !important;
    }
    .header-search {
        flex: 0 1 auto;
    }
    .search-input {
        width: 30px;
        min-width: 30px;
    }
}
