/* ======================================================================
   MINI-CART DROPDOWN - Replaces side drawer
   ====================================================================== */

/* ---- Suppress Astra's own cart dropdown panel, keeping the cart icon visible ---- */
html body .ast-site-header-cart-dropdown,
html body .ast-site-header-cart-dropdown-wrap,
html body .ast-site-header-cart-dropdown-wrap *,
html body .widget_shopping_cart,
html body .ast-site-header-cart:hover .ast-site-header-cart-dropdown-wrap,
html body .ast-site-header-cart-li:hover .ast-site-header-cart-dropdown-wrap,
html body .ast-site-header-cart:hover .widget_shopping_cart,
html body .ast-site-header-cart-li:hover .widget_shopping_cart {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    height: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
}

/* Ensure the parent header items have relative positioning so the absolute dropdown anchors correctly */
.ast-site-header-cart,
.ast-site-header-cart-wrap,
.ast-menu-cart-li,
.ast-site-header-cart-container {
    position: relative !important;
    overflow: visible !important;
}

/* ---- Dropdown container ---- */
#wmc-mini-cart-dropdown {
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    left: auto !important;
    margin-top: 10px !important;
    width: 360px;
    background: #ffffff !important;
    border: 1px solid var(--ast-border-color, #e2e8f0) !important;
    border-radius: 14px !important;
    box-shadow: 0 8px 32px rgba(15, 23, 42, 0.14), 0 2px 8px rgba(15, 23, 42, 0.06) !important;
    z-index: 999999 !important;
    display: flex !important;
    flex-direction: column !important;
    max-height: 520px !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(-8px) !important;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease !important;
    pointer-events: none !important;
}

/* Open state via JS class */
#wmc-mini-cart-dropdown.wmc-dropdown-open {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
}

/* CSS-only hover fallback: if javascript fails or on instant hover */
.ast-site-header-cart:hover #wmc-mini-cart-dropdown,
.ast-site-header-cart-wrap:hover #wmc-mini-cart-dropdown,
.ast-site-header-cart-li:hover #wmc-mini-cart-dropdown,
.ast-site-header-cart-container:hover #wmc-mini-cart-dropdown {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
}

/* Arrow pointing up toward cart icon */
.wmc-dropdown-arrow {
    position: absolute;
    top: -8px;
    right: 22px;
    width: 16px;
    height: 16px;
    background: #ffffff;
    border-left: 1px solid var(--ast-border-color, #e2e8f0);
    border-top: 1px solid var(--ast-border-color, #e2e8f0);
    transform: rotate(45deg);
    border-radius: 3px 0 0 0;
}

/* ---- Header ---- */
.wmc-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px 12px;
    border-bottom: 1px solid var(--ast-global-color-4, #f1f5f9);
    flex-shrink: 0;
}

.wmc-dropdown-title {
    font-size: 15px;
    font-weight: 700;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 7px;
}

.wmc-dropdown-title .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    color: var(--wmc-primary);
}

.wmc-cart-badge {
    background: var(--wmc-primary);
    color: #fff;
    border-radius: 20px;
    padding: 2px 9px;
    font-size: 12px;
    font-weight: 700;
    min-width: 22px;
    text-align: center;
}

/* ---- Shipping progress ---- */
.wmc-dropdown-shipping-bar {
    padding: 10px 18px;
    background: #f8fafc;
    border-bottom: 1px solid var(--ast-global-color-4, #f1f5f9);
    flex-shrink: 0;
}

.wmc-shipping-text {
    font-size: 12px;
    color: inherit;
    margin-bottom: 6px;
}

.wmc-shipping-text strong {
    color: inherit;
    font-weight: 700;
}

.wmc-shipping-text .dashicons-yes-alt {
    color: #10b981;
    font-size: 14px;
    width: 14px;
    height: 14px;
    vertical-align: middle;
    margin-right: 3px;
}

.wmc-shipping-track {
    width: 100%;
    height: 5px;
    background: var(--ast-border-color, #e2e8f0);
    border-radius: 3px;
    overflow: hidden;
}

.wmc-shipping-fill {
    display: block;
    height: 100%;
    background: var(--wmc-primary);
    border-radius: 3px;
    transition: width 0.4s ease-out;
}

.wmc-shipping-track.reached .wmc-shipping-fill {
    background: #10b981;
}

/* ---- Body / items ---- */
.wmc-dropdown-body {
    flex: 1;
    overflow-y: auto;
    padding: 4px 0;
    /* Thin scrollbar */
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.wmc-dropdown-body::-webkit-scrollbar {
    width: 4px;
}

.wmc-dropdown-body::-webkit-scrollbar-track {
    background: transparent;
}

.wmc-dropdown-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

/* ---- Cart items list ---- */
.wmc-cart-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

.wmc-cart-item {
    display: flex;
    gap: 12px;
    padding: 12px 18px;
    position: relative;
    border-bottom: 1px solid var(--ast-global-color-4, #f1f5f9);
    transition: background 0.15s ease;
}

.wmc-cart-item:last-child {
    border-bottom: none;
}

.wmc-cart-item:hover {
    background: #f8fafc;
}

/* Thumbnail */
.wmc-item-thumb {
    width: 62px;
    height: 62px;
    border-radius: 8px;
    border: 1px solid var(--ast-border-color, #e2e8f0);
    overflow: hidden;
    flex-shrink: 0;
    background: #f8fafc;
}

.wmc-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Details column */
.wmc-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding-right: 22px; /* space for remove button */
}

.wmc-item-title {
    margin: 0 0 4px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    white-space: normal;
}

.wmc-item-title a {
    color: inherit;
    text-decoration: none;
}

.wmc-item-title a:hover {
    color: var(--wmc-primary);
}

/* Variations / product data list */
.wmc-item-details .wc-item-meta,






/* ================================================================
   PC Configurator integration — SCOPED to mini-cart dropdown only
   (prevents affecting main cart page at /koszyk/)
   ================================================================ */

/* Options text block inside mini-cart */
#wmc-mini-cart-dropdown .pc-mini-configs-inline {
    display: block !important;
    font-size: 11px !important;
    color: #64748b !important;
    margin-top: 4px !important;
    line-height: 1.5 !important;
    border-left: 2px solid var(--ast-border-color, #e2e8f0) !important;
    padding-left: 7px !important;
}

#wmc-mini-cart-dropdown .wmc-config-detail-item {
    display: block !important;
    margin-bottom: 3px !important;
    line-height: 1.45 !important;
    font-size: 11px !important;
    color: #64748b !important;
}

#wmc-mini-cart-dropdown .wmc-config-detail-item:last-child {
    margin-bottom: 0 !important;
}

/* Hide the pc-mini-price-summary inside the dropdown */
#wmc-mini-cart-dropdown .pc-mini-price-summary {
    display: none !important;
}

/* ================================================================
   Item price — .wmc-item-price
   Items WITH extras (.pc-mini-configs-inline present):
     The PC Configurator handles the full price breakdown natively.
     .wmc-item-price shows base price in light gray.
   Items WITHOUT extras:
     Only .wmc-item-price is shown — use dark gray inherit
     matching the configurator's total-price shade.
   ================================================================ */

/* Default: dark gray for items without extras */
.wmc-item-price {
    font-size: 13px;
    font-weight: 700;
    color: inherit;
    margin-top: auto;
}

/* Items WITH extras: make base price lighter (subordinate to configurator total) */
#wmc-mini-cart-dropdown .wmc-cart-item:has(.pc-mini-configs-inline) .wmc-item-price {
    color: #94a3b8 !important;
    font-weight: 600 !important;
    font-size: 12px !important;
}

/* Items WITHOUT extras: ensure dark gray (same shade as configurator's total) */
#wmc-mini-cart-dropdown .wmc-cart-item:not(:has(.pc-mini-configs-inline)) .wmc-item-price {
    color: inherit !important;
    font-weight: 700 !important;
}


