/*
Theme Name: KosMas
Theme URI: https://kos-mas.ru
Description: Premium custom WordPress theme for KosMas beauty salon and home furniture.
Version: 1.0.0
Author: KosMas
Author URI: https://kos-mas.ru
Tags: woocommerce, custom-background, post-thumbnails, translation-ready
Text Domain: kos-mas
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/

@import url('https://fonts.googleapis.com/css2?family=Cormorant:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&family=Golos+Text:wght@400;500;600;700&family=Manrope:wght@700;800&family=Unbounded:wght@700;800&family=Oswald:wght@600;700&display=swap');

/* ==========================================================================
   KosMas Core Styles from prototype
   ========================================================================== */

* { box-sizing: border-box; }
body { margin: 0; background: #F3EFE7; overflow-x: clip; }
#km-root summary { list-style: none; cursor: pointer; }
#km-root summary::-webkit-details-marker { display: none; }
#km-root details[open] .km-plus { transform: rotate(45deg); }
::selection { background: #1B1916; color: #F3EFE7; }
#km-root::-webkit-scrollbar { height: 8px; width: 8px; }
#km-root ::-webkit-scrollbar { height: 8px; }
#km-root ::-webkit-scrollbar-thumb { background: rgba(27,25,22,.22); border-radius: 8px; }
.km-snap { scrollbar-width: none; -ms-overflow-style: none; }
.km-snap::-webkit-scrollbar { display: none; }

@keyframes km-marq {
  from { transform: translate3d(0,0,0); }
  to { transform: translate3d(-50%,0,0); }
}
@keyframes km-fadein {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Burger Menu classes */
.km-burger { display: none; }
.km-nav-desktop { display: flex; align-items: center; gap: 40px; }
#km-mobile-menu.open { transform: translateX(0) !important; }
.km-filters-wrapper.open .km-filters-chips { display: flex !important; }

/* ==========================================================================
   RESPONSIVE Overrides
   ========================================================================== */
@media (max-width: 1024px) {
  #km-hero { grid-template-columns: 1fr !important; }
  #km-hero-img { position: relative !important; inset: 0 !important; width: 100% !important; height: 50vh !important; }
  #km-hero > div:nth-child(2) { height: 50vh !important; }
}

@media (max-width: 768px) {
  /* Header */
  #km-header {
    padding: 12px 4vw !important;
    background: rgba(243,239,231,0.95) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border-bottom: 1px solid rgba(27,25,22,.10) !important;
  }
  .km-nav-desktop { display: none !important; }
  .km-burger {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(27,25,22,.12);
    border-radius: 50%;
    cursor: pointer;
    color: #1B1916;
    background: transparent !important;
  }
  .km-logo-sub { display: none !important; }
  .km-header-fav, .km-header-compare { display: none !important; }

  /* Hero */
  #km-hero { min-height: auto !important; height: auto !important; }
  #km-hero > div:first-child { padding: 90px 4vw 40px !important; }
  #km-hero h1 { font-size: clamp(38px,8vw,64px) !important; line-height: 0.95 !important; }

  /* Horizontal Pinned Sections (km-pin & km-pin2) */
  #km-pin > div, #km-pin2 > div {
    height: 70vh !important;
    top: 15vh !important;
  }
  #km-pin-track {
    height: auto !important;
    gap: 3vw !important;
    padding: 0 6vw !important;
    align-items: stretch !important;
  }
  #km-pin-track > div, #km-pin-track > figure,
  #km-pin2-track > div, #km-pin2-track > figure {
    flex: 0 0 82vw !important;
    width: 82vw !important;
    max-width: 320px !important;
  }
  #km-pin-track > div:first-child, #km-pin2-track > div:first-child {
    flex: 0 0 82vw !important;
    width: 82vw !important;
    max-width: 320px !important;
  }

  /* Mobile overrides for #km-pin to look like #km-pin2 card style */
  .km-pin-intro {
    flex: 0 0 82vw !important;
    width: 82vw !important;
    max-width: 320px !important;
    padding-right: 3vw !important;
  }
  .km-pin-intro h2 {
    font-size: clamp(36px,4.6vw,72px) !important;
    line-height: 0.96 !important;
  }
  .km-pin-intro p {
    margin-top: 28px !important;
  }
  .km-pin-intro div:last-child {
    display: none !important;
  }
  .km-pin-card {
    height: auto !important;
  }
  .km-pin-card-img-wrap {
    aspect-ratio: 4/5 !important;
    flex: none !important;
  }
  .km-pin-card-cat {
    display: none !important;
  }
  .km-pin-card-fav {
    top: 12px !important;
    right: 12px !important;
    width: 32px !important;
    height: 32px !important;
    font-size: 14px !important;
    background: rgba(243,239,231,0.72) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    border: 1px solid rgba(27,25,22,0.06) !important;
  }
  .km-pin-card-cap {
    display: grid !important;
    grid-template-columns: 1fr auto !important;
    gap: 8px 12px !important;
    padding-top: 16px !important;
  }
  .km-pin-card-cap > div:first-child {
    display: contents !important;
  }
  .km-pin-card-cap > div:first-child > div:first-child {
    order: 2 !important;
    font-size: 21px !important;
    line-height: 1.1 !important;
  }
  .km-pin-card-cat-sub {
    order: 1 !important;
    grid-column: 1 / 3 !important;
    font-size: 11px !important;
    margin: 0 !important;
  }
  .km-pin-card-cap > div:last-child {
    order: 3 !important;
    font-size: 14px !important;
    line-height: 1.1 !important;
    margin-top: 4px !important;
  }
  .km-pin-outro {
    flex: 0 0 82vw !important;
    width: 82vw !important;
    max-width: 320px !important;
    height: auto !important;
    padding-left: 3vw !important;
  }

  /* Для кого (audiences) */
  .km-audiences-section { padding: 60px 4vw 20px !important; }
  .km-audiences-section > div:first-child { margin-bottom: 30px !important; }
  .km-audiences-grid { grid-template-columns: 1fr !important; gap: 20px !important; }

  /* Популярное (km-pin2) intro spacing */
  #km-pin2 > div > div:first-child { padding: 0 4vw !important; margin-bottom: 24px !important; }

  /* FAQ (Вопросы) */
  .km-faq-section { padding: 40px 4vw 60px !important; }
  .km-faq-section > div:first-child { margin-bottom: 24px !important; }
  .km-faq-section details summary { font-size: 18px !important; padding: 18px 4px !important; }
  .km-faq-section details p { padding: 0 10px 18px 4px !important; font-size: 14px !important; }

  /* CTA комплектация */
  .km-cta-section { padding: 60px 4vw !important; }

  /* Catalog Page */
  .km-catalog-page { padding: 90px 4vw 60px !important; }
  .km-catalog-page h1 { font-size: clamp(36px,8vw,64px) !important; }
  .km-catalog-grid { grid-template-columns: 1fr 1fr !important; gap: 24px 16px !important; }
  .km-filters-chips { gap: 8px !important; }

  /* Product Page */
  .km-product-page { padding: 95px 4vw 60px !important; }
  .km-product-grid { grid-template-columns: 1fr !important; gap: 30px !important; }
  .km-product-grid > div:first-child { position: relative !important; top: 0 !important; }
  .km-product-grid h1 { font-size: clamp(30px,8vw,44px) !important; }

  /* Cart & Checkout */
  .km-cart-grid, .km-checkout-form { grid-template-columns: 1fr !important; gap: 40px !important; }
  .km-cart-grid aside, .km-checkout-form aside { position: relative !important; top: 0 !important; padding: 24px !important; }
  .km-cart-item { grid-template-columns: 80px 1fr !important; gap: 16px !important; }
  .km-cart-item > div:first-child { width: 80px !important; height: 80px !important; }
  .km-cart-item > div:nth-child(3) { grid-column: 2; margin-top: 10px; width: fit-content; }
  .km-cart-item > div:nth-child(4) { grid-column: 2; align-items: flex-start !important; min-width: auto !important; margin-top: 10px; }

  /* Checkout inputs */
  .km-checkout-fields-2col, .km-checkout-fields-3col { grid-template-columns: 1fr !important; }

  /* Production Page */
  .km-production-grid-intro, .km-production-grid-materials { grid-template-columns: 1fr !important; gap: 16px !important; }
  .km-production-section-1 { padding: 90px 4vw 40px !important; }
  .km-production-section-2 { padding: 0 4vw 20px !important; }
  .km-production-section-3 { padding: 40px 4vw 30px !important; }
  .km-production-section-3 > div:last-child { grid-template-columns: 1fr !important; }
  .km-production-section-4 { padding: 40px 4vw 30px !important; }
  .km-production-section-4 > div { grid-template-columns: 1fr !important; gap: 30px !important; }
  .km-production-section-5 { padding: 30px 4vw 40px !important; }
  .km-production-grid-stats { grid-template-columns: 1fr 1fr !important; gap: 30px 20px !important; padding-top: 30px !important; }
  .km-production-section-6 { padding: 60px 4vw !important; }

  /* Contacts Page */
  .km-contacts-grid { grid-template-columns: 1fr !important; gap: 40px !important; }
  .km-contacts-item-row { grid-template-columns: 1fr !important; gap: 6px !important; padding: 18px 0 !important; }
  .km-contacts-item-row > div:first-child { font-size: 9px !important; }
  .km-contacts-item-row > div:last-child { font-size: 20px !important; }

  /* Footer */
  footer { padding: 50px 4vw 30px !important; }
  footer > div:first-child { grid-template-columns: 1fr !important; gap: 30px !important; padding-bottom: 40px !important; }

  /* Modal Form padding */
  .km-modal-content { padding: 36px 24px 30px !important; }

  /* Mobile Filters Chips Collapsed */
  .km-filters-wrapper { margin: 20px 0 !important; padding-top: 20px !important; }
  .km-filters-toggle { display: flex !important; }
  .km-filters-chips { display: none !important; }
  .km-filters-wrapper.open .km-filters-chips { display: flex !important; }
  .km-filters-wrapper.open .km-filters-toggle { margin-bottom: 16px !important; }
}

