/**
 * Proostlijst Shop Integration v4 Styling
 * Ultra-specifieke selectors voor Woodmart thema compatibiliteit
 */

/* ==========================================
   CSS VARS
   ========================================== */
.pl-shop-intro,
.pl-shop-panel,
.pl-shop-toast,
.pl-shop-single-btn-wrapper {
    --pl-bordeaux: #722F37;
    --pl-bordeaux-donker: #5a252c;
    --pl-bordeaux-licht: #9f3d4c;
    --pl-bordeaux-subtiel: #f5eced;
}

/* ==========================================
   SVG RESET
   ========================================== */
.pl-shop-btn svg,
.pl-shop-panel svg,
.pl-shop-intro svg,
.pl-shop-toast svg,
.pl-shop-single-btn-wrapper svg {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    vertical-align: middle;
    fill: none;
    flex-shrink: 0;
    pointer-events: none;
}

.pl-shop-panel-icoon svg { fill: currentColor; stroke: none; }


/* ==========================================
   INTRO BANNER
   ========================================== */
.pl-shop-intro {
    background: linear-gradient(135deg, #faf8f6 0%, #f5eced 100%);
    border: 1px solid #e8d5d8;
    border-radius: 12px;
    padding: 20px 24px;
    margin: 0 0 24px;
    font-family: 'Lato', -apple-system, sans-serif;
}

.pl-shop-intro-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.pl-shop-intro-tekst h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.25rem;
    color: var(--pl-bordeaux) !important;
    margin: 0 0 4px;
    font-weight: 700;
}

.pl-shop-intro-tekst p {
    margin: 0;
    color: #6b6b6b !important;
    font-size: 0.9rem;
}

.pl-shop-intro-rechts {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.pl-shop-intro-stappen {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pl-shop-stap {
    font-size: 0.82rem;
    color: #999 !important;
    font-weight: 600;
}

.pl-shop-stap-actief { color: var(--pl-bordeaux) !important; }

.pl-shop-stap-pijl { color: #ccc !important; font-size: 0.9rem; }

.pl-shop-intro-dashboard-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--pl-bordeaux) !important;
    color: #fff !important;
    font-family: 'Lato', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none !important;
    transition: background 0.25s ease;
    white-space: nowrap;
}

.pl-shop-intro-dashboard-link:hover {
    background: var(--pl-bordeaux-donker) !important;
    color: #fff !important;
}

.pl-shop-intro-logout {
    font-size: 0.82rem;
    color: #999 !important;
    text-decoration: none !important;
    transition: color 0.25s ease;
}

.pl-shop-intro-logout:hover {
    color: var(--pl-bordeaux) !important;
    text-decoration: underline !important;
}


/* ==========================================
   SELECTEER KNOP
   Woodmart zet agressieve kleuren op a, button,
   span, en zelfs pseudo-elements. Daarom overal
   explicit !important op elke tekst-dragende selector.
   ========================================== */
button.pl-shop-btn.pl-shop-btn-selecteer,
.pl-shop-btn.pl-shop-btn-selecteer,
.pl-shop-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 10px 20px !important;
    border: 2px solid #722F37 !important;
    background: #fff !important;
    color: #722F37 !important;
    font-family: 'Lato', -apple-system, sans-serif !important;
    font-size: 0.88rem !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: all 0.25s ease !important;
    text-decoration: none !important;
    line-height: 1.2 !important;
    box-shadow: none !important;
    white-space: nowrap !important;
    width: auto !important;
    min-width: 0 !important;
    text-transform: none !important;
    letter-spacing: 0.02em !important;
}

/* Tekst-spans expliciet kleuren (Woodmart override) */
button.pl-shop-btn-selecteer span,
.pl-shop-btn-selecteer span,
.pl-shop-btn-selecteer .pl-shop-btn-toevoegen,
.pl-shop-btn-selecteer .pl-shop-btn-geselecteerd {
    color: inherit !important;
    font-size: inherit !important;
    font-weight: inherit !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
}

/* SVG in default state */
button.pl-shop-btn-selecteer svg,
.pl-shop-btn-selecteer svg {
    stroke: #722F37 !important;
    width: 16px !important;
    height: 16px !important;
}

/* Hover state */
button.pl-shop-btn-selecteer:hover,
.pl-shop-btn-selecteer:hover {
    background: #722F37 !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(114, 47, 55, 0.25) !important;
    transform: translateY(-1px);
}

button.pl-shop-btn-selecteer:hover span,
.pl-shop-btn-selecteer:hover span {
    color: #fff !important;
}

