:root {
    --main_FARBE: #F6EFE0;
    --secondary_FARBE: #A79689;
    --primary_CNONTRAST: #573C32;
    --secondary_CONTRAST: #2C1E19;
    --black_FARBE: #000000;
}

/* Verhindert horizontales Scrollen und Geister-Ränder weltweit */
body,
html {
    overflow-x: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
    background-color: var(--main_FARBE);
    /* Damit Ränder nicht weiß sind */
}

#index_navbar_carousel_container {
    display: grid;
    grid-template-columns: auto;
    grid-template-rows: repeat(2, auto);
    grid-column-gap: 0;
    grid-row-gap: 0;
}

.navbar {
    background-color: var(--secondary_FARBE) !important;
    grid-area: 1 / 1 / 2 / 2;
    transition: width 0.3s ease, border-radius 0.3s ease, padding 0.3s ease, background-color 0.3s ease;
    /* Startzustand */
    z-index: 1000;
}

.normal_nav {
    transition: all 0.3s ease;
}

.normal_nav.nav-active {
    position: fixed;
}

.navbar a {
    color: white !important;
}

.navbar.fixed {
    position: fixed;
    top: 0;
    left: 0;
    width: 100% !important;
    border-radius: 0;
    margin: 0 !important;
}

.index_nav {
    backdrop-filter: blur(15px) saturate(200%) !important;
    -webkit-backdrop-filter: blur(15px) saturate(200%) !important;
    background-color: rgba(252, 235, 228, 0.58) !important;
    border-radius: 12px !important;
    border: 1px solid rgba(209, 213, 219, 0.3) !important;
    width: 90% !important;
    margin-top: 15px;
}

.index_nav a {
    color: black !important;
}

.navbar#big_nav {
    width: 100%;
    /* margin-top: 10px; */
    display: block;
}

.navbar#small_nav {
    width: 100%;
    margin-top: 0;
    border-radius: 0 !important;
    display: none;
}



.uk-offcanvas-bar a {
    font-size: 25px !important;
}

#index_carousel {
    grid-area: 1 / 1 / 3 / 2;
}

.uk-navbar-container img {
    height: 60px;
    width: auto;
    margin: 0;
}

.uk-offcanvas-bar {
    background-color: var(--main_color) !important;
    backdrop-filter: blur(15px) saturate(200%) !important;
    -webkit-backdrop-filter: blur(15px) saturate(200%) !important;
    background-color: rgba(252, 235, 228, 0.58) !important;
    border: 1px solid rgba(209, 213, 219, 0.3) !important;
    transition: all 0.3s ease-in-out;
}

.uk-offcanvas-bar a {
    color: black !important;
}

.uk-offcanvas-bar .uk-iconnav {
    border-top: gray solid 1px;
    padding: 2.5px;
}

.uk-offcanvas-bar .uk-iconnav img {
    max-width: 30px;
}

#big_nav .uk-dropdown {
    width: fit-content !important;
    background-color: var(--main_color);
}

#big_nav .uk-iconnav {
    margin: auto;
    grid-area: 1 / 2 / 2 / 3;
    padding-right: 10px;
}

.lang_img {
    width: 20px !important;
    height: auto !important;
}

.index_slide_head {
    font-family: "Dancing Script", cursive;
    font-size: 70px;
    /* font-weight: bold; */
}

.index_slide_text {
    font-family: "Dancing Script", cursive;
    font-size: 50px;
}

.uk-slideshow-items img {
    width: 100%;
}

#index_slide_img_2 {
    height: auto;
}

#index_product_product_cards {
    margin-bottom: 20px;
}

#product_div {
    margin: 0 20px;

}

.custom-select {
    position: relative;
    width: 300px;
    cursor: pointer;
    margin-bottom: 10px;
}

.custom-select p {
    padding: 10px;
    margin: 0;
    font-size: 20px;
}

.selected {
    padding: 10px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.options {
    list-style: none;
    margin: 0;
    padding: 0;
    position: absolute;
    width: 100%;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-5px);
    transition: max-height 0.3s ease, opacity 0.25s ease, transform 0.25s ease;
    z-index: 10;
}

.options.open {
    max-height: fit-content;
    opacity: 1;
    transform: translateY(0);
}