/* ==========================================================================
   WordPress/WooCommerce Specific Core Styling Integration
   ========================================================================== */

#km-header .menu-item.current-menu-item a,
#km-header a:hover {
  color: #1B1916 !important;
  border-bottom: 1px solid #1B1916;
}

#km-header > a:hover {
  border-bottom: none !important;
}

/* General button support matching our buttons */
.km-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #1B1916;
  color: #F3EFE7;
  font: 500 14px/1 'Golos Text', sans-serif;
  letter-spacing: .01em;
  padding: 18px 30px;
  border-radius: 100px;
  cursor: pointer;
  border: 1px solid #1B1916;
  text-decoration: none;
  transition: transform .4s ease, background .4s ease;
}
.km-btn-primary:hover {
  transform: translateY(-2px);
  background: #2e2a26;
}

.km-btn-outline {
  display: inline-flex;
  align-items: center;
  font: 500 14px/1 'Golos Text', sans-serif;
  letter-spacing: .01em;
  padding: 18px 28px;
  border: 1px solid rgba(27,25,22,.25);
  border-radius: 100px;
  cursor: pointer;
  text-decoration: none;
  background: transparent;
  color: #1B1916;
  transition: background .4s ease;
}
.km-btn-outline:hover {
  background: rgba(27,25,22,.05);
}

/* ==========================================================================
   WordPress Dynamic Navigation Menu Styles (ul / li lists)
   ========================================================================== */

#km-header nav ul,
#km-mobile-menu nav ul {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 40px !important;
}

#km-header nav li,
#km-mobile-menu nav li {
  margin: 0 !important;
  padding: 0 !important;
  display: inline-block !important;
}

#km-header nav a,
#km-mobile-menu nav a {
  font: 500 13px/1 'Golos Text', sans-serif !important;
  letter-spacing: .02em !important;
  cursor: pointer !important;
  text-decoration: none !important;
  color: #57514A !important;
  transition: color .3s ease !important;
  padding-bottom: 3px !important;
}

#km-header nav a:hover,
#km-header nav li.current-menu-item a {
  color: #1B1916 !important;
  border-bottom: 1px solid #1B1916 !important;
}

/* Mobile menu off-canvas vertical list overrides */
#km-mobile-menu nav ul {
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 32px !important;
}

#km-mobile-menu nav a {
  font: 300 clamp(32px, 7.5vw, 52px)/1 'Cormorant', serif !important;
  color: #1B1916 !important;
}

/* ==========================================================================
   WooCommerce Global styling mappings
   ========================================================================== */

/* Catalog / Archive Grid */
ul.products {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)) !important;
  gap: 52px 34px !important;
  list-style: none !important;
  margin: 40px 0 !important;
  padding: 0 !important;
}

ul.products li.product {
  margin: 0 !important;
  padding: 0 !important;
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  width: auto !important;
  float: none !important;
}

ul.products li.product a {
  text-decoration: none !important;
  color: inherit !important;
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
}

/* Image styling */
ul.products li.product img {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 4/5 !important;
  object-fit: cover !important;
  border-radius: 3px !important;
  background: #EAE4D8 !important;
  transition: transform 1.1s cubic-bezier(.16,.8,.24,1) !important;
}

ul.products li.product:hover img {
  transform: scale(1.04) !important;
}

/* Titles */
ul.products li.product .woocommerce-loop-product__title {
  font: 400 21px/1.1 'Cormorant', serif !important;
  color: #1B1916 !important;
  margin: 16px 0 6px !important;
}

/* Price tags */
ul.products li.product .price,
.woocommerce div.product p.price,
.woocommerce div.product span.price {
  font: 500 15px/1 'Golos Text', sans-serif !important;
  color: #1B1916 !important;
  margin-top: 4px !important;
  display: block !important;
}

/* Loop Add to Cart buttons */
ul.products li.product .button {
  margin-top: 14px !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  background: #1B1916 !important;
  color: #F3EFE7 !important;
  font: 500 13px/1 'Golos Text', sans-serif !important;
  padding: 15px 22px !important;
  border-radius: 100px !important;
  text-decoration: none !important;
  text-transform: none !important;
  border: none !important;
  transition: all 0.3s ease !important;
}

ul.products li.product .button:hover {
  background: #2e2a26 !important;
}

/* Single Product layout overrides */
.woocommerce div.product {
  display: grid !important;
  grid-template-columns: 1.15fr .85fr !important;
  gap: 5vw !important;
  align-items: start !important;
  margin-top: 40px !important;
}

@media (max-width: 768px) {
  .woocommerce div.product {
    grid-template-columns: 1fr !important;
    gap: 30px !important;
  }
}

.woocommerce div.product div.images {
  position: sticky !important;
  top: 110px !important;
  width: 100% !important;
  float: none !important;
  margin: 0 !important;
}

.woocommerce div.product div.summary {
  width: 100% !important;
  float: none !important;
  margin: 0 !important;
  padding-top: 6px !important;
}

/* Titles */
.woocommerce div.product .product_title {
  font: 300 clamp(38px, 4.6vw, 68px)/1.02 'Cormorant', serif !important;
  letter-spacing: -.01em !important;
  color: #1B1916 !important;
  margin-bottom: 20px !important;
}

/* Price */
.woocommerce div.product p.price,
.woocommerce div.product span.price {
  font: 500 26px/1 'Golos Text', sans-serif !important;
  color: #1B1916 !important;
  margin: 26px 0 !important;
}

/* Add to cart button */
.woocommerce div.product .button.alt {
  background: #1B1916 !important;
  color: #F3EFE7 !important;
  font: 500 15px/1 'Golos Text', sans-serif !important;
  padding: 20px 30px !important;
  border-radius: 100px !important;
  border: none !important;
  width: 100% !important;
  max-width: 320px !important;
  cursor: pointer !important;
  transition: transform .4s ease !important;
}

.woocommerce div.product .button.alt:hover {
  transform: translateY(-2px) !important;
  background: #2e2a26 !important;
}

/* Tabs */
.woocommerce-tabs {
  grid-column: span 2 !important;
  margin-top: 60px !important;
  border-top: 1px solid rgba(27,25,22,.12) !important;
  padding-top: 40px !important;
}

@media (max-width: 768px) {
  .woocommerce-tabs {
    grid-column: span 1 !important;
  }
}

/* WooCommerce Cart Layout */
.woocommerce-cart-form {
  width: 100% !important;
}

.woocommerce-cart table.shop_table.cart thead {
  display: none !important;
}

.woocommerce table.shop_table {
  border-collapse: collapse !important;
  width: 100% !important;
  border: none !important;
  background: transparent !important;
  border-radius: 0 !important;
  overflow: hidden !important;
  margin-bottom: 40px !important;
}

