/* Shopfront Navigation Styles for Customer Dashboard */
/* Diese Datei enthält alle kritischen Styles für die Shop-Navigation */

.shopfront {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: #222;
    background: #f5f5f5;
}

.shopfront-header {
    padding: 0.75rem 0;
    border-bottom: 1px solid #e6e6e6;
    background: #fff;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.shopfront-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    box-sizing: border-box;
    gap: 0.75rem 1.5rem;
}

.shopfront-logo {
    font-weight: 700;
    font-size: 1.25rem;
    color: #222;
    text-decoration: none;
    white-space: nowrap;
}

.shopfront-logo:hover {
    color: #3BAA35;
}

/* Navigation List */
.shopfront-nav__list {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.25rem;
    flex-wrap: nowrap;
    width: max-content;
    min-width: 100%;
    justify-content: flex-end;
}

.shopfront-nav__item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.shopfront-nav .shopfront-nav__item > .shopfront-nav__link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 6rem;
    height: 3.5rem;
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 6px;
    color: #444;
    text-decoration: none;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    transition: background 0.2s, color 0.2s;
    appearance: none;
    -webkit-appearance: none;
    box-sizing: border-box;
    text-align: center;
    flex-shrink: 0;
    /* Important */
}

@media (max-width: 520px) {
    .shopfront-nav .shopfront-nav__item > .shopfront-nav__link {
        width: 5.25rem;
    }
}

@media (max-width: 380px) {
    .shopfront-nav .shopfront-nav__item > .shopfront-nav__link {
        width: 4.75rem;
    }

    .shopfront-nav__label {
        font-size: 0.65rem;
    }
}

/* Hard Reset for Button to match Anchor perfectly */
button.shopfront-nav__link {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    font: inherit;
    line-height: inherit;
    appearance: none;
    -webkit-appearance: none;
    text-align: center;
}

.shopfront-nav__link::-moz-focus-inner {
    border: 0;
    padding: 0;
}

.shopfront-nav .shopfront-nav__item > .shopfront-nav__link:hover {
    background: #f0f0f0;
    color: #3BAA35;
}

.shopfront-nav__label {
    font-size: 0.7rem;
    font-weight: 500;
    line-height: 1.2;
    margin-top: 0.25rem;
    white-space: nowrap;
}

.shopfront-nav__icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shopfront-nav__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.shopfront-nav__icon svg {
    display: block;
    width: 24px;
    height: 24px;
}

.shopfront-nav__badge {
    position: absolute;
    top: -6px;
    right: -10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.35rem;
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1;
    color: #fff;
    background: #3BAA35;
    border-radius: 999px;
    box-shadow: 0 0 0 2px #fff;
    z-index: 1;
}

.shopfront-nav__separator {
    width: 1px;
    height: 1.5rem;
    background: #e0e0e0;
    margin: 0 0.5rem;
    flex: 0 0 1px;
}

.shopfront-nav {
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.shopfront-nav::-webkit-scrollbar {
    display: none;
}

@media (max-width: 768px) {
    .shopfront-nav__list {
        min-width: max-content;
        justify-content: flex-end;
        padding-bottom: 0.125rem;
    }
}


/* Search Overlay */
.shop-search-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 4rem 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}

.shop-search-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.shop-search-overlay__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
}

.shop-search-overlay__panel {
    position: relative;
    width: 100%;
    max-width: 28rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    padding: 1.25rem;
}

.shop-search-overlay .shop-search {
    margin: 0;
    max-width: none;
}

.shop-search {
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border: 1px solid #e6e6e6;
    border-radius: 6px;
    overflow: hidden;
}

.shop-search__icon {
    padding: 0.5rem 0.75rem;
    color: #666;
}

.shop-search__input {
    flex: 1;
    min-width: 0;
    padding: 0.5rem 0.75rem;
    border: none;
    background: transparent;
    font-size: 0.875rem;
}

.shop-search__submit {
    margin: 2px;
    padding: 0.35rem 0.75rem;
    font-size: 0.875rem;
    background: #3BAA35;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
}

.shop-search-overlay__close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: none;
    background: transparent;
    color: #666;
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shop-search-overlay__close:hover {
    background: #f0f0f0;
    color: #222;
}

/* Utility Classes */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Toast Notifications */
.shop-toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #222;
    color: #fff;
    padding: 1rem 1.5rem;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
}
