/* GEWA Gelle - Base Styles */

/* Open Sans Font Faces */
@font-face {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: 400;
    src: url("../fonts/open-sans-v15-latin-regular.cffb686d7d2f.woff2") format('woff2');
}

@font-face {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: 600;
    src: url("../fonts/open-sans-v15-latin-600.223a277bd88d.woff2") format('woff2');
}

/* Reset and Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
}

body {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    font-size: 14px;
    font-family: 'Open Sans', sans-serif;
    color: #333;
    background-color: #fff;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 15px;
}

a {
    color: #003a62;
    text-decoration: none;
}

a:hover {
    color: #0076c8;
    text-decoration: none;
}

ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
}

/* Header Styles */
#header {
    position: relative;
    background: #003a62;
    color: #ffffff;
}

#header .container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 100px;
    padding: 15px;
    gap: 20px;
}

#header .logo-container {
    flex: 0 0 auto;
}

#header .logo {
    height: 50px;
    width: auto;
}

#header .search-container {
    flex: 1;
    max-width: 400px;
    margin: 0 auto;
}

/* Autocomplete Styles */
.autocomplete-item-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.autocomplete-text {
    flex: 1;
    min-width: 0;
}

.autocomplete-title {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.autocomplete-sku {
    font-size: 11px;
    color: #666;
    margin-top: 2px;
}

.autocomplete-thumbnail {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    flex-shrink: 0;
}

.autocomplete-thumbnail-placeholder {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    flex-shrink: 0;
}

.autocomplete-thumbnail-placeholder svg {
    opacity: 0.3;
}

.header-autocomplete-item {
    padding: 10px 15px;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.header-autocomplete-item:hover {
    border-left-color: #016cb8;
    background-color: #f8f9fa;
}

/* "Alle Ergebnisse anzeigen" Button */
.autocomplete-show-all {
    background-color: #f8f9fa;
    border-top: 2px solid #e0e0e0;
    font-weight: 600;
    color: #016cb8;
    text-align: center;
    padding: 12px 15px;
    margin-top: 5px;
}

.autocomplete-show-all-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.autocomplete-show-all-content svg {
    flex-shrink: 0;
}

.autocomplete-show-all:hover {
    background-color: #016cb8;
    color: #ffffff;
    border-left-color: transparent;
}

.autocomplete-show-all:hover svg {
    fill: #ffffff;
}

#header .info {
    flex: 0 0 auto;
    color: #ffffff;
    font-size: 1.5rem;
    text-align: right;
    white-space: nowrap;
}

#header .info label {
    font-weight: normal;
    margin-right: 5px;
}

#header .info .fon {
    font-weight: bold;
}

#header .languages {
    flex: 0 0 auto;
    text-align: right;
    display: flex;
    gap: 60px;
}

#header .languages a {
    color: #ffffff;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
}

#header .languages img {
    max-height: 15px;
    width: auto;
}

/* Navigation Styles */
#navigation {
    background: #016cb8;
    border-top: none;
}

#navigation .container {
    padding: 0;
}

#navigation ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

#navigation ul li {
    position: relative;
    flex: 0 0 auto;
    font-size: 1rem;
}

#navigation ul li a {
    display: block;
    padding: 15px 20px;
    color: #ffffff;
    font-weight: 400;
    transition: background 0.3s ease, color 0.3s ease;
}

#navigation ul li a:hover {
    background: #0076c8;
    color: #ffffff;
}

#navigation ul li.selected a,
#navigation ul li.active a,
#navigation ul li.ancestor a {
    background: #ffffff;
    color: #333333;
}

#navigation ul li ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #ffffff;
    min-width: 200px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 1000;
    flex-direction: column;
    white-space: nowrap;
    width: auto;
}

#navigation ul li:hover > ul {
    display: flex;
}

#navigation ul li ul li {
    width: 100%;
}

#navigation ul li ul li a {
    padding: 12px 20px;
    border-bottom: 1px solid #e0e0e0;
    color: #333333;
}

#navigation ul li ul li:last-child a {
    border-bottom: none;
}

/* Main Content */
#main {
    flex: 1;
    background-color: #eeeeee;
    display: flex;
}

#main .container {
    background-color: #ffffff;
    padding: 40px 15px;
    width: 100%;
}

/* Category Page Layout */
.category-layout {
    width: 100%;
}

.category-content-wrapper {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.category-sidebar-wrapper {
    flex: 0 0 250px;
    position: sticky;
    top: 20px;
}

.category-sidebar {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 4px;
}

.sidebar-category-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #003a62;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #016cb8;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li {
    margin-bottom: 8px;
}

