.btn,
.ot-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid var(--ot-primary);
  border-radius: var(--ot-radius-xs);
  color: var(--ot-white);
  background: var(--ot-primary);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  transition: background var(--ot-ease), color var(--ot-ease), border-color var(--ot-ease), transform var(--ot-ease);
}

.btn:hover,
.ot-button:hover {
  color: var(--ot-white);
  background: #2a2a2a;
  border-color: #2a2a2a;
}

.btn:active,
.ot-button:active {
  transform: translateY(1px);
}

.btn-default,
.btn-light,
.ot-button--secondary {
  color: var(--ot-primary);
  background: var(--ot-white);
  border-color: var(--ot-border);
}

.btn-default:hover,
.btn-light:hover,
.ot-button--secondary:hover {
  color: var(--ot-primary);
  background: var(--ot-surface);
  border-color: #cfd3d8;
}

.btn-danger {
  color: var(--ot-white);
  background: var(--ot-danger);
  border-color: var(--ot-danger);
}

.btn-link {
  min-height: 44px;
  padding-inline: 6px;
  color: var(--ot-primary);
  background: transparent;
  border-color: transparent;
}

.ot-icon-button {
  display: inline-flex;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--ot-primary);
  background: var(--ot-white);
  border: 1px solid var(--ot-border);
  border-radius: var(--ot-radius-xs);
}

.ot-icon-button.is-active,
[data-ot-wishlist-add].is-active,
[data-ot-compare-add].is-active {
  color: var(--ot-primary);
  background: var(--ot-accent);
  border-color: var(--ot-accent);
}

.ot-badge {
  position: absolute;
  display: inline-flex;
  min-width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
  padding-inline: 5px;
  color: var(--ot-primary);
  background: var(--ot-accent);
  border: 2px solid var(--ot-white);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.form-control,
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="search"],
input[type="number"],
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  color: var(--ot-text);
  background: var(--ot-white);
  border: 1px solid var(--ot-border);
  border-radius: var(--ot-radius-xs);
  font-size: 14px;
  outline: 0;
  transition: border-color var(--ot-ease), box-shadow var(--ot-ease);
}

textarea {
  min-height: 104px;
  resize: vertical;
}

.form-control:focus,
input:focus,
select:focus,
textarea:focus {
  border-color: var(--ot-accent);
  box-shadow: var(--ot-focus);
}

label {
  display: inline-block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 600;
}

.form-group {
  margin-bottom: 16px;
}

.input-group {
  display: flex;
  width: 100%;
  align-items: stretch;
}

.input-group > .form-control {
  min-width: 0;
  flex: 1 1 auto;
  border-radius: var(--ot-radius-xs) 0 0 var(--ot-radius-xs);
}

.input-group-btn {
  display: flex;
}

.input-group-btn > .btn {
  height: 100%;
  border-radius: 0 var(--ot-radius-xs) var(--ot-radius-xs) 0;
}

.rs-fields-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0 16px;
}

.rs-fields-grid .col-sm-2 { grid-column: span 2; }
.rs-fields-grid .col-sm-3 { grid-column: span 3; }
.rs-fields-grid .col-sm-4 { grid-column: span 4; }
.rs-fields-grid .col-sm-6 { grid-column: span 6; }
.rs-fields-grid .col-sm-8 { grid-column: span 8; }
.rs-fields-grid .col-sm-12 { grid-column: span 12; }

.required > label::after,
label.required::after {
  content: " *";
  color: var(--ot-danger);
}

.text-danger {
  margin-top: 6px;
  color: var(--ot-danger);
  font-size: 13px;
}

.alert {
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid var(--ot-border);
  border-radius: var(--ot-radius-sm);
}

.alert-success {
  color: #0c6b45;
  background: #e9f8f1;
  border-color: #b8ead3;
}

.alert-danger {
  color: #9b1c28;
  background: #fff0f2;
  border-color: #ffc8cf;
}

.alert-info {
  background: var(--ot-surface);
}

.close {
  float: right;
  padding: 0 4px;
  background: transparent;
  border: 0;
  font-size: 22px;
  line-height: 1;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
  padding: 0;
  color: var(--ot-text-muted);
  list-style: none;
  font-size: 13px;
}

.breadcrumb li:not(:last-child)::after {
  content: "/";
  margin-left: 8px;
  color: var(--ot-text-soft);
}

.breadcrumb a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ot-card,
.panel {
  padding: 18px;
  background: var(--ot-white);
  border: 1px solid var(--ot-border);
  border-radius: var(--ot-radius-md);
}

.panel-heading {
  margin: -18px -18px 16px;
  padding: 14px 18px;
  background: var(--ot-surface);
  border-radius: var(--ot-radius-md) var(--ot-radius-md) 0 0;
  font-weight: 600;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--ot-border);
  border-radius: var(--ot-radius-sm);
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 11px 12px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--ot-border);
}

.table th {
  color: var(--ot-text-muted);
  background: var(--ot-surface-alt);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

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

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0;
  list-style: none;
}

.pagination a,
.pagination span {
  display: inline-flex;
  min-width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  padding-inline: 10px;
  border: 1px solid var(--ot-border);
  border-radius: var(--ot-radius-xs);
}

.pagination .active span {
  color: var(--ot-white);
  background: var(--ot-primary);
  border-color: var(--ot-primary);
}

.ot-notices {
  position: fixed;
  z-index: 1100;
  top: 20px;
  right: 20px;
  display: grid;
  width: min(380px, calc(100vw - 40px));
  gap: 10px;
  pointer-events: none;
}

.ot-notice {
  padding: 14px 16px;
  color: var(--ot-white);
  background: var(--ot-primary);
  border-left: 4px solid var(--ot-accent);
  border-radius: var(--ot-radius-xs);
  box-shadow: var(--ot-shadow-sm);
}

.ot-notice--error {
  border-left-color: var(--ot-danger);
}

.ot-quantity {
  display: inline-grid;
  grid-template-columns: 44px minmax(64px, 90px) 44px;
  align-items: stretch;
}

.ot-quantity button {
  min-width: 44px;
  min-height: 44px;
  color: var(--ot-white);
  background: var(--ot-primary);
  border: 1px solid var(--ot-primary);
}

.ot-quantity button:first-child {
  border-radius: var(--ot-radius-xs) 0 0 var(--ot-radius-xs);
}

.ot-quantity button:last-child {
  border-radius: 0 var(--ot-radius-xs) var(--ot-radius-xs) 0;
}

.ot-quantity input {
  min-height: 44px;
  padding-inline: 6px;
  text-align: center;
  border-radius: 0;
}
