/*
Theme Name: DPM Theme
Theme URI: https://daiphucminh.vn/
Author: Đại Phúc Minh
Author URI: https://daiphucminh.vn/
Description: Giao diện khung cho hệ sinh thái DPM. Chỉnh toàn bộ ở DPM Giao diện: đầu trang kéo thả, menu, mẫu trọn bộ, màu & chữ, bố cục, vị trí khối, bán hàng, chân trang.
Version: 2.16.4
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: dpm-theme
*/
:root{--dpm-bg:#f7efe4;--dpm-surface:#fffdf8;--dpm-text:#33251d;--dpm-title:#a61b1b;--dpm-link:#b12020;--dpm-border:#e2c9a7;--dpm-header-bg:#fffdf8;--dpm-header-text:#33251d;--dpm-header-border:#e2c9a7;--dpm-banner-bg:#fffdf8;--dpm-banner-text:#33251d;--dpm-banner-border:#e2c9a7;--dpm-menu-bg:#b51f24;--dpm-menu-text:#fff3bf;--dpm-menu-hover-bg:#8e171c;--dpm-menu-hover-text:#fff3bf;--dpm-menu-border:#8e171c;--dpm-content-bg:#fffdf8;--dpm-content-text:#33251d;--dpm-content-title:#a61b1b;--dpm-content-link:#b12020;--dpm-content-border:#e2c9a7;--dpm-sidebar-bg:#fffdf8;--dpm-sidebar-text:#33251d;--dpm-sidebar-title-bg:#b51f24;--dpm-sidebar-title-text:#fff3bf;--dpm-sidebar-border:#e2c9a7;--dpm-footer-bg:#7d171b;--dpm-footer-text:#fff4cf;--dpm-footer-link:#fff4cf;--dpm-footer-border:#e2c9a7;--dpm-max:1200px;--dpm-font-size:17px;--dpm-utility-width:38%;--dpm-gap:20px}
*{box-sizing:border-box}html{-webkit-text-size-adjust:100%}body{margin:0;background-color:var(--dpm-bg);color:var(--dpm-text);font-family:Arial,Helvetica,sans-serif;font-size:var(--dpm-font-size);line-height:1.65}img{max-width:100%;height:auto}a{color:var(--dpm-link);text-decoration:none}a:hover{text-decoration:underline}h1,h2,h3,h4,h5,h6{margin:1.2em 0 .55em;line-height:1.3;font-weight:700;color:var(--dpm-title)}h1{font-size:34px}h2{font-size:29px}h3{font-size:25px}h4{font-size:22px}h5{font-size:19px}h6{font-size:17px}p{margin:0 0 1em}.dpm-container{width:min(calc(100% - 32px),var(--dpm-max));margin-inline:auto}.dpm-layout-full .dpm-container{width:100%;max-width:none;padding-inline:16px}.dpm-layout-fixed .dpm-container{width:min(calc(100% - 32px),1200px)}.dpm-layout-custom .dpm-container{width:min(calc(100% - 32px),var(--dpm-max))}
.dpm-main-wrap{padding:22px 0 34px}.dpm-layout{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--dpm-gap);align-items:start}.dpm-layout.has-utility{grid-template-columns:minmax(0,calc(100% - var(--dpm-utility-width) - var(--dpm-gap))) minmax(260px,var(--dpm-utility-width))}.dpm-content,.dpm-sidebar{min-width:0}.dpm-content{background:var(--dpm-content-bg);color:var(--dpm-content-text)}.dpm-content h1,.dpm-content h2,.dpm-content h3,.dpm-content h4,.dpm-content h5,.dpm-content h6{color:var(--dpm-content-title)}.dpm-content a{color:var(--dpm-content-link)}
.dpm-sidebar .widget{background:var(--dpm-sidebar-bg);color:var(--dpm-sidebar-text);border-color:var(--dpm-sidebar-border)}.widget{margin:0 0 16px}.widget-title{font-size:17px;margin:0 0 10px;padding:8px 10px;background:var(--dpm-sidebar-title-bg);color:var(--dpm-sidebar-title-text);line-height:1.35}.dpm-card-none .dpm-content{background:transparent}.dpm-card-none .dpm-sidebar .widget{background:transparent}.dpm-card-border .dpm-content,.dpm-card-border .dpm-sidebar .widget{border:1px solid var(--dpm-content-border);padding:20px}.dpm-card-border .dpm-sidebar .widget{border-color:var(--dpm-sidebar-border)}.dpm-card-soft .dpm-content,.dpm-card-soft .dpm-sidebar .widget{border:1px solid var(--dpm-content-border);border-radius:min(calc(7px * var(--r-k,1)),var(--r-max,999px));box-shadow:var(--sh-all,0 3px 14px rgba(24,39,50,.055));padding:20px}.dpm-card-soft .dpm-sidebar .widget{border-color:var(--dpm-sidebar-border)}.dpm-card-strong .dpm-content,.dpm-card-strong .dpm-sidebar .widget{border:1px solid var(--dpm-content-border);border-radius:min(calc(8px * var(--r-k,1)),var(--r-max,999px));box-shadow:var(--sh-all,0 6px 20px rgba(0,0,0,.10));padding:20px}.dpm-card-strong .dpm-sidebar .widget{border-color:var(--dpm-sidebar-border)}
.dpm-utility-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.dpm-utility-top{grid-column:1/-1}.dpm-utility-left,.dpm-utility-right{min-width:0}.dpm-utility-grid .widget{margin-bottom:0}.dpm-sidebar-right>.widget{margin-top:12px}.dpm-utility-grid{align-content:start}.entry-header{margin-bottom:16px}.entry-title{margin-top:0;font-size:24px}.entry-meta{opacity:.72;font-size:14px}.entry-content{min-width:0}.entry-content::after{content:"";display:table;clear:both}.navigation.pagination{margin-top:28px}.nav-links{display:flex;flex-wrap:wrap;gap:8px}.page-numbers{padding:6px 10px;border:1px solid var(--dpm-content-border);background:var(--dpm-content-bg)}
.dpm-site-footer{margin-top:20px;padding:24px 0;border-top:1px solid var(--dpm-footer-border);color:var(--dpm-footer-text);background:var(--dpm-footer-bg)}.dpm-site-footer a{color:var(--dpm-footer-link)}button,input,select,textarea{font:inherit}input,select,textarea{max-width:100%}
@media(max-width:980px){.dpm-layout,.dpm-layout.has-utility{grid-template-columns:minmax(0,1fr)}.dpm-content{order:1}.dpm-sidebar-right{order:2}.dpm-header-row{align-items:flex-start;flex-direction:column}h1{font-size:30px}.entry-title{font-size:23px}h2{font-size:26px}h3{font-size:23px}}
@media(max-width:600px){body{font-size:16px}.dpm-container{width:min(calc(100% - 22px),var(--dpm-max))}.dpm-utility-grid{grid-template-columns:1fr}.dpm-utility-top{grid-column:auto}.dpm-card-border .dpm-content,.dpm-card-border .dpm-sidebar .widget,.dpm-card-soft .dpm-content,.dpm-card-soft .dpm-sidebar .widget,.dpm-card-strong .dpm-content,.dpm-card-strong .dpm-sidebar .widget{padding:15px}h1{font-size:28px}.entry-title{font-size:21px}h2{font-size:24px}h3{font-size:21px}}