button.pl-shop-btn-selecteer:hover svg,
.pl-shop-btn-selecteer:hover svg {
    stroke: #fff !important;
}

/* Disabled */
.pl-shop-btn:disabled {
    opacity: 0.6 !important;
    cursor: wait !important;
    transform: none !important;
}

/* GESELECTEERD — wit op bordeaux */
button.pl-shop-btn-selecteer.pl-geselecteerd,
.pl-shop-btn-selecteer.pl-geselecteerd {
    background: #722F37 !important;
    color: #fff !important;
    border-color: #722F37 !important;
}

button.pl-shop-btn-selecteer.pl-geselecteerd span,
.pl-shop-btn-selecteer.pl-geselecteerd span {
    color: #fff !important;
}

button.pl-shop-btn-selecteer.pl-geselecteerd svg,
.pl-shop-btn-selecteer.pl-geselecteerd svg {
    stroke: #fff !important;
}

button.pl-shop-btn-selecteer.pl-geselecteerd:hover,
.pl-shop-btn-selecteer.pl-geselecteerd:hover {
    background: #5a252c !important;
    border-color: #5a252c !important;
}

/* Tekst wissel logica */
.pl-shop-btn-selecteer:not(.pl-geselecteerd) .pl-shop-btn-geselecteerd {
    display: none !important;
}

.pl-shop-btn-selecteer.pl-geselecteerd .pl-shop-btn-toevoegen {
    display: none !important;
}

@keyframes pl-shop-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.pl-shop-btn-pulse { animation: pl-shop-pulse 0.4s ease !important; }

/* Aanvraag & uitverkocht */
.pl-shop-btn-aanvraag {
    border-color: #d4c9c3 !important;
    color: #6b6b6b !important;
    background: #faf8f6 !important;
    font-weight: 500 !important;
    font-style: italic;
}

.pl-shop-btn-aanvraag:hover {
    border-color: #722F37 !important;
    color: #722F37 !important;
    background: #fff !important;
}

.pl-shop-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 600;
}

.pl-shop-badge-uitverkocht {
    background: #f8d7da;
    color: #721c24 !important;
}


/* ==========================================
   SINGLE PRODUCT PAGINA KNOP
   ========================================== */
.pl-shop-single-btn-wrapper {
    margin: 20px 0 24px;
}

.pl-shop-single-btn-wrapper .pl-shop-btn {
    padding: 14px 32px !important;
    font-size: 1rem !important;
    border-radius: 10px !important;
}


/* ==========================================
   GAST PRODUCTPAGINA (via ?proostlijst=X)
   ========================================== */
.pl-gast-single-wrapper {
    margin: 20px 0 24px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

/* Terug naar Proostlijst link */
.pl-gast-single-terug {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.88rem;
    color: #722F37 !important;
    text-decoration: none !important;
    font-weight: 500;
    transition: opacity 0.2s ease;
    order: 2;
}

.pl-gast-single-terug:hover {
    opacity: 0.7;
}

.pl-gast-single-terug svg {
    stroke: #722F37 !important;
}

/* Cadeau doen knop */
.pl-gast-single-bestel {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 36px !important;
    background: #722F37 !important;
    color: #fff !important;
    font-family: 'Lato', sans-serif !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    border: none !important;
    border-radius: 10px !important;
    cursor: pointer !important;
    transition: all 0.25s ease !important;
    box-shadow: none !important;
    white-space: nowrap;
    order: 1;
}

.pl-gast-single-bestel:hover {
    background: #5a252c !important;
    box-shadow: 0 4px 16px rgba(114, 47, 55, 0.3) !important;
}

/* Status tekst */
.pl-gast-single-status {
    display: block;
    font-size: 0.9rem;
    color: #999;
    font-style: italic;
    padding: 12px 0;
}

/* Gast modal op productpagina — hergebruikt gastenpagina modal classes */
.pl-gast-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

body.pl-gast-modal-open { overflow: hidden; }

.pl-gast-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.pl-gast-modal-inhoud {
    position: relative;
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.pl-gast-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e8e0dc;
}

.pl-gast-modal-header h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.15rem;
    color: #722F37;
    margin: 0;
    font-weight: 600;
}

.pl-gast-modal-sluit {
    width: 32px; height: 32px;
    border: none !important;
    background: transparent !important;
    color: #6b6b6b !important;
    border-radius: 50% !important;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    box-shadow: none !important;
}

.pl-gast-modal-sluit:hover {
    background: #faf8f6 !important;
    color: #722F37 !important;
}

