/* WP Theme & Plugin Seller Pro — Public Styles */
:root {
    --wptps-primary:   #2271b1;
    --wptps-primary-h: #135e96;
    --wptps-success:   #00a32a;
    --wptps-danger:    #d63638;
    --wptps-text:      #1d2327;
    --wptps-muted:     #646970;
    --wptps-border:    #e0e0e0;
    --wptps-bg:        #f6f7f7;
    --wptps-card-bg:   #fff;
    --wptps-radius:    8px;
}

/* ── Products Grid ─────────────────────────────────────────────────────── */
.wptps-products {
    display: grid;
    gap: 24px;
}
.wptps-cols-3 { grid-template-columns: repeat(3, 1fr); }
.wptps-cols-2 { grid-template-columns: repeat(2, 1fr); }
.wptps-cols-1 { grid-template-columns: 1fr; }
@media (max-width: 900px) { .wptps-cols-3 { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 600px) { .wptps-cols-3,.wptps-cols-2 { grid-template-columns: 1fr; } }

.wptps-product-card {
    background: var(--wptps-card-bg);
    border: 1px solid var(--wptps-border);
    border-radius: var(--wptps-radius);
    overflow: hidden;
    position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    transition: transform .2s, box-shadow .2s;
}
.wptps-product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,.1);
}
.wptps-product-thumb img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}
.wptps-product-body { padding: 16px; }
.wptps-product-title { margin: 0 0 8px; font-size: 16px; }
.wptps-product-title a { color: var(--wptps-text); text-decoration: none; }
.wptps-product-title a:hover { color: var(--wptps-primary); }
.wptps-product-excerpt { color: var(--wptps-muted); font-size: 14px; margin: 0 0 12px; }
.wptps-product-meta { display: flex; gap: 12px; font-size: 13px; color: var(--wptps-muted); margin-bottom: 12px; }
.wptps-product-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Badges ────────────────────────────────────────────────────────────── */
.wptps-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1;
}
.wptps-badge-free { background: var(--wptps-success); color: #fff; }
.wptps-badge-paid { background: var(--wptps-primary); color: #fff; }

/* ── Buttons ────────────────────────────────────────────────────────────── */
.wptps-btn {
    display: inline-block;
    padding: 9px 18px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: background .15s;
    white-space: nowrap;
}
.wptps-btn-primary   { background: var(--wptps-primary); color: #fff; }
.wptps-btn-primary:hover { background: var(--wptps-primary-h); color: #fff; }
.wptps-btn-secondary { background: #f0f0f1; color: var(--wptps-text); border: 1px solid var(--wptps-border); }
.wptps-btn-secondary:hover { background: var(--wptps-border); }
.wptps-btn-large { padding: 12px 28px; font-size: 16px; }
.wptps-btn-full  { width: 100%; text-align: center; }
.wptps-btn:disabled { opacity: .6; cursor: not-allowed; }

/* ── Inputs ─────────────────────────────────────────────────────────────── */
.wptps-input {
    display: block;
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--wptps-border);
    border-radius: 5px;
    font-size: 15px;
    box-sizing: border-box;
    transition: border .15s;
}
.wptps-input:focus { outline: none; border-color: var(--wptps-primary); box-shadow: 0 0 0 2px rgba(34,113,177,.2); }

.wptps-field { margin-bottom: 16px; }
.wptps-field label { display: block; font-weight: 600; margin-bottom: 5px; font-size: 14px; }

/* ── Single Product ─────────────────────────────────────────────────────── */
.wptps-single-product { max-width: 1000px; margin: 0 auto; }
.wptps-product-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-bottom: 32px;
    background: var(--wptps-card-bg);
    border: 1px solid var(--wptps-border);
    border-radius: var(--wptps-radius);
    overflow: hidden;
}
.wptps-product-hero-image img { width: 100%; height: 300px; object-fit: cover; display: block; }
.wptps-product-hero-info { padding: 24px 24px 24px 0; }
.wptps-product-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; position: relative; }
.wptps-product-badges .wptps-badge { position: static; }
.wptps-version-badge, .wptps-downloads-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    background: var(--wptps-bg);
    color: var(--wptps-muted);
    border: 1px solid var(--wptps-border);
}
.wptps-price-display { font-size: 28px; font-weight: 800; color: var(--wptps-primary); margin-bottom: 12px; }
.wptps-buy-wrap, .wptps-free-download-wrap { display: flex; flex-direction: column; gap: 10px; }
.wptps-success-msg { color: var(--wptps-success); font-weight: 600; }

/* ── Tabs ───────────────────────────────────────────────────────────────── */
.wptps-tab-nav { display: flex; border-bottom: 2px solid var(--wptps-border); margin-bottom: 20px; }
.wptps-tab-btn {
    background: none;
    border: none;
    padding: 10px 20px;
    font-size: 15px;
    cursor: pointer;
    color: var(--wptps-muted);
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    font-weight: 500;
    transition: color .15s;
}
.wptps-tab-btn.active { color: var(--wptps-primary); border-bottom-color: var(--wptps-primary); }
.wptps-tab-content { display: none; }
.wptps-tab-content.active { display: block; }
.wptps-changelog { background: var(--wptps-bg); padding: 16px; border-radius: var(--wptps-radius); font-size: 14px; white-space: pre-wrap; }
.wptps-screenshots-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.wptps-screenshots-grid img { width: 100%; border-radius: 5px; border: 1px solid var(--wptps-border); }

/* ── Checkout ───────────────────────────────────────────────────────────── */
.wptps-checkout-wrap { max-width: 560px; margin: 0 auto; }
.wptps-checkout-product {
    display: flex;
    gap: 16px;
    background: var(--wptps-card-bg);
    border: 1px solid var(--wptps-border);
    border-radius: var(--wptps-radius);
    padding: 16px;
    margin-bottom: 24px;
    align-items: center;
}
.wptps-checkout-thumb img { width: 80px; height: 60px; object-fit: cover; border-radius: 5px; }
.wptps-checkout-price { font-size: 20px; font-weight: 700; color: var(--wptps-primary); margin-top: 6px; }
.wptps-checkout-form {
    background: var(--wptps-card-bg);
    border: 1px solid var(--wptps-border);
    border-radius: var(--wptps-radius);
    padding: 24px;
}
.wptps-coupon-row { display: flex; gap: 8px; }
.wptps-coupon-row .wptps-input { flex: 1; }
.wptps-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-top: 1px solid var(--wptps-border);
    margin-bottom: 16px;
}
.wptps-total-amount { font-size: 20px; font-weight: 700; color: var(--wptps-primary); }
.wptps-secure-note { text-align: center; color: var(--wptps-muted); font-size: 13px; margin-top: 12px; }

