/* Mobility Products Grid Widget styles */

.mpgw-wrapper {
    width: 100%;
    position: relative;
}

/* Toast */
.mpgw-toast {
    position: absolute;
    left: 50%;
    bottom: 12px;
    transform: translate(-50%, 10px);
    background: rgba(0,0,0,0.88);
    color: #ffffff;
    font-size: 12px;
    padding: 6px 14px;
    border-radius: 999px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.18s ease;
    z-index: 50;
}
.mpgw-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* Header & Tabs */

.mpgw-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 16px;
}

.mpgw-tabs {
    display: inline-flex;
    align-items: center;
    gap: 16px;
}

.mpgw-tab {
    background: transparent;
    border: none;
    padding: 0;
    font-size: 24px;
    font-weight: 600;
    cursor: pointer;
    color: #999999;
    position: relative;
}

.mpgw-tab--active {
    color: #111111;
}

.mpgw-tab--active::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 100%;
    height: 2px;
    background: #111111;
    border-radius: 999px;
}

.mpgw-panels {
    width: 100%;
}

/* Grid */

.mpgw-panel {
    display: none;
}

.mpgw-panel--active {
    display: block;
}

.mpgw-grid {
    display: grid;
    grid-template-columns: repeat(var(--mpgw-cols-desktop, 4), minmax(0, 1fr));
    grid-gap: var(--mpgw-gap, 20px);
}

.mpgw-product {
    position: relative;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 5px 12px rgba(15, 51, 102, 0.06);
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.mpgw-product__inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.mpgw-product__image-wrap {
    position: relative;
    display: block;
    overflow: hidden;
    border-top-left-radius: inherit;
    border-top-right-radius: inherit;
}

.mpgw-product__image-link {
    display: block;
}

.mpgw-product__image-wrap img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.25s ease;
}

/* Desktop hover quick view */

.mpgw-product__hover {
    position: absolute;
    left: 50%;
    bottom: 14px;
    transform: translate(-50%, 24px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.18s ease;
    z-index: 3;
}

.mpgw-product__quickview-btn {
    padding: 8px 22px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    gap: 6px;
}

.mpgw-product__quickview-icon {
    font-size: 15px;
}

/* Mobile bottom icons */

.mpgw-product__mobile-actions {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 8px;
    padding: 0 10px;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    z-index: 3;
}

.mpgw-product__icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.92);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    cursor: pointer;
    text-decoration: none;
    font-size: 18px;
    color: #111111;
}

/* Content */

.mpgw-product__content {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 12px;
    gap: 6px;
    flex: 1 1 auto;
}



.mpgw-product__title {
    font-size: 14px;
    font-weight: 500;
    margin: 0;
}

.mpgw-product__title a {
    text-decoration: none;
}

.mpgw-product__title a:hover {
    text-decoration: underline;
}

.mpgw-product__price {
    margin-top: 8px;
    font-weight: 600;
}

/* price bottom */

.mpgw-product--price-bottom .mpgw-product__content {
    min-height: 80px;
}

.mpgw-product--price-bottom .mpgw-product__price {
    margin-top: auto;
}

/* Desktop Add to cart button */

.mpgw-product__actions {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
    opacity: 0;
    transform: translateY(6px);
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}



.mpgw-product__add-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
    border: none;
}

/* Hover state (desktop) */

.mpgw-product:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(15, 51, 102, 0.16);
}

.mpgw-product:hover .mpgw-product__image-wrap img {
    transform: scale(1.03);
}

.mpgw-product:hover .mpgw-product__hover {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, 0);
}

.mpgw-product:hover .mpgw-product__actions {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}


/* No products */

.mpgw-no-products {
    font-size: 14px;
    color: #777777;
}

/* Quickview modal */

.mpgw-quickview-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.mpgw-quickview-modal.is-open {
    display: flex;
}

.mpgw-qv-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
}

.mpgw-qv-dialog {
    position: relative;
    background: #ffffff;
    border-radius: 18px;
    max-width: 960px;
    width: 96%;
    max-height: 92vh;
    overflow: hidden;
    box-shadow: 0 18px 40px rgba(0,0,0,0.35);
    display: flex;
    flex-direction: column;
    z-index: 1;
}

.mpgw-qv-close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: none;
    background: rgba(0,0,0,0.06);
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mpgw-qv-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 24px;
    padding: 24px 24px 20px;
    overflow-y: auto;
}

.mpgw-qv-image {
    max-width: 420px;
}

.mpgw-qv-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
}

.mpgw-qv-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 8px;
}

.mpgw-qv-price {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 10px;
}

.mpgw-qv-stock {
    font-size: 14px;
    color: #e38b06;
    margin-bottom: 10px;
}

.mpgw-qv-excerpt {
    font-size: 14px;
    color: #444444;
    margin-bottom: 18px;
}

.mpgw-qv-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 8px;
}

.mpgw-qv-view-details {
    font-size: 14px;
    text-decoration: underline;
    font-weight: 600;
}

.mpgw-qv-add-to-cart.button {
    padding: 10px 24px;
    border-radius: 24px;
    font-weight: 600;
}

/* Responsive */

@media (max-width: 1024px) {
    .mpgw-grid {
        grid-template-columns: repeat(var(--mpgw-cols-tablet, 2), minmax(0, 1fr));
    }

    .mpgw-tab {
        font-size: 20px;
    }

    .mpgw-qv-body {
        grid-template-columns: minmax(0, 1fr);
        padding: 22px 18px 20px;
    }

    .mpgw-qv-image {
        max-width: 100%;
    }
}

@media (max-width: 767px) {

    /* Grid'i yatay karusele çevir */
    .mpgw-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: var(--mpgw-gap, 20px);
    }

    .mpgw-grid::-webkit-scrollbar {
        display: none;
    }

    /* 1.5 kart görünsün */
    .mpgw-product {
        flex: 0 0 calc(100% / 1.5);
        max-width: calc(100% / 1.5);
        scroll-snap-align: start;
    }

    .mpgw-tabs {
        gap: 12px;
    }

    .mpgw-tab {
        font-size: 18px;
    }

    .mpgw-product__hover {
        display: none;
    }

    .mpgw-product__actions {
        display: none;
    }

    .mpgw-product__mobile-actions {
        display: flex;
    }

    .mpgw-qv-dialog {
        max-width: 96%;
        width: 96%;
        height: auto;
        max-height: 90vh;
        border-radius: 16px;
        margin: 20px auto;
    }

    .mpgw-qv-body {
        padding: 18px 14px 16px;
    }

    .mpgw-qv-title {
        font-size: 20px;
    }

    .mpgw-qv-price {
        font-size: 20px;
    }
}


.mpgw-qv-title a {
    color: inherit;
    text-decoration: none;
}

.mpgw-qv-title a:hover {
    text-decoration: underline;
}


/* Remove underline from all links inside widget */
.mpgw-wrapper a,
.mpgw-wrapper a:hover {
    text-decoration: none;
}


/* Faded color for strikethrough prices */
.mpgw-product__price del,
.mpgw-qv-price del {
    opacity: 0.6;
}


.mpgw-product__add-btn i {
    margin-right: 6px;
}
