/*
 * Mobile website header.
 * Desktop is untouched. Bottom application tabbar is disabled.
 */
.psdv-mobile-site-header,
.psdv-mobile-drawer,
.psdv-mobile-tabbar {
	display: none;
}

@media (max-width: 767px) {
	html {
		scroll-padding-bottom: 0;
	}

	body {
		padding-bottom: 0 !important;
	}

	.psdv-mobile-tabbar,
	.psdv-mobile-app-header {
		display: none !important;
	}

	.site-header > .site-header__inner,
	.site-mobile-menu-panel,
	.site-menu-toggle,
	.site-header__mobile-search,
	.site-header__mobile-cart {
		display: none !important;
	}

	.site-header {
		position: sticky;
		top: 0;
		z-index: 1200;
		min-height: 0;
		padding: 0;
		border: 0;
		background: #fff;
		box-shadow: none;
	}

	body.admin-bar .site-header {
		top: var(--wp-admin--admin-bar--height, 46px);
	}

	.psdv-mobile-site-header {
		display: block;
		border-bottom: 1px solid #ece8e4;
		background: rgba(255, 255, 255, .98);
		backdrop-filter: blur(18px);
		-webkit-backdrop-filter: blur(18px);
	}

	.psdv-mobile-site-header__bar {
		display: grid;
		position: relative;
		display: flex;
		align-items: center;
		gap: 2px;
		min-height: 62px;
		padding: 7px 11px;
	}

	.psdv-mobile-site-header__menu {
		margin-right: auto;
	}

	.psdv-mobile-site-header__favorite {
		margin-left: 0;
	}

	.psdv-mobile-site-header__button {
		position: relative;
		display: grid;
		place-items: center;
		width: 42px;
		height: 42px;
		padding: 0;
		border: 0;
		border-radius: 50%;
		background: transparent;
		color: #171513;
		text-decoration: none;
		appearance: none;
	}

	.psdv-mobile-site-header__button:active {
		background: #f3f1ef;
	}

	.psdv-mobile-site-header__button svg {
		width: 25px;
		height: 25px;
		fill: none;
		stroke: currentColor;
		stroke-width: 1.65;
		stroke-linecap: round;
		stroke-linejoin: round;
	}

	.psdv-mobile-site-header__menu {
		display: flex;
		flex-direction: column;
		justify-content: center;
		gap: 5px;
	}

	.psdv-mobile-site-header__menu span {
		display: block;
		width: 23px;
		height: 1.5px;
		background: currentColor;
	}

	.psdv-mobile-site-header__brand {
		position: absolute;
		top: 50%;
		left: 50%;
		display: grid;
		place-items: center;
		width: 42px;
		height: 42px;
		color: #171513;
		text-decoration: none;
		transform: translate(-50%, -50%);
	}

	.psdv-mobile-site-header__brand img {
		display: block;
		width: 38px;
		height: 38px;
		border-radius: 10px;
		object-fit: contain;
	}

	.psdv-mobile-site-header__count {
		position: absolute;
		top: 1px;
		right: 0;
		display: grid;
		place-items: center;
		min-width: 16px;
		height: 16px;
		padding: 0 4px;
		border-radius: 999px;
		background: #61080d;
		color: #fff;
		font-size: 9px;
		font-weight: 700;
		line-height: 1;
	}

	.psdv-mobile-site-header__count:empty {
		display: none;
	}

	.psdv-mobile-drawer {
		position: fixed;
		inset: 0;
		z-index: 2147483000;
		isolation: isolate;
		contain: layout style;
		display: block;
		visibility: hidden;
		opacity: 0;
		pointer-events: none;
		transition: opacity .22s ease, visibility .22s ease;
	}

	.psdv-mobile-drawer.is-open {
		visibility: visible;
		opacity: 1;
		pointer-events: auto;
	}

	.psdv-mobile-drawer__backdrop {
		position: fixed;
		z-index: 0;
		inset: 0;
		border: 0;
		background: rgba(15, 13, 12, .42);
		opacity: 0;
		transition: opacity .22s ease;
	}

	.psdv-mobile-drawer.is-open .psdv-mobile-drawer__backdrop {
		opacity: 1;
	}

	.psdv-mobile-drawer__panel {
		position: fixed;
		z-index: 1;
		top: 0;
		bottom: 0;
		left: 0;
		width: min(88vw, 390px);
		padding: max(14px, env(safe-area-inset-top)) 0 28px;
		overflow-y: auto;
		background: #fff;
		box-shadow: 18px 0 50px rgba(0, 0, 0, .16);
		transform: translateX(-102%);
		transition: transform .26s cubic-bezier(.22, .61, .36, 1);
	}

	.psdv-mobile-drawer.is-open .psdv-mobile-drawer__panel {
		transform: translateX(0);
	}

	.psdv-mobile-drawer__head {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 16px;
		padding: 4px 20px 18px;
		border-bottom: 1px solid #efedeb;
	}

	.psdv-mobile-drawer__brand {
		display: flex;
		align-items: center;
		gap: 11px;
		min-width: 0;
		color: #171513;
		text-decoration: none;
	}

	.psdv-mobile-drawer__brand img {
		width: 38px;
		height: 38px;
		border-radius: 10px;
		object-fit: contain;
	}

	.psdv-mobile-drawer__brand span {
		overflow: hidden;
		font-size: 15px;
		font-weight: 700;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.psdv-mobile-drawer__close {
		display: grid;
		place-items: center;
		width: 40px;
		height: 40px;
		padding: 0;
		border: 0;
		border-radius: 50%;
		background: #f4f2f0;
		color: #171513;
		font-size: 28px;
		font-weight: 300;
		line-height: 1;
	}

	.psdv-mobile-drawer__nav {
		display: grid;
		padding: 12px 20px 10px;
	}

	.psdv-mobile-drawer__nav > a,
	.psdv-mobile-drawer__nav summary,
	.psdv-mobile-drawer__main-link {
		display: flex;
		align-items: center;
		justify-content: space-between;
		min-height: 48px;
		padding: 0;
		border: 0;
		border-bottom: 1px solid #f0eeec;
		background: transparent;
		color: #171513;
		font-size: 17px;
		font-weight: 500;
		line-height: 1.2;
		text-decoration: none;
		list-style: none;
		cursor: pointer;
	}

	.psdv-mobile-drawer__main-link {
		font-size: 22px !important;
		font-weight: 700 !important;
	}

	.psdv-mobile-drawer__nav summary::-webkit-details-marker {
		display: none;
	}

	.psdv-mobile-drawer__nav details[open] summary span:last-child {
		transform: rotate(180deg);
	}

	.psdv-mobile-drawer__subnav {
		display: grid;
		padding: 4px 0 10px 18px;
		border-bottom: 1px solid #f0eeec;
	}

	.psdv-mobile-drawer__subnav a {
		padding: 10px 0;
		color: #6d6762;
		font-size: 15px;
		text-decoration: none;
	}

	.psdv-mobile-drawer__section {
		display: grid;
		padding: 18px 20px 4px;
		border-top: 8px solid #f7f6f5;
	}

	.psdv-mobile-drawer__section p {
		margin: 0 0 5px;
		color: #8b847e;
		font-size: 11px;
		font-weight: 700;
		letter-spacing: .08em;
		text-transform: uppercase;
	}

	.psdv-mobile-drawer__section a {
		padding: 11px 0;
		border-bottom: 1px solid #f0eeec;
		color: #171513;
		font-size: 16px;
		text-decoration: none;
	}

	html.psdv-mobile-drawer-open,
	html.psdv-mobile-drawer-open body {
		overflow: hidden;
	}

	.site-footer {
		margin-bottom: 0 !important;
	}
}

@media (max-width: 380px) {
	.psdv-mobile-site-header__bar { padding-right: 7px; padding-left: 7px; }
	.psdv-mobile-site-header__button { width: 39px; height: 39px; }
	.psdv-mobile-site-header__brand { width: 40px; height: 40px; }
	.psdv-mobile-site-header__brand img { width: 36px; height: 36px; }
}
@media (max-width: 767px) {
  .psdv-mobile-app-header, .psdv-mobile-tabbar { display:none !important; }
  body { padding-bottom:0 !important; }

	.psdv-mobile-drawer.is-open {
		transform: none;
	}

	html.psdv-mobile-drawer-open body > *:not(.psdv-mobile-drawer):not(#wpadminbar) {
		pointer-events: none;
	}

	html.psdv-mobile-drawer-open .psdv-mobile-drawer,
	html.psdv-mobile-drawer-open .psdv-mobile-drawer * {
		pointer-events: auto;
	}

}

/* Brand refinement for the mobile header and drawer. */
@media (max-width: 767px) {
	:root {
		--psdv-mobile-burgundy: #61080d;
		--psdv-mobile-burgundy-dark: #4b070b;
		--psdv-mobile-gold: #b18a4d;
		--psdv-mobile-ink: #3f332f;
		--psdv-mobile-muted: #756b66;
		--psdv-mobile-line: #eee3d8;
		--psdv-mobile-soft: #f8f3ed;
	}

	.psdv-mobile-site-header {
		border-bottom-color: var(--psdv-mobile-line);
	}

	.psdv-mobile-site-header__button {
		color: var(--psdv-mobile-burgundy);
	}

	.psdv-mobile-site-header__button:active {
		background: var(--psdv-mobile-soft);
	}

	.psdv-mobile-site-header__count {
		background: var(--psdv-mobile-burgundy);
		color: #fff;
	}

	.psdv-mobile-drawer__panel {
		background: #fffdfb;
		box-shadow: 18px 0 52px rgba(50, 17, 14, .18);
	}

	.psdv-mobile-drawer__head {
		padding-inline: 24px;
		border-bottom-color: var(--psdv-mobile-line);
	}

	.psdv-mobile-drawer__brand {
		color: var(--psdv-mobile-burgundy);
	}

	.psdv-mobile-drawer__brand span {
		color: var(--psdv-mobile-burgundy);
		font-weight: 700;
	}

	.psdv-mobile-drawer__close {
		background: var(--psdv-mobile-soft);
		color: var(--psdv-mobile-burgundy);
		transition: background .18s ease, transform .18s ease;
	}

	.psdv-mobile-drawer__close:active {
		background: #f0e4d8;
		transform: scale(.96);
	}

	.psdv-mobile-drawer__nav {
		padding-right: 24px;
		padding-left: 24px;
	}

	.psdv-mobile-drawer__nav > a,
	.psdv-mobile-drawer__nav summary,
	.psdv-mobile-drawer__main-link {
		border-bottom-color: var(--psdv-mobile-line);
		color: var(--psdv-mobile-burgundy);
	}

	.psdv-mobile-drawer__nav > a:active,
	.psdv-mobile-drawer__nav summary:active,
	.psdv-mobile-drawer__main-link:active {
		background: var(--psdv-mobile-soft);
	}

	.psdv-mobile-drawer__main-link {
		color: var(--psdv-mobile-burgundy-dark) !important;
	}

	.psdv-mobile-drawer__nav summary span:last-child,
	.psdv-mobile-drawer__main-link span:last-child {
		color: var(--psdv-mobile-gold);
		transition: transform .18s ease, color .18s ease;
	}

	.psdv-mobile-drawer__nav details[open] > summary {
		color: var(--psdv-mobile-burgundy-dark);
	}

	.psdv-mobile-drawer__nav details[open] > summary::before {
		position: absolute;
		left: -12px;
		width: 3px;
		height: 24px;
		border-radius: 999px;
		background: var(--psdv-mobile-gold);
		content: '';
	}

	.psdv-mobile-drawer__nav summary {
		position: relative;
	}

	.psdv-mobile-drawer__subnav {
		padding: 6px 0 12px 20px;
		border-bottom-color: var(--psdv-mobile-line);
	}

	.psdv-mobile-drawer__subnav a {
		color: var(--psdv-mobile-muted);
		transition: color .18s ease, transform .18s ease;
	}

	.psdv-mobile-drawer__subnav a:active {
		color: var(--psdv-mobile-burgundy);
		transform: translateX(2px);
	}

	.psdv-mobile-drawer__section {
		padding-right: 24px;
		padding-left: 24px;
		border-top-color: #f6f1ec;
	}

	.psdv-mobile-drawer__section p {
		color: var(--psdv-mobile-gold);
	}

	.psdv-mobile-drawer__section a {
		border-bottom-color: var(--psdv-mobile-line);
		color: var(--psdv-mobile-burgundy);
	}

	.psdv-mobile-drawer__section a:active {
		background: var(--psdv-mobile-soft);
	}

	.psdv-mobile-drawer__backdrop {
		background: rgba(34, 13, 11, .46);
	}
}

/* Compact mobile footer — desktop footer remains unchanged. */
.site-footer-mobile {
	display: none;
}

@media (max-width: 767px) {
	.site-footer > .site-footer__inner,
	.site-footer > .site-footer__bottom {
		display: none !important;
	}

	.site-footer {
		margin-top: 28px;
		background: #48060A; /* Замените на ТОЧНЫЙ HEX-код фона вашего логотипа */
		color: #fff;
	}

	.site-footer-mobile {
		display: grid;
		gap: 0;
		width: calc(100% - 28px);
		margin-inline: auto;
		padding: 28px 0 max(22px, env(safe-area-inset-bottom));
	}

	.site-footer-mobile__brand {
		display: grid;
		justify-items: center;
		gap: 10px;
		padding-bottom: 20px;
		text-align: center;
	}

	.site-footer-mobile__brand img {
		display: block;
		width: 138px;
		height: auto;
		border-radius: 10px;
	}

	.site-footer-mobile__brand p {
		max-width: 310px;
		margin: 0;
		color: rgba(255,255,255,.68);
		font-size: 13px;
		line-height: 1.5;
	}

	.site-footer-mobile__nav {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 12px;
		padding: 18px 0;
		border-top: 1px solid rgba(255,255,255,.12);
		border-bottom: 1px solid rgba(255,255,255,.12);
	}

	.site-footer-mobile__nav section {
		min-width: 0;
	}

	.site-footer-mobile__nav h2 {
		margin: 0 0 8px;
		color: #d4b06a;
		font-family: var(--psdv-font);
		font-size: 11px;
		font-weight: 700;
		letter-spacing: .08em;
		text-transform: uppercase;
	}

	.site-footer-mobile__nav a {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 8px;
		min-height: 37px;
		border-bottom: 1px solid rgba(255,255,255,.08);
		color: rgba(255,255,255,.84);
		font-size: 13px;
		line-height: 1.2;
		text-decoration: none;
	}

	.site-footer-mobile__nav a:last-child {
		border-bottom: 0;
	}

	.site-footer-mobile__nav a span {
		color: #d4b06a;
		font-size: 19px;
		font-weight: 300;
	}

	.site-footer-mobile__expert {
		display: grid;
		gap: 13px;
		margin-top: 16px;
		padding: 16px;
		border: 1px solid rgba(212,176,106,.26);
		border-radius: 16px;
		background: rgba(255,255,255,.055);
	}

	.site-footer-mobile__expert div {
		display: grid;
		gap: 3px;
	}

	.site-footer-mobile__expert span {
		color: #d4b06a;
		font-size: 10px;
		font-weight: 700;
		letter-spacing: .08em;
		text-transform: uppercase;
	}

	.site-footer-mobile__expert strong {
		color: #fff;
		font-family: var(--psdv-heading-font);
		font-size: 23px;
		font-weight: 400;
		line-height: 1.12;
	}

	.site-footer-mobile__expert > a {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		min-height: 44px;
		border: 1px solid rgba(212,176,106,.58);
		border-radius: 12px;
		background: #fff;
		color: #61080d;
		font-size: 13px;
		font-weight: 700;
		text-decoration: none;
	}

	.site-footer-mobile__contacts {
		display: grid;
		grid-template-columns: 1fr;
		gap: 0;
		margin-top: 16px;
		border-top: 1px solid rgba(255,255,255,.12);
		border-bottom: 1px solid rgba(255,255,255,.12);
	}

	.site-footer-mobile__contacts > a,
	.site-footer-mobile__contacts > div {
		display: grid;
		grid-template-columns: 38px minmax(0, 1fr);
		grid-template-rows: auto auto;
		gap: 2px 10px;
		align-items: center;
		min-width: 0;
		padding: 12px 0;
		border-bottom: 1px solid rgba(255,255,255,.08);
		color: inherit;
		text-decoration: none;
	}

	.site-footer-mobile__contacts > :last-child {
		border-bottom: 0;
	}

	.site-footer-mobile__contacts > a > span,
	.site-footer-mobile__contacts > div > span {
		grid-row: 1 / span 2;
		display: grid;
		place-items: center;
		width: 36px;
		height: 36px;
		border: 1px solid rgba(212,176,106,.26);
		border-radius: 50%;
		color: #d4b06a;
	}

	.site-footer-mobile__contacts svg {
		width: 18px;
		height: 18px;
	}

	.site-footer-mobile__contacts small {
		color: rgba(255,255,255,.5);
		font-size: 10px;
		line-height: 1.2;
	}

	.site-footer-mobile__contacts strong {
		overflow-wrap: anywhere;
		color: rgba(255,255,255,.86);
		font-size: 13px;
		font-weight: 500;
		line-height: 1.3;
	}

	.site-footer-mobile__bottom {
		display: grid;
		justify-items: center;
		gap: 10px;
		padding-top: 17px;
		text-align: center;
	}

	.site-footer-mobile__bottom p {
		margin: 0;
		color: rgba(255,255,255,.48);
		font-size: 10px;
	}

	.site-footer-mobile__bottom div {
		display: flex;
		flex-wrap: wrap;
		justify-content: center;
		gap: 6px 14px;
	}

	.site-footer-mobile__bottom a {
		color: rgba(255,255,255,.58);
		font-size: 10px;
		text-decoration: none;
	}
}

@media (max-width: 360px) {
	.site-footer-mobile__nav {
		grid-template-columns: 1fr;
		gap: 16px;
	}
}

/* Mobile footer brand-color correction */
@media (max-width: 767px) {
	.site-footer {
		background: #48060A; /* Тот же самый ТОЧНЫЙ HEX-код */
	}

	.site-footer-mobile__brand img {
		border-radius: 0;
		background: transparent; /* Убираем фон под самой картинкой, чтобы избежать наложений */
		box-shadow: none;
	}

	.site-footer-mobile__expert {
		border-color: rgba(212, 176, 106, .28);
		background: #61080d;
	}

	.site-footer-mobile__expert > a {
		border-color: rgba(212, 176, 106, .52);
		background: #fffaf3;
		color: #57070b;
	}

	.site-footer-mobile__nav,
	.site-footer-mobile__contacts,
	.site-footer-mobile__bottom {
		border-color: rgba(255,255,255,.11);
	}
}
/* --- ВОССТАНОВЛЕНИЕ БЛОКА ЛОЯЛЬНОСТИ ДЛЯ МОБИЛЬНОЙ ВЕРСИИ --- */
@media (max-width: 767px) {
    /* 1. Главный контейнер */
    .psdv-loyalty-dashboard {
        background: linear-gradient(180deg, #6c0a0f 0%, #4a0407 100%);
        border-radius: 12px;
        padding: 24px;
        color: #ffffff;
    }

    /* 2. Шапка блока (Ваша скидка / Максимум) */
    .psdv-loyalty-dashboard__top {
        display: flex;
        justify-content: space-between;
        align-items: flex-end;
        margin-bottom: 15px;
    }

    .psdv-loyalty-dashboard__top > div {
        display: flex;
        flex-direction: column;
    }

    .psdv-loyalty-dashboard__top span,
    .psdv-loyalty-dashboard__max span {
        font-size: 13px;
        color: rgba(255, 255, 255, 0.7);
        margin-bottom: 4px;
    }

    .psdv-loyalty-dashboard__top strong {
        font-size: 48px;
        font-weight: 700;
        line-height: 1;
    }

    .psdv-loyalty-dashboard__max {
        text-align: right;
        align-items: flex-end;
    }

    .psdv-loyalty-dashboard__max b {
        font-size: 24px;
        font-weight: 700;
        line-height: 1;
    }

    /* 3. Полоса прогресса и текст */
    .psdv-loyalty-dashboard__progress {
        margin-bottom: 24px;
    }

    .psdv-loyalty-dashboard__bar {
        height: 4px;
        background: rgba(255, 255, 255, 0.15);
        border-radius: 4px;
        margin-bottom: 12px;
        overflow: hidden;
    }

    .psdv-loyalty-dashboard__bar i {
        display: block;
        height: 100%;
        background: #9d1f27; /* Цвет заполненной части шкалы */
        border-radius: 4px;
    }

    .psdv-loyalty-dashboard__progress p {
        font-size: 13px;
        color: rgba(255, 255, 255, 0.8);
        margin: 0;
        /* Убираем странный желтый фон из сломанной версии */
        background: transparent !important;
        padding: 0 !important;
    }

    /* 4. Шаги (кружочки с процентами и суммами) */
    .psdv-loyalty-dashboard__steps {
        display: flex;
        justify-content: space-between;
        position: relative;
        margin-bottom: 24px;
    }

    /* Тонкая соединительная линия между кружками */
    .psdv-loyalty-dashboard__steps::before {
        content: '';
        position: absolute;
        top: 7px;
        left: 10%;
        right: 10%;
        height: 1px;
        background: rgba(255, 255, 255, 0.2);
        z-index: 1;
    }

    .psdv-loyalty-dashboard__steps > div {
        display: flex;
        flex-direction: column;
        align-items: center;
        flex: 1;
        position: relative;
        z-index: 2;
    }

    /* Сами кружочки */
    .psdv-loyalty-dashboard__steps > div::before {
        content: '';
        width: 14px;
        height: 14px;
        border-radius: 50%;
        background: #4a0407; /* Цвет внутри кружка сливается с фоном */
        border: 2px solid rgba(255, 255, 255, 0.4);
        margin-bottom: 8px;
    }

    .psdv-loyalty-dashboard__steps > div b {
        font-size: 16px;
        font-weight: 700;
        margin-bottom: 2px;
        line-height: 1.2;
    }

    .psdv-loyalty-dashboard__steps > div span {
        font-size: 11px;
        color: rgba(255, 255, 255, 0.5);
        text-align: center;
        white-space: nowrap;
    }

    /* 5. Нижняя статистика */
    .psdv-loyalty-dashboard__meta {
        display: flex;
        justify-content: space-between;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        padding-top: 16px;
    }

    .psdv-loyalty-dashboard__meta span {
        font-size: 12px;
        color: rgba(255, 255, 255, 0.6);
    }
    
    /* Убираем системный желтый фон у любых уведомлений внутри блока лояльности */
    .psdv-loyalty-dashboard__progress p,
    .psdv-loyalty-dashboard__progress div:not(.psdv-loyalty-dashboard__bar),
    .psdv-loyalty-dashboard mark,
    .psdv-loyalty-dashboard p,
    .psdv-loyalty-dashboard .woocommerce-info,
    .psdv-loyalty-dashboard .woocommerce-message,
    .psdv-loyalty-dashboard .wc-forward {
        background: transparent !important;
        background-color: transparent !important;
        padding: 0 !important;
        border: none !important;
        box-shadow: none !important;
        color: rgba(255, 255, 255, 0.8) !important;
        font-size: 13px !important;
        line-height: 1.4 !important;
        margin-bottom: 24px !important;
    }
}