/*
Theme Name: Brand Starter
Theme URI: https://devorra.ru
Template: astra
Author: Devorra
Author URI: https://devorra.ru
Description: Универсальная дочерняя тема Astra для монобрендовых интернет-магазинов электротехники. Динамические цвета и тексты через BRAND_ID.
Version: 2.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: brand-starter
*/

/* ==========================================================================
   CSS Variables
   ========================================================================== */

:root {
  /* Astra global palette override — kill blue */
  --ast-global-color-0: #E65100;
  --ast-global-color-1: #BF360C;
  --ast-global-color-2: #1e293b;
  --ast-global-color-3: #334155;
  --ast-global-color-4: #F5F5F5;
  --ast-global-color-5: #FFFFFF;
  --ast-global-color-6: #757575;
  --ast-global-color-7: #333333;
  --ast-global-color-8: #1A1A2E;

  /* Theme palette */
  --primary: #E65100;
  --primary-dark: #BF360C;
  --primary-light: #FF8A65;
  --secondary: #4d4d4d;
  --secondary-dk: #333333;
  --secondary-light: #6b7280;
  --neutral-900: #1A1A2E;
  --neutral-700: #424242;
  --neutral-500: #757575;
  --neutral-300: #E0E0E0;
  --neutral-200: #F5F5F5;
  --neutral-100: #FAFAFA;
  --white: #FFFFFF;
  --success: #2E7D32;
  --danger: #C62828;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,.1);
  --shadow-lg: 0 8px 24px rgba(0,0,0,.12);
  --radius: 8px;
  --radius-sm: 4px;
  --radius-lg: 12px;
  --transition: .25s ease;
  --container: 1280px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: var(--font);
  color: var(--neutral-900);
  background: var(--neutral-100);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--primary-dark);
}

/* Astra overrides */
.ast-container {
  max-width: var(--container);
  padding-left: 20px;
  padding-right: 20px;
}

/* Hide default Astra header/footer/scroll-top on all pages */
.site-header,
.ast-above-header,
.ast-below-header,
.site-footer,
.ast-small-footer,
#ast-scroll-top {
  display: none !important;
}

/* Remove Astra default content wrapper */
#content > .ast-container {
  max-width: 100%;
  padding: 0;
}

.site-content .ast-container {
  max-width: 100%;
  padding: 0;
}

/* ==========================================================================
   Container
   ========================================================================== */

.tdm-container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

/* ==========================================================================
   Top Bar
   ========================================================================== */

.tdm-topbar {
  background: var(--secondary);
  color: var(--white);
  font-size: 13px;
  line-height: 1;
  padding: 6px 0;
}

.tdm-topbar .tdm-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tdm-topbar__nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.tdm-topbar__nav ul {
  display: flex;
  align-items: center;
  gap: 20px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.tdm-topbar__nav li {
  list-style: none;
}

.tdm-topbar__nav a,
.tdm-topbar__nav li a {
  color: rgba(255,255,255,.85);
  font-size: 13px;
  transition: color var(--transition);
}

.tdm-topbar__nav a:hover,
.tdm-topbar__nav li a:hover {
  color: var(--white);
}

.tdm-topbar__schedule {
  color: rgba(255,255,255,.7);
  font-size: 13px;
}

.tdm-topbar__auth {
  display: flex;
  align-items: center;
  gap: 16px;
}

.tdm-topbar__auth a {
  color: rgba(255,255,255,.85);
  font-size: 13px;
  transition: color var(--transition);
}

.tdm-topbar__auth a:hover {
  color: var(--white);
}

/* ==========================================================================
   Header
   ========================================================================== */

.tdm-header {
  background: var(--white);
  box-shadow: var(--shadow-sm);
  position: relative;
  z-index: 1000;
}

.tdm-header .tdm-container {
  padding-top: 12px;
  padding-bottom: 12px;
}

.tdm-header__row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
}

.tdm-header__burger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--neutral-900);
}

.tdm-header__burger svg {
  width: 24px;
  height: 24px;
  display: block;
}

.tdm-header__logo {
  flex-shrink: 0;
  text-decoration: none;
}

.tdm-header__logo img,
.tdm-header__logo-img {
  height: 44px;
  width: auto;
  display: block;
}

.tdm-header__logo-text {
  font-size: 22px;
  font-weight: 300;
  color: var(--neutral-900);
  letter-spacing: -.5px;
  line-height: 1;
  display: flex;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
}

.tdm-header__logo-tdm {
  font-weight: 800;
  color: var(--primary);
  font-size: 26px;
}

/* Header Contacts */
.tdm-header__contacts {
  display: flex;
  align-items: center;
  gap: 20px;
  justify-content: center;
}

.tdm-header__phone {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 18px;
  font-weight: 700;
  color: var(--neutral-900) !important;
  white-space: nowrap;
}

.tdm-header__phone:hover {
  color: var(--primary) !important;
}

.tdm-header__callback {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-family: var(--font);
  transition: color var(--transition);
}

.tdm-header__callback:hover {
  color: var(--primary-dark);
}

.tdm-header__email,
.tdm-header__tg {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--neutral-700) !important;
}

.tdm-header__email:hover,
.tdm-header__tg:hover {
  color: var(--primary) !important;
}

