/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: 10px;
  font-size: var(--font-size-btn);
  font-weight: 600;
  line-height: 1;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-cta);
  color: #fff;
}

.btn-primary:hover {
  background: var(--color-cta-hover);
}

.btn-secondary {
  background: #fff;
  color: var(--color-cta);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  border-color: var(--color-text-muted);
}

.btn--sm {
  padding: 10px 16px;
  font-size: var(--font-size-small);
}

.btn--block {
  width: 100%;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
}

.badge--hit {
  background: rgba(245, 154, 35, 0.15);
  color: var(--color-orange);
}

.badge--new {
  background: rgba(86, 182, 93, 0.15);
  color: var(--color-green);
}

.badge--stock {
  background: rgba(86, 182, 93, 0.15);
  color: var(--color-green);
}

/* Breadcrumbs */
.breadcrumbs {
  margin-bottom: 24px;
}

.breadcrumbs__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: var(--font-size-small);
  color: var(--color-text-muted);
}

.breadcrumbs__item:not(:last-child)::after {
  content: '›';
  margin-left: 8px;
  color: var(--color-text-muted);
}

.breadcrumbs__link:hover {
  color: var(--color-text-secondary);
}

.breadcrumbs__current {
  color: var(--color-text-secondary);
}

.breadcrumbs--yoast {
  margin-bottom: 24px;
  font-size: var(--font-size-small);
  color: var(--color-text-muted);
}

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

.breadcrumbs--yoast a:hover {
  color: var(--color-text-secondary);
}

.breadcrumbs--yoast .breadcrumb_last,
.breadcrumbs--yoast .breadcrumbs__current {
  color: var(--color-text-secondary);
}

/* Product card */
.product-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), box-shadow var(--transition);
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.product-card__media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 5;
  padding: 12px;
  background: var(--color-bg-gray);
  overflow: hidden;
}

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

.product-card__image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.product-card__image--placeholder {
  background: linear-gradient(145deg, #eceae6 0%, #f7f6f3 100%);
}

.product-card__badges {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  gap: 6px;
}

.product-card__wishlist {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--color-text-secondary);
  transition: color var(--transition);
}

.product-card__wishlist:hover {
  color: var(--color-error);
}

.product-card__wishlist.is-active,
.product-configurator__action.is-active,
.product-pogonazh__favorite.is-active {
  color: var(--color-error);
}

.product-card__wishlist.is-active .icon,
.product-configurator__action.is-active .icon,
.product-pogonazh__favorite.is-active .icon {
  fill: currentColor;
}

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

.product-card__title {
  margin-bottom: 6px;
  font-size: 1rem;
  font-weight: 700;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.product-card__specs {
  margin-bottom: 10px;
  font-size: var(--font-size-small);
  color: var(--color-text-secondary);
}

.product-card__rating {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  font-size: var(--font-size-small);
  color: var(--color-text-secondary);
}

.product-card__rating .icon {
  color: var(--color-orange);
  fill: var(--color-orange);
  stroke: var(--color-orange);
}

.product-card__price {
  margin-bottom: 14px;
  font-size: var(--font-size-price);
  font-weight: 700;
}

.product-card__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: auto;
}

/* Modal */
.dvr-modal[hidden] {
  display: none !important;
}

.dvr-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
}

.dvr-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(31, 31, 31, 0.45);
}

.dvr-modal__dialog {
  position: relative;
  width: min(520px, calc(100% - 32px));
  margin: 10vh auto 0;
  padding: 28px;
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-hover);
}

.dvr-modal__title {
  margin: 0 40px 0 0;
  font-size: 1.375rem;
  line-height: 1.25;
}

.dvr-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: none;
  background: var(--color-bg-gray);
  border-radius: 50%;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.dvr-modal__text {
  margin: 8px 0 20px;
  font-size: var(--font-size-small);
  color: var(--color-text-secondary);
}

body.dvr-modal-open {
  overflow: hidden;
}

.dvr-callback-trigger {
  cursor: pointer;
}

.dvr-callback-trigger--link {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: var(--color-text-secondary);
  text-align: left;
  text-decoration: underline;
}

.dvr-callback-trigger--link:hover {
  color: var(--color-wood);
}

/* Form elements */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field__label {
  font-size: var(--font-size-small);
  font-weight: 500;
  color: var(--color-text-secondary);
}

.input,
.select,
textarea.input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg-gray);
  transition: border-color var(--transition);
}

textarea.input {
  resize: vertical;
  min-height: 120px;
}

.input:focus,
.select:focus,
textarea.input:focus {
  outline: none;
  border-color: var(--color-wood);
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  padding: 0 16px;
  height: 48px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg-gray);
}

.search-bar__input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
}

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

/* Rating stars */
.stars {
  display: inline-flex;
  gap: 2px;
  color: var(--color-orange);
}

.stars .icon {
  fill: currentColor;
  stroke: currentColor;
}

/* Cookie consent */
.cookie-consent[hidden] {
  display: none !important;
}

.cookie-consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1350;
  padding: 16px 0 calc(16px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -10px 32px rgba(31, 31, 31, 0.08);
  backdrop-filter: blur(10px);
  transform: translateY(110%);
  opacity: 0;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.cookie-consent--visible {
  transform: translateY(0);
  opacity: 1;
}

.cookie-consent__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px 28px;
}

.cookie-consent__content {
  flex: 1 1 auto;
  min-width: 0;
}

.cookie-consent__title {
  margin: 0 0 6px;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-text);
}

.cookie-consent__text {
  margin: 0;
  font-size: var(--font-size-small);
  line-height: 1.55;
  color: var(--color-text-secondary);
}

.cookie-consent__text a {
  color: var(--color-text);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-consent__text a:hover {
  color: var(--color-wood);
}

.cookie-consent__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  flex: 0 0 auto;
}

@media (max-width: 768px) {
  .cookie-consent {
    bottom: calc(var(--mobile-tabbar-height, 64px) + env(safe-area-inset-bottom, 0px));
  }

  .cookie-consent__inner {
    flex-direction: column;
    align-items: stretch;
  }

  .cookie-consent__actions {
    width: 100%;
  }

  .cookie-consent__actions .btn {
    flex: 1 1 calc(50% - 5px);
  }
}

@media (max-width: 480px) {
  .cookie-consent__actions {
    flex-direction: column;
  }

  .cookie-consent__actions .btn {
    width: 100%;
  }
}
