/* ====================================================================
   Product Deal Manager — Stylesheet
   ==================================================================== */

/* ---- RESET & BASE ---- */
#pdm-wrapper *, .pdm-form-wrap *, .pdm-admin-wrap * { box-sizing: border-box; }

/* ====================================================================
   CSS VARIABLES
   ==================================================================== */
:root {
    --pdm-primary:    #f97316;
    --pdm-primary-dk: #ea6c0a;
    --pdm-success:    #16a34a;
    --pdm-danger:     #dc2626;
    --pdm-warn:       #d97706;
    --pdm-info:       #2563eb;
    --pdm-bg:         #f8f9fb;
    --pdm-card-bg:    #ffffff;
    --pdm-border:     #e5e7eb;
    --pdm-text:       #1f2937;
    --pdm-muted:      #6b7280;
    --pdm-radius:     14px;
    --pdm-shadow:     0 2px 16px rgba(0,0,0,.08);
    --pdm-shadow-h:   0 6px 28px rgba(0,0,0,.14);
}

/* ====================================================================
   DEALS GRID WRAPPER
   ==================================================================== */
#pdm-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--pdm-text);
}

/* ---- FILTER BAR ---- */
.pdm-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 24px;
    padding: 16px 20px;
    background: #fff;
    border-radius: var(--pdm-radius);
    border: 1px solid var(--pdm-border);
    box-shadow: var(--pdm-shadow);
}

.pdm-search-wrap { flex: 1; min-width: 200px; }

.pdm-search-input {
    width: 100%;
    padding: 10px 16px;
    border: 1.5px solid var(--pdm-border);
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color .2s;
}
.pdm-search-input:focus { border-color: var(--pdm-primary); }

.pdm-filter-wrap { display: flex; gap: 10px; flex-wrap: wrap; }

.pdm-select {
    padding: 10px 12px;
    border: 1.5px solid var(--pdm-border);
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    cursor: pointer;
    outline: none;
    transition: border-color .2s;
}
.pdm-select:focus { border-color: var(--pdm-primary); }

/* ---- GRID ---- */
.pdm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

/* ====================================================================
   DEAL CARD — Modern redesign
   ==================================================================== */
.pdm-card {
    background: #fff;
    border-radius: 16px;
    border: 1.5px solid #f0f0f0;
    box-shadow: 0 1px 8px rgba(0,0,0,.06);
    overflow: hidden;
    transition: box-shadow .22s ease, transform .22s ease, border-color .22s;
    position: relative;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}
.pdm-card:hover {
    box-shadow: 0 8px 32px rgba(0,0,0,.13);
    transform: translateY(-4px);
    border-color: #ffe0c7;
}
.pdm-card:focus {
    outline: 2px solid var(--pdm-primary);
    outline-offset: 2px;
}

.pdm-card-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
}

.pdm-badge-disc {
    display: inline-block;
    width: fit-content;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 20px;
    letter-spacing: .4px;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(220,38,38,.35);
}

