:root {
    --bg: #ffffff;
    --text: #111111;
    --card: #ffffff;
    --card-muted: #f4f8fb;
    --border: #e3e6ea;

    --accent: #2271b1;
    --accent-soft: #2a7fff;

    --success: #2fbf71;
    --muted-text: #777777;
}

[data-theme="dark"] {
    --bg: #121212;
    --text: #ffffff;
    --card: #1e1e1e;
    --card-muted: #1a1a1a;
    --border: #2c2c2c;

    --accent: #4ea1ff;
    --accent-soft: #6fb3ff;

    --success: #3adf86;
    --muted-text: #aaaaaa;
}

body {
    background: var(--bg);
    color: var(--text);
}
h1,h2,h3,h4,h5,h6{
    color: var(--text);
}
h1{
    padding:15px;
}
.has-global-padding{
    padding-top: 0px !important
}
.mobile-header-title a{
    text-decoration: none;
}

button {
    all: unset;
    cursor: pointer;
    font: inherit;
    color: inherit;
}

.filters {
    display: flex;
    gap: 10px;
    padding: 15px;
}

.filter {
    flex: 1;
    padding: 10px 12px;
    border-radius: 8px;
    background: var(--card);
    color: var(--text);
    font-weight: 500;
    text-align: center;
    border: 1px solid var(--border);
}

.filter.blue {
    color: var(--accent-soft);
}

.filter.green {
    color: var(--success);
}

.discounts-app {
    max-width: 420px;
    margin: auto;
}

.discounts-grid {
    padding-bottom: 80px;
}

.card {
    background: var(--card-muted);
    border-radius: 14px;
    margin: 15px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 1px solid var(--border);
}

.card img {
    width: 100% !important;
    height: 180px !important;
    object-fit: cover;
    display: block;
}

.card-content {
    padding: 15px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding:15px 0px !important;
    border:0px !important;
    background:none !important;
}

.card-header h3 {
    margin: 0;
    font-size: 18px;
    color: var(--accent-soft);
    background: transparent;
    border-bottom: none;
}

.discount {
    color: var(--success);
    font-weight: 700;
}

.price {
    margin: 8px 0;
}

.price .old {
    text-decoration: line-through;
    color: var(--muted-text);
    margin-right: 8px;
}

.price .new {
    font-size: 22px;
    color: var(--accent-soft);
    font-weight: 700;
}

.description {
    font-size: 14px;
    color: var(--muted-text);
}

.meta {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
}

.tag {
    color: var(--success);
    font-weight: 600;
}

.date {
    color: var(--muted-text);
}

.country-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 999999;
}

.country-modal-content {
    background: var(--card);
    padding: 28px;
    border-radius: 12px;
    width: 340px;
    text-align: center;
    border: 1px solid var(--border);
}

.country-btn {
    width: 100%;
    box-sizing: border-box;
    margin-top: 4px !important;
    display: flex;
    align-items: center;
    gap: 10px;
}

.country-btn:first-child{
    margin-top:0px
}

.mobile-navbar {
    height: 56px;
    background: var(--card);
    padding: 0 12px;
}

.mobile-navbar .navbar-brand {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 18px;
}

.icon-btn {
    background: none;
    border: none;
    font-size: 22px;
    color: var(--text);
}

.offcanvas {
    width: 85%;
    max-width: 320px;
    background: var(--bg);
    z-index: 10000;
}

.offcanvas-header {
    border-bottom: 1px solid var(--border);
    padding-top: 13px;
    padding-bottom: 12px;
}

.mobile-menu a {
    display: block;
    padding: 14px 0;
    font-size: 18px;
    color: var(--text);
    text-decoration: none;
}

.mobile-menu a + a {
    border-top: 1px solid var(--border);
}

.mobile-section h6 {
    margin: 16px 0 8px;
    font-size: 13px;
    color: var(--muted-text);
}

.mobile-section button {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 8px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
}

/* header */
.mobile-header {
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    background: var(--card);
    border-bottom: 1px solid var(--border);
    z-index: 9999;
}

.mobile-header-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-weight: 700;
    font-size: 18px;
}

.mobile-header-title span {
    color: var(--accent);
}

.mobile-header-btn {
    background: none;
    border: none;
    font-size: 22px;
    color: var(--text);
}

/* offset for fixed header */
body {
    padding-top: 56px;
}

/* menu */
.mobile-menu a {
    display: block;
    padding: 14px 0;
    font-size: 18px;
    text-decoration: none;
    color: var(--text);
}