/* DPM Theme 1.4.1 - Tiêu đề khu vực */
.dpm-area-title{margin:0 0 12px;padding:9px 12px;font-size:var(--dpm-block-title-size);line-height:1.35;background:var(--dpm-block-title-bg);color:var(--dpm-block-title-text);border:1px solid var(--dpm-block-title-border)}
.dpm-blog-title{background:transparent;color:var(--dpm-content-title);border:0;border-bottom:2px solid var(--dpm-content-border);padding:0 0 9px;font-size:24px}
.dpm-utility-title{margin-bottom:8px}

/* DPM Theme 1.5.0 - Logo responsive + tiêu đề khối */
.custom-logo-link{display:inline-block;max-width:100%;line-height:0}
.custom-logo,.dpm-branding .custom-logo{display:block;width:auto!important;height:auto!important;max-width:min(100%,var(--dpm-logo-width))!important;max-height:var(--dpm-logo-height)!important;object-fit:contain}
.dpm-block-title{margin:0 0 10px;padding:8px 12px;font-size:18px;line-height:1.35;font-weight:700;background:var(--dpm-sidebar-title-bg);color:var(--dpm-sidebar-title-text);border:1px solid var(--dpm-sidebar-border)}
@media(max-width:700px){.custom-logo,.dpm-branding .custom-logo{max-width:100%!important;height:auto!important}.dpm-block-title{font-size:16px}}

.dpm-title-align-left .dpm-area-title{text-align:left}.dpm-title-align-center .dpm-area-title{text-align:center}.dpm-title-align-right .dpm-area-title{text-align:right}
.dpm-title-weight-400 .dpm-area-title{font-weight:400}.dpm-title-weight-500 .dpm-area-title{font-weight:500}.dpm-title-weight-600 .dpm-area-title{font-weight:600}.dpm-title-weight-700 .dpm-area-title{font-weight:700}.dpm-title-weight-800 .dpm-area-title{font-weight:800}
.dpm-title-style-line .dpm-area-title{background:transparent;color:var(--dpm-title);border:0;border-bottom:3px solid var(--dpm-block-title-border);padding:6px 0 8px}
.dpm-title-style-plain .dpm-area-title{background:transparent;color:var(--dpm-title);border:0;padding:4px 0}

