/**
 * DPR Product Frontend Styles
 * Used for Shortcodes, Product Content Blocks and Category Table
 */
 :root {
    --primary: #0D52E2;
 }

.dpr-product-block {
    margin-bottom: 35px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    /* border-radius: 8px; */
    padding: 24px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

.dpr-block-title {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    margin-top: 0;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid #0073aa;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Overview Specs Table */
.dpr-specs-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 20px 0;
}

.dpr-specs-table tr:nth-child(even) {
    background: #f8fafc;
}

.dpr-specs-table tr:nth-child(odd) {
    background: #ffffff;
}

.dpr-specs-table td {
    padding: 12px 16px;
    font-size: 14px;
    border: 1px solid #e2e8f0;
    color: #334155;
}

.dpr-specs-table td.dpr-spec-label {
    font-weight: 600;
    color: #0f172a;
    width: 35%;
}

/* PDF Download Button */
.dpr-pdf-btn-wrap {
    margin-top: 15px;
}

.dpr-btn-pdf {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #dc2626;
    color: #ffffff !important;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(220,38,38,0.25);
    transition: background 0.2s, transform 0.2s;
}

.dpr-btn-pdf:hover {
    background: #b91c1c;
    transform: translateY(-1px);
}

/* Interactive Tabs Component */
.dpr-tabs-container {
    margin: 30px 0;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

.dpr-tabs-nav {
    display: flex;
    background: #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.dpr-tab-btn {
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    border: none;
    background: transparent;
    transition: all 0.2s;
    border-bottom: 3px solid transparent;
}

.dpr-tab-btn:hover {
    color: #0073aa;
    background: #e2e8f0;
}

.dpr-tab-btn.active {
    color: #0073aa;
    background: #ffffff;
    border-bottom: 3px solid #0073aa;
}

.dpr-tab-pane {
    display: none;
    padding: 25px;
    line-height: 1.7;
    font-size: 14px;
    color: #334155;
}

.dpr-tab-pane.active {
    display: block;
}

/* Content typography */
.dpr-tab-pane p {
    margin-bottom: 12px;
}

.dpr-tab-pane strong {
    color: #0f172a;
}

/* Category Grid Table (Exact Match to AGG Table) */
.dpr-category-table-wrap {
    margin: 30px 0;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}

.dpr-table-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.dpr-freq-filter {
    display: inline-flex;
    background: #d4d4d8;
    border-radius: 2px;
    overflow: hidden;
}

.dpr-freq-btn {
    border: none;
    background: transparent;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 700;
    color: #52525b;
    cursor: pointer;
    transition: all 0.2s;
}

.dpr-freq-btn.active {
    background: #27272a;
    color: #ffffff;
}

.dpr-phase-filter {
    display: inline-flex;
    gap: 8px;
}

.dpr-phase-btn {
    border: 1px solid #d4d4d8;
    background: #ffffff;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #52525b;
    border-radius: 2px;
    cursor: pointer;
}

.dpr-phase-btn.active {
    border-color: #71717a;
    color: #18181b;
}

.dpr-table-responsive {
    overflow-x: auto;
}

.dpr-product-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.dpr-product-table th {
    background: #ffffff;
    border-top: 1px solid #e5e5e5;
    border-bottom: 2px solid #e5e5e5;
    padding: 12px 16px;
    text-align: center;
    font-weight: 700;
    font-size: 13px;
    color: #333333;
}

.dpr-product-table th:first-child {
    text-align: left;
}

.dpr-product-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #ebebeb;
    text-align: center;
    font-size: 14px;
    color: #555555;
}

.dpr-product-table td.dpr-col-model {
    text-align: left;
    font-weight: 600;
    color: #222222;
}

.dpr-product-table tr:hover td {
    background: #fbfbfb;
}

.dpr-view-btn {
    display: inline-block;
    background: #e4e4e7;
    color: #3f3f46 !important;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none !important;
    border-radius: 2px;
    transition: background 0.2s, color 0.2s;
}

.dpr-view-btn:hover {
    background: #0073aa;
    color: #ffffff !important;
}

/* ==========================================================================
   SERIES BY CATEGORY & FREQUENCY CATALOG SHORTCODE
   [dpr_series_by_category] / [dpr_series_list] / [dpr_dong_may]
   ========================================================================== */

.dpr-series-catalog-wrap {
    margin: 30px 0 50px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #1e293b;
}

/* Header & Filter Controls Bar */
.dpr-catalog-header-bar {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    /* border-radius: 12px; */
    padding: 16px 20px;
    margin-bottom: 35px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.dpr-filter-group {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.dpr-filter-label {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.dpr-filter-label .dashicons {
    font-size: 17px;
    width: 17px;
    height: 17px;
    color: var(--primary);
}

.dpr-catalog-btn-group {
    display: inline-flex;
    flex-wrap: wrap;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 8px;
    gap: 4px;
}

.dpr-cat-filter-btn {
    border: none;
    background: transparent;
    padding: 7px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    line-height: 1.2;
}

.dpr-cat-filter-btn small {
    font-size: 10px;
    opacity: 0.8;
}

.dpr-cat-filter-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.dpr-cat-filter-btn.active {
    background: #0f172a;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.15);
}

.dpr-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.dot-50hz {
    background: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

.dot-60hz {
    background: #10b981;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
}

/* Category Section */
.dpr-category-section {
    margin-bottom: 50px;
    transition: opacity 0.3s ease;
}

.dpr-category-header {
    margin-bottom: 22px;
}

.dpr-cat-title-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 10px;
}

.dpr-cat-title {
    margin: 0;
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.5px;
}

.dpr-cat-badge {
    background: #e0f2fe;
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 9999px;
    border: 1px solid #bae6fd;
}

.dpr-cat-divider {
    height: 3px;
    width: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, #38bdf8 35%, #e2e8f0 100%);
    border-radius: 2px;
}

/* Series Grid Layout */
.dpr-series-grid {
    display: grid;
    gap: 24px;
}

.dpr-grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dpr-grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dpr-grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1024px) {
    .dpr-grid-cols-4,
    .dpr-grid-cols-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .dpr-grid-cols-4,
    .dpr-grid-cols-3,
    .dpr-grid-cols-2 {
        grid-template-columns: 1fr;
    }
    .dpr-catalog-header-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .dpr-filter-group {
        flex-direction: column;
        align-items: flex-start;
    }
    .dpr-catalog-btn-group {
        width: 100%;
    }
    .dpr-cat-filter-btn {
        flex: 1;
        justify-content: center;
    }
}

/* Series Card */
.dpr-series-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    /* border-radius: 12px; */
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    position: relative;
}

.dpr-series-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 28px -6px rgba(15, 23, 42, 0.1);
    border-color: #cbd5e1;
}

/* Card Media */
.dpr-series-card-media {
    position: relative;
    background: #f8fafc;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-bottom: 1px solid #f1f5f9;
}

.dpr-series-img {
    max-width: 88%;
    max-height: 88%;
    object-fit: contain;
    transition: transform 0.35s ease;
}

.dpr-series-card:hover .dpr-series-img {
    transform: scale(1.05);
}

.dpr-series-img-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #94a3b8;
}