/* .mobile-menu a + a {
    border-top: 1px solid var(--border);
} */

.mobile-section h6 {
    margin: 16px 0 8px;
    font-size: 13px;
    color: var(--muted-text);
}

#settingsMenu {
    width: 85%;
    max-width: 320px;
    background: var(--bg);
}

#settingsMenu .offcanvas-header {
    border-bottom: 1px solid var(--border);
}

.register-card {
    margin-top: 20px;
}

.register-title {
    margin-bottom: 16px;
    font-size: 20px;
    color: var(--accent-soft);
    text-align: center;
}

/* form */
.register-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 13px;
    color: var(--muted-text);
}

.form-group input {
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
    font-size: 15px;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent);
}

/* button */
.primary-btn {
    margin-top: 8px;
    padding: 12px;
    border-radius: 8px;
    border: none;
    background: var(--accent);
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    text-align: center;
}

/* error */
.form-error {
    background: #ffefef;
    color: #b00020;
    padding: 10px;
    border-radius: 8px;
    font-size: 14px;
}
h1.wp-block-post-title{
    display:none
}

textarea {
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
    font-size: 15px;
    box-sizing: border-box;
}

/* список акций */
.discount-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.discount-row-left {
    display: flex;
    gap: 10px;
    align-items: center;
}

.discount-row-title {
    font-weight: 600;
}

.discount-row-status {
    font-size: 12px;
    color: var(--muted-text);
}

.discount-row-actions {
    display: flex;
    gap: 10px;
}

.icon-btn {
    font-size: 18px;
    text-decoration: none;
    color: var(--text);
}

.muted {
    color: var(--muted-text);
}

/* success */
.form-success {
    background: #e9f9ef;
    color: #1b7a3a;
    padding: 10px;
    border-radius: 8px;
}

/* danger */
.danger-btn {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: none;
    background: #c62828;
    color: #fff;
    font-size: 16px;
}

.my-discount-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

/* квадратная миниатюра */
.my-discount-thumb {
    width: 60px;
    height: 60px;
    min-width: 60px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    background-color: var(--card-muted);
}

/* текст */
.my-discount-info {
    flex: 1;
}

.my-discount-title {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 4px;
}

.my-discount-status {
    font-size: 12px;
    color: var(--muted-text);
}

/* маленькие иконки */
.my-discount-actions {
    display: flex;
    gap: 12px;
}

.action-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: var(--card);
    border: 1px solid var(--border);
}

.action-icon svg {
    width: 16px;
    height: 16px;
    fill: var(--text);
}

.action-icon:hover {
    background: var(--card-muted);
}

.my-discount-actions a {
    text-decoration: none;
    opacity: 0.7;
}

.my-discount-actions a:hover {
    opacity: 1;
}
.danger-menu-btn{
    border: 0px !important
}
.wp-block-post-title{
    display:none !important
}
.discount-dates {
    font-size: 12px;
    color: var(--muted-text);
}
.discount-period {
    margin: 10px 0 6px;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.period-dates {
    color: var(--muted-text);
}

.period-status {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

/* состояния */
.period-status.активна {
    background: #e6f7ee;
    color: #1b7a3a;
}

.period-status.скоро\ начнётся {
    background: #fff4e5;
    color: #a15c00;
}

.period-status.завершена {
    background: #ffeaea;
    color: #b00020;
}

/* bottom navigation */
.app-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: var(--card);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 9999;
}

.tab-item {
    text-decoration: none;
    color: var(--muted-text);
    font-size: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 1;
}

.tab-icon {
    font-size: 20px;
}

.tab-item.active {
    color: var(--accent);
}

/* чтобы контент не перекрывался */
body {
    padding-bottom: 70px;
}

.page-home .app-bottom-nav a[href="/"],
.page-catalog .app-bottom-nav a[href="/catalog/"],
.page-submit .app-bottom-nav a[href="/dashboard/"],
.page-about .app-bottom-nav a[href="/about/"] {
    color: var(--accent);
}

.card-item {
    position: relative;
}

.favorite-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,0.95);
    box-shadow: 0 4px 14px rgba(0,0,0,0.12);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s ease;
    z-index: 5;
}

.favorite-btn:hover {
    transform: scale(1.06);
}

.favorite-icon {
    font-size: 22px;
    line-height: 1;
    transition: 0.2s ease;
}

.favorite-btn.active .favorite-icon {
    color: #e53935;
}

.favorite-btn.active .favorite-icon::before {
    content: '♥';
}

.favorite-btn:not(.active) .favorite-icon::before {
    content: '♡';
}

