/* GAYA – Mini-cart dropdown (tooltip na hover ikony koszyka) */

.gaya-mc {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    width: 360px;
    max-height: 480px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .12), 0 2px 8px rgba(0, 0, 0, .06);
    z-index: 9999;
    display: flex;
    flex-direction: column;

    /* domyślnie ukryty */
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
}

.gaya-mc.is-open {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
    transform: translateY(0);
}

/* --- Header --- */
.gaya-mc__header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 18px 20px 0;
}

.gaya-mc__title {
    font-size: 15px;
    font-weight: 600;
    color: #111;
}

.gaya-mc__count {
    font-size: 13px;
    color: #888;
}

/* --- Items list --- */
.gaya-mc__items {
    list-style: none;
    margin: 0;
    padding: 12px 20px;
    overflow-y: auto;
    flex: 1;
    max-height: 280px;
}

.gaya-mc__item {
    display: grid;
    grid-template-columns: 60px 1fr 28px;
    gap: 12px;
    align-items: start;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.gaya-mc__item:last-child {
    border-bottom: none;
}

/* Thumbnail */
.gaya-mc__thumb {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    overflow: hidden;
    background: #fafafa;
    flex-shrink: 0;
}

.gaya-mc__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gaya-mc__thumb a {
    display: block;
    line-height: 0;
}

/* Details */
.gaya-mc__details {
    min-width: 0;
}

.gaya-mc__name {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #111;
    text-decoration: none;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gaya-mc__name:hover {
    text-decoration: underline;
}

/* Qty + price row */
.gaya-mc__qty-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
}

.gaya-mc__qty-ctrl {
    display: inline-flex;
    align-items: center;
    gap: 0;
    border: 1px solid #e3e3e3;
    border-radius: 8px;
    overflow: hidden;
}

.gaya-mc__qty-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
}

.gaya-mc__qty-btn:hover {
    background: #f5f5f5;
}

.gaya-mc__qty-btn:disabled {
    opacity: .3;
    cursor: not-allowed;
}

.gaya-mc__qty-val {
    min-width: 24px;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
}

.gaya-mc__price {
    font-size: 13px;
    font-weight: 600;
    color: #111;
    white-space: nowrap;
}

/* Remove button */
.gaya-mc__remove {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #bbb;
    text-decoration: none;
    border-radius: 6px;
    transition: color .15s, background .15s;
    flex-shrink: 0;
}

.gaya-mc__remove:hover {
    color: #d63638;
    background: #fef1f1;
}

/* Loading state on item */
.gaya-mc__item.is-loading {
    opacity: .4;
    pointer-events: none;
}

/* --- Footer --- */
.gaya-mc__footer {
    padding: 14px 20px 18px;
    border-top: 1px solid #f0f0f0;
}

.gaya-mc__subtotal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    margin-bottom: 14px;
}

.gaya-mc__subtotal-val {
    font-weight: 600;
    color: #111;
}

.gaya-mc__buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.gaya-mc__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: opacity .15s, transform .1s;
}

.gaya-mc__btn:hover {
    transform: translateY(-1px);
}

.gaya-mc__btn--cart {
    background: #fff;
    border: 1px solid #e3e3e3;
    color: #111;
}

.gaya-mc__btn--cart:hover {
    border-color: #111;
}

.gaya-mc__btn--checkout {
    background: #111;
    border: 1px solid #111;
    color: #fff;
}

.gaya-mc__btn--checkout:hover {
    background: #000;
}

/* --- Empty state --- */
.gaya-mc__empty {
    padding: 32px 20px;
    text-align: center;
}

.gaya-mc__empty p {
    font-size: 14px;
    color: #888;
    margin: 0 0 16px;
}

.gaya-mc__empty .gaya-mc__btn {
    display: inline-flex;
}

/* --- Position anchor --- */
.site-header-item[data-section="kadence_customizer_cart"],
.kadence-header-cart {
    position: relative;
}

/* Kadence sets overflow:hidden on #masthead which clips our dropdown */
#masthead {
    overflow: visible !important;
}

/* --- Mobile: full-width dropdown --- */
@media (max-width: 600px) {
    .gaya-mc {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-height: 70vh;
        border-radius: 20px 20px 0 0;
        margin-top: 0;
    }
}
