.fz-search-wrapper,
.fz-user-menu-wrapper,
.fz-cart-wrapper,
.fz-icon-link,
.fz-icon-btn {
    box-sizing: border-box;
}


.fz-icon-btn,
.fz-icon-link {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    text-decoration: none;
    cursor: pointer;
    padding: 0;
    transition: background 0.3s, color 0.3s;
}

.fz-icon-link {
    color: #2c3e50;
    background: #e3e3e385;
}

.fz-icon-link:hover {
    background-color: #fff;
    color: #000;
}

.fz-icon-btn svg,
.fz-icon-link svg {
    width: 20px;
    height: 20px;
}

.fz-search-wrapper {
    position: relative;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.fz-search-form {
    display: flex;
    align-items: center;
    width: 100%;
    position: relative;
}

.fz-search-input {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    opacity: 0;
    background-color: #f5f5f5;
    border: 1px solid transparent;
    border-radius: 50px !important;
    color: #333;
    font-size: 14px;
    padding: 0 40px 0 15px;
    transition: width 0.4s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.3s ease, background-color 0.3s ease;
    z-index: 10;
    cursor: pointer;
    border-radius: 0.5rem !important;
}

.fz-search-submit {
    position: absolute;
    z-index: 20;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    color: #2c3e50;
    transition: color 0.3s;
}

button.fz-icon-btn.fz-search-submit.icon-pill {
    z-index: 20;
}

.fz-search-wrapper:hover button.fz-icon-btn.fz-search-submit.icon-pill {
    box-shadow: none;
}

.fz-search-wrapper:hover .fz-search-input,
.fz-search-wrapper.is-active .fz-search-input,
.fz-search-input:focus {
    width: 220px;
    opacity: 1;
    background-color: #fff;
    border-color: #e0e0e0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    cursor: text;
    border-radius: 100px;
}

.fz-search-wrapper:hover .fz-search-input {
    border-radius: 0.5rem;
}

.fz-user-menu-wrapper,
.fz-cart-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.fz-user-dropdown-list {
    position: absolute;
    top: calc(100% + 25px);
    right: 0;
    width: max-content;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-15px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10005;
    overflow: hidden;
}

.fz-user-menu-wrapper.active .fz-user-dropdown-list {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.fz-user-drop-item {
    display: block;
    width: 100%;
    padding: 10px 20px;
    border: 0;
    background: transparent;
    font-size: 14px;
    color: #555;
    font-weight: 500;
    text-align: left;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    font-family: inherit;
}

.fz-user-drop-item:hover {
    background-color: #f8f9fa;
    color: #1b1b1b;
}

.fz-login-modal-wrapper[hidden] {
    display: none !important;
}

.fz-modal-overlay {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2147483647;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.fz-modal-container {
    position: fixed;
    top: 50%;
    left: 50%;
    width: min(90vw, 400px);
    box-sizing: border-box;
    padding: 40px 30px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
    z-index: 2147483648;
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, -50%) scale(0.95);
    transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.fz-modal-active .fz-modal-overlay {
    opacity: 1;
    pointer-events: auto;
}

.fz-modal-active .fz-modal-container {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.fz-close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    border: 0;
    background: transparent;
    color: #999;
    font-size: 32px;
    line-height: 1;
    font-weight: 300;
    cursor: pointer;
    padding: 0;
}

.fz-close-btn:hover {
    color: #555;
}

.fz-modal-header h3 {
    margin: 0 0 5px;
    color: #222;
    font-size: 22px;
    font-weight: 700;
    text-align: center;
}

.fz-modal-header p {
    margin: 0 0 20px;
    color: #666;
    font-size: 14px;
    text-align: center;
}

.fz-error-message {
    display: none;
    margin-bottom: 15px;
    padding: 10px;
    border: 1px solid #fadbd8;
    border-radius: 4px;
    background-color: #fdecea;
    color: #c0392b;
    font-size: 13px;
    text-align: center;
}

.fz-form-group {
    margin-bottom: 15px;
}

.fz-form-group label {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-size: 13px;
    font-weight: 600;
    text-align: left;
}

.fz-input {
    width: 100%;
    height: 42px;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #222;
    font-size: 15px;
}

.fz-input:focus {
    border-color: #333;
    outline: none;
}

.fz-form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
    font-size: 13px;
}

.fz-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #666;
    cursor: pointer;
}

.fz-link,
.fz-link-bold {
    color: #333;
    text-decoration: none;
}

.fz-link:hover,
.fz-link-bold:hover {
    text-decoration: underline;
}

.fz-link-bold {
    font-weight: 700;
}

.fz-submit-btn {
    width: 100%;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 4px;
    background: #333;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.fz-submit-btn:hover {
    background: #000 !important;
    color: #fff !important;
}

.fz-submit-btn:disabled {
    background: #999 !important;
    color: #fff !important;
    cursor: wait;
}

.fz-submit-btn .btn-loader {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid #fff;
    border-bottom-color: transparent;
    border-radius: 50%;
    animation: fz-spin 0.8s linear infinite;
}

.fz-submit-btn.is-loading .btn-text {
    display: none;
}

.fz-submit-btn.is-loading .btn-loader {
    display: block;
}

.fz-divider {
    position: relative;
    margin: 25px 0 5px;
    text-align: center;
}

.fz-divider::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background: #eee;
}