.pdm-badge-expiry {
    display: inline-block;
    width: fit-content;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
    white-space: nowrap;
}
.pdm-badge-expiry.urgent { background: #fee2e2; color: var(--pdm-danger); }
.pdm-badge-expiry.warn   { background: #fef3c7; color: var(--pdm-warn); }

.pdm-card-img-wrap {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(145deg, #fafafa, #f3f4f6);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-bottom: 1px solid #f0f0f0;
}

.pdm-card-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
    transition: transform .35s cubic-bezier(.34,1.56,.64,1);
}
.pdm-card:hover .pdm-card-img { transform: scale(1.07); }

.pdm-no-img {
    font-size: 52px;
    opacity: .25;
}

.pdm-card-body {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0;
}

.pdm-card-brand,
.pdm-card-shop {
    font-size: 10px;
    font-weight: 700;
    color: var(--pdm-primary);
    text-transform: uppercase;
    letter-spacing: .8px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.pdm-card-title {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
    line-height: 1.45;
    margin: 0 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: calc(1.45em * 2);
}

.pdm-card-desc {
    font-size: 12px;
    color: var(--pdm-muted);
    margin: 0 0 10px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pdm-card-prices {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 0 0 10px;
}

.pdm-price-regular {
    font-size: 12px;
    color: #9ca3af;
    text-decoration: line-through;
    font-weight: 500;
}
.pdm-price-selling {
    font-size: 22px;
    font-weight: 800;
    color: #111827;
    letter-spacing: -.3px;
}
.pdm-price-save {
    font-size: 11px;
    color: var(--pdm-success);
    font-weight: 700;
    background: #dcfce7;
    padding: 2px 7px;
    border-radius: 20px;
}

.pdm-btn-buynow {
    display: block;
    width: 100%;
    padding: 12px 16px;
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: #fff !important;
    text-align: center;
    border-radius: 12px;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none !important;
    transition: all .2s ease;
    margin-top: auto;
    cursor: pointer;
    border: none;
    box-shadow: 0 3px 10px rgba(249,115,22,.35);
    letter-spacing: .2px;
}
.pdm-btn-buynow:hover {
    background: linear-gradient(135deg, #ea580c, #c2410c);
    transform: translateY(-1px);
    box-shadow: 0 5px 16px rgba(249,115,22,.45);
    color: #fff !important;
}
.pdm-btn-buynow:active { transform: translateY(0); }

/* ---- LOADER / EMPTY ---- */
.pdm-loader {
    text-align: center;
    padding: 48px 20px;
    color: var(--pdm-muted);
}
.pdm-spinner {
    display: inline-block;
    width: 36px; height: 36px;
    border: 3px solid #e5e7eb;
    border-top-color: var(--pdm-primary);
    border-radius: 50%;
    animation: pdm-spin .7s linear infinite;
    margin-bottom: 12px;
}
@keyframes pdm-spin { to { transform: rotate(360deg); } }

.pdm-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--pdm-muted);
    font-size: 16px;
}

.pdm-btn-secondary {
    padding: 12px 36px;
    background: #fff;
    border: 2px solid var(--pdm-primary);
    color: var(--pdm-primary);
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    font-size: 14px;
    transition: all .2s;
}
.pdm-btn-secondary:hover { background: var(--pdm-primary); color: #fff; }

/* ====================================================================
   DEAL FORM
   ==================================================================== */
.pdm-form-wrap {
    background: #fff;
    border-radius: var(--pdm-radius);
    border: 1px solid var(--pdm-border);
    box-shadow: var(--pdm-shadow);
    padding: 28px 32px;
    max-width: 700px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.pdm-form-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--pdm-text);
    margin: 0 0 24px;
}

/* ---- FETCH BOX ---- */
.pdm-fetch-box {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    border: 1.5px solid #fed7aa;
    border-radius: 12px;
    padding: 18px 20px 14px;
    margin-bottom: 8px;
}

.pdm-fetch-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
}

.pdm-fetch-icon { font-size: 24px; }
.pdm-fetch-header strong { display: block; font-size: 15px; color: var(--pdm-text); margin-bottom: 2px; }
.pdm-fetch-hint { font-size: 12px; color: var(--pdm-muted); margin: 0; }

.pdm-fetch-row { display: flex; gap: 8px; }

.pdm-fetch-input {
    flex: 1;
    padding: 10px 14px;
    border: 1.5px solid #fed7aa;
    border-radius: 8px;
    font-size: 13px;
    outline: none;
    background: #fff;
}
.pdm-fetch-input:focus { border-color: var(--pdm-primary); }

.pdm-btn-fetch {
    padding: 10px 18px;
    background: var(--pdm-primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    transition: background .2s;
}
.pdm-btn-fetch:hover { background: var(--pdm-primary-dk); }
.pdm-btn-fetch:disabled { opacity: .7; cursor: not-allowed; }

.pdm-fetch-spinner {
    display: inline-block;
    width: 14px; height: 14px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: pdm-spin .6s linear infinite;
}

.pdm-fetch-status {
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
}
.pdm-fetch-success { background: #dcfce7; color: var(--pdm-success); }
.pdm-fetch-error   { background: #fee2e2; color: var(--pdm-danger); }
.pdm-fetch-info    { background: #dbeafe; color: var(--pdm-info); }
.pdm-fetch-warn    { background: #fef3c7; color: var(--pdm-warn); }

.pdm-supported-sites {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center;
    font-size: 11px;
    color: var(--pdm-muted);
}

.pdm-site-badge {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    color: var(--pdm-text);
}

/* ---- DIVIDER ---- */
.pdm-form-divider {
    text-align: center;
    position: relative;
    margin: 18px 0;
    color: var(--pdm-muted);
    font-size: 13px;
}
.pdm-form-divider::before, .pdm-form-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 42%;
    height: 1px;
    background: var(--pdm-border);
}
.pdm-form-divider::before { left: 0; }
.pdm-form-divider::after  { right: 0; }

/* ---- FORM FIELDS ---- */
.pdm-form-group { margin-bottom: 18px; }

.pdm-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--pdm-text);
    margin-bottom: 6px;
}

.pdm-req { color: var(--pdm-danger); margin-left: 2px; }
.pdm-hint { color: var(--pdm-muted); font-weight: 400; font-size: 12px; margin-left: 4px; }

.pdm-input, .pdm-textarea, .pdm-select {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--pdm-border);
    border-radius: 8px;
    font-size: 14px;
    color: var(--pdm-text);
    background: #fff;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    font-family: inherit;
}
.pdm-input:focus, .pdm-textarea:focus {
    border-color: var(--pdm-primary);
    box-shadow: 0 0 0 3px rgba(249,115,22,.1);
}
.pdm-textarea { resize: vertical; min-height: 90px; }

.pdm-form-row { display: flex; gap: 14px; }
.pdm-half { flex: 1; min-width: 0; }

/* Price with currency icon */
.pdm-input-icon-wrap { position: relative; }
.pdm-currency {
    position: absolute;
    left: 12px; top: 50%;
    transform: translateY(-50%);
    color: var(--pdm-muted);
    font-size: 15px;
    font-weight: 600;
    pointer-events: none;
}
.pdm-price-input { padding-left: 28px !important; }

/* Discount preview */
.pdm-discount-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: -8px 0 16px;
    padding: 8px 12px;
    background: #fef2f2;
    border-radius: 8px;
    border: 1px solid #fecaca;
}
.pdm-discount-badge {
    background: var(--pdm-danger);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 20px;
}
.pdm-discount-save { font-size: 13px; color: var(--pdm-success); font-weight: 600; }

/* Media tabs */
.pdm-media-tabs {
    display: flex;
    gap: 0;
    border: 1.5px solid var(--pdm-border);
    border-radius: 8px;
    overflow: hidden;
    width: fit-content;
    margin-bottom: 10px;
}
.pdm-tab-btn {
    padding: 7px 16px;
    border: none;
    background: #f9fafb;
    font-size: 13px;
    cursor: pointer;
    color: var(--pdm-muted);
    transition: all .15s;
}
.pdm-tab-btn + .pdm-tab-btn { border-left: 1.5px solid var(--pdm-border); }
.pdm-tab-active { background: var(--pdm-primary); color: #fff; font-weight: 600; }

.pdm-btn-outline {
    padding: 9px 18px;
    border: 1.5px solid var(--pdm-primary);
    background: #fff;
    color: var(--pdm-primary);
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 13px;
    transition: all .2s;
}
.pdm-btn-outline:hover { background: var(--pdm-primary); color: #fff; }

/* Image preview */
.pdm-img-preview-inner {
    display: inline-flex;
    align-items: flex-start;
    gap: 10px;
}
.pdm-img-preview {
    max-width: 160px;
    max-height: 160px;
    border-radius: 8px;
    border: 1px solid var(--pdm-border);
    object-fit: contain;
    background: #f3f4f6;
}
.pdm-remove-btn {
    width: 26px; height: 26px;
    border-radius: 50%;
    background: var(--pdm-danger);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 13px;
    display: flex; align-items: center; justify-content: center;
}

/* Submit button */
.pdm-btn-primary {
    display: block;
    width: 100%;
    padding: 14px;
    background: var(--pdm-primary);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s, transform .15s;
    margin-top: 8px;
}
.pdm-btn-primary:hover { background: var(--pdm-primary-dk); transform: translateY(-1px); }
.pdm-btn-primary:disabled { opacity: .7; cursor: not-allowed; transform: none; }

/* Form messages */
.pdm-form-message {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 16px;
}
.pdm-msg-success { background: #dcfce7; color: var(--pdm-success); border: 1px solid #86efac; }
.pdm-msg-error   { background: #fee2e2; color: var(--pdm-danger);  border: 1px solid #fca5a5; }
.pdm-msg-info    { background: #dbeafe; color: var(--pdm-info);    border: 1px solid #93c5fd; }

/* Brand wrap */
.pdm-brand-wrap { position: relative; }

/* ====================================================================
   ADMIN PANEL
   ==================================================================== */
.pdm-admin-wrap {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.pdm-admin-page-title {
    font-size: 22px !important;
    margin-bottom: 20px !important;
    color: #1f2937 !important;
}

.pdm-admin-form {
    max-width: 800px;
    margin: 0;
    border: 1px solid var(--pdm-border);
}

/* Toolbar */
.pdm-admin-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.pdm-admin-search-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pdm-admin-search { padding: 7px 12px; border: 1px solid var(--pdm-border); border-radius: 6px; font-size: 13px; }
.pdm-admin-filter-select { padding: 7px 10px; border: 1px solid var(--pdm-border); border-radius: 6px; font-size: 13px; }
.pdm-count-badge {
    margin-left: auto;
    background: #f1f5f9;
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 12px;
    color: var(--pdm-muted);
    font-weight: 600;
}

/* Table */
.pdm-admin-table { border-collapse: collapse; width: 100%; }
.pdm-admin-table th { background: #f8f9fb; font-size: 12px; font-weight: 700; padding: 10px 14px; text-align: left; }
.pdm-admin-table td { padding: 10px 14px; border-top: 1px solid var(--pdm-border); vertical-align: middle; font-size: 13px; }
.pdm-admin-table tr:hover td { background: #fafafa; }

.pdm-admin-thumb { width: 56px; height: 56px; object-fit: contain; border-radius: 8px; border: 1px solid var(--pdm-border); background: #f3f4f6; }
.pdm-admin-thumb-placeholder { width: 56px; height: 56px; border-radius: 8px; background: #f3f4f6; display: flex; align-items: center; justify-content: center; font-size: 24px; }

.pdm-admin-disc { background: #fee2e2; color: var(--pdm-danger); font-weight: 700; border-radius: 20px; padding: 2px 8px; font-size: 11px; }
.pdm-admin-link { font-size: 11px; color: var(--pdm-info); text-decoration: none; }
.pdm-admin-link:hover { text-decoration: underline; }

.pdm-expiry-urgent { color: var(--pdm-danger); font-weight: 600; }
.pdm-expiry-warn   { color: var(--pdm-warn);   font-weight: 600; }

.pdm-admin-actions { white-space: nowrap; }
.pdm-admin-btn-edit, .pdm-admin-btn-delete {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all .15s;
}
.pdm-admin-btn-edit   { background: #dbeafe; color: var(--pdm-info); margin-right: 4px; }
.pdm-admin-btn-edit:hover { background: var(--pdm-info); color: #fff; }
.pdm-admin-btn-delete { background: #fee2e2; color: var(--pdm-danger); }
.pdm-admin-btn-delete:hover { background: var(--pdm-danger); color: #fff; }

.pdm-admin-empty { padding: 40px; text-align: center; color: var(--pdm-muted); }

.pdm-pagination { margin-top: 16px; }
.pdm-pagination .page-numbers { padding: 6px 12px; border: 1px solid var(--pdm-border); border-radius: 6px; text-decoration: none; font-size: 13px; margin: 0 2px; }
.pdm-pagination .current { background: var(--pdm-primary); color: #fff; border-color: var(--pdm-primary); }

/* Admin cards */
.pdm-admin-card {
    background: #fff;
    border: 1px solid var(--pdm-border);
    border-radius: var(--pdm-radius);
    padding: 24px;
    margin-top: 4px;
}
.pdm-admin-brands-textarea {
    width: 100%;
    max-width: 500px;
    padding: 12px;
    border: 1.5px solid var(--pdm-border);
    border-radius: 8px;
    font-size: 14px;
    font-family: monospace;
    line-height: 1.6;
}

.pdm-brands-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pdm-brand-chip {
    background: #f1f5f9;
    border: 1px solid var(--pdm-border);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--pdm-text);
}

/* Settings */
.pdm-settings-table th { font-weight: 600; padding-right: 24px; text-align: left; white-space: nowrap; }
.pdm-settings-table td { padding: 12px 0; }

.pdm-shortcode-list { display: flex; flex-direction: column; gap: 10px; margin: 8px 0; }
.pdm-shortcode-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    background: #f8f9fb;
    border-radius: 8px;
    font-size: 13px;
}
.pdm-shortcode-item code { font-size: 13px; background: #1e293b; color: #f8fafc; padding: 3px 10px; border-radius: 6px; }

/* ====================================================================
   RESPONSIVE
   ==================================================================== */
@media (max-width: 640px) {
    .pdm-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
    .pdm-card-img-wrap { height: 150px; }
    .pdm-form-wrap { padding: 18px 16px; }
    .pdm-form-row { flex-direction: column; }
    .pdm-fetch-row { flex-direction: column; }
    .pdm-btn-fetch { width: 100%; justify-content: center; }
    .pdm-filter-bar { flex-direction: column; align-items: stretch; }
}

/* ====================================================================
   v1.1 ADDITIONS: Modal, card info button, shop name, file input
   ==================================================================== */

/* ---- CARD footer ---- */
.pdm-card-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
}
.pdm-card-footer .pdm-btn-buynow { flex: 1; }

.pdm-card-info-btn {
    flex-shrink: 0;
    width: 38px; height: 38px;
    background: #f1f5f9;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    display: flex; align-items: center; justify-content: center;
    transition: background .2s;
    padding: 0;
}
.pdm-card-info-btn:hover { background: #dbeafe; border-color: #93c5fd; }

/* Shop name (was brand) on card */
.pdm-card-shop {
    font-size: 11px;
    font-weight: 700;
    color: var(--pdm-primary);
    text-transform: uppercase;
    letter-spacing: .6px;
    margin-bottom: 4px;
}

/* Make card cursor pointer */
.pdm-card { cursor: pointer; }
.pdm-card:focus { outline: 2px solid var(--pdm-primary); outline-offset: 2px; }

/* ---- MODAL ---- */
.pdm-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    backdrop-filter: blur(3px);
}

body.pdm-modal-open { overflow: hidden; }

.pdm-modal {
    background: #fff;
    border-radius: 18px;
    max-width: 580px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 24px 60px rgba(0,0,0,.25);
    animation: pdm-modal-in .22s ease;
}
@keyframes pdm-modal-in {
    from { opacity: 0; transform: translateY(20px) scale(.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.pdm-modal-close {
    position: sticky;
    top: 12px;
    float: right;
    margin: 12px 12px 0 0;
    width: 32px; height: 32px;
    border-radius: 50%;
    background: #f1f5f9;
    border: none;
    cursor: pointer;
    font-size: 16px;
    display: flex; align-items: center; justify-content: center;
    z-index: 2;
    transition: background .2s;
}
.pdm-modal-close:hover { background: #fee2e2; color: var(--pdm-danger); }

.pdm-modal-inner { padding: 0 0 24px; }

.pdm-modal-img-wrap {
    width: 100%;
    background: #f8f9fb;
    border-radius: 18px 18px 0 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pdm-modal-img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    object-position: center;
    padding: 12px;
    display: block;
}

.pdm-modal-content { padding: 20px 24px 0; }

.pdm-modal-shop {
    font-size: 12px;
    font-weight: 700;
    color: var(--pdm-primary);
    text-transform: uppercase;
    letter-spacing: .6px;
    margin-bottom: 6px;
}

.pdm-modal-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--pdm-text);
    line-height: 1.4;
    margin: 0 0 14px;
}

.pdm-modal-price-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}
.pdm-modal-mrp  { font-size: 14px; color: var(--pdm-muted); }
.pdm-modal-sp   { font-size: 28px; font-weight: 800; color: var(--pdm-text); }
.pdm-modal-save { font-size: 13px; color: var(--pdm-success); font-weight: 600; margin-bottom: 14px; background: #dcfce7; display: inline-block; padding: 3px 12px; border-radius: 20px; }

.pdm-modal-desc {
    margin: 14px 0;
    padding: 14px;
    background: #f8f9fb;
    border-radius: 10px;
}
.pdm-modal-desc h4 { font-size: 13px; font-weight: 700; margin: 0 0 6px; color: var(--pdm-text); }
.pdm-modal-desc p  { font-size: 13px; color: var(--pdm-muted); line-height: 1.6; margin: 0; white-space: pre-line; }

.pdm-modal-meta {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: var(--pdm-muted);
    margin-bottom: 16px;
}

.pdm-modal-buynow {
    display: block;
    width: 100%;
    padding: 14px;
    font-size: 16px;
}

/* ---- SHOP SELECT in form ---- */
.pdm-shop-select-wrap { position: relative; }
.pdm-select-full { width: 100%; }

/* ---- FILE INPUT AREA ---- */
.pdm-file-drop-hint {
    font-size: 12px;
    color: var(--pdm-muted);
    margin-top: 6px;
}

/* ---- RESPONSIVE MODAL ---- */
@media (max-width: 640px) {
    .pdm-modal { border-radius: 14px; }
    .pdm-modal-img { max-height: 280px; }
    .pdm-modal-sp { font-size: 22px; }
    .pdm-modal-title { font-size: 16px; }
    .pdm-modal-content { padding: 14px 16px 0; }
}

/* ====================================================================
   v1.2: Image download protection + description unlimited
   ==================================================================== */

/* Prevent image download via pointer/select */
.pdm-no-save {
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    pointer-events: none;       /* blocks right-click save-as on image itself */
    -webkit-touch-callout: none;
}

/* The img-wrap needs pointer-events so the card click still works,
   but the img inside is blocked */
/* card-img-wrap position:relative set in main rule above */

/* Description textarea: allow unlimited height growth */
.pdm-textarea {
    min-height: 100px;
    max-height: none;
    resize: vertical;
}

/* Upload status indicator while image is uploading */
.pdm-upload-progress {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--pdm-info);
    margin-top: 6px;
}

/* ====================================================================
   v1.3: Offers section, More Info below Buy Now, modal offers
   ==================================================================== */

/* ---- CARD: More Info below Buy Now (stacked layout) ---- */
.pdm-card-body {
    display: flex;
    flex-direction: column;
}
.pdm-card-body .pdm-btn-buynow {
    margin-top: 12px;
}
.pdm-card-info-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 100%;
    margin-top: 8px;
    padding: 8px 12px;
    background: transparent;
    border: 1.5px solid var(--pdm-border);
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--pdm-muted);
    transition: all .2s;
}
.pdm-card-info-btn:hover {
    border-color: var(--pdm-primary);
    color: var(--pdm-primary);
    background: #fff7ed;
}

/* Remove old card-footer flex layout (replaced by stacked) */
.pdm-card-footer { display: none !important; }

/* Offers badge on card */
.pdm-card-offers-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    color: #7c3aed;
    background: #ede9fe;
    border-radius: 20px;
    padding: 3px 9px;
    margin: 6px 0 4px;
    width: fit-content;
}

/* ---- OFFERS FORM SECTION ---- */
.pdm-offers-fetch-row {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}
.pdm-offers-url-input { flex: 1; }
.pdm-offers-fetch-btn {
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
}

.pdm-offers-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
    min-height: 0;
}

.pdm-offer-row {
    display: flex;
    gap: 8px;
    align-items: center;
    background: #f8f9fb;
    border: 1.5px solid var(--pdm-border);
    border-radius: 10px;
    padding: 10px 12px;
    flex-wrap: wrap;
}

.pdm-input-sm {
    padding: 8px 10px;
    border: 1.5px solid var(--pdm-border);
    border-radius: 7px;
    font-size: 13px;
    background: #fff;
    outline: none;
    transition: border-color .2s;
    font-family: inherit;
    color: var(--pdm-text);
}
.pdm-input-sm:focus { border-color: var(--pdm-primary); }

.pdm-offer-type   { width: 150px; flex-shrink: 0; }
.pdm-offer-title  { flex: 1; min-width: 120px; }
.pdm-offer-detail { flex: 2; min-width: 160px; }

.pdm-offer-remove-btn {
    flex-shrink: 0;
    width: 28px; height: 28px;
    border-radius: 50%;
    background: #fee2e2;
    color: var(--pdm-danger);
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    transition: background .2s;
}
.pdm-offer-remove-btn:hover { background: var(--pdm-danger); color: #fff; }

.pdm-btn-add-offer {
    padding: 8px 16px;
    background: #fff;
    border: 1.5px dashed #d1d5db;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--pdm-muted);
    cursor: pointer;
    transition: all .2s;
    width: 100%;
    text-align: center;
}
.pdm-btn-add-offer:hover {
    border-color: var(--pdm-primary);
    color: var(--pdm-primary);
    background: #fff7ed;
}

/* ---- MODAL OFFERS ---- */
.pdm-modal-offers {
    margin: 14px 0;
}
.pdm-modal-offers h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--pdm-text);
    margin: 0 0 10px;
}
.pdm-modal-offers-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.pdm-modal-offer-item {
    border-radius: 10px;
    padding: 10px 14px;
    border-left: 4px solid #d1d5db;
    background: #f8f9fb;
}
/* Color coding by offer type */
.pdm-offer-type-bank     { border-left-color: #2563eb; background: #eff6ff; }
.pdm-offer-type-cashback { border-left-color: #16a34a; background: #f0fdf4; }
.pdm-offer-type-emi      { border-left-color: #7c3aed; background: #f5f3ff; }
.pdm-offer-type-exchange { border-left-color: #d97706; background: #fffbeb; }
.pdm-offer-type-coupon   { border-left-color: #db2777; background: #fdf2f8; }
.pdm-offer-type-special  { border-left-color: #f97316; background: #fff7ed; }
.pdm-offer-type-combo    { border-left-color: #0891b2; background: #ecfeff; }
.pdm-offer-type-discount { border-left-color: #dc2626; background: #fef2f2; }

.pdm-modal-offer-header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}
.pdm-modal-offer-type {
    font-size: 11px;
    font-weight: 700;
    opacity: .8;
}
.pdm-modal-offer-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--pdm-text);
}
.pdm-modal-offer-detail {
    font-size: 12px;
    color: var(--pdm-muted);
    line-height: 1.5;
}

/* Responsive offers form */
@media (max-width: 640px) {
    .pdm-offer-row       { flex-direction: column; align-items: stretch; }
    .pdm-offer-type      { width: 100%; }
    .pdm-offers-fetch-row { flex-direction: column; }
}

/* ====================================================================
   v1.4: Full-size modal image, no More Info button, card cursor hint
   ==================================================================== */

/* Card: pointer cursor + subtle "click to view" hint */
.pdm-card {
    cursor: pointer;
}
.pdm-card:hover .pdm-card-img-wrap::after {
    content: '🔍 Tap for details';
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,.55);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
    z-index: 3;
    pointer-events: none;
    letter-spacing: .2px;
}

/* Hide More Info button (removed from HTML but keep rule in case cached) */
.pdm-card-info-btn { display: none !important; }
.pdm-card-footer   { display: none !important; }

/* Modal image rules moved to main section above */

/* Settings saved notice — make it visible even without JS */
.pdm-settings-saved {
    background: #dcfce7;
    border: 1px solid #86efac;
    color: #166534;
    padding: 10px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-weight: 600;
}

/* Ad slot styles moved to v1.8 section */


/* Ad styles in v1.8 block below */


/* ====================================================================
   v1.8 — Advertisement Cards: Modern, Clean, Responsive
   ==================================================================== */

/* ---- GRID SLOT ---- */
.pdm-ad-slot.pdm-ad-item {
    grid-column: 1 / -1;
    width: 100%;
    margin: 4px 0;
    animation: pdm-fade-in .4s ease;
}
@keyframes pdm-fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---- INNER CARD ---- */
.pdm-ad-inner {
    position: relative;
    background: linear-gradient(135deg, #fff 0%, #fafbff 100%);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
    transition: box-shadow .2s;
}
.pdm-ad-inner:hover { box-shadow: 0 4px 20px rgba(0,0,0,.1); }

/* ---- SPONSORED LABEL ---- */
.pdm-ad-label {
    position: absolute;
    top: 10px;
    right: 12px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .8px;
    text-transform: uppercase;
    color: #94a3b8;
    background: rgba(255,255,255,.85);
    padding: 2px 7px;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    backdrop-filter: blur(4px);
    z-index: 2;
    pointer-events: none;
}

/* ================================================================
   LAYOUT: image-only
   ================================================================ */
.pdm-ad-layout-img .pdm-ad-img-wrap { display: block; overflow: hidden; }
.pdm-ad-layout-img .pdm-ad-img {
    display: block;
    width: 100%;
    height: auto;           /* full natural height — no cropping */
    max-height: none;       /* removed cap */
    object-fit: contain;    /* never crop, always show full image */
    transition: transform .35s ease;
    background: #f3f4f6;
}
.pdm-ad-layout-img .pdm-ad-inner:hover .pdm-ad-img { transform: scale(1.01); }
.pdm-ad-layout-img .pdm-ad-img-link { display: block; }

/* ================================================================
   LAYOUT: text-only
   ================================================================ */
.pdm-ad-layout-text .pdm-ad-inner {
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f4fd 100%);
    border-color: #bfdbfe;
}
.pdm-ad-layout-text .pdm-ad-content {
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.pdm-ad-layout-text .pdm-ad-message {
    flex: 1;
    min-width: 180px;
    font-size: 14px;
    font-weight: 500;
    color: #1e3a5f;
    line-height: 1.6;
    white-space: pre-line;
    padding: 0;
}

/* ================================================================
   LAYOUT: split (image left + message right)
   On desktop — side by side; tablet/mobile — stacked full-width
   ================================================================ */
.pdm-ad-layout-split .pdm-ad-inner {
    display: flex;
    align-items: stretch;
}
.pdm-ad-layout-split .pdm-ad-img-wrap {
    flex: 0 0 42%;
    max-width: 42%;
    overflow: hidden;
}
.pdm-ad-layout-split .pdm-ad-img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 140px;
    object-fit: cover;      /* cover for split layout so it fills the column */
    max-height: none;
    transition: transform .35s ease;
}
.pdm-ad-layout-split .pdm-ad-inner:hover .pdm-ad-img { transform: scale(1.02); }
.pdm-ad-layout-split .pdm-ad-img-link { display: block; height: 100%; }
.pdm-ad-layout-split .pdm-ad-content {
    flex: 1;
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
}
.pdm-ad-layout-split .pdm-ad-message {
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
    line-height: 1.65;
    white-space: pre-line;
    padding: 0;
}

/* ---- SHARED MESSAGE ---- */
.pdm-ad-message { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }

/* ---- LINKS IN MESSAGE ---- */
.pdm-ad-link {
    color: #2563eb;
    font-weight: 700;
    text-decoration: underline;
    text-decoration-color: rgba(37,99,235,.35);
    word-break: break-all;
    transition: color .15s, text-decoration-color .15s;
}
.pdm-ad-link:hover { color: #1d4ed8; text-decoration-color: #2563eb; }

/* ---- CTA BUTTON ---- */
.pdm-ad-cta-wrap { display: flex; }
.pdm-ad-cta {
    display: inline-block;
    padding: 9px 20px;
    background: linear-gradient(135deg, #f97316, #ea6c0a);
    color: #fff !important;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none !important;
    border-radius: 8px;
    transition: opacity .2s, transform .15s;
    white-space: nowrap;
}
.pdm-ad-cta:hover { opacity: .9; transform: translateY(-1px); }

/* ================================================================
   RESPONSIVE — split stacks on tablet/mobile, full image always visible
   ================================================================ */

/* Tablet ≤ 900px: stack image above content, show full image */
@media (max-width: 900px) {
    .pdm-ad-layout-split .pdm-ad-inner     { flex-direction: column; }
    .pdm-ad-layout-split .pdm-ad-img-wrap  { flex: none; max-width: 100%; width: 100%; }
    .pdm-ad-layout-split .pdm-ad-img       { height: auto; min-height: 0; object-fit: contain; width: 100%; }
    .pdm-ad-layout-split .pdm-ad-img-link  { height: auto; }
    .pdm-ad-layout-split .pdm-ad-content   { padding: 16px 18px; }
}

/* Mobile ≤ 640px: compact padding */
@media (max-width: 640px) {
    .pdm-ad-layout-split .pdm-ad-content,
    .pdm-ad-layout-text  .pdm-ad-content { padding: 14px 16px; gap: 10px; }
    .pdm-ad-layout-split .pdm-ad-message,
    .pdm-ad-layout-text  .pdm-ad-message { font-size: 13px; }
    .pdm-ad-cta  { padding: 8px 16px; font-size: 12px; }
    .pdm-ad-label { font-size: 8px; top: 8px; right: 8px; }
}

/* ================================================================
   ADMIN FORM: device checkboxes
   ================================================================ */
.pdm-ad-device-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}
.pdm-device-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: #f8f9fb;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all .15s;
    user-select: none;
}
.pdm-device-label input[type="checkbox"] {
    accent-color: var(--pdm-primary);
    width: 15px; height: 15px;
    margin: 0;
}
.pdm-device-label:has(input:checked) {
    border-color: var(--pdm-primary);
    background: #fff7ed;
    color: #c2410c;
    font-weight: 700;
}

/* ====================================================================
   v1.9 — Ad Carousel (Carousel view format)
   ==================================================================== */

/* ---- WRAPPER ---- */
.pdm-ad-carousel-wrap {
    grid-column: 1 / -1;
    width: 100%;
    position: relative;
    margin: 8px 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(0,0,0,.08);
    background: #fff;
    animation: pdm-fade-in .4s ease;
    /* Make sure carousel sits inside grid correctly */
    contain: layout;
}

/* ---- TRACK ---- */
.pdm-carousel-track {
    position: relative;
    width: 100%;
    /* Height is driven by the active slide's content */
}

/* ---- SLIDES ---- */
.pdm-carousel-slide {
    display: none;
    width: 100%;
}
.pdm-carousel-slide.pdm-carousel-active {
    display: block;
    animation: pdm-slide-in .35s ease;
}
@keyframes pdm-slide-in {
    from { opacity: 0; transform: translateX(18px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* Ad items inside carousel lose their outer wrapper styles — track handles shape */
.pdm-carousel-slide .pdm-ad-slot.pdm-ad-item {
    grid-column: unset;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    animation: none;
}
.pdm-carousel-slide .pdm-ad-inner {
    border-radius: 0;
    border: none;
    box-shadow: none;
}

/* ---- PREV / NEXT ARROWS ---- */
.pdm-carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,.92);
    border: 1.5px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    color: #374151;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background .15s, box-shadow .15s, transform .15s;
    backdrop-filter: blur(4px);
}
.pdm-carousel-arrow:hover {
    background: #fff;
    box-shadow: 0 4px 14px rgba(0,0,0,.18);
    transform: translateY(-50%) scale(1.08);
}
.pdm-carousel-prev { left: 10px; }
.pdm-carousel-next { right: 10px; }

/* ---- DOTS ---- */
.pdm-carousel-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
}
.pdm-carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,.55);
    border: 1.5px solid rgba(255,255,255,.8);
    cursor: pointer;
    padding: 0;
    transition: background .2s, transform .2s, width .2s;
}
.pdm-carousel-dot.pdm-dot-active {
    background: #fff;
    width: 22px;
    border-radius: 4px;
    transform: none;
}

/* ---- WHEN ONLY ONE AD — no arrows/dots needed ---- */
.pdm-ad-carousel-wrap[data-total="1"] .pdm-carousel-dots,
.pdm-ad-carousel-wrap[data-total="1"] .pdm-carousel-arrow { display: none; }

/* ---- RESPONSIVE ---- */
@media (max-width: 640px) {
    .pdm-carousel-arrow { width: 30px; height: 30px; font-size: 18px; }
    .pdm-carousel-prev  { left: 6px; }
    .pdm-carousel-next  { right: 6px; }
    .pdm-carousel-dot   { width: 6px; height: 6px; }
    .pdm-carousel-dot.pdm-dot-active { width: 16px; }
}

/* ====================================================================
   v1.9.1 — Ad form: link + button text group
   ==================================================================== */
.pdm-ad-link-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}
.pdm-ad-link-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.pdm-sub-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--pdm-muted);
    min-width: 80px;
    flex-shrink: 0;
}

/* ====================================================================
   v1.9.2 — Carousel toggle switch + static ad mode
   ==================================================================== */

/* ---- TOGGLE SWITCH ---- */
.pdm-toggle-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}
.pdm-toggle-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0; height: 0;
}
.pdm-toggle-switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 26px;
    background: #d1d5db;
    border-radius: 13px;
    transition: background .25s;
    flex-shrink: 0;
}
.pdm-toggle-switch::after {
    content: '';
    position: absolute;
    top: 3px; left: 3px;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,.2);
    transition: transform .25s;
}
.pdm-toggle-label input:checked ~ .pdm-toggle-switch {
    background: #f97316;
}
.pdm-toggle-label input:checked ~ .pdm-toggle-switch::after {
    transform: translateX(20px);
}
.pdm-toggle-text {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

/* ---- STATIC AD (carousel OFF) ---- */
.pdm-ad-static {
    grid-column: 1 / -1;
    margin: 8px 0;
    animation: pdm-fade-in .3s ease;
}
.pdm-ad-static .pdm-ad-inner {
    border-radius: 14px;
}

/* ====================================================================
   v2.0 — Image ratio picker in Settings
   ==================================================================== */
.pdm-ratio-picker {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.pdm-ratio-option {
    cursor: pointer;
    text-align: center;
    padding: 10px 12px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    background: #f8f9fb;
    min-width: 72px;
    transition: border-color .15s, background .15s, box-shadow .15s;
    user-select: none;
}
.pdm-ratio-option:hover {
    border-color: #f97316;
    background: #fff7ed;
}
.pdm-ratio-option.pdm-ratio-selected {
    border-color: #f97316;
    background: #fff7ed;
    box-shadow: 0 0 0 3px rgba(249,115,22,.15);
}

.pdm-ratio-preview {
    width: 56px;
    margin: 0 auto 6px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}
.pdm-ratio-option.pdm-ratio-selected .pdm-ratio-preview {
    background: #fed7aa;
}

.pdm-ratio-box {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pdm-ratio-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #9ca3af;
}
.pdm-ratio-option.pdm-ratio-selected .pdm-ratio-icon { color: #ea580c; }

.pdm-ratio-label {
    font-size: 12px;
    font-weight: 700;
    color: #374151;
}
.pdm-ratio-option.pdm-ratio-selected .pdm-ratio-label { color: #c2410c; }

.pdm-ratio-desc {
    font-size: 10px;
    color: #9ca3af;
    margin-top: 1px;
}
.pdm-ratio-option.pdm-ratio-selected .pdm-ratio-desc { color: #ea580c; }

/* ====================================================================
   v2.1 — Page Heading, Featured Deals Section, Featured Badge
   ==================================================================== */

/* ---- PAGE HEADING ---- */
.pdm-page-heading {
    text-align: center;
    margin-bottom: 28px;
}
.pdm-page-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--pdm-text);
    margin: 0 0 6px;
    line-height: 1.2;
}
.pdm-page-subtitle {
    font-size: 15px;
    color: var(--pdm-muted);
    margin: 0;
}
@media (max-width: 640px) {
    .pdm-page-title    { font-size: 22px; }
    .pdm-page-subtitle { font-size: 13px; }
}

/* ---- FEATURED SECTION ---- */
#pdm-featured-section {
    margin-bottom: 36px;
}
.pdm-featured-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}
.pdm-featured-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--pdm-text);
    margin: 0;
    position: relative;
    padding-left: 14px;
}
.pdm-featured-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: var(--pdm-primary);
    border-radius: 2px;
}

/* Featured grid uses same grid but with highlighted cards */
.pdm-featured-grid { margin-bottom: 0; }

.pdm-featured-divider {
    margin-top: 28px;
    border: none;
    border-top: 2px dashed #e5e7eb;
}

/* ---- FEATURED CARD STYLE ---- */
.pdm-card-featured {
    border-color: #fed7aa !important;
    box-shadow: 0 2px 16px rgba(249,115,22,.12) !important;
    background: linear-gradient(160deg, #fff 80%, #fff7ed 100%) !important;
}
.pdm-card-featured:hover {
    box-shadow: 0 6px 28px rgba(249,115,22,.2) !important;
}

/* ---- FEATURED BADGE ---- */
.pdm-badge-featured {
    display: inline-block;
    width: fit-content;
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
    white-space: nowrap;
    letter-spacing: .3px;
}

/* ---- FEATURED TOGGLE IN FORM ---- */
.pdm-featured-toggle-wrap {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
    padding: 12px 16px;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    background: #f8f9fb;
    transition: border-color .2s, background .2s;
    width: 100%;
}
.pdm-featured-toggle-wrap:has(input:checked) {
    border-color: #f97316;
    background: #fff7ed;
}
.pdm-featured-toggle-wrap input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.pdm-featured-toggle-ui {
    position: relative;
    width: 42px;
    height: 24px;
    background: #d1d5db;
    border-radius: 12px;
    flex-shrink: 0;
    transition: background .25s;
}
.pdm-featured-toggle-wrap:has(input:checked) .pdm-featured-toggle-ui {
    background: #f97316;
}
.pdm-featured-toggle-knob {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,.2);
    transition: transform .25s;
}
.pdm-featured-toggle-wrap:has(input:checked) .pdm-featured-toggle-knob {
    transform: translateX(18px);
}
.pdm-featured-toggle-text {
    font-size: 14px;
    color: var(--pdm-text);
}
.pdm-featured-toggle-wrap:has(input:checked) .pdm-featured-toggle-text {
    color: #c2410c;
    font-weight: 600;
}

/* ====================================================================
   v2.2 — Dashboard, Custom Label, Ad Click Tracking
   ==================================================================== */

/* ---- DASHBOARD STAT CARDS ---- */
.pdm-dash-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}
.pdm-stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 18px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    border: 1px solid var(--pdm-border);
    box-shadow: 0 1px 6px rgba(0,0,0,.05);
    transition: box-shadow .2s;
}
.pdm-stat-card:hover { box-shadow: 0 3px 14px rgba(0,0,0,.1); }
.pdm-stat-icon { font-size: 28px; flex-shrink: 0; }
.pdm-stat-num  { font-size: 24px; font-weight: 800; color: #1f2937; line-height: 1; }
.pdm-stat-label{ font-size: 11px; font-weight: 600; color: #6b7280; margin-top: 3px; text-transform: uppercase; letter-spacing: .4px; }

.pdm-stat-blue   { border-left: 4px solid #3b82f6; }
.pdm-stat-orange { border-left: 4px solid #f97316; }
.pdm-stat-gold   { border-left: 4px solid #f59e0b; }
.pdm-stat-purple { border-left: 4px solid #8b5cf6; }
.pdm-stat-green  { border-left: 4px solid #10b981; }
.pdm-stat-gray   { border-left: 4px solid #6b7280; }

/* ---- QUICK ACTIONS ---- */
.pdm-dash-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}
.pdm-action-btn {
    padding: 9px 18px;
    border-radius: 8px;
    background: #f1f5f9;
    color: #374151;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    border: 1.5px solid #e2e8f0;
    transition: all .15s;
}
.pdm-action-btn:hover { background: #e2e8f0; color: #1f2937; text-decoration: none; }
.pdm-action-primary   { background: #f97316; color: #fff; border-color: #f97316; }
.pdm-action-primary:hover { background: #ea6c0a; color: #fff; }

/* ---- DASHBOARD PANELS ---- */
.pdm-dash-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
@media (max-width: 900px) { .pdm-dash-panels { grid-template-columns: 1fr; } }

.pdm-dash-panel-title {
    font-size: 14px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f1f5f9;
}
.pdm-dash-more {
    display: inline-block;
    margin-top: 10px;
    font-size: 12px;
    color: var(--pdm-primary);
    text-decoration: none;
    font-weight: 600;
}

/* ---- CUSTOM LABEL ---- */
.pdm-label-wrap { display: flex; flex-direction: column; gap: 8px; }

.pdm-label-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.pdm-label-preset-btn {
    padding: 4px 10px;
    border-radius: 20px;
    border: 1.5px solid var(--pdm-border);
    background: #f8f9fb;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    color: #374151;
    transition: all .15s;
}
.pdm-label-preset-btn:hover {
    border-color: var(--pdm-primary);
    background: #fff7ed;
    color: var(--pdm-primary);
}

.pdm-label-preview-wrap {
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ---- CUSTOM LABEL BADGE (on deal cards) ---- */
.pdm-card-custom-label {
    display: inline-block;
    width: fit-content;
    white-space: nowrap;
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
    letter-spacing: .3px;
    white-space: nowrap;
}

/* ---- Card expiry date+time ---- */
.pdm-card-expiry {
    font-size: 11px;
    color: var(--pdm-muted);
    margin: 6px 0 4px;
    display: flex;
    align-items: center;
    gap: 3px;
    flex-wrap: wrap;
}
.pdm-card-expiry span {
    font-weight: 600;
    color: #4b5563;
}

/* ====================================================================
   v2.2.8 — Disc below price, expiry alert above button, upload inline
   ==================================================================== */

/* % OFF label — below selling price */
.pdm-card-disc-line {
    display: inline-block;
    width: fit-content;
    background: #fee2e2;
    color: var(--pdm-danger);
    font-size: 12px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    margin: 4px 0 6px;
    letter-spacing: .2px;
}

/* Expires Today / N days left — plain small text below Buy Now, centered, no background */
.pdm-card-expiry-alert {
    display: block;
    font-size: 11px;
    font-weight: 600;
    margin: 6px 0 0;
    padding: 0;
    background: none;
    border: none;
    text-align: center;
}
.pdm-card-expiry-alert.pdm-expiry-urgent { color: var(--pdm-danger); }
.pdm-card-expiry-alert.pdm-expiry-warn   { color: var(--pdm-warn); }

/* Upload status — inline below Choose Image */
.pdm-upload-status {
    margin-top: 8px;
    padding: 7px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
}
.pdm-upload-info    { background: #dbeafe; color: #1d4ed8; }
.pdm-upload-success { background: #dcfce7; color: #15803d; }
.pdm-upload-error   { background: #fee2e2; color: #dc2626; }

/* ====================================================================
   v2.3.4 — Modern card design overrides & responsive polish
   ==================================================================== */

/* Filter bar — glassmorphism style */
.pdm-filter-bar {
    background: rgba(255,255,255,.95);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(229,231,235,.8);
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
}

/* Search input — rounded pill */
.pdm-search-input {
    border-radius: 50px !important;
    padding: 10px 20px !important;
    background: #f9fafb;
    border-color: #e5e7eb;
    font-size: 14px;
}
.pdm-search-input:focus {
    background: #fff;
    border-color: var(--pdm-primary) !important;
    box-shadow: 0 0 0 3px rgba(249,115,22,.1);
}

/* Sort/category selects */
.pdm-select {
    border-radius: 50px !important;
    padding: 9px 14px !important;
    background: #f9fafb;
    font-size: 13px;
    font-weight: 500;
}
.pdm-select:focus { border-color: var(--pdm-primary) !important; }

/* Card — hover cursor hint overlay (cleaner than before) */
.pdm-card-img-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.18) 0%, transparent 50%);
    opacity: 0;
    transition: opacity .25s;
    z-index: 1;
    pointer-events: none;
}
.pdm-card:hover .pdm-card-img-wrap::after { opacity: 1; }

/* Custom label badge — on image */
.pdm-card-custom-label {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    font-size: 10px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 20px;
    box-shadow: 0 2px 6px rgba(109,40,217,.35);
    white-space: nowrap;
    width: fit-content;
}

/* Offers badge */
.pdm-card-offers-badge {
    font-size: 11px;
    color: #7c3aed;
    background: #ede9fe;
    border-radius: 6px;
    padding: 4px 8px;
    margin: 2px 0 8px;
    display: inline-block;
    width: fit-content;
    font-weight: 600;
}

/* Expiry alert */
.pdm-card-expiry-alert {
    font-size: 11px;
    text-align: center;
    margin: 4px 0 8px;
}

/* Load more button */
.pdm-btn-secondary {
    padding: 13px 40px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 14px;
    background: #fff;
    border: 2px solid var(--pdm-primary);
    color: var(--pdm-primary);
    cursor: pointer;
    transition: all .2s;
    box-shadow: 0 2px 8px rgba(249,115,22,.15);
}
.pdm-btn-secondary:hover {
    background: var(--pdm-primary);
    color: #fff;
    box-shadow: 0 4px 14px rgba(249,115,22,.35);
    transform: translateY(-1px);
}

/* Page heading */
.pdm-page-heading { margin-bottom: 24px; }
.pdm-page-title { font-size: 26px; font-weight: 800; letter-spacing: -.3px; }

/* ---- RESPONSIVE GRID ---- */
/* Desktop default handled by output_grid_css inline style */
@media (max-width: 1024px) {
    .pdm-card-img-wrap { height: 180px; }
}
@media (max-width: 640px) {
    .pdm-grid { gap: 12px; }
    .pdm-card-img-wrap { height: 160px; }
    .pdm-price-selling { font-size: 19px; }
    .pdm-card-body { padding: 12px 13px 14px; }
    .pdm-filter-bar { padding: 12px 14px; gap: 8px; }
    .pdm-btn-buynow { padding: 11px 12px; font-size: 13px; }
}

/* Card animation on load */
.pdm-card {
    animation: pdm-card-in .3s ease both;
}
@keyframes pdm-card-in {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
