/* ═══════════════════════════════════════════════
   PGWP Shop – Frontend Styles
   ═══════════════════════════════════════════════ */

/* Reset */
.pgwp-shop *, .pgwp-checkout *, .pgwp-thankyou * {
    box-sizing: border-box;
}

/* ─── BUTTONS ─── */
.pgwp-btn {
    display: inline-block;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: all .2s;
    line-height: 1.4;
}
.pgwp-btn-primary { background: #0f172a; color: #fff; }
.pgwp-btn-primary:hover { background: #1e293b; color: #fff; }
.pgwp-btn-secondary { background: #f1f5f9; color: #0f172a; border: 1px solid #e2e8f0; }
.pgwp-btn-secondary:hover { background: #e2e8f0; color: #0f172a; }
.pgwp-btn-test { background: #fef3c7; color: #92400e; border: 2px solid #f59e0b; }
.pgwp-btn-test:hover { background: #fde68a; }
.pgwp-btn-large { font-size: 16px; padding: 14px 28px; width: 100%; }
.pgwp-btn-small { font-size: 12px; padding: 6px 14px; }
.pgwp-btn-block { display: block; width: 100%; margin-bottom: 10px; }
.pgwp-btn:disabled { opacity: .5; cursor: not-allowed; }

/* ─── NOTICES ─── */
.pgwp-notice {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}
.pgwp-notice-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.pgwp-notice-warning { background: #fffbeb; color: #92400e; border: 1px solid #fed7aa; }
.pgwp-notice-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.pgwp-notice-test { background: #fef3c7; color: #92400e; border: 2px solid #f59e0b; }

/* ─── PRODUCTS GRID ─── */
.pgwp-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}
.pgwp-product-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow .2s;
}
.pgwp-product-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,.08);
}
.pgwp-product-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}
.pgwp-product-info {
    padding: 20px;
}
.pgwp-product-title {
    font-size: 18px;
    margin: 0 0 8px;
    color: #0f172a;
}
.pgwp-product-short-desc {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 16px;
    line-height: 1.5;
}
.pgwp-product-price {
    margin-bottom: 16px;
}
.pgwp-price-amount {
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
}
.pgwp-price-tax {
    display: block;
    font-size: 12px;
    color: #94a3b8;
}

/* ─── MINI CART ─── */
.pgwp-mini-cart {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #0f172a;
    color: #fff;
    padding: 12px 20px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,.2);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 9999;
    font-size: 14px;
    animation: pgwp-slide-up .3s ease-out;
}
.pgwp-mini-cart-count {
    background: #16a34a;
    color: #fff;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
}
@keyframes pgwp-slide-up {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* ─── CHECKOUT ─── */
.pgwp-checkout-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 32px;
    align-items: start;
}
@media (max-width: 768px) {
    .pgwp-checkout-grid { grid-template-columns: 1fr; }
    .pgwp-checkout-summary { order: -1; }
}

.pgwp-checkout-form h2 {
    font-size: 18px;
    margin: 24px 0 12px;
    color: #0f172a;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
}
.pgwp-checkout-form h2:first-child { margin-top: 0; }

/* Form fields */
.pgwp-form-row { margin-bottom: 12px; }
.pgwp-form-row.pgwp-2col { display: flex; gap: 12px; }
.pgwp-form-row.pgwp-2col-wide { display: flex; gap: 12px; }
.pgwp-form-row.pgwp-2col .pgwp-form-field { flex: 1; }
.pgwp-form-field { margin-bottom: 4px; }
.pgwp-form-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 4px;
}
.pgwp-form-field input,
.pgwp-form-field select {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    transition: border-color .2s;
}
.pgwp-form-field input:focus,
.pgwp-form-field select:focus {
    border-color: #0f172a;
    outline: none;
    box-shadow: 0 0 0 3px rgba(15,23,42,.08);
}
.pgwp-form-field input.pgwp-error { border-color: #dc2626; }
.pgwp-form-field .pgwp-help { font-size: 12px; color: #94a3b8; margin-top: 4px; }

/* Payment methods */
.pgwp-payment-methods { display: flex; flex-direction: column; gap: 8px; }
.pgwp-payment-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: all .2s;
}
.pgwp-payment-option:has(input:checked) {
    border-color: #0f172a;
    background: #f8fafc;
}
.pgwp-payment-option input { margin: 0; }
.pgwp-payment-label strong { display: block; font-size: 14px; }
.pgwp-payment-label span { font-size: 12px; color: #64748b; }

/* Consents */
.pgwp-consents { margin-bottom: 20px; }
.pgwp-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 0;
    font-size: 13px;
    line-height: 1.5;
    color: #475569;
    border-bottom: 1px solid #f1f5f9;
}
.pgwp-consent input { margin-top: 3px; flex-shrink: 0; }
.pgwp-consent a { color: #0f172a; text-decoration: underline; }

/* ─── ORDER SUMMARY ─── */
.pgwp-summary-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    position: sticky;
    top: 32px;
}
.pgwp-summary-box h3 {
    font-size: 16px;
    margin: 0 0 16px;
    color: #0f172a;
}
.pgwp-summary-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 0;
    border-bottom: 1px solid #e2e8f0;
}
.pgwp-summary-item-info { flex: 1; }
.pgwp-summary-item-info strong { font-size: 14px; display: block; }
.pgwp-summary-qty { font-size: 12px; color: #64748b; }
.pgwp-summary-item-price { font-weight: 600; font-size: 14px; }
.pgwp-remove-item {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 18px;
    padding: 0 4px;
}
.pgwp-remove-item:hover { color: #dc2626; }

.pgwp-summary-totals { margin-top: 16px; }
.pgwp-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 14px;
    color: #475569;
}
.pgwp-summary-total {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    padding-top: 12px;
    margin-top: 8px;
    border-top: 2px solid #0f172a;
}
.pgwp-summary-klein { font-size: 11px; color: #94a3b8; margin-top: 4px; }
.pgwp-back-link {
    display: block;
    text-align: center;
    margin-top: 16px;
    font-size: 13px;
    color: #64748b;
    text-decoration: none;
}
.pgwp-back-link:hover { color: #0f172a; }

/* ─── THANK YOU ─── */
.pgwp-thankyou-header {
    text-align: center;
    padding: 40px 20px;
}
.pgwp-thankyou-icon { font-size: 48px; margin-bottom: 12px; }
.pgwp-thankyou-header h1 { font-size: 24px; color: #0f172a; margin-bottom: 8px; }
.pgwp-thankyou-nr { font-size: 14px; color: #64748b; }

.pgwp-thankyou-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
@media (max-width: 768px) {
    .pgwp-thankyou-grid { grid-template-columns: 1fr; }
}
.pgwp-thankyou-items,
.pgwp-thankyou-actions {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
}
.pgwp-thankyou-items h3,
.pgwp-thankyou-actions h3 { margin: 0 0 16px; font-size: 16px; }
.pgwp-thankyou-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e2e8f0;
    font-size: 14px;
}
.pgwp-thankyou-total { border-top: 2px solid #0f172a; border-bottom: none; padding-top: 12px; margin-top: 4px; }

/* License display */
.pgwp-license-display {
    background: #1e293b;
    border-radius: 8px;
    padding: 16px;
    margin-top: 16px;
}
.pgwp-license-display h4 { color: #fff; margin: 0 0 8px; font-size: 14px; }
.pgwp-license-key {
    display: block;
    background: #0f172a;
    color: #34d399;
    padding: 10px;
    border-radius: 6px;
    font-size: 11px;
    word-break: break-all;
    line-height: 1.6;
    cursor: text;
    user-select: all;
}
.pgwp-license-display .pgwp-help { color: #94a3b8; margin-top: 8px; font-size: 12px; }

/* ─── SINGLE PRODUCT ─── */
.pgwp-single-product {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}
@media (max-width: 768px) {
    .pgwp-single-product { grid-template-columns: 1fr; }
}
.pgwp-gallery-main img {
    width: 100%;
    border-radius: 12px;
}
.pgwp-gallery-thumbs {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}
.pgwp-thumb {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color .2s;
}
.pgwp-thumb:hover { border-color: #0f172a; }
.pgwp-product-price-large {
    font-size: 32px;
    font-weight: 700;
    color: #0f172a;
    margin: 16px 0;
}
.pgwp-product-long-desc { font-size: 15px; line-height: 1.7; color: #475569; margin-bottom: 24px; }

/* ─── LOADING ─── */
.pgwp-loading {
    position: relative;
    pointer-events: none;
    opacity: .7;
}
.pgwp-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px;
    border: 3px solid #e2e8f0;
    border-top-color: #0f172a;
    border-radius: 50%;
    animation: pgwp-spin .6s linear infinite;
}
@keyframes pgwp-spin { to { transform: rotate(360deg); } }
