/* ============================================
   HEADER ACTIONS
   ============================================ */
.mesoxy-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.mesoxy-header-actions a {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s;
}

.mesoxy-header-actions a:hover {
    opacity: 0.7;
}

.mesoxy-header-actions svg {
    display: block;
}

.mesoxy-divider {
    color: #ddd;
}

.uyari {
    display: none;
    color: #fff;
    background: #ff4d4d;
    padding: 5px 10px;
    margin-top: 5px;
    border-radius: 4px;
    font-size: 13px;
}

.mesoxy-count-desktop {
    font-size: 13px;
    opacity: 0.7;
}

/* Badge System - Sadece mobilde görünür */
.mesoxy-icon-badge {
    position: relative;
}

.mesoxy-badge {
    display: none !important;
    /* Desktop'ta kesinlikle gizli */
}

@keyframes badgePulse {
    0% {
        transform: scale(0.8);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

.mesoxy-text {
    white-space: nowrap;
}

/* ============================================
   ACCOUNT MENU
   ============================================ */
.mesoxy-account-menu {
    position: relative;
}

.mesoxy-account-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s;
}

.mesoxy-account-trigger:hover {
    background: #f8f8f8;
}

.mesoxy-account-trigger .mesoxy-arrow {
    transition: transform 0.3s;
}

.mesoxy-account-menu.active .mesoxy-account-trigger .mesoxy-arrow {
    transform: rotate(180deg);
}

.mesoxy-account-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 220px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
    z-index: 100;
}

.mesoxy-account-menu.active .mesoxy-account-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mesoxy-account-dropdown a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #333;
    text-decoration: none;
    transition: all 0.2s;
    border-bottom: 1px solid #f0f0f0;
}

.mesoxy-account-dropdown a:first-child {
    border-radius: 8px 8px 0 0;
}

.mesoxy-account-dropdown a:last-child {
    border-bottom: none;
    border-radius: 0 0 8px 8px;
}

.mesoxy-account-dropdown a:hover {
    background: #f8f8f8;
    padding-left: 20px;
}

.mesoxy-account-dropdown a.mesoxy-logout {
    color: #ff4757;
}

.mesoxy-account-dropdown a.mesoxy-logout:hover {
    background: #fff5f5;
}

.mesoxy-login-link {
    border-radius: 8px;
    transition: all 0.3s;
}

.mesoxy-login-link:hover {
    background: #f8f8f8;
}

/* ============================================
   WISHLIST BUTTON (Archive & Single)
   ============================================ */

/* Archive - Ürün görselinin sağ üstünde */
.woocommerce ul.products li.product {
    position: relative;
}

.mesoxy-loop-wishlist {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
}

.mesoxy-wishlist-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 55px;
    height: 100%;
    background: #fff;
    border: 0;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    padding: 0;
    background: #4a81dc;
}

.mesoxy-wishlist-btn:hover {
    background: #f8f8f8;
    border-color: #ff4757;
}

.mesoxy-wishlist-btn svg {
    transition: all 0.3s;
}

.mesoxy-wishlist-btn.active svg {
    fill: #ff4757;
    stroke: #ff4757;
}

.mesoxy-wishlist-btn.loading {
    opacity: 0.6;
    pointer-events: none;
}

.mesoxy-wishlist-btn.loading svg {
    animation: pulse 1s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Single Product Page */

.mesoxy-single-wishlist-wrapper .mesoxy-wishlist-btn:hover {
    background: #ff4757;
    border-color: #ff4757;
}

.mesoxy-single-wishlist-wrapper .mesoxy-wishlist-btn.active {
    background: #ff4757;
    border-color: #ff4757;
}

.mesoxy-single-wishlist-wrapper .mesoxy-wishlist-btn svg {
    flex-shrink: 0;
}

.mesoxy-single-wishlist-wrapper .mesoxy-wishlist-btn.active svg {
    fill: #fff;
    stroke: #fff;
}

a.woocommerce-LoopProduct-link.woocommerce-loop-product__link .mesoxy-wishlist-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #fff;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    padding: 0;
    background: #4a81dc;
}

a.woocommerce-LoopProduct-link.woocommerce-loop-product__link .mesoxy-wishlist-btn.active {
    background: #ff4757;
    border-color: #ff4757;

}

a.woocommerce-LoopProduct-link.woocommerce-loop-product__link .mesoxy-wishlist-btn.active svg {
    fill: #fff;
    stroke: #fff;

}

.mesoxy-wishlist-text {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.mesoxy-single-wishlist-wrapper .mesoxy-wishlist-btn.active .mesoxy-wishlist-text {
    color: #ff4757;
}

/* ============================================
   OVERLAYS
   ============================================ */
.mesoxy-wishlist-overlay,
.mesoxy-cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

body.mesoxy-wishlist-opened .mesoxy-wishlist-overlay,
body.mesoxy-cart-opened .mesoxy-cart-overlay {
    opacity: 1;
    visibility: visible;
}

/* ============================================
   WISHLIST MODAL
   ============================================ */
.mesoxy-wishlist {
    position: fixed;
    right: -450px;
    top: 0;
    width: 450px;
    max-width: 90vw;
    height: 100vh;
    background: #fff;
    z-index: 9999;
    transition: right 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
}

body.mesoxy-wishlist-opened .mesoxy-wishlist {
    right: 0;
}

.mesoxy-wishlist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.mesoxy-wishlist-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.mesoxy-wishlist-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
    color: #484848;
}