.dpr-series-img-placeholder .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
}

.dpr-card-floating-badges {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 6px;
    z-index: 2;
}

.dpr-freq-pill {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 6px;
    letter-spacing: 0.4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.06);
}

.pill-50hz {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.pill-60hz {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

/* Card Body */
.dpr-series-card-body {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.dpr-series-name {
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.35;
}

.dpr-series-power {
    background: #f8fafc;
    border-left: 3px solid var(--primary);
    border-radius: 0 6px 6px 0;
    padding: 8px 12px;
    margin-bottom: 14px;
}

.dpr-power-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 2px;
}

.dpr-power-val {
    font-size: 15px;
    font-weight: 800;
    color: var(--primary);
}

.dpr-series-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    font-size: 12px;
}

.dpr-model-count-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    color: #475569;
}

.dpr-model-count-badge .dashicons {
    font-size: 15px;
    width: 15px;
    height: 15px;
    color: #64748b;
}

.dpr-phase-tag {
    background: #f1f5f9;
    color: #475569;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
}

/* Model Chips */
.dpr-series-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
    padding-top: 6px;
}

.dpr-model-chip {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    background: #f1f5f9;
    color: #334155;
    padding: 4px 8px;
    border-radius: 4px;
    text-decoration: none !important;
    border: 1px solid #e2e8f0;
    transition: all 0.15s ease;
}

.dpr-model-chip:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff !important;
}

.dpr-model-chip-more {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    padding: 4px 6px;
}

/* Card Footer / View Models Button */
.dpr-series-card-footer {
    padding: 14px 20px;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
    margin-top: auto;
}

.dpr-btn-open-modal,
.dpr-btn-toggle-models {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #0f172a;
    color: #ffffff !important;
    border: none;
    padding: 11px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none !important;
}

.dpr-btn-open-modal:hover,
.dpr-btn-toggle-models:hover {
    background: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
}

.dpr-btn-open-modal .dashicons,
.dpr-btn-toggle-models .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
}

.dpr-btn-open-modal:hover .dashicons {
    transform: translateX(3px);
}