.woocommerce table.shop_table td {
  padding: 26px 0 !important;
  border-bottom: 1px solid rgba(27,25,22,.12) !important;
  font: 400 14px/1.6 'Golos Text', sans-serif !important;
  color: #1B1916 !important;
  background: transparent !important;
}

/* Explicit custom grids for cart items on PC */
@media (min-width: 769px) {
  .woocommerce-cart table.shop_table.cart tr.cart_item {
    display: grid !important;
    grid-template-columns: 80px 1.5fr auto auto !important;
    gap: 30px !important;
    align-items: center !important;
    padding: 24px 0 !important;
    border-bottom: 1px solid rgba(27,25,22,.12) !important;
  }

  .woocommerce-cart table.shop_table.cart td.product-thumbnail {
    padding: 0 !important;
    border: none !important;
  }

  .woocommerce-cart table.shop_table.cart td.product-thumbnail img {
    width: 80px !important;
    height: 80px !important;
    object-fit: cover !important;
    border-radius: 4px !important;
    background: #FBF9F4 !important;
  }

  .woocommerce-cart table.shop_table.cart td.product-name {
    padding: 0 !important;
    border: none !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    text-align: left !important;
  }

  .woocommerce-cart table.shop_table.cart td.product-name a {
    font: 400 20px/1.2 'Cormorant', serif !important;
    color: #1B1916 !important;
    text-decoration: none !important;
  }


  .woocommerce-cart table.shop_table.cart td.product-quantity {
    padding: 0 !important;
    border: none !important;
    text-align: center !important;
  }

  .woocommerce-cart table.shop_table.cart td.product-subtotal {
    padding: 0 !important;
    border: none !important;
    text-align: right !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    gap: 6px !important;
  }

  .woocommerce-cart table.shop_table.cart td.product-subtotal .woocommerce-Price-amount {
    font: 500 18px/1 'Golos Text', sans-serif !important;
    color: #1B1916 !important;
  }

  .km-delete-wrap {
    display: block !important;
  }

  .km-delete-link {
    font: 400 11px/1 'Golos Text', sans-serif !important;
    color: #8A8272 !important;
    text-decoration: underline !important;
    cursor: pointer !important;
    transition: color 0.3s ease !important;
  }

  .km-delete-link:hover {
    color: #1B1916 !important;
  }

  /* Hide original table columns */
  .woocommerce-cart table.shop_table.cart th.product-price,
  .woocommerce-cart table.shop_table.cart td.product-price,
  .woocommerce-cart table.shop_table.cart th.product-remove,
  .woocommerce-cart table.shop_table.cart td.product-remove {
    display: none !important;
  }
}

/* Quantity inputs */
.woocommerce .quantity, .quantity {
  display: inline-flex !important;
  align-items: center !important;
  border: 1px solid rgba(27,25,22,.15) !important;
  border-radius: 100px !important;
  background: #FBF9F4 !important;
  padding: 2px 8px !important;
}

.woocommerce .quantity .qty {
  width: 36px !important;
  height: 32px !important;
  border: none !important;
  background: transparent !important;
  font: 500 15px/1 'Golos Text', sans-serif !important;
  color: #1B1916 !important;
  padding: 0 !important;
  text-align: center !important;
}

/* Hide spin arrows in cart inputs */
.woocommerce .quantity input::-webkit-outer-spin-button,
.woocommerce .quantity input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.woocommerce .quantity input[type=number] {
  -moz-appearance: textfield;
}

/* Remove button */
.woocommerce a.remove {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  background: transparent !important;
  color: #8A8272 !important;
  border: 1px solid rgba(27,25,22,.15) !important;
  font-size: 16px !important;
  line-height: 1 !important;
  transition: all 0.3s ease !important;
  text-decoration: none !important;
}

.woocommerce a.remove:hover {
  background: #1B1916 !important;
  color: #F3EFE7 !important;
  border-color: #1B1916 !important;
}

/* Coupon and Cart actions cell layout */
.woocommerce-cart table.shop_table td.actions {
  display: block !important;
  width: 100% !important;
  border-bottom: none !important;
  background: transparent !important;
  padding: 24px 0 !important;
  text-align: right !important;
}

.woocommerce-cart table.shop_table td.actions::after {
  content: "" !important;
  display: table !important;
  clear: both !important;
}

.woocommerce-cart table.shop_table td.actions .coupon {
  float: left !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 0 !important;
  margin: 0 !important;
}

.woocommerce-cart table.shop_table td.actions .coupon input.input-text {
  width: 200px !important;
  height: 48px !important;
  background: #FBF9F4 !important;
  border: 1px solid rgba(27, 25, 22, 0.16) !important;
  border-radius: 100px !important;
  padding: 0 20px !important;
  font: 400 14px/1 'Golos Text', sans-serif !important;
  color: #1B1916 !important;
  outline: none !important;
  margin: 0 !important;
}

.woocommerce-cart table.shop_table td.actions .coupon button.button,
.woocommerce-cart table.shop_table td.actions .coupon button[name="apply_coupon"] {
  height: 48px !important;
  background: #1B1916 !important;
  color: #F3EFE7 !important;
  font: 500 13px/1 'Golos Text', sans-serif !important;
  padding: 0 24px !important;
  border-radius: 100px !important;
  border: none !important;
  cursor: pointer !important;
  transition: transform 0.4s ease, background 0.4s ease !important;
  margin: 0 !important;
}

.woocommerce-cart table.shop_table td.actions .coupon button.button:hover,
.woocommerce-cart table.shop_table td.actions .coupon button[name="apply_coupon"]:hover {
  background: #2e2a26 !important;
  transform: translateY(-2px) !important;
}

.woocommerce-cart table.shop_table td.actions button[name="update_cart"].button,
.woocommerce-cart table.shop_table td.actions input[name="update_cart"].button {
  display: none !important;
}

/* Cart totals block */
.cart-collaterals {
  margin-top: 40px !important;
  display: flex !important;
  justify-content: flex-end !important;
}

.cart-collaterals .cart_totals {
  width: 100% !important;
  max-width: 460px !important;
  background: #FBF9F4 !important;
  border: 1px solid rgba(27,25,22,.10) !important;
  border-radius: 6px !important;
  padding: 36px !important;
  float: none !important;
}

.cart-collaterals .cart_totals h2 {
  display: none !important;
}
.cart-collaterals .cart_totals::before {
  content: 'ВАШ ЗАКАЗ' !important;
  display: block !important;
  font: 600 10px/1 'Golos Text', sans-serif !important;
  letter-spacing: .24em !important;
  text-transform: uppercase !important;
  color: #8A8272 !important;
  margin-bottom: 26px !important;
}

/* Cart totals table clean style */
.cart-collaterals .cart_totals table.shop_table {
  background: transparent !important;
  border: none !important;
  margin-bottom: 0 !important;
  display: block !important;
}

.cart-collaterals .cart_totals table.shop_table tbody {
  display: block !important;
  width: 100% !important;
}

.cart-collaterals .cart_totals table.shop_table tr {
  display: flex !important;
  justify-content: space-between !important;
  align-items: flex-start !important;
  padding: 12px 0 !important;
  width: 100% !important;
  border-bottom: 1px solid rgba(27,25,22,.08) !important;
}

.cart-collaterals .cart_totals table.shop_table th,
.cart-collaterals .cart_totals table.shop_table td {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: block !important;
  text-align: right !important;
}

.cart-collaterals .cart_totals table.shop_table th {
  text-align: left !important;
  font: 600 10px/1 'Golos Text', sans-serif !important;
  letter-spacing: .24em !important;
  text-transform: uppercase !important;
  color: #8A8272 !important;
  min-width: 100px !important;
}

.cart-collaterals .cart_totals table.shop_table td {
  font: 400 14px/1.3 'Golos Text', sans-serif !important;
  color: #57514A !important;
  flex: 1 !important;
}

.cart-collaterals .cart_totals table.shop_table tr.cart-subtotal {
  border-bottom: none !important;
}

