
body {
    background: #fff;
    font-family: 'Open Sans', sans-serif;
    font-weight: 500;
    font-size: 13px;
    display: flex;
    flex-direction: column;
    min-height: 100vh; }


#freeDropdown {
    position: relative;
    display: inline-block;
    padding: 6px 14px;
    border-radius: 28px;
    background:
            linear-gradient(#fff, #fff) padding-box,               /* içi ağ */
            linear-gradient(90deg, #e70d67, #0d5eff) border-box;  /* border gradient */
    border: 2px solid transparent;
    color: #000;
    transition: 0.3s;
}

/*templates*/
.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    position: relative;
}

/* Kart özülü */
.template-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    background: #0d0f1d;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1rem;
}

/* Şəkil və video */
.template-item img,
.template-item video {
    position: absolute;
    top: 0;
    left: 0;
    object-fit: cover;
    width: 100%;
    height: 100%;
    z-index: 1;
    transition: 0.3s;
}

/* Fərqli ölçülər */

/* Responsive Grid Layout */
.grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fill, 146px); /* Sabit sütun ölçüsü */
    grid-auto-rows: 320px; /* Sabit hündürlük */
    gap: 1rem;
    justify-content: start;
}

.template-card {
    background-color: transparent;
    /*border: 1px solid #ccc;*/
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}
.full-width-wrapper {
    width: 100%;
    padding: 0 1rem; /* Ən kənar boşluğu azalt, istəsən 0 da edə bilərsən */
    margin: 0 auto;
}
/* Tiplərə görə grid-span verilir */
/*.grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(152px, 1fr));
    gap: 0.75rem;
    justify-content: center;
    max-width: 100%;
    grid-auto-flow: dense;
}*/

.grid-layout {
    display: grid;
    gap: 0.75rem;
    justify-content: center;
    max-width: 100%;
    grid-auto-flow: dense;
}