.options li {
    padding: 10px;
    transition: background 0.2s;
}

.options li:hover {
    background: #eee;
}

#product_div hr {
    border: 2px solid var(--secondary_FARBE);
}

#product_div_listed {
    display: grid;
    grid-template-columns: 30% 1fr;
    grid-template-rows: fit-content fit-content;
    grid-column-gap: 0;
    grid-row-gap: 0;
    padding-bottom: 15px;
}

#product_div_listed #filter_section {
    grid-area: 2 / 1 / 3 / 2;
    width: 60%;
    backdrop-filter: blur(0px) saturate(108%);
    -webkit-backdrop-filter: blur(0px) saturate(108%);
    background-color: rgba(255, 255, 255, 0.46);
    border-radius: 12px;
    border: 1px solid rgba(209, 213, 219, 0.3);
    padding: 10px;
    height: fit-content;
}

#product_div_listed #product_container {
    grid-area: 1 / 2 / 2 / 3;
}

#product_div_listed a {
    color: black !important;
    text-decoration: none !important;
}

#product_div_listed #control_section {
    grid-area: 1 / 2 / 2 / 3;
    padding: 20px;
    display: flex;
    justify-content: space-between;
}

#product_div_listed #product-container {
    grid-area: 2 / 2 / 3 / 3;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

#control_section .button {
    background-color: var(--secondary_FARBE);
    color: white;
    padding: 5px 20px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    max-width: 20%;
    width: 15%;
    font-size: 15px;
    cursor: pointer;
    display: inline-block;
    text-align: center;
}

/* Hover */
#control_section .button:hover {
    background-color: var(--primary_CNONTRAST);
}

/* Toggle aktiv */
#btn1:checked + .button,
#btn2:checked + .button,
#btn3:checked + .button,
#btn4:checked + .button {
    background-color: var(--primary_CNONTRAST);
}

/* From Uiverse.io by satyamchaudharydev */
/* From uiverse.io by @satyamchaudharydev */
/* removing default style of button */

.form button {
    border: none;
    background: none;
    color: #8b8ba7;
}
/* styling of whole input container */
.form {
    --timing: 0.3s;
    --width-of-input: 30%;
    --height-of-input: 40px;
    --border-height: 2px;
    --input-bg: #fff;
    --border-radius: 30px;
    --after-border-radius: 1px;
    position: relative;
    width: var(--width-of-input);
    height: var(--height-of-input);
    display: flex;
    align-items: center;
    padding-inline: 0.8em;
    border-radius: var(--border-radius);
    transition: border-radius 0.5s ease;
    background: var(--input-bg,#fff);
}
/* styling of Input */
.input {
    font-size: 0.9rem;
    background-color: transparent;
    width: 100%;
    height: 100%;
    padding-inline: 0.5em;
    padding-block: 0.7em;
    border: none;
}
/* styling of animated border */
.form:before {
    content: "";
    position: absolute;
    background: var(--secondary_CONTRAST);
    transform: scaleX(0);
    transform-origin: center;
    width: 100%;
    height: var(--border-height);
    left: 0;
    bottom: 0;
    border-radius: 1px;
    transition: transform var(--timing) ease;
}
/* Hover on Input */
.form:focus-within {
    border-radius: var(--after-border-radius);
}

input:focus {
    outline: none;
}
/* here is code of animated border */
.form:focus-within:before {
    transform: scale(1);
}
/* styling of close button */
/* == you can click the close button to remove text == */
.reset {
    border: none;
    background: none;
    opacity: 0;
    visibility: hidden;
}
/* close button shown when typing */
input:not(:placeholder-shown) ~ .reset {
    opacity: 1;
    visibility: visible;
}
/* sizing svg icons */
.form svg {
    width: 17px;
    margin-top: -3px;
    max-width: 150%;
}

#filter_section .uk-form-controls {
    width: 100%;
}

#filter_section .uk-select {
    border-radius: 5px;
    background-color: #f5f5f5;
}

input.uk-checkbox {
    border-radius: 50%;
    margin-right: 7px;
    /* height: 5px !important;
    width: 5px !important;
    min-width: 0 !important;
    min-height: 0 !important; */
    border-color: var(--secondary_CONTRAST);
}