.pl-gast-modal-body { padding: 20px 24px 24px; }

.pl-gast-modal-veld { margin-bottom: 16px; }

.pl-gast-modal-veld label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #2c2c2c;
    margin-bottom: 6px;
}

.pl-gast-optioneel {
    font-weight: 400;
    color: #999;
    font-size: 0.8rem;
}

.pl-gast-aantal-wrapper {
    display: flex;
    align-items: center;
    width: fit-content;
    border: 1.5px solid #e8e0dc;
    border-radius: 8px;
    overflow: hidden;
}

.pl-gast-aantal-btn {
    width: 40px; height: 40px;
    border: none !important;
    background: #faf8f6 !important;
    color: #2c2c2c !important;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    box-shadow: none !important;
}

.pl-gast-aantal-btn:hover { background: #e8e0dc !important; }

.pl-gast-aantal-input {
    width: 50px; height: 40px;
    border: none;
    border-left: 1px solid #e8e0dc;
    border-right: 1px solid #e8e0dc;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    color: #2c2c2c;
    background: #fff;
    outline: none;
    -moz-appearance: textfield;
}

.pl-gast-aantal-input::-webkit-outer-spin-button,
.pl-gast-aantal-input::-webkit-inner-spin-button { -webkit-appearance: none; }

.pl-gast-modal-veld textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #e8e0dc;
    border-radius: 8px;
    font-family: 'Lato', sans-serif;
    font-size: 0.9rem;
    color: #2c2c2c;
    resize: vertical;
    outline: none;
}

.pl-gast-modal-veld textarea:focus { border-color: #722F37; }
.pl-gast-modal-veld textarea::placeholder { color: #bbb; }

.pl-gast-modal-fout {
    background: #fdf0f0;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    padding: 10px 14px;
    color: #721c24;
    font-size: 0.85rem;
    margin-bottom: 14px;
}

.pl-gast-btn-toevoegen {
    width: 100%;
    padding: 14px 24px !important;
    background: #722F37 !important;
    color: #fff !important;
    font-family: 'Lato', sans-serif !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    border: none !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    box-shadow: none !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.pl-gast-btn-toevoegen:hover:not(:disabled) { background: #5a252c !important; }
.pl-gast-btn-toevoegen:disabled { opacity: 0.7 !important; cursor: wait !important; }

.pl-gast-modal-hint {
    text-align: center;
    font-size: 0.78rem;
    color: #999;
    margin: 12px 0 0;
    font-style: italic;
}

/* Cart bar (ook op productpagina) */
.pl-gast-cart-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: #722F37;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
}

.pl-gast-cart-bar-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.pl-gast-cart-bar-tekst {
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 0.9rem;
}

.pl-gast-btn-afrekenen {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    padding: 10px 24px !important;
    background: #fff !important;
    color: #722F37 !important;
    font-family: 'Lato', sans-serif !important;
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    border: none !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    white-space: nowrap;
    box-shadow: none !important;
}

.pl-gast-btn-afrekenen:hover {
    background: #faf8f6 !important;
}


/* ==========================================
   VERBERG DOKAN "Add to my store" KNOP
   (het oude aanvinksysteem voor ingelogde vendors)
   ========================================== */
.dokan-store-products-filter-area form,
form.dokan-form-container button[name="add_to_my_store"],
.dokan-product-add-to-store,
input[name="add_to_my_store"],
button[name="add_to_my_store"] {
    display: none !important;
}


/* ==========================================
   TOAST
   ========================================== */
.pl-shop-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: #2c2c2c;
    color: #fff !important;
    padding: 14px 28px;
    border-radius: 8px;
    font-family: 'Lato', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 10001;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    max-width: 90vw;
    text-align: center;
}

.pl-shop-toast-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}


/* ==========================================
   FLOATING PANEL
   ========================================== */
.pl-shop-panel {
    position: fixed;
    bottom: -100%;
    left: 50%;
    transform: translateX(-50%);
    width: 94%;
    max-width: 640px;
    background: #fff;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12);
    z-index: 9999;
    transition: bottom 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid #e8e0dc;
    border-bottom: none;
    font-family: 'Lato', -apple-system, sans-serif;
}

.pl-shop-panel.pl-shop-panel-zichtbaar { bottom: 0; }

.pl-shop-panel-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    cursor: pointer;
}

.pl-shop-panel-icoon {
    color: #722F37;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.pl-shop-panel-tekst {
    flex: 1;
    font-size: 0.95rem;
    color: #2c2c2c !important;
}