/* Rename subtotal th to 'Товары' dynamically */
.cart-collaterals .cart_totals table.shop_table tr.cart-subtotal th {
  font-size: 0 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

.cart-collaterals .cart_totals table.shop_table tr.cart-subtotal th::before {
  content: 'Товары' !important;
  font: 400 14px/1 'Golos Text', sans-serif !important;
  color: #57514A !important;
}

/* Hide shipping calculator and style shipping detail as grey text */
.cart-collaterals .cart_totals table.shop_table tr.shipping {
  flex-direction: column !important;
  align-items: stretch !important;
  border-bottom: 1px solid rgba(27,25,22,.12) !important;
  padding-bottom: 20px !important;
}

.cart-collaterals .cart_totals table.shop_table tr.shipping th {
  display: block !important;
  width: 100% !important;
  text-align: left !important;
  margin-bottom: 14px !important;
}

.cart-collaterals .cart_totals table.shop_table tr.shipping td {
  display: block !important;
  width: 100% !important;
  text-align: left !important;
  font: 400 13px/1.4 'Golos Text', sans-serif !important;
  color: #8A8272 !important;
}

.cart-collaterals .cart_totals table.shop_table tr.shipping td a.shipping-calculator-button {
  display: none !important;
}

.cart-collaterals .cart_totals table.shop_table tr.order-total {
  padding: 24px 0 4px !important;
}

.cart-collaterals .cart_totals table.shop_table tr.order-total th {
  font: 400 18px/1 'Cormorant', serif !important;
  color: #1B1916 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
}

.cart-collaterals .cart_totals table.shop_table tr.order-total td {
  font: 500 26px/1 'Golos Text', sans-serif !important;
  color: #1B1916 !important;
}

/* Checkout Button */
.wc-proceed-to-checkout .checkout-button {
  background: #1B1916 !important;
  color: #F3EFE7 !important;
  font: 500 15px/1 'Golos Text', sans-serif !important;
  padding: 20px !important;
  border-radius: 100px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-decoration: none !important;
  margin-top: 28px !important;
  transition: transform .4s ease !important;
}

.wc-proceed-to-checkout .checkout-button:hover {
  transform: translateY(-2px) !important;
  background: #2e2a26 !important;
}

/* Input text styling - Scoped to #km-root to prevent admin bar pollution */
#km-root input[type="text"],
#km-root input[type="tel"],
#km-root input[type="email"],
#km-root textarea,
#km-root select,
.woocommerce-checkout input[type="text"],
.woocommerce-checkout input[type="tel"],
.woocommerce-checkout input[type="email"],
.woocommerce-checkout textarea,
.woocommerce-checkout select {
  width: 100% !important;
  background: #FBF9F4 !important;
  border: 1px solid rgba(27,25,22,.16) !important;
  border-radius: 4px !important;
  padding: 15px 16px !important;
  font: 400 15px/1.3 'Golos Text', sans-serif !important;
  color: #1B1916 !important;
  outline: none !important;
}

#km-root input[type="text"]:focus,
#km-root input[type="tel"]:focus,
#km-root input[type="email"]:focus,
#km-root textarea:focus,
.woocommerce-checkout input[type="text"]:focus,
.woocommerce-checkout input[type="tel"]:focus,
.woocommerce-checkout input[type="email"]:focus,
.woocommerce-checkout textarea:focus {
  border-color: #1B1916 !important;
}

/* Fix blue links inside cart, checkout, single product metadata, etc. - without overriding buttons */
#km-root a,
.woocommerce a,
.woocommerce-cart a,
.woocommerce-checkout a,
.woocommerce-message a,
.woocommerce-info a,
.product-type-simple a,
.woocommerce-loop-product__link a {
  color: #1B1916;
  text-decoration: none;
}
#km-root a:hover,
.woocommerce a:hover {
  color: #8A8272;
}

/* Hover Image Swapping System */
.km-product-card {
  position: relative;
}
.km-product-card .km-card-img-main,
.km-product-card .km-card-img-hover {
  transition: transform 1.1s cubic-bezier(.16,.8,.24,1), opacity 0.5s ease !important;
}
.km-product-card:hover .km-card-img-main {
  transform: scale(1.04) !important;
}
/* If hover image is present, hide main image on hover and fade in hover image */
.km-product-card:hover .km-card-img-hover {
  opacity: 1 !important;
  transform: scale(1.04) !important;
}

/* Spacing and overlapping checkout fields fixes */
.woocommerce form .form-row {
  margin-bottom: 20px !important;
  display: block !important;
  float: none !important;
  width: 100% !important;
  clear: both !important;
}
@media (min-width: 769px) {
  .woocommerce form .form-row-first {
    width: calc(50% - 10px) !important;
    float: left !important;
    margin-right: 20px !important;
    clear: none !important;
  }
  .woocommerce form .form-row-last {
    width: calc(50% - 10px) !important;
    float: right !important;
    clear: none !important;
  }
}

/* Quantity selector styling */
.woocommerce .quantity, .quantity {
  display: inline-flex !important;
  align-items: center !important;
  margin-right: 12px !important;
}
.woocommerce .quantity .qty, .quantity .qty {
  width: 60px !important;
  height: 56px !important;
  padding: 0 !important;
  text-align: center !important;
  border: 1px solid rgba(27,25,22,.16) !important;
  background: #FBF9F4 !important;
  border-radius: 100px !important;
  font: 500 15px/1 'Golos Text', sans-serif !important;
  color: #1B1916 !important;
  outline: none !important;
}

/* WooCommerce Single Product Add to Cart styling */
.woocommerce div.product form.cart:not(.variations_form),
.woocommerce div.product .woocommerce-variation-add-to-cart {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 14px !important;
  margin: 0 !important;
  width: 100% !important;
  max-width: 440px !important;
  flex: 1 !important;
}

.woocommerce div.product form.cart.variations_form {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 20px !important;
  margin-top: 30px !important;
  margin-bottom: 0 !important;
}

.woocommerce div.product form.cart .quantity,
.woocommerce div.product .woocommerce-variation-add-to-cart .quantity {
  margin: 0 !important;
}

body.single-product button.single_add_to_cart_button,
body.single-product .single_add_to_cart_button,
body.single-product .button.alt,
.woocommerce div.product form.cart .button,
.woocommerce div.product .woocommerce-variation-add-to-cart .button {
  flex: 1 !important;
  height: 56px !important;
  background: #1B1916 !important;
  color: #F3EFE7 !important;
  font: 500 15px/1 'Golos Text', sans-serif !important;
  padding: 0 30px !important;
  border-radius: 100px !important;
  border: none !important;
  cursor: pointer !important;
  transition: transform .4s ease, background .4s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-decoration: none !important;
}

body.single-product button.single_add_to_cart_button:hover,
body.single-product .single_add_to_cart_button:hover,
body.single-product .button.alt:hover,
.woocommerce div.product form.cart .button:hover,
.woocommerce div.product .woocommerce-variation-add-to-cart .button:hover {
  transform: translateY(-2px) !important;
  background: #2e2a26 !important;
  color: #F3EFE7 !important;
}

table.variations {
  border: none !important;
  margin-bottom: 20px !important;
  width: 100% !important;
  display: block !important;
}

table.variations tbody,
table.variations tr,
table.variations th,
table.variations td {
  display: block !important;
  width: 100% !important;
  text-align: left !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
}

table.variations th.label {
  font: 600 10px/1 'Golos Text', sans-serif !important;
  letter-spacing: .22em !important;
  text-transform: uppercase !important;
  color: #8A8272 !important;
  margin-bottom: 12px !important;
  margin-top: 24px !important;
  display: block !important;
}

table.variations tr:first-child th.label {
  margin-top: 0 !important;
}

table.variations td.value {
  margin-bottom: 24px !important;
  display: block !important;
}

.woocommerce div.product form.cart .reset_variations {
  display: inline-block !important;
  margin-top: 8px !important;
  font: 500 11px/1 'Golos Text', sans-serif !important;
  color: #8A8272 !important;
  border-bottom: 1px dashed #8A8272 !important;
  text-decoration: none !important;
  width: fit-content !important;
}
.woocommerce div.product form.cart .reset_variations[style*="hidden"] {
  display: none !important;
}

/* Clearfix override to prevent empty grid cells in WooCommerce list */
ul.products::before,
ul.products::after {
  display: none !important;
  content: none !important;
}

/* Spacing for inputs inside the modal */
.km-modal-content form input,
.km-modal-content form textarea {
  margin-bottom: 14px !important;
}
.km-modal-content form button {
  margin-top: 6px !important;
}

/* Hide WooCommerce quantity selector on single product pages */
body.single-product .quantity,
.woocommerce div.product form.cart .quantity,
.woocommerce div.product .woocommerce-variation-add-to-cart .quantity {
  display: none !important;
}

/* Style disabled single product add to cart button */
body.single-product button.single_add_to_cart_button.disabled,
body.single-product .single_add_to_cart_button.disabled {
  background: #1B1916 !important;
  color: #F3EFE7 !important;
  opacity: 0.65 !important;
}

/* Hide duplicate variation price outputs */
.woocommerce-variation.single_variation {
  display: none !important;
}

/* Specificity overrides for button text colors */
#km-root a.button,
#km-root a.checkout-button,
#km-root a.km-btn-primary,
#km-root a.button.alt,
#km-root .button,
#km-root .button.alt,
.woocommerce a.button,
.woocommerce a.button.alt,
.woocommerce-cart a.button,
.woocommerce-cart a.button.alt,
.woocommerce-checkout a.button,
.woocommerce-checkout a.button.alt,
.wc-proceed-to-checkout a.checkout-button {
  color: #F3EFE7 !important;
}

#km-root a.km-btn-outline,
.woocommerce a.button.km-btn-outline {
  color: #1B1916 !important;
}

/* WooCommerce Checkout Fields Styling */
.woocommerce-checkout input.input-text,
.woocommerce-checkout select,
.woocommerce-checkout textarea,
.woocommerce-checkout .select2-container--default .select2-selection--single {
  background-color: #FBF9F4 !important;
  border: 1px solid rgba(27, 25, 22, 0.16) !important;
  border-radius: 4px !important;
  padding: 13px 16px !important;
  font: 400 15px/1.3 'Golos Text', sans-serif !important;
  color: #1B1916 !important;
  outline: none !important;
  height: auto !important;
  box-shadow: none !important;
  width: 100% !important;
}

.woocommerce-checkout select {
  padding-right: 32px !important;
}

.woocommerce-checkout input[type="checkbox"],
.woocommerce-checkout input[type="radio"] {
  accent-color: #1B1916 !important;
  width: 16px !important;
  height: 16px !important;
  margin-right: 8px !important;
}

.woocommerce-checkout h3 {
  font: 600 10px/1 'Golos Text', sans-serif !important;
  letter-spacing: .24em !important;
  text-transform: uppercase !important;
  color: #8A8272 !important;
  margin-bottom: 22px !important;
  margin-top: 36px !important;
  border: none !important;
  padding: 0 !important;
}



.woocommerce-billing-fields__field-wrapper,
.woocommerce-shipping-fields__field-wrapper,
.woocommerce-additional-fields__field-wrapper {
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
}

.woocommerce-checkout form.checkout p.form-row {
  margin-bottom: 14px !important;
  display: block !important;
  width: 100% !important;
  float: none !important;
}

@media (min-width: 769px) {
  .woocommerce-checkout form.checkout .form-row-first {
    width: calc(50% - 10px) !important;
    float: left !important;
    margin-right: 20px !important;
    clear: none !important;
  }
  .woocommerce-checkout form.checkout .form-row-last {
    width: calc(50% - 10px) !important;
    float: right !important;
    clear: none !important;
  }
  .woocommerce-checkout form.checkout .clear {
    clear: both !important;
  }
}

/* Review Order Section */
#order_review {
  background: #FBF9F4 !important;
  border: 1px solid rgba(27, 25, 22, .10) !important;
  border-radius: 6px !important;
  padding: 34px !important;
}