/* Header Cart Block */
.tdm-header__cart-block {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.tdm-header__cart-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tdm-header__cart-info svg {
  color: var(--primary);
  flex-shrink: 0;
}

.tdm-header__cart-details {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.tdm-header__cart-count-text {
  font-size: 13px;
  color: var(--neutral-500);
}

.tdm-header__cart-total {
  font-size: 16px;
  font-weight: 700;
  color: var(--neutral-900);
}

.tdm-header__cart-checkout {
  white-space: nowrap;
}

/* ==========================================================================
   Search Bar
   ========================================================================== */

.tdm-searchbar {
  background: var(--primary);
  padding: 12px 0;
}

.tdm-searchbar__form {
  display: flex;
  align-items: stretch;
  height: 48px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}

.tdm-searchbar__form > * {
  height: 48px !important;
  box-sizing: border-box !important;
  border: none !important;
  margin: 0 !important;
  border-radius: 0 !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

.tdm-searchbar__catalog-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--secondary-dk);
  color: var(--white) !important;
  font-weight: 600;
  font-size: 14px;
  padding: 0 24px;
  white-space: nowrap;
  text-decoration: none;
  transition: background var(--transition);
  flex-shrink: 0;
}

.tdm-searchbar__catalog-btn:hover {
  background: var(--neutral-900);
  color: var(--white) !important;
}

.tdm-searchbar__input,
input[type="search"].tdm-searchbar__input {
  flex: 1;
  border: none !important;
  padding: 0 20px !important;
  font-size: 15px;
  outline: none;
  background: var(--white) !important;
  font-family: var(--font);
  min-width: 0;
  height: 48px !important;
  box-sizing: border-box !important;
  -webkit-appearance: none !important;
  line-height: 48px;
}

.tdm-searchbar__input::placeholder {
  color: var(--neutral-500);
}

.tdm-searchbar__input:focus {
  outline: none !important;
  box-shadow: none !important;
}

.tdm-searchbar__btn,
button.tdm-searchbar__btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--secondary-dk) !important;
  color: var(--white) !important;
  border: none !important;
  padding: 0 28px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  transition: background var(--transition);
  flex-shrink: 0;
  box-shadow: none !important;
  text-shadow: none !important;
}

.tdm-searchbar__btn:hover,
button.tdm-searchbar__btn:hover {
  background: var(--neutral-900) !important;
}

/* Mobile Navigation Contacts */
.tdm-mobile-nav__contacts {
  padding: 16px 20px;
  border-top: 1px solid var(--neutral-200);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tdm-mobile-nav__phone {
  font-size: 16px;
  font-weight: 700;
  color: var(--neutral-900) !important;
}

.tdm-mobile-nav__email {
  font-size: 14px;
  color: var(--neutral-500) !important;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.tdm-hero {
  position: relative;
  background: linear-gradient(135deg, var(--secondary-dk) 0%, var(--secondary) 100%);
  color: var(--white);
  overflow: hidden;
  min-height: 420px;
  display: flex;
  align-items: center;
}

.tdm-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.tdm-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .2;
}

.tdm-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(51,51,51,.85) 0%, rgba(77,77,77,.7) 100%);
  z-index: 2;
}

.tdm-hero__content {
  position: relative;
  z-index: 3;
  max-width: 640px;
  padding: 60px 0;
}

.tdm-hero__badge {
  display: inline-block;
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(4px);
  color: var(--white);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 20px;
  border: 1px solid rgba(255,255,255,.2);
}

.tdm-hero__title {
  font-size: 40px;
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 16px;
}

.tdm-hero__subtitle {
  font-size: 18px;
  opacity: .9;
  margin: 0 0 32px;
  line-height: 1.5;
}

.tdm-hero__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.tdm-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition), transform var(--transition);
  font-family: var(--font);
  line-height: 1;
}

.tdm-btn:active {
  transform: scale(.97);
}

.tdm-btn--primary {
  background: var(--primary);
  color: var(--white) !important;
}

.tdm-btn--primary:hover {
  background: var(--primary-dark);
  color: var(--white) !important;
}

.tdm-btn--outline {
  background: transparent;
  color: var(--white) !important;
  border: 2px solid rgba(255,255,255,.4);
}

.tdm-btn--outline:hover {
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.6);
  color: var(--white) !important;
}

.tdm-btn--secondary {
  background: var(--secondary);
  color: var(--white) !important;
}

.tdm-btn--secondary:hover {
  background: var(--secondary-dk);
  color: var(--white) !important;
}

.tdm-btn--white {
  background: var(--white);
  color: var(--primary) !important;
}

.tdm-btn--white:hover {
  background: var(--neutral-200);
  color: var(--primary-dark) !important;
}

.tdm-btn--sm {
  font-size: 13px;
  padding: 10px 18px;
}

/* ==========================================================================
   Advantages
   ========================================================================== */

.tdm-advantages {
  background: var(--neutral-200);
  padding: 48px 0;
}

.tdm-advantages__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.tdm-advantage {
  text-align: center;
  padding: 28px 16px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}

.tdm-advantage:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.tdm-advantage__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tdm-advantage__icon svg {
  width: 28px;
  height: 28px;
  fill: var(--white);
}

.tdm-advantage__title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--neutral-900);
}

.tdm-advantage__text {
  font-size: 13px;
  color: var(--neutral-500);
  margin: 0;
  line-height: 1.5;
}

/* ==========================================================================
   Section Common
   ========================================================================== */

.tdm-section {
  padding: 56px 0;
}

.tdm-section--gray {
  background: var(--neutral-200);
}

.tdm-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  gap: 16px;
}

.tdm-section__title {
  font-size: 28px;
  font-weight: 800;
  margin: 0;
  color: var(--neutral-900);
}

.tdm-section__link {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.tdm-section__link:hover {
  color: var(--primary-dark);
}

.tdm-section__link svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

/* ==========================================================================
   Categories
   ========================================================================== */

.tdm-categories__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.tdm-category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--white);
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius-lg);
  padding: 24px 16px;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  text-decoration: none;
  color: var(--neutral-900);
}

.tdm-category-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  color: var(--neutral-900);
}

.tdm-category-card__img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin-bottom: 12px;
}