.pl-shop-panel-tekst strong {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.15rem;
    color: #722F37 !important;
    margin-right: 4px;
}

/* RONDE toggle */
.pl-shop-panel-toggle {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    max-width: 36px !important;
    max-height: 36px !important;
    border: none !important;
    background: #f5eced !important;
    color: #722F37 !important;
    border-radius: 50% !important;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s ease, background 0.25s ease;
    flex-shrink: 0;
    padding: 0 !important;
    box-shadow: none !important;
}

.pl-shop-panel-open .pl-shop-panel-toggle { transform: rotate(180deg); }

.pl-shop-panel-toggle:hover {
    background: #722F37 !important;
    color: #fff !important;
}

.pl-shop-panel-toggle svg { stroke: currentColor !important; }

/* Lijst */
.pl-shop-panel-lijst {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border-top: 1px solid #f0ebe8;
}

.pl-shop-panel-open .pl-shop-panel-lijst {
    max-height: 320px;
    overflow-y: auto;
}

.pl-shop-panel-items { padding: 12px 20px; }

.pl-shop-panel-leeg {
    text-align: center;
    padding: 20px;
    color: #999 !important;
    font-style: italic;
}

.pl-shop-panel-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f0ebe8;
}

.pl-shop-panel-item:last-child { border-bottom: none; }

.pl-shop-panel-item-afb {
    width: 44px; height: 44px;
    border-radius: 6px;
    overflow: hidden;
    background: #faf8f6;
    flex-shrink: 0;
}

.pl-shop-panel-item-afb img { width: 100%; height: 100%; object-fit: contain; }

.pl-shop-panel-item-info { flex: 1; min-width: 0; }

.pl-shop-panel-item-naam {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #2c2c2c !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pl-shop-panel-item-prijs {
    display: block;
    font-size: 0.78rem;
    color: #6b6b6b !important;
    margin-top: 2px;
}

/* RONDE verwijder */
.pl-shop-panel-item-verwijder {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    min-height: 28px !important;
    max-width: 28px !important;
    max-height: 28px !important;
    border: none !important;
    background: transparent !important;
    color: #999 !important;
    cursor: pointer;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    flex-shrink: 0;
    padding: 0 !important;
    box-shadow: none !important;
}

.pl-shop-panel-item-verwijder:hover {
    background: #f5eced !important;
    color: #722F37 !important;
}

.pl-shop-panel-item-verwijder svg { stroke: currentColor !important; }

/* Panel actie + logout */
.pl-shop-panel-actie {
    padding: 12px 20px 16px;
    border-top: 1px solid #f0ebe8;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.pl-shop-btn-verder {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 24px !important;
    background: #722F37 !important;
    color: #fff !important;
    font-family: 'Lato', sans-serif !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    border: none !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    cursor: pointer;
    transition: background 0.25s ease;
}

.pl-shop-btn-verder:hover {
    background: #5a252c !important;
    color: #fff !important;
}

.pl-shop-btn-verder svg { stroke: #fff !important; }

.pl-shop-panel-logout {
    font-size: 0.8rem;
    color: #999 !important;
    text-decoration: none !important;
    transition: color 0.25s ease;
}

.pl-shop-panel-logout:hover {
    color: #722F37 !important;
    text-decoration: underline !important;
}

@keyframes pl-shop-shake {
    0%, 100% { transform: translateX(-50%); }
    20%, 60% { transform: translateX(calc(-50% - 6px)); }
    40%, 80% { transform: translateX(calc(-50% + 6px)); }
}

.pl-shop-panel-shake { animation: pl-shop-shake 0.5s ease; }


/* ==========================================
   SCROLLBAR
   ========================================== */
.pl-shop-panel-lijst::-webkit-scrollbar { width: 6px; }
.pl-shop-panel-lijst::-webkit-scrollbar-track { background: transparent; }
.pl-shop-panel-lijst::-webkit-scrollbar-thumb { background: #e8e0dc; border-radius: 3px; }


/* ==========================================
   RESPONSIEF
   ========================================== */
@media (max-width: 768px) {
    .pl-shop-intro { padding: 16px 18px; }
    .pl-shop-intro-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
    .pl-shop-intro-tekst h3 { font-size: 1.1rem; }
    .pl-shop-intro-rechts { width: 100%; justify-content: space-between; }
    .pl-shop-single-btn-wrapper .pl-shop-btn { width: 100% !important; justify-content: center; }
}

@media (max-width: 480px) {
    .pl-shop-intro-stappen { display: none; }
}