.woocommerce-checkout table.woocommerce-checkout-review-order-table {
  background: transparent !important;
  border: none !important;
  margin-bottom: 0 !important;
  border-collapse: collapse !important;
  width: 100% !important;
}

/* Style the rows in review table */
.woocommerce-checkout table.woocommerce-checkout-review-order-table tr {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: 12px 0 !important;
  width: 100% !important;
}

.woocommerce-checkout table.woocommerce-checkout-review-order-table th,
.woocommerce-checkout table.woocommerce-checkout-review-order-table td {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  font: 400 14px/1.35 'Golos Text', sans-serif !important;
  color: #1B1916 !important;
}

/* Special styles for cart item rows */
.woocommerce-checkout table.woocommerce-checkout-review-order-table tr.cart_item {
  border-bottom: 1px solid rgba(27, 25, 22, .10) !important;
  padding: 12px 0 !important;
}

.woocommerce-checkout table.woocommerce-checkout-review-order-table tr.cart_item td.product-name {
  text-align: left !important;
  flex: 1 !important;
  padding-right: 16px !important;
  display: block !important;
}

.woocommerce-checkout table.woocommerce-checkout-review-order-table tr.cart_item td.product-name strong.product-quantity {
  font-weight: 400 !important;
  color: #8A8272 !important;
  margin-left: 6px !important;
}

.woocommerce-checkout table.woocommerce-checkout-review-order-table tr.cart_item td.product-total {
  text-align: right !important;
  font-weight: 500 !important;
  white-space: nowrap !important;
  display: block !important;
}

/* Header and Footer rows in review table */
.woocommerce-checkout table.woocommerce-checkout-review-order-table thead th {
  font-weight: 600 !important;
  color: #8A8272 !important;
  text-transform: uppercase !important;
  font-size: 10px !important;
  letter-spacing: 0.15em !important;
}

.woocommerce-checkout table.woocommerce-checkout-review-order-table tr.cart-subtotal,
.woocommerce-checkout table.woocommerce-checkout-review-order-table tr.order-total {
  border-top: 1px solid rgba(27, 25, 22, .10) !important;
}

.woocommerce-checkout table.woocommerce-checkout-review-order-table tr.order-total td {
  font-weight: 600 !important;
  font-size: 18px !important;
}

.woocommerce-checkout table.woocommerce-checkout-review-order-table tr.cart-subtotal,
.woocommerce-checkout table.woocommerce-checkout-review-order-table tr.shipping {
  border-bottom: 1px solid rgba(27, 25, 22, .10) !important;
}

.woocommerce-checkout table.woocommerce-checkout-review-order-table tr.order-total {
  padding: 22px 0 4px !important;
}

.woocommerce-checkout table.woocommerce-checkout-review-order-table tr.order-total th {
  font: 400 18px/1 'Cormorant', serif !important;
  color: #1B1916 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
}

.woocommerce-checkout table.woocommerce-checkout-review-order-table tr.order-total td {
  font: 500 24px/1 'Golos Text', sans-serif !important;
  color: #1B1916 !important;
}

/* Payment Gateway styling */
.woocommerce-checkout-payment {
  background: transparent !important;
}

.woocommerce-checkout-payment ul.payment_methods {
  border-bottom: none !important;
  padding: 0 !important;
  margin-bottom: 0 !important;
  list-style: none !important;
}

.woocommerce-checkout-payment ul.payment_methods li {
  font: 400 14px/1.3 'Golos Text', sans-serif !important;
  color: #1B1916 !important;
  margin-bottom: 10px !important;
}

.woocommerce-checkout-payment button#place_order {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  background: #1B1916 !important;
  color: #F3EFE7 !important;
  font: 500 15px/1 'Golos Text', sans-serif !important;
  padding: 20px !important;
  border-radius: 100px !important;
  cursor: pointer !important;
  border: none !important;
  margin-top: 26px !important;
  transition: transform .4s ease !important;
}

.woocommerce-checkout-payment button#place_order:hover {
  transform: translateY(-2px) !important;
  background: #2e2a26 !important;
}

/* Default WooCommerce privacy notice is hidden: consent is collected explicitly
   via the km-checkout-consent checkbox rendered above the order button. */
.woocommerce-checkout .woocommerce-privacy-policy-text {
  display: none !important;
}

/* WooCommerce Alert/Notice Banners Styling */
.woocommerce-error,
.woocommerce-info,
.woocommerce-message {
  background-color: #FBF9F4 !important;
  border: 1px solid rgba(27, 25, 22, 0.12) !important;
  border-radius: 6px !important;
  padding: 16px 20px !important;
  font: 400 14px/1.5 'Golos Text', sans-serif !important;
  color: #1B1916 !important;
  margin-bottom: 24px !important;
  list-style: none !important;
}

.woocommerce-error::before,
.woocommerce-info::before,
.woocommerce-message::before {
  display: none !important;
}

.woocommerce-error a,
.woocommerce-info a,
.woocommerce-message a {
  color: #1B1916 !important;
  text-decoration: underline !important;
  font-weight: 500 !important;
}


