header {
    position: sticky;
    top: 0;
    z-index: 40;
    background-color: var(--color-bg-secondary);
    box-shadow: 0 1px 2px 0 var(--color-card-shadow-base);
}

.box {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0.5rem 1rem;
}

.wrapper {
    display: flex;
    flex-wrap: nowrap;
    margin-bottom: 0;
    gap: clamp(0.5rem, 1vw, 1.25rem);
    justify-content: flex-start;
    align-items: center;
}

.logo-wrapper {
    flex-shrink: 1;
    min-width: 0;
}

.logo-img {
    display: block;
    height: auto;
    width: clamp(6rem, 20vw, 12rem);
}

.logo-wrapper a {
    display: block;
}

.company {
    font-size: 1.5rem;
    line-height: 2rem;
    font-weight: 700;
    color: var(--color-accent);
}

.subtitle {
    font-size: 0.75rem;
    line-height: 1rem;
    color: var(--color-text-muted);
}

.contact {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: left;
    flex-shrink: 1;
    min-width: 0;
}

.contact a {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    color: var(--color-text);
    transition: color 300ms var(--transition-cubic);
}

.contact a:hover {
    color: var(--color-link-hover);
}

.contact a span {
    font-size: 0.875rem;
    line-height: 1.25rem;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.icon-contact {
    width: 1rem;
    height: 1rem;
    color: var(--color-text);
    flex-shrink: 0;
}

.global-search {
    max-width: 36rem;
    min-width: 8rem;
    flex: 1;
}

.form-search {
    position: relative;
}

.global-search input {
    width: 100%;
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    border: 1px solid var(--color-border-input);
    border-radius: 0.5rem;
    color: var(--color-input-text);
    background-color: var(--color-background-input);
}

.global-search input::placeholder {
    color: var(--color-placeholder-input);
}

.global-search input:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--color-border-input-shadow);
}

.btn-search {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text);
    transition: color 150ms var(--transition-cubic);
}

.btn-search:hover {
    color: var(--color-accent-hover);
}

.icon-search {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--color-text-muted-light);
}

.header-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 3rem;
}

.cart-wrapper {
    min-width: 0;
}

.cart-wrapper a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background-color: var(--color-button-secondary-bg);
    color: var(--color-button-secondary-text);
    border-radius: 0.5rem;
    text-decoration: none;
    transition: background-color 150ms ease-in-out;
    min-width: 0;
}

.cart-wrapper a:hover {
    background-color: var(--color-button-secondary-hover);
}

.cart-icon {
    width: 1.25rem;
    height: 1.25rem;
    fill: none;
}

.cart-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.cart-label {
    font-size: 0.75rem;
    opacity: 0.9;
}

.cart-price {
    font-weight: 600;
}

.cart-badge {
    position: absolute;
    top: -0.5rem;
    right: -0.5rem;
    width: 1.5rem;
    height: 1.5rem;
    background-color: var(--color-cart-badge-header-bg);
    color: var(--color-cart-badge-header-text);
    font-size: 0.75rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle {
    display: flex;
    align-items: center;
}

.btn-theme {
    padding: 0.5rem;
    background-color: var(--color-button-cart-bg);
    color: var(--color-button-cart-text);
    border-radius: 0.5rem;
    border: none;
    transition: background-color 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-theme:hover {
    background-color: var(--color-button-cart-hover-bg);
}

.cart-area {
    position: relative;
    flex-shrink: 1;
    min-width: 0;
}


.cart-area:hover .cart-header-display {
    display: block;
}

.cart-header-display {

    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 0;
    z-index: 100;
    width: min(34rem, calc(100vw - 2rem));
    max-height: 70vh;
    overflow: auto;

    background: var(--color-bg-secondary);
    border: 1px solid var(--color-form-border);
    border-radius: 0.75rem;

    box-shadow:
        0 10px 15px -3px var(--color-card-shadow-raised),
        0 4px 6px -4px var(--color-card-shadow-raised);


    font-size: 0.875rem;
    color: var(--color-text-muted);
    padding: 1.25rem 1.5rem;
}

.box_basket_global {
    position: relative;
}

.cart-header-display .table-cart-header {
    display: grid;
}

.cart-header-display .table-cart-header .tr {
    display: grid;
    grid-template-columns: 4.5rem 1fr 3.5rem 3.5rem;
    align-items: center;
    gap: 0.75rem;

    padding: 0.75rem 0.75rem;
    border-bottom: 1px solid var(--color-form-border);

    transition: background-color 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.cart-header-display .table-cart-header .tr:hover {
    background: var(--color-dropdown-hover);
}

.cart-header-display .table-cart-header .tr:first-child {
    background: var(--color-bg-primary);
}

.cart-header-display .table-cart-header .tr:first-child:hover {
    background: var(--color-bg-primary);
}

.cart-header-display .table-cart-header .td {
    min-width: 0;
}

.cart-header-display .cart-header-productname-header,
.cart-header-display .cart-header-productamount-header,
.cart-header-display .cart-header-productprice-header {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.cart-header-display .cart-header-productamount-header {
    text-align: center;
}

.cart-header-display .cart-header-productprice-header {
    text-align: right;
}

.cart-header-display .cart-header-productimage {
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-header-display img.image_cart {
    width: 3.25rem;
    height: 3.25rem;
    object-fit: cover;
    display: block;

    border-radius: 0.5rem;
    border: 1px solid var(--color-form-border);
    background: var(--color-image-wrapper-bg);
}

.cart-header-display .cart-header-productname a {
    display: block;
    text-decoration: none;

    color: var(--color-text-strong);
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.3;

    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-header-display .cart-header-productname a:hover {
    color: var(--color-link-hover);
}

.cart-header-display .cart-header-productamount {
    text-align: center;
    font-size: 0.875rem;
    color: var(--color-text);
}

.cart-header-display .cart-header-productprice {
    text-align: right;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-accent);
    white-space: nowrap;
}

.cart-header-display .table-cart-header+.tr {
    padding: 0.75rem;
}

.cart-header-display .table-cart-header+.tr .cart-header-productname a {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    padding: 0.625rem 0.75rem;
    border-radius: 0.5rem;

    background: var(--color-button-primary-bg);
    color: var(--color-button-primary-text);
    font-weight: 600;
    text-decoration: none;

    transition: background-color 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.cart-header-display .table-cart-header+.tr .cart-header-productname a:hover {
    background: var(--color-button-primary-hover);
}

.cart-header-display {
    color: var(--color-text);
    font-size: 0.875rem;
}

@media (max-width: 520px) {
    .cart-header-display .table-cart-header .tr {
        grid-template-columns: 4.25rem 1fr;
    }

    .cart-header-display .table-cart-header .tr:first-child .td:nth-child(3),
    .cart-header-display .table-cart-header .tr:first-child .td:nth-child(4) {
        display: none;
    }

    .cart-header-display .table-cart-header .tr:not(:first-child) .td:nth-child(3),
    .cart-header-display .table-cart-header .tr:not(:first-child) .td:nth-child(4) {
        grid-column: 2 / 3;
    }

    .cart-header-display .cart-header-productamount,
    .cart-header-display .cart-header-productprice {
        text-align: left;
    }

    .cart-header-display .cart-header-productprice {
        margin-top: 0.25rem;
    }

    .contact {
        display: none;
    }
}

@media (max-width: 720px) {
    .cart-text {
        display: none;
    }

    .cart-wrapper a {
        padding: 0.5rem;
        gap: 0.5rem;
    }
}

@media (max-width: 420px) {
    .logo-wrapper {
        display: none;
    }
}