/* 📱 Mobil vertical (portrait) — 1 sütun */
@media (max-width: 767px) and (orientation: portrait) {
    .grid-layout {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 📱 Mobil horizontal (landscape) — 6 sütun */
@media (max-width: 767px) and (orientation: landscape) {
    .grid-layout {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* 💻 Normal notebook və yuxarı ekranlar — 9 sütun */
@media (min-width: 768px) {
    .grid-layout {
        grid-template-columns: repeat(9, 1fr);
    }
}

/* 🖥️ Əgər çox böyük ekran olsa belə, 9 sütun sabit qalacaq */
@media (min-width: 1200px) {
    .grid-layout {
        grid-template-columns: repeat(9, 1fr);
    }
}

.template-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    /* border: 1px solid #ccc;*/
    background: #fff;
    overflow: hidden;
}

/* WIDTH-i span sayına uyğun veririk */
.template-card.vertical {
    grid-column: span 1;
}

.template-card.square {
    grid-column: span 2;
}

.template-card.horizontal {
    grid-column: span 3;
}

.template-card a {
    display: block;
    height: 100%;
    width: 100%;
    color: inherit;
    text-decoration: none;
}

.media-element {
    width: 100%;
    height: 100%;
    object-fit: cover !important;
    display: block;
}
.media-wrapper {
    position: relative;
    height: 100%;
    overflow: hidden;
}
.media-wrapper video{
    position: absolute;
    top: 0;
}
.card-footer {
    position: absolute;;
    bottom: 0px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 0 0.5rem;
    background: transparent;

}
.badge {
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 4px;
}
/*Badge*/
.badge-free {
    background-color: white !important;
    color: black !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.badge-buy {
    background-color: #ff2d89 !important;
    color: white !important;
}
.badge-ae {
    background-color: white !important;
    color: black !important;
    padding: 0.25em 0.6em;
    border-radius: 0.25rem;
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1;
}
@media (max-width: 480px) {
    .grid-layout {
        grid-template-columns: 1fr;
    }
    .template-card {
        width: 100% !important;
        grid-column: span 1 !important;
    }
}

/*filter buttons*/
/* Container padding azaldılır */
.custom-container-padding {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}

section.py-3.border-bottom.bg-white {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}

section.py-3.border-bottom.bg-white > .container-xxl {
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

section.py-3.border-bottom.bg-white form > .col-lg-6 {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
}

/* Row margin ləğv edilir */
.row.g-2 {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Col padding kiçildilir */
.col-lg-6, .col-md-12 {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
}

.btn-outline-dark.filter-btn {
    color: #fff !important;
    border-color: #212529;
    background-color: #212529;
    font-family: 'Open Sans', sans-serif;
    font-weight: 500;
    font-size: 13px;
}

.btn-outline-dark.filter-btn:hover,
.btn-outline-dark.filter-btn:focus {
    background-color: #000;
    color: #fff;
    border-color: #000;
    font-family: 'Open Sans', sans-serif;
    font-weight: 500;
    font-size: 13px;
}

.btn-outline-dark.filter-btn i {
    color: #fff;
}
/*search button*/
input.form-control {
    font-family: 'Open Sans', sans-serif;
    font-weight: 500;
    font-size: 13px;
    font-style: italic;
}
input[name="q"] {
    font-style: normal; /* Normal yazı */
    font-size: 0.9rem;   /* (istəyə görə) kiçik şrift */
}
input[name="q"]::placeholder {
    color: #bababa;
    opacity: 1; /* Firefox üçün */
}
input[name="q"]::-webkit-input-placeholder {
    color: #bababa;
}
input[name="q"]:-ms-input-placeholder {
    color: #bababa;
}


/* Dropdown ümumi stil */
.dropdown-menu {
    background-color: #000; /* qara fon */
    border: 1px solid #444; /* boz sərhəd */
    border-radius: 6px; /* yumşaq künclər */
    padding: 0.5rem;
}

/* Hər bir element */
.dropdown-item {
    color: #fff; /* ağ yazı */
    border: 1px solid transparent;
    border-radius: 4px;
    margin: 2px 0;
    transition: all 0.2s ease-in-out;
}

/* Hover effekti */
.dropdown-item:hover {
    background-color: #222; /* hoverda bir az açıq qara */
    border: 1px solid #666;
    color: #fff;
}

/* Divider rəngi */
.dropdown-divider {
    border-top: 1px solid #555;
}

/* Sign out qırmızı xüsusi */
.dropdown-item.text-danger {
    color: #ff4d4d;
}

.dropdown-item.text-danger:hover {
    background-color: #330000;
    border: 1px solid #800000;
}



/*version button filter*/
.dropdown-menu.show {
    background-color: black !important;
    padding: 0.5rem;
    font-family: 'Open Sans', sans-serif;
    font-weight: 500;
    font-size: 13px;
    color: white;
    border: 1px solid black;
}

.dropdown-menu.show button {
    color: white;
    border: 1px solid #eee; /* nazik ağ xətt */
    margin-bottom: 0.4rem;
    width: 100%;
    text-align: left;
    font-family: 'Open Sans', sans-serif;
    font-weight: 500;
    font-size: 13px;
}

.dropdown-menu.show button:hover {
    background-color: #ddd;
    color: black;
    cursor: pointer;
}

.dropdown-menu.show .version-btn.active {
    background-color: #bbb;
    font-weight: bold;
}

/*container*/
.template-detail-container {
    width: calc(100% - 5%);
    margin: 20px auto;
    padding: 20px;
    border-radius: 2rem;
    border: 3px solid #000;
    background-color: #fff;
    height: 400px;
    box-sizing: border-box;
    overflow: hidden;
}

.template-video-wrapper {
    background-color: #f3f3f3;
    border-radius: 1rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    /* Videonun optimal ölçüsü üçün */
    max-width: 100%;
    max-height: 100%;
    /* Əgər dəstəklənirsə */
    aspect-ratio: 16 / 9;
}

.template-video {
    width: auto;         /* eni avtomatik */
    height: 100%;        /* hündürlük containerə tam uyğun */
    max-width: 100%;     /* eni containeri keçməsin */
    object-fit: contain;
    border-radius: 0.75rem;
}

@media (max-width: 767px) {
    .template-detail-container {
        height: auto;
        overflow: visible;
        padding-bottom: 20px;
    }

    .template-video-wrapper {
        height: auto !important;
        max-height: 300px;
        aspect-ratio: unset;
    }

    .template-video {
        width: 100% !important;
        height: auto !important;
    }
}

h1 {  /* template adı üçün */
    font-family: 'Open Sans', sans-serif;
    font-weight: 300; /* Light */
}

.template-description {  /* description üçün */
    font-family: 'Open Sans', sans-serif;
    font-weight: 400; /* Regular */
    font-size: 14px;
}

.template-meta span {
    white-space: nowrap;
}



.badge-free {
    background-color: #28a745;
    color: white;
}

.badge-buy {
    background-color: #dc3545;
    color: white;
}


/* Overlay bütün ekrani qaplasın, arxa plan üçün */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0,0,0,0.75);
    z-index: 999;
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: transparent;
    max-width: 450px;
    width: 90%;
    max-height: 90vh;          /* Ekranın 90%-dən böyük olmasın */
    overflow-y: auto;          /* Modal içində scroll varsa, scroll olsun */
    z-index: 1000;

    /* Flexbox ilə mərkəzləşdirmə */
    display: flex;
    justify-content: center; /* horizontal */
    align-items: center;     /* vertikal */
    padding-top: 5%;           /* lazım olsa */
    box-sizing: border-box
}

.modal-close-btn {
    position: absolute;
    top: 10px; right: 15px;
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    display: none;  /* burada gizlətdik */
}

/* Yalnız form üçün padding azaldıldı */
.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;   /* Daha az padding */
}

.auth-container {
    background: #fff;
    padding: 1.5rem; /* Daha az padding */
    border-radius: 20px;
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

/*login*/


h2 {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.5rem;
}

.form-label {
    font-weight: 600;
}

.form-control {
    border-radius: 6px;
}

.btn-brand {
    background-color: var(--brand-2);
    color: #fff;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    padding: 0.6rem;
    font-size: 1rem;
    transition: 0.3s ease;
}

.btn-brand:hover {
    filter: brightness(1.1);
}

.custom-divider {
    width: 1px;
    height: 36px;
    background-color: rgba(0, 0, 0, 0.15);
}