/* Hide unnecessary billing fields, shipping toggle on checkout page */
#billing_last_name_field,
#billing_company_field,
#billing_country_field,
#billing_address_2_field,
#billing_state_field,
#billing_postcode_field,
#ship-to-different-address,
.shipping_address {
  display: none !important;
}

/* Fix WP Gutenberg block library stylesheet border-color selector pollution on header */
#km-header {
  border-top: none !important;
  border-left: none !important;
  border-right: none !important;
  border-bottom-style: solid !important;
  border-bottom-width: 1px !important;
}

/* Admin bar fixed header offset */
.admin-bar #km-header {
  top: 32px !important;
}
@media screen and (max-width: 782px) {
  .admin-bar #km-header {
    top: 46px !important;
  }
}

/* Enforce dark text color for update cart button to prevent white-on-white text */
.woocommerce-cart table.shop_table td.actions button[name="update_cart"] {
  color: #1B1916 !important;
}
.woocommerce-cart table.shop_table td.actions button[name="update_cart"][disabled],
.woocommerce-cart table.shop_table td.actions button[name="update_cart"][disabled]:hover {
  color: rgba(27, 25, 22, 0.4) !important;
  background: transparent !important;
  border-color: rgba(27, 25, 22, 0.15) !important;
  opacity: 0.65 !important;
}

/* PC Desktop 2-Column Layout for Cart & Checkout Pages */
@media (min-width: 769px) {
  /* Cart Page 2-Column Grid */
  .woocommerce-cart .woocommerce {
    display: grid !important;
    grid-template-columns: 1.6fr .9fr !important;
    gap: 4vw !important;
    align-items: start !important;
    padding-top: 40px !important;
  }

  /* Make notices wrapper span across both columns in grid layout */
  .woocommerce-cart .woocommerce .woocommerce-notices-wrapper,
  .woocommerce-checkout .woocommerce .woocommerce-notices-wrapper {
    grid-column: 1 / -1 !important;
    width: 100% !important;
  }

  .woocommerce-cart .woocommerce-cart-form {
    margin-bottom: 0 !important;
  }

  .woocommerce-cart .cart-collaterals {
    margin-top: 0 !important;
    display: block !important;
  }

  .woocommerce-cart .cart-collaterals .cart_totals {
    max-width: 100% !important;
  }

  /* Checkout Page 2-Column Grid */
  .woocommerce-checkout form.checkout {
    display: grid !important;
    grid-template-columns: 1.5fr .9fr !important;
    gap: 4vw !important;
    align-items: start !important;
    width: 100% !important;
  }

  .woocommerce-checkout form.checkout #customer_details {
    margin-bottom: 0 !important;
  }

  /* Hide raw heading to make form a clean 2-element grid (fields + review box) */
  .woocommerce-checkout form.checkout #order_review_heading {
    display: none !important;
  }

  .woocommerce-checkout form.checkout #order_review {
    margin-top: 0 !important;
  }

  /* Prepend heading inside review order box dynamically */
  .woocommerce-checkout #order_review::before {
    content: 'Ваш заказ' !important;
    display: block !important;
    font: 600 10px/1 'Golos Text', sans-serif !important;
    letter-spacing: .24em !important;
    text-transform: uppercase !important;
    color: #8A8272 !important;
    margin-bottom: 22px !important;
  }
}

/* Mobile Responsive Layout overrides for Cart and Checkout pages */
@media (max-width: 768px) {
  .woocommerce-cart table.shop_table_responsive thead {
    display: none !important;
  }

  .woocommerce-cart table.shop_table_responsive tr {
    display: block !important;
    padding: 20px 0 !important;
    border-bottom: 1px solid rgba(27,25,22,.12) !important;
    position: relative !important;
  }

  .woocommerce-cart table.shop_table_responsive tr td {
    display: flex !important;
    justify-content: space-between !important;
    /* align-items: center !important; */
    padding: 8px 0 !important;
    border: none !important;
    text-align: right !important;
  }

  .woocommerce-cart table.shop_table_responsive tr td::before {
    content: attr(data-title) ": " !important;
    font: 600 10px/1 'Golos Text', sans-serif !important;
    letter-spacing: .15em !important;
    text-transform: uppercase !important;
    color: #8A8272 !important;
    text-align: left !important;
    display: block !important;
  }

  /* Align product info on mobile */
  .woocommerce-cart table.shop_table_responsive tr td.product-remove {
    display: none !important;
  }

  /* Mobile cart items card grid layout */
  .woocommerce-cart table.shop_table_responsive tr.cart_item {
    display: grid !important;
    grid-template-columns: 80px 1fr !important;
    gap: 20px !important;
    padding: 24px 0 !important;
    align-items: start !important;
  }

  .woocommerce-cart table.shop_table_responsive tr.cart_item td.product-thumbnail {
    display: block !important;
    grid-column: 1 !important;
    grid-row: 1 / span 3 !important;
    padding: 0 !important;
    border: none !important;
  }
  .woocommerce-cart table.shop_table_responsive tr.cart_item td.product-thumbnail::before {
    display: none !important;
  }
  .woocommerce-cart table.shop_table_responsive tr.cart_item td.product-thumbnail img {
    width: 80px !important;
    height: 80px !important;
    object-fit: cover !important;
    border-radius: 4px !important;
    background: #FBF9F4 !important;
    display: block !important;
  }

  .woocommerce-cart table.shop_table_responsive tr.cart_item td.product-name {
    grid-column: 2 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    text-align: left !important;
    padding: 0 !important;
    border: none !important;
  }
  .woocommerce-cart table.shop_table_responsive tr.cart_item td.product-name::before {
    display: none !important;
  }
  .woocommerce-cart table.shop_table_responsive tr.cart_item td.product-name a {
    font-size: 15px !important;
    font-weight: 500 !important;
    line-height: 1.35 !important;
    color: #1B1916 !important;
  }

  .woocommerce-cart table.shop_table_responsive tr.cart_item td.product-quantity {
    grid-column: 2 !important;
    display: flex !important;
    justify-content: flex-start !important;
    align-items: center !important;
    padding: 0 !important;
    border: none !important;
  }
  .woocommerce-cart table.shop_table_responsive tr.cart_item td.product-quantity::before {
    display: none !important;
  }

  .woocommerce-cart table.shop_table_responsive tr.cart_item td.product-subtotal {
    grid-column: 2 !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 0 !important;
    border: none !important;
  }
  .woocommerce-cart table.shop_table_responsive tr.cart_item td.product-subtotal::before {
    display: none !important;
  }
  .woocommerce-cart table.shop_table_responsive tr.cart_item td.product-subtotal .woocommerce-Price-amount {
    font: 500 16px/1 'Golos Text', sans-serif !important;
    color: #1B1916 !important;
  }

  /* Remove duplicate responsive labels in cart totals on mobile */
  .woocommerce-cart .cart-collaterals .cart_totals table.shop_table_responsive tr td::before {
    display: none !important;
  }

  /* Style actions row on mobile */
  .woocommerce-cart table.shop_table_responsive tr td.actions {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 16px !important;
    padding: 24px 0 0 !important;
    float: none !important;
  }
  .woocommerce-cart table.shop_table_responsive tr td.actions::before {
    display: none !important;
  }

  .woocommerce-cart table.shop_table_responsive tr td.actions .coupon {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    width: 100% !important;
    float: none !important;
  }

  .woocommerce-cart table.shop_table_responsive tr td.actions .coupon input.input-text {
    width: 100% !important;
  }

  .woocommerce-cart table.shop_table_responsive tr td.actions button[name="update_cart"] {
    width: 100% !important;
    float: none !important;
  }

  /* Mobile checkout adjustments */
  .woocommerce-checkout form.checkout {
    display: block !important;
  }
  
  .woocommerce-checkout #order_review {
    padding: 20px !important;
    margin-top: 30px !important;
  }

  .woocommerce-checkout table.woocommerce-checkout-review-order-table tr {
    padding: 10px 0 !important;
  }
  
  .woocommerce-checkout form.checkout p.form-row {
    margin-bottom: 12px !important;
  }
}

/* Additional Cart Totals styling details */
.woocommerce-cart .checkout-button::after,
.woocommerce-checkout #place_order::after {
  content: ' →' !important;
}

.km-continue-shopping {
  margin-top: 30px !important;
  text-align: left !important;
}

.km-continue-link {
  font: 500 13px/1 'Golos Text', sans-serif !important;
  color: #1B1916 !important;
  text-decoration: none !important;
  transition: opacity 0.3s ease !important;
}