.tdm-category-card__img--placeholder {
  width: 80px;
  height: 80px;
  background: var(--neutral-200);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.tdm-category-card__img--placeholder svg {
  width: 40px;
  height: 40px;
  fill: var(--neutral-500);
  opacity: .4;
}

.tdm-category-card__name {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 4px;
  line-height: 1.3;
}

.tdm-category-card__count {
  font-size: 12px;
  color: var(--neutral-500);
}

.tdm-categories__more {
  display: none;
  text-align: center;
  margin-top: 20px;
}

/* ==========================================================================
   About / Trust
   ========================================================================== */

.tdm-about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.tdm-about__text h2 {
  font-size: 24px;
  font-weight: 800;
  margin: 0 0 16px;
  color: var(--neutral-900);
}

.tdm-about__text p {
  font-size: 15px;
  color: var(--neutral-700);
  line-height: 1.7;
  margin: 0 0 24px;
}

.tdm-about__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

.tdm-stat {
  text-align: center;
  padding: 20px 12px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.tdm-stat__number {
  font-size: 32px;
  font-weight: 800;
  color: var(--primary);
  display: block;
  line-height: 1;
  margin-bottom: 4px;
}

.tdm-stat__label {
  font-size: 13px;
  color: var(--neutral-500);
}

.tdm-about__features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tdm-about__features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: var(--neutral-700);
}

.tdm-about__features li svg {
  width: 20px;
  height: 20px;
  fill: var(--success);
  flex-shrink: 0;
}

/* ==========================================================================
   Brands
   ========================================================================== */

.tdm-brands__track {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
  scrollbar-width: thin;
}

.tdm-brands__track::-webkit-scrollbar {
  height: 4px;
}

.tdm-brands__track::-webkit-scrollbar-track {
  background: var(--neutral-200);
  border-radius: 2px;
}

.tdm-brands__track::-webkit-scrollbar-thumb {
  background: var(--neutral-300);
  border-radius: 2px;
}

.tdm-brand-card {
  flex: 0 0 160px;
  height: 80px;
  background: var(--white);
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  scroll-snap-align: start;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.tdm-brand-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.tdm-brand-card img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: .6;
  transition: filter var(--transition), opacity var(--transition);
}

.tdm-brand-card:hover img {
  filter: grayscale(0);
  opacity: 1;
}

/* ==========================================================================
   News
   ========================================================================== */

.tdm-news__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.tdm-news-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
  text-decoration: none;
  color: var(--neutral-900);
  display: flex;
  flex-direction: column;
}

.tdm-news-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  color: var(--neutral-900);
}

.tdm-news-card__img {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: var(--neutral-200);
}

.tdm-news-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}

.tdm-news-card:hover .tdm-news-card__img img {
  transform: scale(1.05);
}

.tdm-news-card__img-placeholder {
  width: 100%;
  height: 100%;
  background: var(--neutral-200);
  display: flex;
  align-items: center;
  justify-content: center;
}

.tdm-news-card__body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.tdm-news-card__date {
  font-size: 12px;
  color: var(--neutral-500);
  margin-bottom: 8px;
}

.tdm-news-card__title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 8px;
  line-height: 1.4;
}

.tdm-news-card__excerpt {
  font-size: 13px;
  color: var(--neutral-700);
  line-height: 1.5;
  margin: 0;
  flex: 1;
}

/* ==========================================================================
   CTA Banner
   ========================================================================== */

.tdm-cta {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  padding: 56px 0;
  text-align: center;
}

.tdm-cta__title {
  font-size: 28px;
  font-weight: 800;
  margin: 0 0 12px;
}

.tdm-cta__text {
  font-size: 16px;
  opacity: .9;
  margin: 0 0 28px;
}

.tdm-cta__actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.tdm-footer {
  background: var(--secondary-dk);
  color: rgba(255,255,255,.8);
  padding-top: 48px;
}

.tdm-footer a {
  color: rgba(255,255,255,.85);
  transition: color var(--transition);
}

.tdm-footer a:hover {
  color: var(--white);
}

.tdm-footer__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  padding-bottom: 40px;
}

.tdm-footer__col-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--white);
  margin: 0 0 16px;
}

.tdm-footer__menu {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tdm-footer__menu li a {
  font-size: 14px;
}

.tdm-footer__contacts p {
  margin: 0 0 10px;
  font-size: 14px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.tdm-footer__contacts svg {
  width: 16px;
  height: 16px;
  fill: rgba(255,255,255,.5);
  flex-shrink: 0;
  margin-top: 2px;
}

.tdm-footer__phone {
  font-size: 18px !important;
  font-weight: 700;
  color: var(--white) !important;
}

.tdm-footer__socials {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.tdm-footer__social {
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}

.tdm-footer__social:hover {
  background: rgba(255,255,255,.2);
}

.tdm-footer__social svg {
  width: 18px;
  height: 18px;
  fill: var(--white);
}

/* Footer accordion toggle (mobile) */
.tdm-footer__toggle {
  display: none;
}

.tdm-footer__bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 20px 0;
}

.tdm-footer__bottom .tdm-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.tdm-footer__copy {
  font-size: 13px;
  color: rgba(255,255,255,.5);
  margin: 0;
}

.tdm-footer__legal {
  display: flex;
  gap: 20px;
}

.tdm-footer__legal a {
  font-size: 13px;
  color: rgba(255,255,255,.5);
}

.tdm-footer__legal a:hover {
  color: rgba(255,255,255,.8);
}

/* ==========================================================================
   Cookie Banner
   ========================================================================== */

.tdm-cookie {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--neutral-900);
  color: var(--white);
  padding: 16px 0;
  z-index: 9999;
  transform: translateY(100%);
  transition: transform .4s ease;
  box-shadow: 0 -4px 20px rgba(0,0,0,.2);
}

.tdm-cookie.is-visible {
  transform: translateY(0);
}

.tdm-cookie .tdm-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.tdm-cookie__text {
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
  flex: 1;
}

.tdm-cookie__text a {
  color: var(--primary-light);
  text-decoration: underline;
}

.tdm-cookie__accept {
  background: var(--primary);
  color: var(--white);
  border: none;
  padding: 10px 24px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition);
  font-family: var(--font);
}

.tdm-cookie__accept:hover {
  background: var(--primary-dark);
}

/* ==========================================================================
   Mobile Navigation Overlay
   ========================================================================== */

.tdm-mobile-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 300px;
  height: 100%;
  background: var(--white);
  z-index: 10001;
  transform: translateX(-100%);
  transition: transform .3s ease;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.tdm-mobile-nav.is-open {
  transform: translateX(0);
}

