/* ── Digital Products Plugin ─────────────────────────────────────────────── */

/* Grid */
.dp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 28px;
    padding: 12px 0 32px;
}

/* Card */
.dp-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
    transition: transform .2s ease, box-shadow .2s ease;
    display: flex;
    flex-direction: column;
}
.dp-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(0,0,0,.14);
}

/* Cover */
.dp-cover {
    position: relative;
    width: 100%;
    height: 240px;
    overflow: hidden;
    background: #f0f0f0;
}
.dp-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.dp-cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e8e8f8 0%, #d8d8f0 100%);
    color: #aaa;
}
.dp-cover-placeholder svg {
    width: 64px;
    height: 64px;
    opacity: .4;
}
.dp-free-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #4f46e5;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
}

/* Body */
.dp-body {
    padding: 16px 18px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.dp-title {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 8px;
    line-height: 1.3;
}
.dp-desc {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    margin: 0 0 16px;
    flex: 1;
}

/* Download button */
.dp-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #4f46e5;
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .18s ease;
    width: 100%;
    justify-content: center;
    margin-top: auto;
}
.dp-download-btn:hover { background: #3730c8; }
.dp-download-btn svg { flex-shrink: 0; }

/* ── Modal ────────────────────────────────────────────────────────────────── */
.dp-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: dp-fade-in .18s ease;
}
@keyframes dp-fade-in { from { opacity: 0 } to { opacity: 1 } }

.dp-modal {
    background: #fff;
    border-radius: 14px;
    padding: 40px 36px 36px;
    max-width: 420px;
    width: 100%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
    animation: dp-slide-up .2s ease;
}
@keyframes dp-slide-up {
    from { opacity: 0; transform: translateY(16px) }
    to   { opacity: 1; transform: translateY(0) }
}

.dp-modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    font-size: 26px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 4px;
    transition: color .15s;
}
.dp-modal-close:hover { color: #333; }

.dp-modal-icon {
    text-align: center;
    color: #4f46e5;
    margin-bottom: 16px;
}
.dp-modal-heading {
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 8px;
}
.dp-modal-subtext {
    text-align: center;
    color: #666;
    font-size: 14px;
    margin: 0 0 24px;
    line-height: 1.5;
}

.dp-modal-error {
    background: #fff5f5;
    border: 1px solid #fca5a5;
    color: #b91c1c;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 13px;
    margin-bottom: 16px;
}
.dp-modal-success {
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #166534;
    border-radius: 6px;
    padding: 14px 16px;
    font-size: 14px;
    margin-bottom: 8px;
    text-align: center;
    line-height: 1.5;
}

.dp-field { margin-bottom: 16px; }
.dp-field input[type="email"] {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 7px;
    font-size: 15px;
    outline: none;
    box-sizing: border-box;
    transition: border-color .15s;
}
.dp-field input[type="email"]:focus { border-color: #4f46e5; }

.dp-submit-btn {
    width: 100%;
    background: #4f46e5;
    color: #fff;
    border: none;
    padding: 13px;
    border-radius: 7px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background .18s;
}
.dp-submit-btn:hover:not(:disabled) { background: #3730c8; }
.dp-submit-btn:disabled { opacity: .65; cursor: not-allowed; }

.dp-privacy-note {
    text-align: center;
    font-size: 12px;
    color: #999;
    margin: 12px 0 0;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .dp-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 18px; }
    .dp-cover { height: 200px; }
    .dp-modal { padding: 32px 22px 28px; }
}