.fz-divider span {
    position: relative;
    z-index: 1;
    padding: 0 10px;
    background: #fff;
    color: #999;
    font-size: 12px;
}

.fz-social-login {
    margin-top: 20px;
}

.fz-google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 44px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    color: #555;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.fz-google-btn:hover {
    background: #f8f9fa;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.fz-google-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    color: #222;
    font-weight: 700;
}

.fz-modal-footer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    color: #666;
    font-size: 13px;
    text-align: center;
}

@keyframes fz-spin {
    to {
        transform: rotate(360deg);
    }
}

.fz-cart-count {
    position: absolute;
    top: 0;
    right: 0;
    background-color: #ff0003;
    color: #fff;
    font-size: 8px !important;
    font-weight: 700;
    height: 12px;
    min-width: 12px;
    border-radius: 8px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 0px 2px;
    border: 2px solid #fff;
}

.fz-cart-count:empty {
    display: none !important;
}

.fz-mini-cart-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 360px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid #eee;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
    margin-top: 15px;
    text-align: left;
    display: flex;
    flex-direction: column;
}

.fz-cart-wrapper.fz-active .fz-mini-cart-dropdown,
.fz-cart-wrapper.is-open .fz-mini-cart-dropdown,
.fz-cart-wrapper:hover .fz-mini-cart-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.fz-mini-cart-dropdown::before {
    content: "";
    position: absolute;
    top: -6px;
    right: 12px;
    width: 12px;
    height: 12px;
    background: #fff;
    border-top: 1px solid #eee;
    border-left: 1px solid #eee;
    transform: rotate(45deg);
}

.fz-cart-titlebar {
    padding: 4px 12px;
    border-bottom: 1px solid #eee;
    color: #333;
    font-weight: 700;
    font-size: 14px;
    background: #fff;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.fz-cart-list {
    max-height: 300px;
    overflow-y: auto;
    padding: 0;
    background: #fff;
    overflow-x: hidden;
}

.fz-cart-item {
    display: flex;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    position: relative;
}

.fz-cart-item:hover {
    background-color: #fcfcfc;
}

.fz-item-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border: 1px solid #eee;
    border-radius: 4px;
    margin-right: 15px;
    flex-shrink: 0;
}

.fz-item-thumb--empty {
    display: inline-block;
    background: #f5f5f5;
}