.tdm-mobile-nav__overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease;
}

.tdm-mobile-nav__overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.tdm-mobile-nav__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--neutral-300);
}

.tdm-mobile-nav__close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--neutral-700);
}

.tdm-mobile-nav__close svg {
  width: 24px;
  height: 24px;
  display: block;
}

.tdm-mobile-nav__menu {
  list-style: none;
  padding: 16px 0;
  margin: 0;
}

.tdm-mobile-nav__menu li a {
  display: block;
  padding: 12px 20px;
  font-size: 15px;
  color: var(--neutral-900);
  border-bottom: 1px solid var(--neutral-200);
}

.tdm-mobile-nav__menu li a:hover {
  background: var(--neutral-200);
  color: var(--primary);
}

/* ==========================================================================
   Responsive — Tablet (≤1024px)
   ========================================================================== */

@media (max-width: 1024px) {
  .tdm-header__contacts {
    gap: 12px;
  }

  .tdm-header__email,
  .tdm-header__tg {
    display: none;
  }

  .tdm-footer__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ==========================================================================
   Responsive — Mobile (≤768px)
   ========================================================================== */

@media (max-width: 768px) {
  /* Topbar: hide nav, keep auth */
  .tdm-topbar__nav {
    display: none;
  }

  /* Header: 2 columns (logo + burger), hide contacts */
  .tdm-header__burger {
    display: flex;
    order: -1;
  }

  .tdm-header__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .tdm-header__contacts {
    display: none;
  }

  .tdm-header__cart-block .tdm-header__cart-details,
  .tdm-header__cart-block .tdm-header__cart-checkout {
    display: none;
  }

  .tdm-header__cart-block {
    gap: 0;
  }

  /* Search bar: compact */
  .tdm-searchbar {
    padding: 6px 0;
  }

  .tdm-searchbar__catalog-btn {
    display: none;
  }

  .tdm-searchbar__btn {
    padding: 10px 14px;
  }

  .tdm-searchbar__btn svg + span {
    display: none;
  }

  /* Sidebar: above products, full width */
  .tdm-shop__layout--with-sidebar {
    grid-template-columns: 1fr;
  }

  .tdm-cat-sidebar {
    margin-bottom: 16px;
  }

  .tdm-cat-sidebar__list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .tdm-cat-sidebar__item a {
    font-size: 13px;
    padding: 8px 12px;
  }

  /* Products: 2 columns */
  .tdm-products__grid,
  .tdm-products__grid--3col {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  /* Product card compact */
  .tdm-product-card__desc {
    display: none;
  }

  .tdm-product-card__links {
    font-size: 11px;
  }

  .tdm-product-card__cart-row {
    flex-direction: column;
    gap: 6px;
  }

  .tdm-product-card__cart {
    width: 100%;
  }

  .tdm-btn {
    padding: 12px 20px;
    font-size: 14px;
  }

  /* Shop/Page titles */
  .tdm-shop__title {
    font-size: 22px;
  }

  .tdm-shop__toolbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  /* Footer accordion */
  .tdm-footer__grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .tdm-footer__col {
    border-bottom: 1px solid rgba(255,255,255,.1);
  }

  .tdm-footer__col-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    margin: 0;
    cursor: pointer;
  }

  .tdm-footer__toggle {
    display: block;
    width: 20px;
    height: 20px;
    position: relative;
  }

  .tdm-footer__toggle::before,
  .tdm-footer__toggle::after {
    content: '';
    position: absolute;
    background: rgba(255,255,255,.5);
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    transition: transform var(--transition);
  }

  .tdm-footer__toggle::before {
    width: 12px;
    height: 2px;
  }

  .tdm-footer__toggle::after {
    width: 2px;
    height: 12px;
  }

  .tdm-footer__col.is-open .tdm-footer__toggle::after {
    transform: translate(-50%,-50%) rotate(90deg);
  }

  .tdm-footer__col-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
  }

  .tdm-footer__col.is-open .tdm-footer__col-content {
    max-height: 300px;
  }

  .tdm-footer__menu {
    padding-bottom: 16px;
  }

  .tdm-footer__contacts {
    padding-bottom: 16px;
  }

  .tdm-footer__bottom .tdm-container {
    flex-direction: column;
    text-align: center;
  }

  .tdm-footer__legal {
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
  }

  .tdm-cookie .tdm-container {
    flex-direction: column;
    text-align: center;
  }
}

/* ==========================================================================
   Responsive — Small Mobile (≤480px)
   ========================================================================== */

@media (max-width: 480px) {
  .tdm-cat-sidebar__list {
    grid-template-columns: 1fr;
  }

  .tdm-products__grid,
  .tdm-products__grid--3col {
    grid-template-columns: 1fr;
  }

  .tdm-product-card__cart-row {
    flex-direction: column;
  }
}

/* ==========================================================================
   Breadcrumbs
   ========================================================================== */

.tdm-breadcrumbs {
  background: var(--neutral-200);
  padding: 12px 0;
  border-bottom: 1px solid var(--neutral-300);
}

.tdm-breadcrumbs__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  font-size: 13px;
}

.tdm-breadcrumbs__item {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--neutral-500);
}

.tdm-breadcrumbs__item::after {
  content: '/';
  color: var(--neutral-300);
  margin-left: 4px;
}

.tdm-breadcrumbs__item:last-child::after {
  display: none;
}

.tdm-breadcrumbs__item a {
  color: var(--neutral-500);
  text-decoration: none;
  transition: color var(--transition);
}

.tdm-breadcrumbs__item a:hover {
  color: var(--primary);
}

.tdm-breadcrumbs__item span[aria-current] {
  color: var(--neutral-700);
  font-weight: 500;
}

/* ==========================================================================
   Page Template
   ========================================================================== */

.tdm-page {
  padding: 40px 0 60px;
}

.tdm-page__layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