/* From Uiverse.io by garerim */
.product_card {
    position: relative;
    width: 190px;
    height: 284px;
    background: #fff;
    border: solid 4px var(--secondary_FARBE);
    /* box-shadow: -5px 5px #333; */
    transition: all 0.2s ease-in-out;
    display: flex;
    justify-content: center;
    cursor: pointer;
}

.product_card:hover {
    transform: translate(-10px, -10px);
    box-shadow: 0 0 #333;
}

.product_card .img-product_card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: calc(100% - 80px);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: filter 0.2s 1s ease-in-out;
}

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

.product_card .info-product_card {
    position: absolute;
    height: 80px;
    width: 100%;
    bottom: 0;
    left: 0;
    right: 0;
    border-top: solid 1px #333;
}

.product_card .info-product_card p {
    font-size: 14px;
    margin: 5px;
}

.auth-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    width: 80%;
    max-width: 400px;
    position: relative;
    overflow: hidden;
    margin: 30px auto;
}
h2 {
    text-align: center;
    color: #333;
    margin-top: 0;
}
input {
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-sizing: border-box;
}
button {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    color: white;
    margin-top: 10px;
}
.btn-login {
    background: #007bff;
}
.btn-register {
    background: #28a745;
}
.toggle-text {
    text-align: center;
    margin-top: 15px;
    font-size: 0.9em;
    color: #666;
    cursor: pointer;
    text-decoration: underline;
}
.alert {
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
    text-align: center;
}
.alert-error {
    background: #f8d7da;
    color: #721c24;
}
.alert-success {
    background: #d4edda;
    color: #155724;
}
.hidden {
    display: none;
}

.product-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    width: 80%;
    margin: 20px auto;
    justify-content: center;
}

.back-link {
    display: inline-block;
    margin: 20px 10%;
    background-color: var(--secondary_FARBE);
    text-decoration: none;
    font-size: 1.2em;
    color: white;
    border-radius: 5px;
    padding: 5px;
}

.back-link:hover {
    background-color: var(--primary_CNONTRAST);
    color: white;
}
.product-image img {
    max-width: 400px;
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.product-info {
    max-width: 400px;
}
.badge {
    background: var(--secondary_FARBE);
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8em;
    margin-right: 5px;
}
.price {
    font-size: 1.5em;
    color: #e44d26;
    font-weight: bold;
}
.rating {
    color: #f1c40f;
    font-size: 1.2em;
}
.stock {
    color: #27ae60;
    font-weight: bold;
}
.btn-checkout {
    background: #28a745;
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 4px;
    font-size: 18px;
    cursor: pointer;
    font-weight: bold;
    width: 100%;
    margin-top: 15px;
}

#order-div {
    margin-top: 20px; 
    padding: 15px; background: #fdfdfd; 
    border: 1px solid #ddd; 
    border-radius: 8px;
}

#add-to-cart-btn {
    background: #27ae60; 
    color: white; 
    border: none; 
    padding: 10px 20px; 
    border-radius: 4px; 
    cursor: pointer;
}





.legal-page {
    text-align: left !important;
    width: 70%;
    padding: 30px;
}

.legal-page h1 {
    text-align: left !important;
}
.legal-page h2 {
    text-align: left !important;
}
.legal-page h3 {
    text-align: left !important;
}

#small_filter {
    display: none;
}
#control_section input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}


.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    border-radius: 8px;
    margin-bottom: 20px;
}
.header h1 {
    margin: 0;
    font-size: 28px;
    color: var(--secondary_CONTRAST);
    font-weight: 500;
}
.header a {
    text-decoration: none;
    color: white;
    background: #6c757d;
    padding: 8px 15px;
    border-radius: 4px;
    font-weight: bold;
    margin-left: 10px;
}
.header a:hover{
    background-color: red;
}


.container {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    padding-bottom: 25px;
}
.card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    flex: 1;
    min-width: 300px;
}
.card h2 {
    margin-top: 0;
    border-bottom: 2px solid #f4f7f6;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.user-info p {
    margin: 8px 0;
    font-size: 16px;
}
.user-info strong {
    display: inline-block;
    width: 100px;
    color: #555;
}

/* Formular-Styling für den Bearbeiten-Modus */
.edit-form input,
.edit-form select {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}
.btn-save {
    background: #28a745;
    color: white;
    border: none;
    padding: 10px;
    width: 100%;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}
