/* =============================================
   POKELITEE ADD TO CART — STYLES v1.0.0
   ============================================= */

/* ─── BUTTON WRAPPER ──────────────────────── */
.platc-wrap {
    display: block;
    width: 100%;
    margin-top: 10px;
}

.platc-wrap--loop {
    padding: 0 4px 8px;
}

.platc-wrap--single {
    margin-top: 18px;
    padding: 0;
}

/* ─── BASE BUTTON ─────────────────────────── */
.platc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    padding: 11px 18px;
    border: none;
    border-radius: 6px;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    text-decoration: none !important;
    color: #ffffff !important;
    background: #e63329;
    transition: background 0.18s ease, transform 0.12s ease, box-shadow 0.15s ease, opacity 0.15s ease;
    box-shadow: 0 2px 8px rgba(230, 51, 41, 0.28);
    letter-spacing: 0.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
}

.platc-btn:hover:not(:disabled) {
    background: #c0241b !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 16px rgba(230, 51, 41, 0.38);
    color: #ffffff !important;
    text-decoration: none !important;
}

.platc-btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

/* ─── ICON ────────────────────────────────── */
.platc-icon {
    font-size: 15px;
    flex-shrink: 0;
    line-height: 1;
}

/* ─── SIMPLE / ADD TO CART STATE ──────────── */
.platc-btn--simple {
    background: #e63329;
}

.platc-btn--simple.platc-adding {
    opacity: 0.75;
    cursor: wait;
    pointer-events: none;
}

.platc-btn--simple.platc-added {
    background: #1a7a3c !important;
    box-shadow: 0 2px 8px rgba(26, 122, 60, 0.30);
    pointer-events: none;
}

.platc-btn--simple.platc-added:hover {
    background: #1a7a3c !important;
    transform: none;
}

.platc-btn--simple.platc-error {
    background: #c0241b !important;
    animation: platcShake 0.35s ease;
}

@keyframes platcShake {
    0%, 100% { transform: translateX(0); }
    25%       { transform: translateX(-4px); }
    75%       { transform: translateX(4px); }
}

/* ─── VARIABLE PRODUCT ────────────────────── */
.platc-btn--variable {
    background: #1a2e6c !important;
    box-shadow: 0 2px 8px rgba(26, 46, 108, 0.22);
}

.platc-btn--variable:hover {
    background: #0f1d45 !important;
    box-shadow: 0 5px 16px rgba(26, 46, 108, 0.32);
}

/* ─── OUT OF STOCK ────────────────────────── */
.platc-btn--outofstock {
    background: #cccccc !important;
    color: #888888 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    transform: none !important;
    font-style: italic;
    font-weight: 500;
}

/* ─── LOADING SPINNER (inside button) ─────── */
.platc-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: platcSpin 0.65s linear infinite;
    flex-shrink: 0;
}

@keyframes platcSpin {
    to { transform: rotate(360deg); }
}

/* ─── TOAST NOTIFICATION ──────────────────── */
#platc-toast {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 999999;
    min-width: 260px;
    max-width: 380px;
    background: #1a2e6c;
    color: #ffffff;
    border-radius: 10px;
    padding: 14px 20px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.22);
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
    pointer-events: none;
    font-family: inherit;
}

#platc-toast.platc-toast--show {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

#platc-toast.platc-toast--error {
    background: #c0241b;
}

#platc-toast.platc-toast--success {
    background: #1a7a3c;
}

.platc-toast-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.platc-toast-body {
    flex: 1;
}

.platc-toast-title {
    display: block;
    font-size: 13px;
    margin-bottom: 3px;
    opacity: 0.85;
    font-weight: 400;
}

.platc-toast-msg {
    display: block;
    font-size: 14px;
    font-weight: 700;
}

.platc-toast-action {
    display: inline-block;
    margin-top: 6px;
    font-size: 12px;
    color: #ffe066;
    text-decoration: underline;
    cursor: pointer;
    font-weight: 600;
}

#platc-toast-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.7);
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
    transition: color 0.15s;
}

#platc-toast-close:hover {
    color: #ffffff;
}

/* ─── CARD HOVER REVEAL (loop) ────────────── */
.woocommerce ul.products li.product .platc-wrap {
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.woocommerce ul.products li.product:hover .platc-wrap,
.woocommerce ul.products li.product:focus-within .platc-wrap {
    opacity: 1;
    transform: translateY(0);
}

/* Always show on mobile */
@media (max-width: 768px) {
    .woocommerce ul.products li.product .platc-wrap {
        opacity: 1;
        transform: none;
    }

    #platc-toast {
        bottom: 16px;
        right: 16px;
        left: 16px;
        max-width: none;
    }
}

/* ─── ELEMENTOR WIDGET PRODUCT GRID ────────── */
.elementor-widget-woocommerce-products .platc-wrap,
.elementor-widget-wc-archive-products .platc-wrap {
    opacity: 1;
    transform: none;
}
