/* MultiStock Sync Pro - Modern Premium Frontend Design (Harmonized with WoodMart Theme) */
.wk-stock-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 18px 20px;
    margin: 20px 0;
    box-shadow: 0 4px 20px -4px rgba(0, 0, 0, 0.05), 0 2px 6px -1px rgba(0, 0, 0, 0.02);
    font-family: var(--wd-text-font, "Albert Sans", Arial, Helvetica, sans-serif);
    transition: all 0.25s ease;
    clear: both;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    container-type: inline-size;
    container-name: wkstock;
}

.wk-stock-box *, .wk-stock-box *::before, .wk-stock-box *::after {
    box-sizing: border-box;
}

.wk-stock-box:hover {
    border-color: #cbd5e1;
    box-shadow: 0 6px 24px -4px rgba(0, 0, 0, 0.08);
}

.wk-stock-box-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
}

.wk-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.wk-header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0f172a;
    flex-shrink: 0;
}

.wk-stock-box-header .woodmart-title-container,
.wk-stock-title {
    margin: 0 !important;
    font-family: var(--wd-title-font, "Urbanist", Arial, Helvetica, sans-serif) !important;
    font-size: 19px !important;
    line-height: 1.35 !important;
    font-weight: 600 !important;
    color: var(--wd-title-color, #242424) !important;
    letter-spacing: -0.2px;
}

.wk-header-right {
    display: none;
}

.wk-live-check-btn.wk-live-check-link,
.wk-live-check-link {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    min-height: 0 !important;
    line-height: 1.4 !important;
    font-family: var(--wd-text-font, "Albert Sans", Arial, Helvetica, sans-serif) !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #2563eb !important;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    text-transform: none !important;
    letter-spacing: normal !important;
    text-decoration: underline;
    text-decoration-style: dashed;
    text-underline-offset: 3px;
    text-decoration-color: rgba(37, 99, 235, 0.45);
    transition: all 0.2s ease;
    align-self: flex-start;
    outline: none;
    white-space: nowrap;
}

.wk-live-check-btn.wk-live-check-link:hover,
.wk-live-check-link:hover {
    color: #1d4ed8 !important;
    text-decoration-color: #1d4ed8;
    background: transparent !important;
    transform: none;
}

.wk-live-check-btn.wk-live-check-link:active,
.wk-live-check-link:active {
    transform: none;
    color: #1e40af !important;
}

.wk-live-check-btn.wk-live-check-link:disabled {
    opacity: 0.7;
    cursor: wait;
}

.wk-live-check-btn.wk-live-check-link .wk-spin-icon {
    color: #2563eb;
    transition: color 0.2s ease;
    flex-shrink: 0;
}

.wk-live-check-btn.wk-live-check-link:hover .wk-spin-icon {
    color: #1d4ed8;
}

.wk-locations-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.wk-location-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 13px 16px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #f1f5f9;
    box-sizing: border-box;
    width: 100%;
    transition: all 0.2s ease;
}

.wk-location-row:hover {
    background: #f1f5f9;
    border-color: #e2e8f0;
}

.wk-loc-main {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1 1 auto;
    min-width: 0;
}