/* ── Notices ────────────────────────────────────────────────────────────── */
.wptps-notice {
    padding: 10px 14px;
    border-radius: 5px;
    margin-bottom: 14px;
    font-size: 14px;
}
.wptps-notice.success { background: #edfaef; color: var(--wptps-success); border: 1px solid #b8e6c1; }
.wptps-notice.error   { background: #fef0f0; color: var(--wptps-danger); border: 1px solid #f5c2c2; }
.wptps-notice.info    { background: #f0f6ff; color: var(--wptps-primary); border: 1px solid #c0d9f5; }

/* ── Modal ──────────────────────────────────────────────────────────────── */
.wptps-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.6);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.wptps-modal-content {
    background: #fff;
    border-radius: var(--wptps-radius);
    padding: 32px;
    max-width: 460px;
    width: 90%;
    text-align: center;
    box-shadow: 0 12px 48px rgba(0,0,0,.2);
}
.wptps-modal-content h3 { margin-top: 0; font-size: 22px; }
.wptps-modal-content .wptps-btn { margin: 6px; }

/* ── Dashboard ──────────────────────────────────────────────────────────── */
.wptps-dashboard { max-width: 900px; margin: 0 auto; }
.wptps-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--wptps-card-bg);
    border: 1px solid var(--wptps-border);
    border-radius: var(--wptps-radius);
    padding: 20px;
    margin-bottom: 20px;
}
.wptps-user-info { display: flex; gap: 16px; align-items: center; }
.wptps-user-info img { border-radius: 50%; }
.wptps-dashboard-stats {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}
.wptps-dash-stat {
    flex: 1;
    background: var(--wptps-card-bg);
    border: 1px solid var(--wptps-border);
    border-radius: var(--wptps-radius);
    padding: 20px;
    text-align: center;
}
.wptps-dash-stat strong { display: block; font-size: 32px; color: var(--wptps-primary); }
.wptps-dash-stat span { color: var(--wptps-muted); font-size: 14px; }

.wptps-dashboard-section {
    background: var(--wptps-card-bg);
    border: 1px solid var(--wptps-border);
    border-radius: var(--wptps-radius);
    padding: 20px;
    margin-bottom: 20px;
}
.wptps-dashboard-section h3 { margin-top: 0; }

.wptps-order-item {
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--wptps-border);
}
.wptps-order-item:last-child { border-bottom: none; }
.wptps-order-thumb img { width: 70px; height: 50px; object-fit: cover; border-radius: 5px; }
.wptps-order-info { flex: 1; }
.wptps-order-info h4 { margin: 0 0 4px; }
.wptps-order-meta { font-size: 13px; color: var(--wptps-muted); margin: 0 0 4px; display: flex; gap: 12px; }
.wptps-license-row { font-size: 13px; margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wptps-license-row code { background: var(--wptps-bg); padding: 2px 6px; border-radius: 3px; font-size: 12px; }

.wptps-status { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.wptps-status-active, .wptps-status-completed { background: #edfaef; color: var(--wptps-success); }
.wptps-status-expired { background: #f0f0f1; color: var(--wptps-muted); }

.wptps-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.wptps-table th, .wptps-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--wptps-border); }
.wptps-table th { font-weight: 600; background: var(--wptps-bg); }

/* ── Auth forms ─────────────────────────────────────────────────────────── */
.wptps-auth-form {
    max-width: 400px;
    margin: 0 auto 24px;
    background: var(--wptps-card-bg);
    border: 1px solid var(--wptps-border);
    border-radius: var(--wptps-radius);
    padding: 28px;
}
.wptps-auth-form h3 { margin-top: 0; }

/* ── Empty ──────────────────────────────────────────────────────────────── */
.wptps-empty { text-align: center; padding: 32px 16px; color: var(--wptps-muted); }