.tdm-page__layout:has(.tdm-page__sidebar) {
  grid-template-columns: 1fr 280px;
}

.tdm-page__title {
  font-size: 32px;
  font-weight: 800;
  margin: 0 0 24px;
  color: var(--neutral-900);
}

.tdm-page__body {
  font-size: 15px;
  line-height: 1.7;
  color: var(--neutral-700);
}

.tdm-page__body h2,
.tdm-page__body h3,
.tdm-page__body h4 {
  color: var(--neutral-900);
  margin-top: 32px;
  margin-bottom: 12px;
}

.tdm-page__body h2 { font-size: 24px; }
.tdm-page__body h3 { font-size: 20px; }
.tdm-page__body h4 { font-size: 17px; }

.tdm-page__body p {
  margin: 0 0 16px;
}

.tdm-page__body ul,
.tdm-page__body ol {
  padding-left: 24px;
  margin: 0 0 16px;
}

.tdm-page__body li {
  margin-bottom: 8px;
}

.tdm-page__body img {
  border-radius: var(--radius);
}

.tdm-page__body table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 16px;
}

.tdm-page__body th,
.tdm-page__body td {
  padding: 10px 12px;
  border: 1px solid var(--neutral-300);
  text-align: left;
  font-size: 14px;
}

.tdm-page__body th {
  background: var(--neutral-200);
  font-weight: 600;
}

/* Sidebar */
.tdm-page__sidebar {
  font-size: 14px;
}

.tdm-sidebar__title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--neutral-900);
}

.tdm-sidebar__widget {
  margin-bottom: 24px;
  padding: 20px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   Single Post
   ========================================================================== */

.tdm-single {
  padding: 40px 0 60px;
}

.tdm-single__article {
  max-width: 800px;
  margin: 0 auto;
}

.tdm-single__thumbnail {
  margin-bottom: 24px;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.tdm-single__img {
  width: 100%;
  height: auto;
  display: block;
}

.tdm-single__meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--neutral-500);
  margin-bottom: 12px;
}

.tdm-single__category {
  background: var(--primary);
  color: var(--white) !important;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.tdm-single__title {
  font-size: 32px;
  font-weight: 800;
  margin: 0 0 24px;
  line-height: 1.3;
  color: var(--neutral-900);
}

.tdm-single__body {
  font-size: 15px;
  line-height: 1.7;
  color: var(--neutral-700);
}

.tdm-single__body h2,
.tdm-single__body h3,
.tdm-single__body h4 {
  color: var(--neutral-900);
  margin-top: 32px;
  margin-bottom: 12px;
}

.tdm-single__body p {
  margin: 0 0 16px;
}

.tdm-single__body img {
  border-radius: var(--radius);
}

/* Post Navigation */
.tdm-single__nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--neutral-300);
}

.tdm-single__nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--neutral-200);
  border-radius: var(--radius);
  color: var(--neutral-700);
  text-decoration: none;
  transition: background var(--transition);
}

.tdm-single__nav-link:hover {
  background: var(--neutral-300);
  color: var(--neutral-900);
}

.tdm-single__nav-link--next {
  text-align: right;
  justify-content: flex-end;
  grid-column: 2;
}

.tdm-single__nav-link small {
  display: block;
  font-size: 12px;
  color: var(--neutral-500);
  margin-bottom: 4px;
}

.tdm-single__nav-link span {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
}

.tdm-single__nav-link svg {
  flex-shrink: 0;
  color: var(--neutral-500);
}

/* ==========================================================================
   Archive
   ========================================================================== */

.tdm-archive {
  padding: 40px 0 60px;
}

.tdm-archive__header {
  margin-bottom: 32px;
}

.tdm-archive__title {
  font-size: 28px;
  font-weight: 800;
  margin: 0 0 8px;
  color: var(--neutral-900);
}

.tdm-archive__desc {
  font-size: 15px;
  color: var(--neutral-500);
}

.tdm-archive__empty {
  text-align: center;
  padding: 60px 0;
  color: var(--neutral-500);
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.tdm-pagination {
  margin-top: 40px;
  text-align: center;
}

.tdm-pagination .nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.tdm-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 8px;
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  color: var(--neutral-700);
  text-decoration: none;
  transition: all var(--transition);
}

.tdm-pagination .page-numbers:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.tdm-pagination .page-numbers.current {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

.tdm-pagination .page-numbers svg {
  width: 18px;
  height: 18px;
}

/* ==========================================================================
   Search Results
   ========================================================================== */

.tdm-search {
  padding: 40px 0 60px;
}

.tdm-search__grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tdm-search-card {
  display: flex;
  gap: 16px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--transition);
}

.tdm-search-card:hover {
  box-shadow: var(--shadow-md);
}

.tdm-search-card__img {
  width: 140px;
  flex-shrink: 0;
}

.tdm-search-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tdm-search-card__body {
  padding: 16px;
  flex: 1;
}

.tdm-search-card__type {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--neutral-500);
  margin-bottom: 4px;
  display: block;
}

.tdm-search-card__title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 8px;
  line-height: 1.3;
}

.tdm-search-card__title a {
  color: var(--neutral-900);
}

.tdm-search-card__title a:hover {
  color: var(--primary);
}

.tdm-search-card__excerpt {
  font-size: 13px;
  color: var(--neutral-500);
  margin: 0;
  line-height: 1.5;
}

/* Search empty state */
.tdm-search__empty {
  text-align: center;
  padding: 60px 0;
}

.tdm-search__empty svg {
  margin-bottom: 16px;
}

.tdm-search__empty h2 {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--neutral-900);
}

.tdm-search__empty p {
  font-size: 15px;
  color: var(--neutral-500);
  margin: 0 0 24px;
}

.tdm-search__form {
  display: flex;
  max-width: 480px;
  margin: 0 auto;
  gap: 8px;
}

.tdm-search__form input[type="search"] {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid var(--neutral-300);
  border-radius: var(--radius);
  font-size: 14px;
  outline: none;
  font-family: var(--font);
  transition: border-color var(--transition);
}