.wmc-item-qty {
    font-size: 11.5px;
    font-weight: 500;
    color: #94a3b8;
}

/* Remove button — absolute top-right of item */
.wmc-item-remove {
    position: absolute;
    top: 14px;
    right: 16px;
    color: #cbd5e1;
    line-height: 1;
    text-decoration: none;
    transition: color 0.15s ease;
}

.wmc-item-remove:hover {
    color: #ef4444;
}

.wmc-item-remove .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Empty cart state */
.wmc-empty-cart {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    text-align: center;
    color: #64748b;
}

.wmc-empty-cart .dashicons-cart {
    font-size: 40px;
    width: 40px;
    height: 40px;
    margin-bottom: 12px;
    color: #cbd5e1;
}

.wmc-empty-cart p {
    font-size: 14px;
    margin: 0 0 16px;
}

.wmc-shop-btn {
    display: inline-block;
    background: var(--wmc-primary);
    color: #ffffff;
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.wmc-shop-btn:hover {
    opacity: 0.88;
    color: #fff;
}

/* ---- Footer ---- */
.wmc-dropdown-footer {
    padding: 14px 18px;
    border-top: 1px solid var(--ast-global-color-4, #f1f5f9);
    background: #fafbfc;
    border-radius: 0 0 14px 14px;
    flex-shrink: 0;
}

.wmc-dropdown-subtotal {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 12px;
    font-size: 14px;
    color: inherit;
}

.wmc-subtotal-amount {
    font-size: 18px;
    font-weight: 800;
    color: inherit;
}

.wmc-dropdown-checkout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 12px;
    background: var(--wmc-primary);
    color: #ffffff;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    transition: opacity 0.2s ease, transform 0.15s ease;
    box-shadow: 0 2px 8px rgba(var(--wmc-primary-rgb), 0.3);
}

.wmc-dropdown-checkout-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    color: #fff;
}

.wmc-dropdown-checkout-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* ---- Loading state ---- */
.wmc-dropdown-items-container.wmc-loading {
    opacity: 0.5;
    pointer-events: none;
}

/* ---- Responsive ---- */
@media (max-width: 420px) {
    #wmc-mini-cart-dropdown {
        width: calc(100vw - 20px);
        right: 10px;
    }
}

/* Hide configurator price summary in the mini-cart dropdown to prevent double price calculations */
#wmc-mini-cart-dropdown .pc-mini-price-summary {
    display: none !important;
}