/* ==========================================================================
   POPUP MODAL COMPONENT (50Hz & 60Hz Tabs)
   ========================================================================== */

body.dpr-modal-open {
    overflow: hidden !important;
}

.dpr-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    box-sizing: border-box;
}

.dpr-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.dpr-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    cursor: pointer;
}

.dpr-modal-container {
    position: relative;
    z-index: 2;
    background: #ffffff;
    width: 100%;
    max-width: 960px;
    max-height: 88vh;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.28);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.96) translateY(12px);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

.dpr-modal-overlay.active .dpr-modal-container {
    transform: scale(1) translateY(0);
}

/* Modal Header */
.dpr-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 26px;
    border-bottom: 1px solid #e2e8f0;
    background: #ffffff;
    gap: 16px;
}

.dpr-modal-header-info {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-width: 0;
}

.dpr-modal-thumb {
    width: 60px;
    height: 60px;
    object-fit: contain;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    padding: 6px;
    flex-shrink: 0;
}

.dpr-modal-title-wrap {
    min-width: 0;
    flex: 1;
}

.dpr-modal-title {
    margin: 0 0 6px 0;
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.25;
    letter-spacing: -0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dpr-modal-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12px;
}

.dpr-modal-cat-tag {
    background: #e0f2fe;
    color: #0369a1;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
}

.dpr-modal-power-tag {
    background: #f8fafc;
    color: var(--primary);
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
    font-size: 11px;
}

.dpr-modal-phase-tag {
    background: #f1f5f9;
    color: #475569;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
}

.dpr-modal-close {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.dpr-modal-close:hover {
    background: #fee2e2;
    color: #ef4444;
    border-color: #fca5a5;
    transform: rotate(90deg);
}

.dpr-modal-close .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* Modal Frequency Tabs */
.dpr-modal-tabs {
    display: flex;
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
    padding: 0 24px;
    gap: 8px;
}

.dpr-modal-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 20px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    font-size: 14px;
    font-weight: 700;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dpr-modal-tab-btn:hover {
    color: #0f172a;
    background: #f1f5f9;
}

.dpr-modal-tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: #ffffff;
}

.dpr-modal-tab-btn .dpr-tab-count {
    display: inline-block;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 999px;
    background: #e2e8f0;
    color: #475569;
}

.dpr-modal-tab-btn.active .dpr-tab-count {
    background: #e0f2fe;
    color: var(--primary);
}

/* Modal Body */
.dpr-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
    background: #ffffff;
}

.dpr-modal-tab-pane {
    display: none;
}

.dpr-modal-tab-pane.active {
    display: block;
    animation: dprFadeIn 0.2s ease;
}

@keyframes dprFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.dpr-modal-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.dpr-modal-table th {
    position: sticky;
    top: -20px;
    background: #f8fafc;
    padding: 12px 14px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #475569;
    font-weight: 700;
    z-index: 2;
    border-top: 1px solid #e2e8f0;
    border-bottom: 2px solid #e2e8f0;
}

.dpr-modal-table td {
    padding: 12px 14px;
    font-size: 13px;
    border-bottom: 1px solid #f1f5f9;
}

.dpr-modal-table tr:hover td {
    background: #f8fafc;
}

.dpr-modal-empty {
    padding: 48px 24px;
    text-align: center;
    color: #64748b;
    font-size: 14px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px dashed #cbd5e1;
    margin: 10px 0;
}

/* Modal Footer */
.dpr-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 26px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

.dpr-modal-footer-count {
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
}

.dpr-modal-btn-close {
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 700;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #334155;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dpr-modal-btn-close:hover {
    background: #0f172a;
    border-color: #0f172a;
    color: #ffffff;
}

.dpr-freq-tag-sm {
    display: inline-block;
    font-size: 9px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
    margin-left: 4px;
    vertical-align: middle;
}

.dpr-freq-tag-sm[class*="50hz"] {
    background: #eff6ff;
    color: #1d4ed8;
}

.dpr-freq-tag-sm[class*="60hz"] {
    background: #ecfdf5;
    color: #047857;
}

@media (max-width: 768px) {
    .dpr-modal-overlay {
        padding: 12px;
    }
    .dpr-modal-container {
        max-height: 94vh;
    }
    .dpr-modal-header {
        padding: 14px 16px;
    }
    .dpr-modal-title {
        font-size: 17px;
    }
    .dpr-modal-tabs {
        padding: 0 16px;
    }
    .dpr-modal-tab-btn {
        padding: 10px 12px;
        font-size: 12px;
    }
    .dpr-modal-body {
        padding: 14px 16px;
    }
    .dpr-modal-table th,
    .dpr-modal-table td {
        padding: 8px 10px;
        font-size: 11px;
    }
}