.tdm-search__form input[type="search"]:focus {
  border-color: var(--primary);
}

/* ==========================================================================
   404 Page
   ========================================================================== */

.tdm-404 {
  padding: 80px 0;
}

.tdm-404__content {
  text-align: center;
  max-width: 480px;
  margin: 0 auto;
}

.tdm-404__illustration {
  width: 240px;
  height: 160px;
  margin-bottom: 24px;
}

.tdm-404__title {
  font-size: 28px;
  font-weight: 800;
  margin: 0 0 12px;
  color: var(--neutral-900);
}

.tdm-404__text {
  font-size: 15px;
  color: var(--neutral-500);
  margin: 0 0 28px;
}

.tdm-404__actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ==========================================================================
   WooCommerce: Shop / Catalog
   ========================================================================== */

.tdm-shop {
  padding: 40px 0 60px;
}

.tdm-shop__header {
  margin-bottom: 24px;
}

.tdm-shop__title {
  font-size: 28px;
  font-weight: 800;
  margin: 0 0 8px;
  color: var(--neutral-900);
}

.tdm-shop__desc {
  font-size: 14px;
  color: var(--neutral-500);
  line-height: 1.5;
}

.tdm-shop__desc p {
  margin: 0;
}

/* Subcategories */
.tdm-shop__subcats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 32px;
}

.tdm-subcat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 16px 12px;
  background: var(--white);
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--neutral-900);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.tdm-subcat-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
  color: var(--neutral-900);
}

.tdm-subcat-card__img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  margin-bottom: 8px;
}

.tdm-subcat-card__placeholder {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.tdm-subcat-card__name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 2px;
}

.tdm-subcat-card__count {
  font-size: 11px;
  color: var(--neutral-500);
}

/* Layout */
.tdm-shop__layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.tdm-shop__layout--with-sidebar {
  grid-template-columns: 240px 1fr;
}

.tdm-shop__layout:has(.tdm-shop__sidebar) {
  grid-template-columns: 240px 1fr;
}

.tdm-shop__sidebar {
  font-size: 14px;
}

/* Toolbar */
.tdm-shop__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
}

/* Category Sidebar */
.tdm-cat-sidebar {
  background: var(--white);
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius);
  overflow: hidden;
}

.tdm-cat-sidebar__header {
  background: var(--secondary-dk);
  color: var(--white);
  font-size: 16px;
  font-weight: 700;
  padding: 14px 16px;
}

.tdm-cat-sidebar__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tdm-cat-sidebar__item a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  font-size: 14px;
  color: var(--neutral-700);
  text-decoration: none;
  border-bottom: 1px solid var(--neutral-200);
  transition: background var(--transition), color var(--transition);
}

.tdm-cat-sidebar__item:last-child a {
  border-bottom: none;
}

.tdm-cat-sidebar__item a:hover {
  background: var(--neutral-200);
  color: var(--primary);
}

.tdm-cat-sidebar__item.is-active a {
  background: var(--primary);
  color: var(--white);
  font-weight: 600;
}

.tdm-cat-sidebar__item.is-active .tdm-cat-sidebar__count {
  color: rgba(255,255,255,.8);
}

.tdm-cat-sidebar__count {
  font-size: 12px;
  color: var(--neutral-500);
  flex-shrink: 0;
}

/* Products grid */
.tdm-products__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.tdm-products__grid--3col {
  grid-template-columns: repeat(3, 1fr);
}

.tdm-shop__empty {
  text-align: center;
  padding: 60px 0;
  color: var(--neutral-500);
}

/* ==========================================================================
   WooCommerce: Product Card
   ========================================================================== */

.tdm-product-card {
  background: var(--white);
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.tdm-product-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.tdm-product-card__link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--neutral-900);
  flex: 1;
}

.tdm-product-card__link:hover {
  color: var(--neutral-900);
}

.tdm-product-card__img {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--neutral-100);
  display: flex;
  align-items: center;
  justify-content: center;
}

.tdm-product-card__img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;
  transition: transform var(--transition);
}

.tdm-product-card:hover .tdm-product-card__img img {
  transform: scale(1.05);
}

.tdm-product-card__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.tdm-product-card__badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  z-index: 1;
}

.tdm-product-card__badge--sale {
  background: var(--danger);
  color: var(--white);
}