.wk-loc-avatar {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.wk-location-row:hover .wk-loc-avatar {
    transform: scale(1.05);
}

.wk-avatar-emerald {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #d1fae5;
}

.wk-avatar-blue {
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #dbeafe;
}

.wk-avatar-gray {
    background: #f8fafc;
    color: #94a3b8;
    border: 1px solid #e2e8f0;
}

.wk-loc-texts {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1 1 auto;
}

.wk-loc-title {
    font-family: var(--wd-title-font, "Urbanist", Arial, Helvetica, sans-serif);
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.35;
    overflow-wrap: break-word;
    word-break: break-word;
}

.wk-loc-sub {
    font-family: var(--wd-text-font, "Albert Sans", Arial, Helvetica, sans-serif);
    font-size: 13.5px;
    color: #64748b;
    line-height: 1.45;
    overflow-wrap: break-word;
    word-break: break-word;
}

.wk-loc-status {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.wk-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 14px;
    border-radius: 20px;
    font-family: var(--wd-text-font, "Albert Sans", Arial, Helvetica, sans-serif);
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap !important;
    letter-spacing: 0.01em;
    line-height: 1.25;
    flex-shrink: 0;
}

.wk-badge-green {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.wk-badge-amber {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

.wk-badge-red {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.wk-badge-gray {
    background: #f8fafc;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.wk-pulse {
    width: 7px;
    height: 7px;
    background: #10b981;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: wk-pulse-anim 1.8s infinite;
}

@keyframes wk-pulse-anim {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.wk-pulse-amber {
    width: 7px;
    height: 7px;
    background: #f59e0b;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.wk-stock-box-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
    font-family: var(--wd-text-font, "Albert Sans", Arial, Helvetica, sans-serif);
    font-size: 13px;
    color: #64748b;
    gap: 10px;
    flex-wrap: wrap;
}

.wk-trust-item {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #64748b;
    min-width: 0;
}

.wk-trust-item svg {
    color: #10b981;
    flex-shrink: 0;
    width: 15px;
    height: 15px;
}

.wk-live-feedback {
    margin-top: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    font-family: var(--wd-text-font, "Albert Sans", Arial, Helvetica, sans-serif);
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.wk-feedback-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.wk-feedback-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.wk-spinning {
    animation: wk-spin 0.8s linear infinite;
}

@keyframes wk-spin {
    100% { transform: rotate(360deg); }
}

/* Container Query: Automatically adapts when parent column/widget is narrow */
@container wkstock (max-width: 390px) {
    .wk-location-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .wk-loc-main {
        width: 100%;
    }
    .wk-loc-status {
        margin-left: 50px;
        align-self: flex-start;
    }
    .wk-stock-box-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* Mobile & Narrow Screen Responsive Polish */
@media (max-width: 576px) {
    .wk-stock-box {
        padding: 14px 16px;
        margin: 16px 0;
        border-radius: 14px;
    }
    .wk-stock-box-header {
        flex-wrap: wrap;
        gap: 8px;
    }
    .wk-stock-box-header .woodmart-title-container,
    .wk-stock-title {
        font-size: 18px !important;
    }
    .wk-location-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 12px 14px;
    }
    .wk-loc-main {
        width: 100%;
    }
    .wk-loc-status {
        margin-left: 50px;
        align-self: flex-start;
    }
    .wk-stock-box-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* Extra small screens (down to 320px) */
@media (max-width: 360px) {
    .wk-stock-box {
        padding: 12px 14px;
    }
    .wk-loc-status {
        margin-left: 0;
    }
}

/* ==========================================================================
   MultiStock Sync Pro - Product-Specific Coupon Banners
   ========================================================================== */

.wk-coupon-banner {
    margin: 14px 0 20px 0;
    font-family: var(--wd-text-font, "Albert Sans", Arial, Helvetica, sans-serif);
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    clear: both;
}

.wk-coupon-banner *, .wk-coupon-banner *::before, .wk-coupon-banner *::after {
    box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   STYLE 2 : MODERN ÉMERAUDE (EXACTEMENT LE DESIGN DU SHOWCASE)
   -------------------------------------------------------------------------- */
.wk-coupon-emerald {
    background: #ffffff !important;
    border: 2px solid #10b981 !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 20px -4px rgba(16, 185, 129, 0.12), 0 2px 6px -1px rgba(0, 0, 0, 0.02) !important;
    position: relative !important;
    overflow: hidden !important;
    margin: 16px 0 20px 0 !important;
    transition: all 0.25s ease !important;
}

.wk-coupon-emerald:hover {
    box-shadow: 0 8px 24px -4px rgba(16, 185, 129, 0.2) !important;
    border-color: #059669 !important;
}

/* Badge Coin Supérieur Droit - EXACTEMENT COMME DANS LE SHOWCASE */
.wk-emerald-corner-badge {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    background: #059669 !important;
    color: #ffffff !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    letter-spacing: 0.8px !important;
    text-transform: uppercase !important;
    padding: 4px 14px !important;
    border-bottom-left-radius: 12px !important;
    line-height: 1.4 !important;
    z-index: 2 !important;
    pointer-events: none !important;
}

.wk-emerald-inner {
    padding: 20px 22px !important;
    position: relative !important;
}

.wk-emerald-content {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 16px !important;
    flex-wrap: wrap !important;
}

.wk-emerald-info {
    display: flex !important;
    align-items: flex-start !important;
    gap: 14px !important;
    flex: 1 1 300px !important;
    min-width: 0 !important;
}

.wk-emerald-icon {
    width: 44px !important;
    height: 44px !important;
    border-radius: 12px !important;
    background: #ecfdf5 !important;
    border: 1.5px solid #a7f3d0 !important;
    font-size: 22px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.08) !important;
}

.wk-emerald-texts {
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;
}

.wk-emerald-category {
    font-size: 11px !important;
    font-weight: 800 !important;
    color: #047857 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.6px !important;
    margin: 0 0 2px 0 !important;
    line-height: 1.2 !important;
}

.wk-emerald-title {
    margin: 0 !important;
    font-family: var(--wd-title-font, "Urbanist", Arial, sans-serif) !important;
    font-size: 15.5px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    line-height: 1.35 !important;
}

.wk-emerald-amount {
    color: #059669 !important;
    font-weight: 800 !important;
    font-size: 16.5px !important;
}

.wk-emerald-sub {
    margin: 3px 0 0 0 !important;
    font-size: 12.5px !important;
    color: #64748b !important;
    line-height: 1.4 !important;
}

.wk-emerald-sub .wk-final-price {
    color: #0f172a !important;
    font-weight: 800 !important;
}

/* Actions : Chip Code + Bouton */
.wk-emerald-actions {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    flex-wrap: nowrap !important;
    flex-shrink: 0 !important;
}

/* Chip Code Promo */
.wk-emerald-code-chip {
    background: #f8fafc !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 12px !important;
    padding: 8px 14px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    cursor: pointer !important;
    user-select: none !important;
    transition: all 0.2s ease !important;
}

.wk-emerald-code-chip:hover {
    background: #f0fdf4 !important;
    border-color: #10b981 !important;
}

.wk-emerald-code-chip .wk-chip-label {
    font-size: 10.5px !important;
    font-weight: 800 !important;
    color: #94a3b8 !important;
    letter-spacing: 0.5px !important;
}

.wk-emerald-code-chip .wk-chip-code {
    font-family: "JetBrains Mono", Consolas, monospace !important;
    font-size: 14px !important;
    font-weight: 900 !important;
    color: #0f172a !important;
    letter-spacing: 0.8px !important;
}

.wk-emerald-code-chip .wk-copy-icon {
    font-size: 13px !important;
    opacity: 0.7 !important;
    transition: opacity 0.2s ease !important;
}

.wk-emerald-code-chip:hover .wk-copy-icon {
    opacity: 1 !important;
}

/* Bouton Appliquer (Protégé contre les styles de thème WoodMart) */
.wk-coupon-banner .wk-coupon-apply-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 9px 18px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
    line-height: 1.3 !important;
    white-space: nowrap !important;
    outline: none !important;
    height: auto !important;
}

.wk-coupon-banner .wk-btn-emerald {
    background: #059669 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.28) !important;
}

.wk-coupon-banner .wk-btn-emerald:hover:not(:disabled) {
    background: #047857 !important;
    color: #ffffff !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.38) !important;
}

.wk-coupon-banner .wk-btn-emerald:active:not(:disabled) {
    transform: scale(0.97) !important;
}

.wk-coupon-banner .wk-coupon-apply-btn.wk-is-applied {
    background: #10b981 !important;
    color: #ffffff !important;
    box-shadow: none !important;
    cursor: default !important;
}

/* Feedback Toast */
.wk-coupon-feedback {
    margin-top: 12px !important;
    padding: 8px 14px !important;
    background: #f0fdf4 !important;
    border: 1px solid #bbf7d0 !important;
    border-radius: 8px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #166534 !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    animation: wkFadeIn 0.3s ease !important;
}

/* Responsive mobile */
@media (max-width: 640px) {
    .wk-emerald-corner-badge {
        font-size: 9px !important;
        padding: 3px 10px !important;
    }
    .wk-emerald-inner {
        padding: 18px 14px 14px 14px !important;
    }
    .wk-emerald-content {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
    }
    .wk-emerald-info {
        width: 100% !important;
        flex: 1 1 100% !important;
    }
    .wk-emerald-actions {
        width: 100% !important;
        justify-content: space-between !important;
    }
    .wk-emerald-code-chip {
        flex: 1 1 auto !important;
        justify-content: center !important;
    }
    .wk-coupon-banner .wk-coupon-apply-btn {
        flex: 1 1 auto !important;
    }
}
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --------------------------------------------------------------------------
   STYLE 1 : TICKET VIP (DÉCOUPÉ GOLD / AMBER)
   -------------------------------------------------------------------------- */
.wk-coupon-ticket {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(254, 243, 199, 0.4) 50%, rgba(245, 158, 11, 0.1) 100%);
    border: 2px dashed #f59e0b;
    border-radius: 16px;
    padding: 16px 18px;
    position: relative;
    box-shadow: 0 4px 16px -4px rgba(245, 158, 11, 0.15);
}

.wk-ticket-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.wk-ticket-badge {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(217, 119, 6, 0.3);
    flex-shrink: 0;
}

.wk-ticket-badge-sub {
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    line-height: 1;
}

.wk-ticket-badge-val {
    font-family: var(--wd-title-font, "Urbanist", sans-serif);
    font-size: 14px;
    font-weight: 800;
    line-height: 1.1;
}

.wk-ticket-tag {
    font-size: 10.5px;
    font-weight: 800;
    text-transform: uppercase;
    padding: 2px 8px;
    background: #f59e0b;
    color: #ffffff;
    border-radius: 6px;
    display: inline-block;
    margin-bottom: 4px;
}

.wk-ticket-title {
    margin: 0 !important;
    font-family: var(--wd-title-font, "Urbanist", sans-serif) !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
}

.wk-ticket-sub {
    margin: 3px 0 0 0 !important;
    font-size: 12px !important;
    color: #78350f !important;
}

.wk-ticket-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wk-coupon-ticket .wk-coupon-chip {
    background: #ffffff;
    border: 1px solid #fcd34d;
    padding: 7px 12px;
    border-radius: 10px;
    font-family: monospace;
    font-weight: 800;
    font-size: 13.5px;
    color: #78350f;
    cursor: pointer;
}

.wk-coupon-ticket .wk-coupon-apply-btn {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(217, 119, 6, 0.25);
}

/* --------------------------------------------------------------------------
   STYLE 3 : CYBER HIGH-TECH (GAMER / DARK MODE)
   -------------------------------------------------------------------------- */
.wk-coupon-cyber {
    background: #0f172a;
    border: 1px solid rgba(99, 102, 241, 0.4);
    border-radius: 16px;
    padding: 16px 18px;
    color: #ffffff;
    position: relative;
    box-shadow: 0 6px 24px -4px rgba(15, 23, 42, 0.6);
    overflow: hidden;
}

.wk-cyber-inner {
    position: relative;
    z-index: 2;
}

.wk-cyber-main {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}

.wk-cyber-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #ffffff;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
    flex-shrink: 0;
}

.wk-cyber-tags {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.wk-cyber-tag {
    font-size: 10px;
    font-weight: 800;
    font-family: monospace;
    padding: 2px 7px;
    background: rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.4);
    border-radius: 4px;
}

.wk-cyber-saving {
    font-size: 11px;
    font-weight: 800;
    color: #fbbf24;
}

.wk-cyber-title {
    margin: 0 !important;
    font-family: var(--wd-title-font, "Urbanist", sans-serif) !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
}

.wk-cyber-sub {
    margin: 3px 0 0 0 !important;
    font-size: 12px !important;
    color: #cbd5e1 !important;
}

.wk-cyber-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-end;
}

.wk-cyber-chip {
    background: #1e293b;
    border: 1px solid #334155;
    padding: 7px 12px;
    border-radius: 10px;
    font-family: monospace;
    font-weight: 800;
    font-size: 13.5px;
    color: #a5b4fc;
    cursor: pointer;
}

.wk-btn-cyber {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

/* --------------------------------------------------------------------------
   RESPONSIVE COUPON BANNERS
   -------------------------------------------------------------------------- */
@media (max-width: 600px) {
    .wk-emerald-content,
    .wk-ticket-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .wk-emerald-actions,
    .wk-ticket-right,
    .wk-cyber-actions {
        width: 100%;
        justify-content: space-between;
    }
    .wk-coupon-apply-btn {
        flex: 1;
    }
}