.dpm-widget-content>:first-child{margin-top:0}.dpm-widget-content>:last-child{margin-bottom:0}

/* DPM 2.5.0 - danh sách bài gọn, có thumbnail */
body:not(.single):not(.page) article.post{display:grid;grid-template-columns:180px minmax(0,1fr);column-gap:18px;align-items:start;margin-bottom:22px;padding-bottom:22px;border-bottom:1px solid var(--dpm-content-border)}
body:not(.single):not(.page) article.post .entry-header{grid-column:2;margin-bottom:6px}
body:not(.single):not(.page) article.post .dpm-entry-thumb{grid-column:1;grid-row:1 / span 2;display:block}
body:not(.single):not(.page) article.post .dpm-entry-thumb img{display:block;width:100%;height:auto;aspect-ratio:auto;object-fit:contain;border-radius:min(calc(5px * var(--r-k,1)),var(--r-max,999px))}
body.dpm-pth-wide:not(.single):not(.page) article.post .dpm-entry-thumb img{aspect-ratio:16/9;object-fit:cover}
body.dpm-pth-square:not(.single):not(.page) article.post .dpm-entry-thumb img{aspect-ratio:1/1;object-fit:cover}
body:not(.single):not(.page) article.post .entry-content{grid-column:2}
@media(max-width:640px){body:not(.single):not(.page) article.post{grid-template-columns:110px minmax(0,1fr);column-gap:12px}}


.dpm-header-html,.dpm-banner-html{width:100%}
.dpm-header-html>:first-child,.dpm-banner-html>:first-child{margin-top:0}
.dpm-header-html>:last-child,.dpm-banner-html>:last-child{margin-bottom:0}

/* ============================================================
 * DPM Theme 1.0.0 — gom từ các bản vá cũ, không còn chèn CSS rải rác
 * ============================================================ */
.screen-reader-text{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.entry-title{line-height:1.28}.entry-title a{font-size:inherit}
@media(max-width:782px){.entry-title{font-size:21px}}


/* Trang chủ Demo */
.dpm-demo-link-list{margin:0;padding-left:20px}.dpm-demo-link-list li{margin:0 0 7px}
.dpm-demo-home .dpm-demo-hero{padding:26px;border:1px solid var(--dpm-border);background:var(--dpm-surface);border-radius:min(calc(8px * var(--r-k,1)),var(--r-max,999px));margin-bottom:18px}
.dpm-demo-home .dpm-demo-hero h2{font-size:28px;margin:5px 0 8px}
.dpm-demo-kicker{font-weight:700;color:var(--dpm-accent)}
.dpm-demo-catbar{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 18px}
.dpm-demo-catbar a{display:inline-block;padding:7px 11px;background:var(--dpm-menu-bg);color:var(--dpm-menu-text)!important;border-radius:min(calc(4px * var(--r-k,1)),var(--r-max,999px));text-decoration:none}
.dpm-demo-home-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.dpm-demo-home-card{display:grid;grid-template-columns:145px 1fr;gap:14px;border:1px solid var(--dpm-border);padding:12px;background:var(--dpm-surface);border-radius:min(calc(7px * var(--r-k,1)),var(--r-max,999px))}
.dpm-demo-home-thumb img{width:145px;height:96px;object-fit:cover;border-radius:min(calc(5px * var(--r-k,1)),var(--r-max,999px))}
.dpm-demo-home .dpm-demo-home-card h3{font-size:20px;margin:2px 0 7px}
.dpm-demo-home-card p{margin:0 0 8px}.dpm-demo-readmore{text-decoration:none;font-weight:600}
@media(max-width:900px){.dpm-demo-home-grid{grid-template-columns:1fr}}
@media(max-width:520px){.dpm-demo-home-card{grid-template-columns:1fr}.dpm-demo-home-thumb img{width:100%;height:auto}}

/* Trang "Không cột tiện ích" — khung đọc vừa mắt */
.dpm-layout-narrow{max-width:900px}

/* Trang "Toàn màn hình (cho app)" */
.dpm-app-wrap{display:block;width:100%;min-height:calc(100vh - 120px)}
.dpm-app{width:100%}
.dpm-app>:first-child{margin-top:0}.dpm-app>:last-child{margin-bottom:0}
.dpm-app .alignwide,.dpm-app .alignfull{max-width:none}


body:not(.single):not(.page) article.post:not(.has-post-thumbnail){display:block}

/* Menu chân trang */
.dpm-footer-menu{list-style:none;display:flex;flex-wrap:wrap;gap:6px 20px;margin:12px 0 0;padding:0}
.dpm-footer-menu a{color:var(--dpm-footer-link)}