.tdm-product-card__body {
  padding: 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.tdm-product-card__sku {
  font-size: 11px;
  color: var(--neutral-500);
  margin-bottom: 4px;
}

.tdm-product-card__title {
  font-size: 13px;
  font-weight: 500;
  margin: 0 0 8px;
  line-height: 1.3;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tdm-product-card__price {
  font-size: 16px;
  font-weight: 700;
  color: var(--neutral-900);
}

.tdm-product-card__price del {
  font-size: 13px;
  font-weight: 400;
  color: var(--neutral-500);
}

.tdm-product-card__price ins {
  text-decoration: none;
  color: var(--danger);
}

/* Product Card Footer */
.tdm-product-card__footer {
  padding: 0 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Links row */
.tdm-product-card__links {
  display: flex;
  gap: 12px;
  font-size: 12px;
}

.tdm-product-card__link-more {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.tdm-product-card__link-more:hover {
  color: var(--primary-dark);
}

.tdm-product-card__compare {
  background: none;
  border: none;
  color: var(--neutral-500);
  font-size: 12px;
  cursor: pointer;
  padding: 0;
  font-family: var(--font);
  transition: color var(--transition);
}

.tdm-product-card__compare:hover {
  color: var(--primary);
}

.tdm-product-card__compare.is-active {
  color: var(--primary);
  font-weight: 600;
}

/* Description */
.tdm-product-card__desc {
  font-size: 12px;
  color: var(--neutral-500);
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Stock status */
.tdm-product-card__stock {
  font-size: 12px;
  font-weight: 600;
}

.tdm-product-card__stock--in {
  color: var(--success);
}

.tdm-product-card__stock--out {
  color: var(--danger);
}

/* Cart row */
.tdm-product-card__cart-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tdm-product-card__cart {
  flex: 1;
  justify-content: center;
  text-align: center;
}

.tdm-product-card__outofstock {
  display: block;
  text-align: center;
  font-size: 13px;
  color: var(--neutral-500);
  padding: 8px;
  width: 100%;
}

/* Quantity selector */
.tdm-qty {
  display: flex;
  align-items: center;
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
}

.tdm-qty__minus,
.tdm-qty__plus {
  width: 28px;
  height: 28px;
  background: var(--neutral-200);
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  color: var(--neutral-700);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
  font-family: var(--font);
}

.tdm-qty__minus:hover,
.tdm-qty__plus:hover {
  background: var(--neutral-300);
}

.tdm-qty__input {
  width: 32px;
  height: 28px;
  border: none;
  border-left: 1px solid var(--neutral-300);
  border-right: 1px solid var(--neutral-300);
  text-align: center;
  font-size: 13px;
  font-family: var(--font);
  -moz-appearance: textfield;
  outline: none;
}

.tdm-qty__input::-webkit-outer-spin-button,
.tdm-qty__input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* ==========================================================================
   WooCommerce: Single Product
   ========================================================================== */

.tdm-product {
  padding: 40px 0 60px;
}

/* Summary layout */
.tdm-product .product {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.tdm-product .woocommerce-product-gallery {
  width: 100% !important;
}

.tdm-product .woocommerce-product-gallery__image img {
  border-radius: var(--radius);
}

.tdm-product .product_title {
  font-size: 26px;
  font-weight: 800;
  margin: 0 0 12px;
}

.tdm-product .price {
  font-size: 24px;
  font-weight: 700;
  color: var(--neutral-900);
  margin-bottom: 16px;
}

.tdm-product .price del {
  font-size: 18px;
  color: var(--neutral-500);
  font-weight: 400;
}

.tdm-product .price ins {
  text-decoration: none;
}

.tdm-product .product_meta {
  font-size: 13px;
  color: var(--neutral-500);
  margin-bottom: 16px;
}

.tdm-product .product_meta > span {
  display: block;
  margin-bottom: 4px;
}

.tdm-product .single_add_to_cart_button {
  background: var(--primary) !important;
  color: var(--white) !important;
  font-weight: 600;
  font-size: 15px;
  padding: 14px 28px;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition);
  font-family: var(--font);
}

.tdm-product .single_add_to_cart_button:hover {
  background: var(--primary-dark) !important;
}

.tdm-product .quantity .qty {
  width: 60px;
  padding: 10px;
  border: 2px solid var(--neutral-300);
  border-radius: var(--radius);
  text-align: center;
  font-size: 15px;
  font-family: var(--font);
}

/* Tabs */
.tdm-product .woocommerce-tabs {
  grid-column: 1 / -1;
  margin-top: 20px;
}

.tdm-product .woocommerce-tabs ul.tabs {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--neutral-300);
}

.tdm-product .woocommerce-tabs ul.tabs li {
  margin: 0;
  padding: 0;
  background: none;
  border: none;
}

.tdm-product .woocommerce-tabs ul.tabs li a {
  display: block;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--neutral-500);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color var(--transition), border-color var(--transition);
}

.tdm-product .woocommerce-tabs ul.tabs li.active a {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.tdm-product .woocommerce-tabs .panel {
  font-size: 15px;
  line-height: 1.7;
  color: var(--neutral-700);
}

.tdm-product .woocommerce-tabs .panel h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 16px;
}

/* Related products */
.tdm-product .related.products {
  grid-column: 1 / -1;
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid var(--neutral-300);
}

.tdm-product .related.products > h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 24px;
}

.tdm-product .related.products .products {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  list-style: none;
  padding: 0;
}

/* Product attributes table */
.tdm-product .shop_attributes {
  width: 100%;
  border-collapse: collapse;
}

.tdm-product .shop_attributes th,
.tdm-product .shop_attributes td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--neutral-300);
  font-size: 14px;
  text-align: left;
}

.tdm-product .shop_attributes th {
  color: var(--neutral-500);
  font-weight: 500;
  width: 40%;
}

/* ==========================================================================
   WooCommerce: Cart
   ========================================================================== */

.woocommerce-cart .tdm-page__title,
.woocommerce-checkout .tdm-page__title {
  font-size: 28px;
}

.woocommerce table.shop_table {
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius);
  overflow: hidden;
  border-collapse: collapse;
  width: 100%;
}

.woocommerce table.shop_table th {
  background: var(--neutral-200);
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .3px;
  padding: 12px 16px;
}

.woocommerce table.shop_table td {
  padding: 16px;
  border-bottom: 1px solid var(--neutral-300);
  vertical-align: middle;
}

.woocommerce table.shop_table img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.woocommerce .cart_totals {
  max-width: 400px;
  margin-left: auto;
}

.woocommerce .checkout-button,
.woocommerce .wc-proceed-to-checkout .checkout-button {
  background: var(--primary) !important;
  color: var(--white) !important;
  font-weight: 600;
  font-size: 15px;
  padding: 14px 28px !important;
  border-radius: var(--radius) !important;
  border: none;
  transition: background var(--transition);
  display: block;
  width: 100%;
  text-align: center;
  text-decoration: none;
}

.woocommerce .checkout-button:hover,
.woocommerce .wc-proceed-to-checkout .checkout-button:hover {
  background: var(--primary-dark) !important;
}

/* ==========================================================================
   WooCommerce: Checkout
   ========================================================================== */

.woocommerce-checkout #customer_details {
  margin-bottom: 24px;
}

.woocommerce form .form-row {
  margin-bottom: 16px;
}

.woocommerce form .form-row label {
  font-size: 14px;
  font-weight: 500;
  color: var(--neutral-700);
  margin-bottom: 4px;
  display: block;
}

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid var(--neutral-300);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: var(--font);
  transition: border-color var(--transition);
}