.sidebar-nav li a {
    display: block;
    padding: 8px 12px;
    color: #333;
    text-decoration: none;
    border-radius: 3px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.sidebar-nav li a:hover {
    background-color: #e9ecef;
    color: #016cb8;
}

.sidebar-nav li.active a {
    background-color: #016cb8;
    color: #ffffff;
    font-weight: 600;
}

.sidebar-nav li.active a:hover {
    background-color: #003a62;
    color: #ffffff;
}

.category-main-content {
    flex: 1;
    min-width: 0;
}

/* Category Hero Section */
.category-hero {
    position: relative;
    width: 100%;
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
}

.category-hero-image {
    width: 100%;
    height: auto;
    display: block;
}

.category-hero-overlay {
    position: absolute;
    bottom: 0;
    right: 0;
    max-width: 50%;
    min-height: fit-content;
    background: linear-gradient(to left, rgba(0, 58, 98, 0.9), rgba(0, 58, 98, 0.6));
    color: #ffffff;
    padding: 30px;
    text-align: left;
    word-wrap: break-word;
    overflow-wrap: break-word;
    display: flex;
    flex-direction: column;
}

.category-hero-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.category-hero-description {
    font-size: 0.95rem;
    line-height: 1.5;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Product & Category Styles */
.product-image-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.product-image-link:hover {
    text-decoration: none;
}

.product-title-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.product-title-link:hover {
    color: #016cb8;
    text-decoration: none;
}

.product-image-wrapper {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #e0e0e0;
}

.subcategory-image-wrapper {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #e0e0e0;
}

.product-image {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    transition: transform 0.3s ease;
}

.subcategory-image {
    width: 100%;
    height: auto;
    max-width: 100%;
    transition: transform 0.3s ease;
}

.product-image:hover,
.subcategory-image:hover {
    transform: scale(1.05);
}

.product-image-placeholder {
    width: 100%;
    aspect-ratio: 4 / 3;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #e0e0e0;
}

.subcategory-image-placeholder {
    width: 100%;
    aspect-ratio: 4 / 3;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #e0e0e0;
}

.product-image-placeholder svg,
.subcategory-image-placeholder svg {
    opacity: 0.3;
}

.product-price {
    font-size: 1.25rem;
    font-weight: 600;
    color: #003a62;
}

/* Footer Styles */
#footer {
    background: #003a62;
    color: #ffffff;
    padding: 40px 0 20px;
}

#footer h4 {
    color: #ffffff;
    font-size: 18px;
    margin-bottom: 15px;
    font-weight: 600;
}

#footer address {
    font-style: normal;
    line-height: 1.8;
    margin-bottom: 0;
}

#footer a {
    color: #5dade2;
}

#footer a:hover {
    color: #ffffff;
}

#footer .quality-block {
    text-align: left;
}

#footer .quality-seal {
    margin-bottom: 15px;
}

#footer .quality-seal img {
    max-width: 180px;
    height: auto;
}

#footer .short-links {
    margin: 0;
    padding: 0;
}

#footer .short-links li {
    margin-bottom: 8px;
}

#footer .short-links li a {
    color: #5dade2;
    font-size: 13px;
    text-decoration: none;
    transition: color 0.2s ease;
}

#footer .short-links li a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* Info Block */
#footer .info-block {
    text-align: left;
}

#footer .gewa-logo {
    max-width: 150px;
}

#footer .gewa-logo img {
    width: 100%;
    height: auto;
    filter: brightness(0) invert(1); /* Logo weiß machen */
}

#footer .info-text {
    font-size: 13px;
    line-height: 1.6;
    color: #bdc3c7;
    margin-bottom: 15px;
}

#footer .footer-links {
    margin: 0;
    padding: 0;
}

#footer .footer-links li {
    margin-bottom: 0;
}

#footer .footer-links li:not(:last-child)::after {
    content: "|";
    margin-left: 8px;
    color: #5dade2;
}

#footer .footer-links li a {
    color: #5dade2;
    font-size: 13px;
    text-decoration: none;
    transition: color 0.2s ease;
}

#footer .footer-links li a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* Footer Links Row */
#footer .footer-links-row {
    margin-top: 10px;
}

#footer .footer-links-row a {
    color: #5dade2;
    font-size: 14px;
    text-decoration: none;
    transition: color 0.2s ease;
}

#footer .footer-links-row a:hover {
    color: #ffffff;
    text-decoration: underline;
}

#footer .footer-bottom {
    border-top: 1px solid #004875;
    margin-top: 30px;
    padding-top: 20px;
    text-align: center;
}