.btn-cancel {
    display: block;
    text-align: center;
    margin-top: 10px;
    color: #dc3545;
    text-decoration: none;
    font-size: 14px;
}

.alert {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    text-align: center;
}
.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.cart-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}
.cart-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    margin-right: 15px;
}
.cart-item-details {
    flex-grow: 1;
}
.cart-item-title {
    font-weight: bold;
    margin: 0 0 5px;
    font-size: 1.1em;
}
.cart-item-price {
    color: #28a745;
    font-weight: bold;
    font-size: 1.1em;
    margin-right: 15px;
}

.btn-remove {
    background: #dc3545;
    color: white;
    text-decoration: none;
    width: 30px;
    height: 30px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border-radius: 4px;
    font-weight: bold;
    transition: background 0.2s;
}
.btn-remove:hover {
    background: #c82333;
}

.total-box {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #333;
    text-align: right;
    font-size: 20px;
}


#offcanvas-cart {
    color: black !important;
}


@media screen and (max-width: 850px) {
    /* --- 1. GLOBALE FIXES (Gegen weiße Ränder & Abschneiden) --- */
    html body {
        overflow-x: hidden !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        background-color: var(--main_FARBE) !important;
    }

    html body #product_div {
        margin: 0 auto !important;
        width: 100% !important;
        max-width: 100vw !important;
        padding: 0 10px !important;
        box-sizing: border-box !important;
    }

    /* --- 2. LAYOUT-STRUKTUR (Flex statt Grid) --- */
    html body #product_div_listed {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        grid-template-columns: 1fr !important;
    }

    /* Filter-Icon mittig platzieren */
    html body #product_div_listed #filter_section {
        width: 100% !important;
        display: flex !important;
        justify-content: center !important;
        margin-bottom: 15px !important;
        background: none !important;
        border: none !important;
        position: static !important;
    }

    /* --- 3. SUCHE & BUTTONS (Zwingend 2x2 Raster) --- */
    html body #product_div_listed #control_section {
        width: 100% !important;
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: space-between !important;
        padding: 0 !important;
        gap: 10px !important;
        box-sizing: border-box !important;
    }

    /* Suchfeld bekommt die volle erste Zeile */
    html body #control_section .form {
        flex: 0 0 100% !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-bottom: 5px !important;
    }

    /* Buttons werden auf exakt 50% Breite (minus Gap) gezwungen */
    html body #control_section label.button {
        flex: 0 0 calc(50% - 5px) !important;
        width: calc(50% - 5px) !important;
        max-width: calc(50% - 5px) !important;
        margin: 0 !important;
        box-sizing: border-box !important;
        display: inline-block !important;
        text-align: center !important;
        padding: 12px 2px !important;
        font-size: 14px !important;
        white-space: nowrap !important;
        text-overflow: ellipsis;
        overflow: hidden;
    }

    /* --- 4. PRODUKTE (Fließend, aber maximal 3 Spalten unter 850px) --- */
    html body #product_div_listed #product-container {
        width: 100% !important;
        margin-top: 20px !important;
        display: grid !important;
        /* Die Mindestbreite von 200px verhindert, dass bei 830px 4 Produkte passen */
        grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)) !important;
        gap: 15px !important;
        padding: 0 !important;
    }

    html body .product_card {
        width: 100% !important;
        max-width: 280px !important;
        height: auto !important;
        min-height: 250px;
        margin: 0 auto !important;
        box-sizing: border-box !important;
    }

    html body .product_card .img-product_card {
        height: 160px !important;
    }

    /* --- 5. UIKIT-SPEZIFISCHE FIXES --- */
    html body #small_filter {
        display: flex !important;
    }
    html body #big_filter {
        display: none !important;
    }
    html body #index_carousel {
        grid-area: auto !important;
    }

    /* Farben für Offcanvas-Checkboxen */
    html body .uk-offcanvas-bar,
    html body .uk-offcanvas-bar * {
        color: black !important;
    }
    html body .uk-offcanvas-bar .uk-checkbox:checked {
        background-color: var(--primary_CNONTRAST) !important;
        border-color: var(--primary_CNONTRAST) !important;
    }

}