.km-continue-link:hover {
  opacity: 0.7 !important;
}

.km-cart-note,
.km-checkout-note {
  font: 400 11px/1.4 'Golos Text', sans-serif !important;
  color: #8A8272 !important;
  text-align: center !important;
  margin-top: 16px !important;
}

/* Shipping options cards */
.woocommerce-checkout #shipping_method,
#shipping_method {
  padding: 0 !important;
  margin: 14px 0 !important;
  list-style: none !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
}

.woocommerce-checkout #shipping_method li,
#shipping_method li {
  background: #FBF9F4 !important;
  border: 1px solid rgba(27, 25, 22, 0.12) !important;
  border-radius: 4px !important;
  padding: 16px 20px !important;
  margin-bottom: 0 !important;
  display: flex !important;
  align-items: center !important;
  font: 400 14px/1 'Golos Text', sans-serif !important;
  color: #1B1916 !important;
  cursor: pointer !important;
  transition: border-color 0.3s ease !important;
  text-align: left !important;
}

.woocommerce-checkout #shipping_method li:hover,
#shipping_method li:hover {
  border-color: rgba(27, 25, 22, 0.25) !important;
}

.woocommerce-checkout #shipping_method li input[type="radio"],
#shipping_method li input[type="radio"] {
  margin-right: 14px !important;
  accent-color: #1B1916 !important;
}



/* Custom dynamic checkout restructuring styles */
.woocommerce-checkout h3:not(.km-section-title),
.woocommerce-checkout #customer_details h3:not(.km-section-title) {
  display: none !important;
}

.km-section-title {
  font: 600 10px/1 'Golos Text', sans-serif !important;
  letter-spacing: .24em !important;
  text-transform: uppercase !important;
  color: #8A8272 !important;
  margin-bottom: 16px !important;
  margin-top: 0 !important;
  border: none !important;
  padding: 0 !important;
  width: 100% !important;
  clear: both !important;
  display: block !important;
}

.km-checkout-shipping-container {
  width: 100% !important;
  clear: both !important;
  padding-top: 20px !important;
  padding-bottom: 20px !important;
  display: block !important;
}

.km-shipping-title {
  font: 600 10px/1 'Golos Text', sans-serif !important;
  letter-spacing: .24em !important;
  text-transform: uppercase !important;
  color: #8A8272 !important;
  margin-bottom: 14px !important;
  display: block !important;
}

/* NOTE: per-field float/width rules were removed here — column layout is now
   handled entirely by the .km-fields-row-* grid wrappers below, so the old
   float rules only added extra margins on top of the grid gap (causing the
   "Улица, дом, квартира" field to overflow and look disproportionate). */

/* Specially override cart quantity input to remove nested ovals */
.woocommerce-cart .quantity,
.woocommerce-cart .woocommerce-cart-form .quantity {
  display: inline-flex !important;
  align-items: center !important;
  border: 1px solid rgba(27,25,22,.15) !important;
  border-radius: 100px !important;
  background: #FBF9F4 !important;
  padding: 2px 8px !important;
}

.woocommerce-cart .quantity .qty,
.woocommerce-cart .woocommerce-cart-form .quantity .qty {
  width: 32px !important;
  height: 36px !important;
  border: none !important;
  background: transparent !important;
  border-radius: 0 !important;
  padding: 0 !important;
  text-align: center !important;
  font: 500 15px/1 'Golos Text', sans-serif !important;
  color: #1B1916 !important;
  box-shadow: none !important;
  outline: none !important;
}

.km-qty-btn {
  font-size: 16px !important;
  font-weight: 500 !important;
  color: #1B1916 !important;
  cursor: pointer !important;
  padding: 0 10px !important;
  user-select: none !important;
  display: inline-block !important;
  transition: opacity 0.2s ease !important;
}
.km-qty-btn:hover {
  opacity: 0.6 !important;
}

.km-shipping-calc-placeholder {
  font: 400 13px/1.4 'Golos Text', sans-serif !important;
  color: #8A8272 !important;
}

/* Custom checkout left column layout structure classes */
.km-checkout-custom-left {
  display: block !important;
  width: 100% !important;
}

.km-checkout-section-block {
  margin-bottom: 22px !important;
  display: block !important;
  clear: both !important;
}

/* Field rows: strict CSS grid so "Имя/Телефон" and "Город/Улица" share the
   exact same column rhythm and align perfectly. min-width:0 stops the 100%-wide
   inputs from blowing their grid column out of proportion. */
.km-fields-row-2,
.km-fields-row-split {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 16px !important;
  width: 100% !important;
  margin-bottom: 16px !important;
}

.km-fields-row-1 {
  width: 100% !important;
  margin-bottom: 16px !important;
}

.km-fields-row-2 > p.form-row,
.km-fields-row-1 > p.form-row,
.km-fields-row-split > p.form-row {
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  float: none !important;
}

/* Personal-data consent checkbox: block label with the box in a left gutter so
   the text + policy link flow as ONE wrapping paragraph (not split into columns). */
.woocommerce-checkout #billing_privacy_policy_field,
#billing_privacy_policy_field {
  display: block !important;
  clear: both !important;
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
}

.woocommerce-checkout #billing_privacy_policy_field label.checkbox,
#billing_privacy_policy_field label.checkbox {
  display: block !important;
  position: relative !important;
  padding-left: 28px !important;
  margin: 0 !important;
  font: 400 11.5px/1.5 'Golos Text', sans-serif !important;
  color: #57514A !important;
  cursor: pointer !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
}

.woocommerce-checkout #billing_privacy_policy_field label.checkbox input[type="checkbox"],
#billing_privacy_policy_field label.checkbox input[type="checkbox"] {
  position: absolute !important;
  left: 0 !important;
  top: 1px !important;
  margin: 0 !important;
  width: 16px !important;
  height: 16px !important;
  accent-color: #1B1916 !important;
  cursor: pointer !important;
}

/* Required asterisk stays inline right after the text */
#billing_privacy_policy_field .required,
#billing_privacy_policy_field abbr.required {
  color: #b23b3b !important;
  border: none !important;
  text-decoration: none !important;
  margin-left: 2px !important;
  white-space: nowrap !important;
}

/* Responsive: stack both two-column rows on mobile */
@media (max-width: 768px) {
  .km-fields-row-2,
  .km-fields-row-split {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
}

/* Hide default checkout input labels to match the clean mockup design.
   Fields get relocated by JS out of .woocommerce-billing-fields__field-wrapper
   into .km-checkout-section-block, so the selector must cover both locations —
   otherwise the labels + asterisks reappear after the JS runs. */
.woocommerce-checkout .woocommerce-billing-fields__field-wrapper label:not(.checkbox),
.woocommerce-checkout #km-checkout-custom-container .form-row > label:not(.checkbox),
.woocommerce-checkout .km-checkout-section-block .form-row > label:not(.checkbox),
.woocommerce-checkout .km-fields-row-2 .form-row > label:not(.checkbox),
.woocommerce-checkout .km-fields-row-1 .form-row > label:not(.checkbox),
.woocommerce-checkout .km-fields-row-split .form-row > label:not(.checkbox),
.woocommerce-checkout #order_comments_field label {
  display: none !important;
}

/* Personal-data consent checkbox above the "Подтвердить заказ" button.
   The inner #billing_privacy_policy_field is styled by the "Privacy policy
   checkbox style" block above; here we only handle the wrapper + link. */
.km-checkout-consent {
  margin: 4px 0 2px !important;
}
.km-checkout-consent a {
  color: #1B1916 !important;
  text-decoration: underline !important;
}

.woocommerce-checkout input::placeholder,
.woocommerce-checkout textarea::placeholder {
  color: #8A8272 !important;
  opacity: 0.65 !important;
}

/* Global cart item meta styling */
.km-cart-item-meta {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  margin-top: 4px !important;
}

.km-cart-item-cat {
  font: 600 9px/1 'Golos Text', sans-serif !important;
  letter-spacing: .15em !important;
  text-transform: uppercase !important;
  color: #8A8272 !important;
}

.km-cart-item-price-unit {
  font: 400 13px/1 'Golos Text', sans-serif !important;
  color: #8A8272 !important;
}