.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce form .form-row select:focus {
  border-color: var(--primary);
  outline: none;
}

.woocommerce #place_order {
  background: var(--primary) !important;
  color: var(--white) !important;
  font-weight: 600;
  font-size: 16px;
  padding: 16px 32px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: background var(--transition);
  width: 100%;
  font-family: var(--font);
}

.woocommerce #place_order:hover {
  background: var(--primary-dark) !important;
}

/* Privacy consent checkbox */
.tdm-privacy-consent {
  margin-top: 16px;
}

.tdm-privacy-consent label {
  font-size: 13px !important;
  display: flex !important;
  align-items: flex-start;
  gap: 8px;
}

.tdm-privacy-consent input[type="checkbox"] {
  margin-top: 2px;
  flex-shrink: 0;
}

/* ==========================================================================
   Cookie Banner (extended 152-ФЗ)
   ========================================================================== */

.tdm-cookie__main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.tdm-cookie__actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.tdm-cookie__settings-btn,
.tdm-cookie__decline {
  background: transparent;
  color: rgba(255,255,255,.8);
  border: 1px solid rgba(255,255,255,.3);
  padding: 10px 18px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition), border-color var(--transition);
  font-family: var(--font);
}

.tdm-cookie__settings-btn:hover,
.tdm-cookie__decline:hover {
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.5);
}

.tdm-cookie__settings {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,.15);
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
}

.tdm-cookie__category {
  flex: 1;
  min-width: 180px;
}

.tdm-cookie__category label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
  cursor: pointer;
}

.tdm-cookie__category small {
  display: block;
  font-size: 12px;
  color: rgba(255,255,255,.6);
  margin-top: 4px;
}

.tdm-cookie__category input[type="checkbox"] {
  accent-color: var(--primary);
}

/* ==========================================================================
   WooCommerce: WC notices
   ========================================================================== */

.woocommerce-message,
.woocommerce-info {
  border-top-color: var(--primary) !important;
  background: var(--neutral-200);
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 14px;
}

.woocommerce-message::before,
.woocommerce-info::before {
  color: var(--primary) !important;
}

.woocommerce-error {
  border-top-color: var(--danger) !important;
}

/* WC ordering / result count */
.woocommerce-ordering,
.woocommerce-result-count {
  font-size: 13px;
  color: var(--neutral-500);
}

.woocommerce-ordering select {
  padding: 8px 12px;
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: var(--font);
}

/* ==========================================================================
   WooCommerce Overrides (global)
   ========================================================================== */

.woocommerce .products .product .woocommerce-loop-product__title {
  font-size: 14px;
}

/* Fix "Products" → localized in functions.php */

/* ==========================================================================
   Responsive: new templates (≤1024px)
   ========================================================================== */

@media (max-width: 1024px) {
  .tdm-products__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .tdm-products__grid--3col {
    grid-template-columns: repeat(2, 1fr);
  }

  .tdm-shop__layout--with-sidebar {
    grid-template-columns: 200px 1fr;
  }

  .tdm-shop__layout:has(.tdm-shop__sidebar) {
    grid-template-columns: 1fr;
  }

  .tdm-page__layout:has(.tdm-page__sidebar) {
    grid-template-columns: 1fr;
  }

  .tdm-product .product {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  .tdm-product .related.products .products {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ==========================================================================
   Responsive: new templates (≤768px)
   ========================================================================== */

@media (max-width: 768px) {
  .tdm-page__title,
  .tdm-single__title {
    font-size: 24px;
  }

  .tdm-archive__title,
  .tdm-shop__title {
    font-size: 22px;
  }

  .tdm-products__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .tdm-product .product {
    grid-template-columns: 1fr;
  }

  .tdm-product .related.products .products {
    grid-template-columns: repeat(2, 1fr);
  }

  .tdm-single__nav {
    grid-template-columns: 1fr;
  }

  .tdm-single__nav-link--next {
    grid-column: auto;
    text-align: left;
    justify-content: flex-start;
    flex-direction: row-reverse;
  }

  .tdm-search-card {
    flex-direction: column;
  }

  .tdm-search-card__img {
    width: 100%;
    height: 160px;
  }

  .tdm-cookie__main {
    flex-direction: column;
    text-align: center;
  }

  .tdm-cookie__actions {
    flex-wrap: wrap;
    justify-content: center;
  }

  .tdm-cookie__settings {
    flex-direction: column;
    align-items: stretch;
  }

  .tdm-product .product_title {
    font-size: 22px;
  }

  .tdm-product .price {
    font-size: 20px;
  }

  .tdm-product .woocommerce-tabs ul.tabs {
    overflow-x: auto;
  }

  .tdm-product .woocommerce-tabs ul.tabs li a {
    padding: 10px 14px;
    font-size: 13px;
    white-space: nowrap;
  }

  .tdm-shop__subcats {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 8px;
  }
}

/* ==========================================================================
   Print
   ========================================================================== */

@media print {
  .tdm-topbar,
  .tdm-header,
  .tdm-searchbar,
  .tdm-cookie,
  .tdm-cta,
  .tdm-mobile-nav,
  .tdm-mobile-nav__overlay,
  .tdm-footer,
  .tdm-brands,
  .tdm-advantages,
  .tdm-breadcrumbs,
  .tdm-pagination,
  .tdm-single__nav,
  .tdm-product-card__footer,
  .tdm-cat-sidebar,
  .tdm-shop__toolbar,
  #ast-scroll-top {
    display: none !important;
  }

  body {
    color: #000 !important;
    background: #fff !important;
  }

  a {
    color: #000 !important;
    text-decoration: underline;
  }

  .tdm-section--gray {
    background: none !important;
  }

  img {
    max-width: 100% !important;
  }

  .tdm-shop__layout--with-sidebar {
    grid-template-columns: 1fr !important;
  }

  .tdm-page__body,
  .tdm-single__body,
  .entry-content {
    page-break-inside: avoid;
  }

  h1, h2, h3 {
    page-break-after: avoid;
  }
}