.fz-item-info {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.fz-item-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.fz-item-title {
    font-size: 14px;
    color: #333;
    line-height: 1.4;
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-decoration: none;
    margin-bottom: 4px;
}

.fz-remove-btn {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 5px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #bbb;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.fz-remove-btn:hover {
    background-color: #f5f5f5;
    color: #333;
}

.fz-remove-btn:disabled,
.fz-remove-btn.is-loading {
    cursor: wait;
    opacity: 0.45;
}

.fz-remove-btn svg {
    width: 18px;
    height: 18px;
}

.fz-item-meta {
    font-size: 13px;
    color: #666;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 5px;
}

.fz-item-price {
    color: #333;
    font-weight: 700;
}

.fz-item-qty {
    background: #f5f5f5;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    color: #666;
}

.fz-cart-footer {
    padding: 20px;
    background: #fff;
    border-top: 1px solid #eee;
    border-radius: 0 0 8px 8px;
}

.fz-cart-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.fz-cart-total-row .label {
    font-size: 14px;
    color: #666;
}

.fz-cart-total-row .price {
    color: var(--fz-cart-accent, #000);
    font-weight: 700;
    font-size: 18px;
}

.fz-btn-checkout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px;
    background-color: transparent;
    border: 1px solid var(--fz-cart-accent, #000);
    color: var(--fz-cart-accent, #000);
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
}

.fz-btn-checkout:hover {
    background-color: var(--fz-cart-accent, #000);
    color: var(--fz-cart-accent-contrast, #fff);
}

.fz-cart-empty {
    padding: 20px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

.fz-cart-empty p {
    margin: 0 0 12px;
}

.fz-btn-shop {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 96px;
    padding: 9px 14px;
    border: 1px solid var(--fz-cart-accent, #000);
    border-radius: 4px;
    color: var(--fz-cart-accent, #000);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.fz-btn-shop:hover {
    background-color: var(--fz-cart-accent, #000);
    color: var(--fz-cart-accent-contrast, #fff);
}

.fz-ajax-cart-container {
    margin: 10px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fz-ajax-cart-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.fz-qty-wrapper {
    height: 40px;
    display: flex;
    align-items: center;
    overflow: hidden;
    border: 1px solid var(--fz-cart-accent, #000);
    border-radius: 4px;
    background: #fff;
    box-sizing: border-box;
}

.fz-qty-btn {
    width: 35px;
    height: 100%;
    border: 0;
    background: transparent;
    color: #000;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
    user-select: none;
}

.fz-qty-btn:hover {
    background: #f5f5f5;
}

.fz-qty-stage {
    position: relative;
    width: 45px;
    height: 100%;
    overflow: hidden;
}

.fz-qty-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    outline: 0;
    padding: 0;
    margin: 0;
    background: transparent;
    color: #000;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    -moz-appearance: textfield;
    transition: transform 0.18s ease, opacity 0.18s ease;
}

.fz-qty-input.is-changing {
    transform: translateY(-8px);
    opacity: 0.45;
}

.fz-qty-input::-webkit-outer-spin-button,
.fz-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.fz-ajax-add-to-cart-btn {
    position: relative;
    min-width: 130px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    overflow: hidden;
    box-sizing: border-box;
    padding: 0 20px;
    border: 1px solid var(--fz-cart-accent, #000);
    border-radius: 4px;
    background: #fff;
    color: var(--fz-cart-accent, #000);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.fz-ajax-add-to-cart-btn:hover:not(:disabled) {
    background: #f5f5f5;
    color: var(--fz-cart-accent, #000);
}

.fz-ajax-add-to-cart-btn:disabled {
    cursor: wait;
    opacity: 0.75;
}

.fz-ajax-add-to-cart-btn .btn-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(0, 0, 0, 0.12);
    border-top-color: var(--fz-cart-accent, #000);
    border-radius: 50%;
    animation: fz-spin 0.8s linear infinite;
}

.fz-ajax-add-to-cart-btn.is-loading .btn-spinner {
    display: inline-block;
}

.fz-ajax-cart-message {
    min-height: 18px;
    font-size: 13px;
    line-height: 18px;
    font-weight: 500;
}

.fz-ajax-cart-message.is-success {
    color: #16833a;
}

.fz-ajax-cart-message.is-error {
    color: #c0392b;
}

@media (max-width: 768px) {
    .fz-search-wrapper:hover .fz-search-input,
    .fz-search-wrapper.is-active .fz-search-input,
    .fz-search-input:focus {
        width: 150px;
        border-radius: 100px;
    }
}

@media (max-width: 767px) {
    .fz-modal-container {
        top: max(18px, env(safe-area-inset-top));
        left: 50%;
        width: min(92vw, 400px);
        max-height: calc(100dvh - 36px);
        overflow-y: auto;
        padding: 34px 22px 24px;
        transform: translateX(-50%) scale(0.96);
    }

    .fz-modal-active .fz-modal-container {
        transform: translateX(-50%) scale(1);
    }

    .fz-mini-cart-dropdown {
        position: fixed;
        top: 60px;
        right: 10px;
        left: 10px;
        width: auto;
        max-width: none;
        margin-top: 0;
        box-shadow: 0 5px 30px rgba(0, 0, 0, 0.2);
    }

    .fz-mini-cart-dropdown::before {
        display: none;
    }

    .fz-ajax-cart-row {
        align-items: stretch;
    }

    .fz-ajax-add-to-cart-btn {
        flex: 1;
        min-width: 0;
        padding: 0 12px;
    }
}