@media (max-width: 768px) {
  /* Hide the duplicate Price column on mobile cart to prevent grid breaks */
  .woocommerce-cart table.shop_table_responsive tr.cart_item td.product-price {
    display: none !important;
  }
  
  /* Hide scroll down indicator on mobile to prevent overlapping */
  .km-scroll-down {
    display: none !important;
  }
}

/* ==========================================================================
   SLIDE-OUT SIDE CART STYLING
   ========================================================================== */

#km-side-cart-overlay {
  z-index: 250 !important;
}

#km-side-cart {
  z-index: 260 !important;
}

#km-side-cart.open {
  right: 0 !important;
}

/* Scrollbar inside side cart body */
.km-side-cart-body::-webkit-scrollbar {
  width: 6px !important;
}
.km-side-cart-body::-webkit-scrollbar-track {
  background: transparent !important;
}
.km-side-cart-body::-webkit-scrollbar-thumb {
  background: rgba(27, 25, 22, 0.15) !important;
  border-radius: 10px !important;
}

/* Reset default widget ul wrapper list spacing */
#km-side-cart ul.cart_list.product_list_widget {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

#km-side-cart ul.cart_list.product_list_widget li {
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
  padding: 18px 0 !important;
  border-bottom: 1px solid rgba(27, 25, 22, 0.08) !important;
  position: relative !important;
  min-height: auto !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* Image wrapper */
#km-side-cart ul.cart_list.product_list_widget li a img {
  width: 70px !important;
  min-width: 70px !important;
  max-width: 70px !important;
  height: 70px !important;
  min-height: 70px !important;
  max-height: 70px !important;
  object-fit: cover !important;
  flex-shrink: 0 !important;
  border-radius: 4px !important;
  background: #FBF9F4 !important;
  float: none !important;
  margin: 0 !important;
  box-shadow: none !important;
}

/* Title text wrapper */
#km-side-cart ul.cart_list.product_list_widget li a:not(.remove) {
  flex: 1 !important;
  display: flex !important;
  align-items: flex-start !important;
  gap: 16px !important;
  font: 500 14px/1.35 'Golos Text', sans-serif !important;
  color: #1B1916 !important;
  text-decoration: none !important;
  padding: 0 !important;
  margin: 0 !important;
  float: none !important;
}

/* Quantity and price text */
#km-side-cart ul.cart_list.product_list_widget li .quantity {
  display: block !important;
  font: 400 13px/1.4 'Golos Text', sans-serif !important;
  color: #8A8272 !important;
  margin-top: 5px !important;
  float: none !important;
  position: static !important;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
}
#km-side-cart ul.cart_list.product_list_widget li .quantity .amount {
  font-weight: 500 !important;
  color: #1B1916 !important;
}

/* Remove button */
#km-side-cart ul.cart_list.product_list_widget li .remove_from_cart_button {
  font-size: 24px !important;
  color: #8A8272 !important;
  cursor: pointer !important;
  line-height: 1 !important;
  text-decoration: none !important;
  position: absolute !important;
  right: 0 !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 24px !important;
  height: 24px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  float: none !important;
  left: auto !important;
}
#km-side-cart ul.cart_list.product_list_widget li .remove_from_cart_button:hover {
  color: #1B1916 !important;
  background: transparent !important;
}

/* Subtotal amount widget row */
#km-side-cart p.woocommerce-mini-cart__total {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: 22px 0 !important;
  margin: 0 !important;
  border-top: 1px solid rgba(27, 25, 22, 0.08) !important;
  font: 600 10px/1 'Golos Text', sans-serif !important;
  letter-spacing: .15em !important;
  text-transform: uppercase !important;
  color: #8A8272 !important;
}
#km-side-cart p.woocommerce-mini-cart__total strong {
  font-weight: 600 !important;
}
#km-side-cart p.woocommerce-mini-cart__total .amount {
  font: 500 20px/1 'Golos Text', sans-serif !important;
  color: #1B1916 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

/* Action button wrappers in mini cart */
#km-side-cart p.woocommerce-mini-cart__buttons {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  margin: 12px 0 0 !important;
  padding: 0 !important;
}
#km-side-cart p.woocommerce-mini-cart__buttons a {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  padding: 17px !important;
  border-radius: 100px !important;
  font: 500 14px/1 'Golos Text', sans-serif !important;
  text-decoration: none !important;
  box-sizing: border-box !important;
  transition: all 0.3s ease !important;
  float: none !important;
  margin: 0 !important;
}
#km-side-cart p.woocommerce-mini-cart__buttons a.checkout {
  background: #1B1916 !important;
  color: #F3EFE7 !important;
  border: 1px solid #1B1916 !important;
}
#km-side-cart p.woocommerce-mini-cart__buttons a.checkout:hover {
  background: #2e2a26 !important;
  border-color: #2e2a26 !important;
}
#km-side-cart p.woocommerce-mini-cart__buttons a:not(.checkout) {
  border: 1px solid rgba(27, 25, 22, 0.25) !important;
  color: #1B1916 !important;
  background: transparent !important;
}
#km-side-cart p.woocommerce-mini-cart__buttons a:not(.checkout):hover {
  border-color: rgba(27, 25, 22, 0.5) !important;
}

/* Empty cart layout inside slide cart */
#km-side-cart p.woocommerce-mini-cart__empty-message {
  font: 400 15px/1.6 'Golos Text', sans-serif !important;
  color: #8A8272 !important;
  text-align: center !important;
  margin: 60px 0 !important;
}

/* Mobile Sticky Buy Panel (default hidden on desktop) */
#km-mobile-sticky-buy {
  display: none !important;
}

@media (max-width: 768px) {
  #km-mobile-sticky-buy {
    display: flex !important;
  }
}

/* AJAX Search Results list style */
.km-search-result-item {
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
  padding: 14px 18px !important;
  border-radius: 4px !important;
  background: rgba(27, 25, 22, 0.03) !important;
  text-decoration: none !important;
  transition: all 0.25s ease !important;
  border: 1px solid transparent !important;
}

.km-search-result-item:hover {
  background: rgba(27, 25, 22, 0.06) !important;
  border-color: rgba(27, 25, 22, 0.1) !important;
}

.km-search-result-thumb {
  width: 50px !important;
  height: 50px !important;
  object-fit: cover !important;
  border-radius: 3px !important;
  background: #FBF9F4 !important;
  flex-shrink: 0 !important;
}

.km-search-result-info {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  min-width: 0 !important;
  flex: 1 !important;
}

.km-search-result-title {
  font: 500 15px/1.3 'Golos Text', sans-serif !important;
  color: #1B1916 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.km-search-result-price {
  font: 400 13px/1 'Golos Text', sans-serif !important;
  color: #8A8272 !important;
  font-variant-numeric: tabular-nums !important;
}

.km-search-result-price ins {
  text-decoration: none !important;
  font-weight: 500 !important;
  color: #1B1916 !important;
}

.km-search-result-price del {
  color: #8A8272 !important;
  margin-right: 8px !important;
  font-size: 11px !important;
}

.km-search-no-results {
  font: 400 15px/1.6 'Golos Text', sans-serif !important;
  color: #8A8272 !important;
  text-align: center !important;
  padding: 30px 0 !important;
}

@keyframes km-pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

/* Product Gallery Navigation Arrows & Vertical Thumbnails */
.km-gallery-thumbs-col::-webkit-scrollbar {
  display: none !important;
}

.km-gallery-arrow:hover {
  background: #1B1916 !important;
  color: #F3EFE7 !important;
  border-color: #1B1916 !important;
}

@media (max-width: 768px) {
  .km-product-grid {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }
  .km-product-page {
    padding-top: 100px !important;
    padding-bottom: 80px !important;
  }
  .km-gallery-wrapper {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    position: relative !important;
    top: 0 !important;
    width: 100% !important;
  }
  .km-main-stage {
    order: 1 !important;
    width: 100% !important;
    aspect-ratio: 1 / 1 !important;
    min-height: 280px !important;
    flex: none !important;
    position: relative !important;
    display: block !important;
  }
  .km-gallery-thumbs-col {
    order: 2 !important;
    flex-direction: row !important;
    width: 100% !important;
    max-height: none !important;
    overflow-x: auto !important;
    margin-top: 4px !important;
    gap: 10px !important;
    box-sizing: border-box !important;
  }
  .km-gallery-thumb {
    flex: 1 !important;
    min-width: 50px !important;
    width: auto !important;
    height: auto !important;
    aspect-ratio: 1 / 1 !important;
    flex-shrink: 0 !important;
  }
}