.mesoxy-wishlist-close:hover {
    opacity: 0.7;
}

.mesoxy-wishlist-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.mesoxy-wishlist-empty {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.mesoxy-wishlist-item {
    display: flex;
    gap: 15px;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    animation: slideIn 0.3s;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.mesoxy-wishlist-thumb {
    flex-shrink: 0;
}

.mesoxy-wishlist-thumb img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

.mesoxy-wishlist-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mesoxy-wishlist-title {
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    color: #333;
    line-height: 1.4;
}

.mesoxy-wishlist-title:hover {
    color: #000;
}

.mesoxy-wishlist-price {
    font-size: 16px;
    font-weight: 600;
    color: #ff4757;
}

.mesoxy-wishlist-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.mesoxy-add-to-cart-btn {
    flex: 1;
    padding: 8px 15px;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s;
}

.mesoxy-add-to-cart-btn:hover {
    background: #000;
}

.mesoxy-add-to-cart-btn.loading {
    opacity: 0.6;
    pointer-events: none;
}

.mesoxy-remove-wishlist {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f8f8;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.mesoxy-remove-wishlist:hover {
    background: #ff4757;
    color: #fff;
}

.mesoxy-remove-wishlist svg {
    transition: stroke 0.3s;
}

.mesoxy-remove-wishlist:hover svg {
    stroke: #fff;
}

/* ============================================
   CART MODAL
   ============================================ */
.mesoxy-cart {
    position: fixed;
    right: -420px;
    top: 0;
    width: 420px;
    max-width: 90vw;
    height: 100vh;
    background: #fff;
    z-index: 9999;
    transition: right 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
}

body.mesoxy-cart-opened .mesoxy-cart {
    right: 0;
}

.mesoxy-cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    border-bottom: 1px solid #eee;
    background: #f8f8f8;
    flex-shrink: 0;
}

.mesoxy-cart-header h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    color: #333;
}

.mesoxy-cart-close {
    /* border: 1px solid #ddd; */
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
    width: 32px;
    height: 32px;
    /* border-radius: 50%; */
    background: transparent;
    color: #484848;
}

.mesoxy-cart-close:hover {
    background: rgba(0, 0, 0, 0.05);
}

.mesoxy-cart-content {
    flex: 1;
    overflow-y: auto;
    padding: 0px;
    display: flex;
    flex-direction: column;
}

/* WooCommerce Mini Cart Stillerini İyileştir */
.mesoxy-cart-content .woocommerce-mini-cart {
    list-style: none;
    padding: 0;
    margin: 0 0 auto 0;
    flex: 1;
}

.mesoxy-cart-content .woocommerce-mini-cart__empty-message {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 14px;
}

.mesoxy-cart-content .woocommerce-mini-cart-item {
    display: flex;
    gap: 12px;
    padding: 12px 0 !important;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
    align-items: center;
}

.mesoxy-cart-content .woocommerce-mini-cart-item:last-child {
    border-bottom: none;
}

.mesoxy-cart-content .woocommerce-mini-cart-item a:not(.remove) {
    text-decoration: none;
    color: #333;
    transition: color 0.2s;
}

.mesoxy-cart-content .woocommerce-mini-cart-item a:not(.remove):hover {
    color: #000;
}

.mesoxy-cart-content .woocommerce-mini-cart-item img {
    width: 60px;
    height: auto;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.mesoxy-cart-content .woocommerce-mini-cart-item .remove:hover {
    translate: zoom(1.1);
}

.mesoxy-cart-content .woocommerce-mini-cart-item>a:not(.remove) {}

.mesoxy-cart-content .quantity {
    font-size: 12px !important;
    color: #666;
    border: unset !important;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    width: 22% !important;
}

.mesoxy-cart-content .woocommerce-mini-cart-item .amount bdi {
    font-size: 12px !important;
}

/* Sepet Footer - Sabit */
.mesoxy-cart-footer {
    border-top: 2px solid #e0e0e0;
    padding: 20px;
    background: #fff;
    flex-shrink: 0;
}

.mesoxy-cart-content .woocommerce-mini-cart__total {
    padding: 12px 22px;
    margin: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
    font-weight: 600;
}

.mesoxy-cart-content .woocommerce-mini-cart__total strong {
    color: #333;
}

.mesoxy-cart-content .woocommerce-mini-cart__total .amount {
    color: #ff4757;
    font-size: 18px;
    font-weight: 700;
}

.mesoxy-cart-content .woocommerce-mini-cart__buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
}

.mesoxy-cart-content .woocommerce-mini-cart__buttons a {
    display: block;
    text-align: center;
    padding: 13px 20px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
    font-size: 14px;
}

.mesoxy-cart-content .woocommerce-mini-cart__buttons .button.checkout {
    background: #4CAF50;
    color: #fff;
    border: none;
    order: 2;
}

.mesoxy-cart-content .woocommerce-mini-cart__buttons .button.checkout:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.mesoxy-cart-content .woocommerce-mini-cart__buttons .button.wc-forward {
    background: #fff;
    color: #333;
    border: 2px solid #e0e0e0;
    order: 1;
}

.mesoxy-cart-content .woocommerce-mini-cart__buttons .button.wc-forward:hover {
    background: #f8f8f8;
    border-color: #333;
}

/* Ürün adı styling */
.mesoxy-cart-content .woocommerce-mini-cart-item a:not(.remove) {
    font-size: 14px !important;
    width: 60% !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 9px;
    font-weight: 600;
    line-height: 17px;
}

.mesoxy-cart-content a.remove.remove_from_cart_button {
    width: 5%;
    transition: .2s ease-in-out;
}

.mesoxy-cart-content a.remove.remove_from_cart_button:hover {
    transform: scale(1.2);
}

p.woocommerce-mini-cart__buttons.buttons {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

p.woocommerce-mini-cart__buttons.buttons>* {
    width: 100% !important;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {

    .mesoxy-wishlist,
    .mesoxy-cart {
        width: 100vw;
        max-width: 100vw;
    }

    a.mesoxy-login-link {
        padding: unset;
    }

    .mesoxy-header-actions>*:not(:last-child)::after {
        content: "";
        width: 2px;
        height: 2px;
        background: #6d6d6d;
        right: 0;
        position: absolute;
        left: 33px;
        border-radius: 50%;
    }

    a.mesoxy-login-link span {
        display: none;
        padding: unset !important;
    }

    .mesoxy-header-actions {
        gap: 25px;
        font-size: 13px;
    }

    /* Mobilde sadece ikonlar ve badge'ler görünsün */
    .mesoxy-text,
    .mesoxy-divider,
    .mesoxy-count-desktop,
    .mesoxy-cart-total {
        display: none !important;
    }

    .mesoxy-header-actions a {
        gap: 0;
    }

    /* Badge'leri mobilde göster */
    .mesoxy-badge {
        display: flex !important;
        position: absolute;
        top: -6px;
        left: 10px;
        min-width: 16px;
        height: 16px;
        align-items: center;
        justify-content: center;
        background: #ff4757;
        color: #fff;
        font-size: 10px;
        font-weight: 600;
        border-radius: 50%;
        padding: 0 4px;
        line-height: 1;
        animation: badgePulse 0.3s ease;
    }

    .mesoxy-badge:empty {
        display: none !important;
    }

    .mesoxy-badge[data-count="0"] {
        display: none !important;
    }

    .mesoxy-loop-wishlist {
        top: 5px;
        right: 5px;
    }

    .mesoxy-wishlist-btn {
        width: 36px;
    }

    .mesoxy-account-dropdown {
        right: -10px;
        min-width: 200px;
    }

    .mesoxy-account-trigger span {
        display: none;
    }

    .mesoxy-account-trigger {
        padding: 8px;
    }
}

button.button.alt.wcvq-quote-button {
    padding: 8px 16px !important;
}

/* Toast Mesaj Stilleri - style.css'e ekleyin */

.mesoxy-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #333;
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 99999;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.mesoxy-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Wishlist butonu loading durumu */
.mesoxy-wishlist-btn.loading {
    opacity: 0.6;
    pointer-events: none;
}

.mesoxy-wishlist-btn.loading svg {
    animation: wishlist-pulse 1s infinite;
}

@keyframes wishlist-pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

/* Giriş gerektiren butonlar için */
.mesoxy-wishlist-btn.require-login {
    cursor: pointer;
}

.mesoxy-wishlist-btn.require-login:hover::after {
    content: 'Giriş gerekli';
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    z-index: 10;
}

/* Uyarı mesajı */
.uyari {
    display: none;
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 10px;
    font-size: 13px;
}

/* Wishlist empty durumu için login linki */
.mesoxy-wishlist-empty a {
    color: #e74c3c;
    text-decoration: underline;
    font-weight: 600;
}

.mesoxy-wishlist-empty a:hover {
    color: #c0392b;
}

.bottom-total-mini-cart>div {
    padding: 0 25px;
}

/* Mesoxy Loader Animasyonu */
button.mesoxy-loading {
    position: relative !important;
    color: transparent !important;
    /* Yazıyı görünmez yap */
    pointer-events: none !important;
    /* Tıklamayı engelle */
    cursor: wait !important;
    opacity: 0.7 !important;
}

/* Dönen Yuvarlak */
button.mesoxy-loading::after {
    content: "" !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 20px !important;
    height: 20px !important;
    margin-top: -10px !important;
    /* Tam ortalamak için */
    margin-left: -10px !important;
    border: 2px solid #000000 !important;
    /* Çember rengi (Siyah yaptım, temanıza göre değiştirin) */
    border-top-color: transparent !important;
    border-radius: 50% !important;
    animation: mesoxy-spin 0.6s linear infinite !important;
    display: block !important;
    z-index: 9999 !important;
}

@keyframes mesoxy-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}