#footer .footer-bottom p {
    margin-bottom: 10px;
    font-size: 13px;
    color: #95a5a6;
}

#footer .footer-nav ul {
    display: flex;
    justify-content: center;
    gap: 20px;
}

#footer .footer-nav ul li a {
    font-size: 13px;
}

/* Responsive Design */
@media (max-width: 992px) {
    #header .container {
        flex-direction: column;
        text-align: center;
    }

    #header .info {
        position: static;
        transform: none;
        margin-top: 15px;
    }

    #header .languages {
        position: static;
        margin-top: 10px;
    }

    #navigation ul {
        flex-direction: column;
    }

    #navigation ul li ul {
        position: static;
        box-shadow: none;
    }

    /* Category Layout - Stack sidebar on tablets */
    .category-content-wrapper {
        flex-direction: column;
    }

    .category-sidebar-wrapper {
        flex: 1 0 auto;
        width: 100%;
        position: static;
        margin-bottom: 30px;
    }

    .category-hero-overlay {
        max-width: 100%;
        text-align: left;
        background: linear-gradient(to top, rgba(0, 58, 98, 0.9), rgba(0, 58, 98, 0.6));
    }

    .category-hero-title {
        font-size: 1.5rem;
    }

    .category-hero-description {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    #header .logo {
        height: 40px;
    }

    #header .info {
        font-size: 1rem;
    }

    #main {
        padding: 20px 0;
    }

    #footer .gewa-logo {
        max-width: 120px;
    }

    #footer .info-text {
        font-size: 12px;
    }

    #footer .quality-seal img {
        max-width: 140px;
    }
}

/* Search Results Styles */
.search-result-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    margin-bottom: 12px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, box-shadow;
}

.search-result-card:hover {
    border-color: #016cb8;
    box-shadow: 0 4px 12px rgba(1, 108, 184, 0.15);
    transform: translateY(-2px);
}

.search-result-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 14px;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.search-result-link:hover {
    text-decoration: none;
}

.search-result-link:focus {
    outline: 2px solid #016cb8;
    outline-offset: 2px;
}

/* Product Result Styles */
.product-result .search-result-thumbnail {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.product-result .search-result-thumbnail-placeholder {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    flex-shrink: 0;
}

.product-result .search-result-thumbnail-placeholder svg {
    opacity: 0.25;
    color: #adb5bd;
}

.search-result-content {
    flex: 1;
    min-width: 0;
}

.search-result-title {
    font-size: 15px;
    font-weight: 600;
    color: #003a62;
    margin: 0 0 6px 0;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-sku {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 8px;
    font-family: 'Courier New', monospace;
}

.search-result-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.search-result-categories .category-badge {
    font-size: 11px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 12px;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    z-index: 10;
}

.search-result-categories .category-badge:hover {
    background-color: #0d8b4d !important;
    transform: scale(1.05);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.search-result-categories .category-badge:focus {
    outline: 2px solid #0d8b4d;
    outline-offset: 2px;
}

.search-result-categories .category-badge:active {
    transform: scale(0.98);
}

/* Category Result Styles */
.category-result .search-result-content {
    padding: 4px 0;
}

.category-result .search-result-title {
    color: #0d8b4d;
}

.search-result-meta {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

/* Collection Image Card Styles */
.image-card {
    text-decoration: none;
    color: inherit;
    display: block;
}

.image-card:hover {
    text-decoration: none;
}

.image-card .card {
    display: flex;
    flex-direction: column;
}

.image-thumbnail-wrapper {
    position: relative;
    width: 100%;
    padding-top: 75%; /* 4:3 Aspect Ratio */
    overflow: hidden;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.image-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.image-card:hover .image-thumbnail {
    transform: scale(1.05);
}

.image-card .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 15px;
}

/* Fix for collections with few items - remove excessive whitespace */
.collection-detail-view .row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
}

/* Collection Preview Grid Styles */
.collection-preview {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.collection-preview-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 2px;
    width: 100%;
    height: 100%;
}

.collection-preview-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.collection-card:hover .collection-preview-grid img {
    transform: scale(1.05);
}

.collection-preview-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #999;
}

.collection-card {
    text-decoration: none;
    color: inherit;
    display: block;
}

.collection-card:hover {
    text-decoration: none;
}

.collection-card .card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.collection-card:hover .card {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1) !important;
}

.collection-card .card-body {
    display: flex;
    flex-direction: column;
}

.collection-card .card-title {
    margin-bottom: 8px;
}

.collection-card .card-body > p {
    min-height: 2.5em;
    margin-bottom: 8px;
}
