:root{
  --bg: #f7f7f7;
  --card: #ffffff;
  --text: #222222;
  --muted: #666666;
  --line: #dddddd;
  --primary: #2d6cdf;
  --primary-2: #2d6cdf;
  --primary-dark: #1f57b8;
  --success: #26c06a;
  --success-2: #139c4b;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --container: 1080px;
}

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

html{
  scroll-behavior: smooth;
}

body{
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.45;
}

img{
  max-width: 100%;
  display: block;
}

a{
  color: inherit;
}

/* ===== layout ===== */

.container,
.cart-container,
.checkout-container,
.page-wrap,
main{
  width: 100%;
  max-width: var(--container);
  margin-left: auto;
  margin-right: auto;
  padding: 0 20px;
}

.container{
  padding-top: 0;
  padding-bottom: 20px;
}

.section-anchor{
  margin-bottom: 24px;
}

/* ===== header ===== */

.site-header{
  width: 100%;
  max-width: var(--container);
  margin: 32px auto 18px;
  background: linear-gradient(180deg, #f5f8ff, #edf3ff);
  border: 1px solid #dfe7f5;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(31, 59, 130, 0.06);
}

.site-header__inner{
  width: 100%;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-logo{
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.4px;
  color: #425b8f;
  white-space: nowrap;
}

/* ===== HEADER NAV MINIMAL ===== */

.site-nav{
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.site-nav a{
  display: inline-block;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  color: #6b6b6b;
  padding: 2px 0;
  background: none !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  transition: color .15s ease;
}

.site-nav a:hover{
  color: #2f5fd0;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  transform: none !important;
}

.cart-link{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #2f5fd0 !important;
  font-weight: 700 !important;
}

.cart-badge{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 5px;
  border-radius: 999px;
  background: #2f5fd0 !important;
  color: #ffffff !important;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  margin-left: 2px;
}

/* ===== controls ===== */

.controls{
  width: 100%;
  margin-bottom: 16px;
}

.search{
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.search input[type="text"]{
  flex: 1;
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 0 12px;
  border: 1px solid #cccccc;
  border-radius: 6px;
  background: #ffffff;
  outline: none;
  font-size: 14px;
  color: var(--text);
}

.search input[type="text"]::placeholder{
  color: #999999;
}

.search input[type="text"]:focus{
  border-color: #8db4ff;
}

.search button{
  flex-shrink: 0;
  height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: 6px;
  background: var(--primary);
  color: #ffffff;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}

.search button:hover{
  background: var(--primary-dark);
}

.search button:active{
  transform: translateY(0);
}

.reset{
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 8px;
  border-radius: 6px;
  text-decoration: none;
  color: var(--primary);
  font-weight: 700;
  background: transparent;
}

.reset:hover{
  text-decoration: underline;
}

/* ===== category head ===== */

.catalog-head{
  margin: 16px 0 12px;
}

.catalog-head.sticky{
  position: relative;
}

.catalog-active{
  margin-bottom: 10px;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 700;
  color: var(--text);
}

.catalog-tabs{
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.catalog-tab{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #cccccc;
  border-radius: 6px;
  background: #ffffff;
  color: #444444;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}

.catalog-tab:hover{
  color: var(--primary);
  border-color: #9ebcf0;
}

.catalog-tab.is-active{
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

/* ===== product table wrapper ===== */

.products-wrapper{
  background: var(--card);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #dddddd;
}

/* ===== table ===== */

.product-table{
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  background: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.product-table thead th{
  padding: 12px;
  background: var(--primary);
  color: #ffffff;
  text-align: left;
  font-size: 14px;
  font-weight: 700;
  border: 0;
  white-space: nowrap;
}

.product-table thead th:first-child{
  border-top-left-radius: 0;
}

.product-table thead th:last-child{
  border-top-right-radius: 0;
  text-align: right;
  padding-right: 16px;
}

.product-table tbody td{
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  background: #ffffff;
  font-size: 14px;
  color: #2b3a4b;
  font-weight: 400;
}

.product-table tbody tr:last-child td{
  border-bottom: 0;
}

.product-table tbody tr:hover td{
  background: #f9fbff;
}

/* widths */
.product-table th:nth-child(1),
.product-table td:nth-child(1){
  width: 48%;
}

.product-table th:nth-child(2),
.product-table td:nth-child(2){
  width: 16%;
  white-space: nowrap;
}

.product-table th:nth-child(3),
.product-table td:nth-child(3){
  width: 12%;
  white-space: nowrap;
}

.product-table th:nth-child(4),
.product-table td:nth-child(4){
  width: 24%;
}

/* ===== subhead rows ===== */

.product-table tr.subhead-row td,
.product-table tr td[colspan]{
  background: #f1f3f7 !important;
  color: #1a1a1a !important;
  font-weight: 800 !important;
  font-size: 15px !important;
  letter-spacing: 0.2px;
  border-bottom: 1px solid #dddddd;
  padding-top: 12px !important;
  padding-bottom: 12px !important;
}

/* ===== product cells ===== */

.product-table tbody td:first-child .product-link,
.product-table tbody td:first-child a.product-link{
  color: #2b3a4b !important;
  font-weight: 300 !important;
  font-size: 14px !important;
  letter-spacing: 0 !important;
  line-height: 1.4 !important;
  text-decoration: none !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: color .15s ease;
}

.product-table tbody td:first-child .product-link:hover,
.product-table tbody td:first-child a.product-link:hover{
  color: var(--primary) !important;
  text-decoration: none !important;
}

.price{
  font-weight: 700;
  color: #111111;
  white-space: nowrap;
}

/* ===== actions column ===== */

.product-table td.td-actions{
  text-align: right;
  padding-right: 16px;
}

.product-table td.td-actions .add-to-cart-form{
  width: 100%;
  margin: 0;
}

.product-table td.td-actions .actions-right{
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-left: auto;
}

/* ===== form controls ===== */

.quantity-input{
  width: 60px;
  min-width: 60px;
  height: 34px;
  padding: 0 8px;
  border: 1px solid #cccccc;
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  font-size: 14px;
  text-align: center;
  outline: none;
}

.quantity-input:focus{
  border-color: #8db4ff;
}

.quantity-input:disabled{
  opacity: .65;
  background: #f1f1f1;
  cursor: not-allowed;
}

.add-to-cart-btn{
  height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: var(--primary);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.add-to-cart-btn:hover:not(:disabled){
  background: var(--primary-dark);
}

.add-to-cart-btn:active:not(:disabled){
  transform: translateY(0);
}

.add-to-cart-btn:disabled{
  opacity: .55;
  cursor: not-allowed;
}

.add-to-cart-form button.is-in-cart{
  border-radius: 6px !important;
  box-shadow: none !important;
}

/* ===== empty row ===== */

.no-rows td{
  text-align: center !important;
  color: var(--muted);
  padding: 20px 12px !important;
  font-weight: 700;
}

/* ===== footer ===== */

.site-footer{
  width: 100%;
  max-width: var(--container);
  margin: 26px auto 0;
  padding: 0 20px 30px;
}

.site-footer__inner{
  position: relative;
  min-height: 24px;
}

.footer-copy{
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 0;
  color: #6f7e9b;
  font-size: 14px;
  line-height: 24px;
  white-space: nowrap;
}

.footer-links{
  position: absolute;
  right: 0;
  top: 0;
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-links a{
  text-decoration: none;
  color: #5d6f95;
  font-size: 14px;
  line-height: 24px;
}

.footer-links a:hover{
  color: #2f5fd0;
  text-decoration: none;
}

/* ===== telegram button ===== */

.telegram-float{
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1200;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  text-decoration: none;
  background: linear-gradient(135deg, #2AABEE, #1b8ed6);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}

.telegram-float:hover{
  opacity: .95;
}

.telegram-float svg{
  flex: 0 0 auto;
}

/* ===== helpers ===== */

.hidden{
  display: none !important;
}

/* ===== responsive ===== */

@media (max-width: 1080px){
  .catalog-active{
    font-size: 22px;
  }

  .product-table th,
  .product-table td{
    padding-left: 10px;
    padding-right: 10px;
  }

  .product-table td.td-actions,
  .product-table thead th:last-child{
    padding-right: 12px;
  }
}

@media (max-width: 900px){
  .site-header{
    margin-left: 14px;
    margin-right: 14px;
  }

  .site-header__inner{
    flex-direction: column;
    align-items: flex-start;
  }

  .site-nav{
    gap: 12px;
  }

  .container{
    padding-top: 18px;
  }

  .catalog-active{
    font-size: 22px;
  }

  .products-wrapper{
    overflow-x: auto;
  }

  .product-table{
    min-width: 760px;
  }

  .search{
    flex-wrap: wrap;
  }
}

@media (max-width: 768px){
  .site-footer{
    padding-bottom: 40px;
  }

  .site-footer__inner{
    min-height: 52px;
  }

  .footer-copy{
    position: static;
    transform: none;
    text-align: center;
    margin-bottom: 10px;
  }

  .footer-links{
    position: static;
    justify-content: center;
  }
}

@media (max-width: 640px){
  .site-logo{
    font-size: 22px;
  }

  .search{
    align-items: stretch;
  }

  .search input[type="text"]{
    width: 100%;
  }

  .telegram-float{
    right: 14px;
    bottom: 14px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 13px;
  }

  .container{
    padding-left: 14px;
    padding-right: 14px;
  }

  .site-header__inner,
  .site-footer{
    padding-left: 14px;
    padding-right: 14px;
  }
}
/* ===== PRODUCT TITLES (сделать жирнее) ===== */

.product-table tbody td:first-child .product-link,
.product-table tbody td:first-child a.product-link{
  font-weight: 500 !important; /* было 300 → стало норм */
  color: #1f2d3d !important;
}

/* hover оставляем аккуратным */
.product-table tbody td:first-child .product-link:hover{
  color: var(--primary) !important;
}

/* ===== РАЗДЕЛЫ ОСТАЮТСЯ ЖИРНЫМИ ===== */

.product-table tr.subhead-row td,
.product-table tr td[colspan]{
  font-weight: 800 !important;
}
/* ===== ИДЕАЛЬНАЯ ИЕРАРХИЯ ШРИФТОВ ===== */

/* 1. НАЗВАНИЯ ТОВАРОВ (средний вес — читаемо и аккуратно) */
.product-table tbody td:first-child .product-link,
.product-table tbody td:first-child a.product-link{
  font-weight: 500 !important;
  font-size: 14px !important;
  color: #1f2d3d !important;
}

/* 2. ЦЕНА (самый акцент) */
.price{
  font-weight: 700 !important;
  color: #111111 !important;
}

/* 3. РАЗДЕЛЫ (максимальный акцент) */
.product-table tr.subhead-row td,
.product-table tr td[colspan]{
  font-weight: 800 !important;
  font-size: 15px !important;
  color: #1a1a1a !important;
  background: #f1f3f7 !important;
}