cp script.js script.js.bak_buttons_same_$(date +%Y%m%d_%H%M%S)
nano script.js:root {
  --bg: #f8f4ee;
  --card: #ffffff;
  --text: #3d3a36;
  --muted: #7b746c;
  --green: #8f967c;
  --pink: #d9a59e;
  --border: #e2d7cb;
  --shadow: 0 18px 45px rgba(61, 58, 54, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

:root {
  --crm-accent: var(--accent, #A8BFAC);
  --crm-accent-dark: var(--accent-dark, #5E7E6A);
}

.container {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.top-line {
  background: #efe5d8;
  color: var(--muted);
  text-align: center;
  padding: 10px 16px;
  font-size: 14px;
}

.header {
  background: rgba(248, 244, 238, 0.94);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.logo {
  font-family: Georgia, serif;
  font-size: 34px;
  color: var(--text);
  white-space: nowrap;
}

.logo span {
  color: var(--pink);
}

.nav {
  display: flex;
  gap: 18px;
  font-size: 14px;
}

.nav a:hover {
  color: var(--green);
}

.header-actions {
  display: flex;
  gap: 14px;
  font-size: 14px;
  color: var(--muted);
}

.hero {
  padding: 36px 0 20px;
}

.hero-inner {
  min-height: 520px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 34px;
  align-items: center;
  background: linear-gradient(120deg, #f7efe7 0%, #fffaf4 100%);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 48px;
  box-shadow: var(--shadow);
}

.eyebrow {
  color: var(--green);
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  font-family: Georgia, serif;
  font-size: clamp(38px, 5vw, 62px);
  line-height: 1.05;
  margin: 0 0 22px;
  font-weight: 400;
}

.hero p {
  font-size: 18px;
  line-height: 1.65;
  color: var(--muted);
  max-width: 560px;
}

.hero-buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 26px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 0;
  font-weight: 600;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--crm-accent);
  border-color: var(--crm-accent);
  color: #ffffff;
}

.btn-secondary {
  background: #ffffff;
  color: var(--text);
  border-color: var(--border);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background: var(--crm-accent-dark);
  border-color: var(--crm-accent-dark);
  color: #ffffff;
}

.btn-secondary:hover,
.btn-secondary:focus,
.btn-secondary:active {
  background: #f5f0ea;
  border-color: #cdbfae;
  color: var(--text);
}

.hero-card {
  background: #ffffff;
  border-radius: 0;
  padding: 18px;
  border: 1px solid var(--border);
}

.hero-image-placeholder {
  height: 390px;
  border-radius: 0;
  background:
    radial-gradient(circle at 25% 30%, rgba(217, 165, 158, 0.36), transparent 30%),
    radial-gradient(circle at 80% 40%, rgba(143, 150, 124, 0.28), transparent 30%),
    linear-gradient(135deg, #efe2d4, #f9f4ed);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 18px;
}

.section {
  padding: 54px 0;
}

.section-head {
  margin-bottom: 26px;
  text-align: center;
}

.section-head h2 {
  font-family: Georgia, serif;
  font-size: 38px;
  font-weight: 400;
  margin: 0 0 10px;
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

.age-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}

.age-grid a {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 18px;
  text-align: center;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.category-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 18px;
  box-shadow: 0 10px 28px rgba(61, 58, 54, 0.05);
}

.category-image {
  height: 150px;
  border-radius: 0;
  background: linear-gradient(135deg, #efe2d4, #f8f1e8);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  margin-bottom: 16px;
}

.category-card h3 {
  font-family: Georgia, serif;
  font-size: 24px;
  font-weight: 400;
  margin: 0 0 8px;
}

.category-card p {
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

.soft-block {
  padding-top: 20px;
}

.soft-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  background: #e8eff1;
  border-radius: 0;
  padding: 34px;
  border: 1px solid #d9e2e5;
}

.soft-inner h2 {
  font-family: Georgia, serif;
  font-size: 34px;
  font-weight: 400;
  margin: 0 0 10px;
}

.soft-inner p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.benefits-grid div {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 22px;
}

.benefits-grid h3 {
  margin: 0 0 10px;
  font-size: 18px;
}

.benefits-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.footer {
  background: #efe5d8;
  padding: 42px 0;
  margin-top: 30px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 30px;
}

.footer-logo {
  font-size: 32px;
  margin-bottom: 12px;
}

.footer p {
  color: var(--muted);
  margin: 0 0 10px;
}

.footer a {
  display: block;
  color: var(--text);
  margin: 8px 0;
  font-size: 14px;
}

@media (max-width: 980px) {
  .header-inner {
    flex-wrap: wrap;
  }

  .nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 8px;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    padding: 30px;
  }

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

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

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

  .footer-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .header-actions {
    display: none;
  }

  .hero-inner {
    border-radius: 0;
    padding: 24px;
    min-height: auto;
  }

  .hero h1 {
    font-size: 36px;
  }

  .hero-image-placeholder {
    height: 240px;
  }

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

  .category-grid {
    grid-template-columns: 1fr;
  }

  .soft-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .benefits-grid {
    grid-template-columns: 1fr;
  }
}

.catalog-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 28px;
  align-items: start;
}

.filters {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 22px;
  position: sticky;
  top: 110px;
}

.filters h3 {
  margin: 0 0 18px;
  font-family: Georgia, serif;
  font-size: 26px;
  font-weight: 400;
}

.filters label {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 14px;
}

.filters select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 0;
  background: #f8f4ee;
  color: var(--text);
  padding: 0 12px;
}

.catalog-top {
  margin-bottom: 18px;
  color: var(--muted);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.product-card {
  display: block;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 0;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(61, 58, 54, 0.05);
}

.product-card:hover {
  transform: translateY(-2px);
}

.product-image {
  position: relative;
  aspect-ratio: 4 / 5;
  min-height: unset;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 30%, rgba(217, 165, 158, 0.28), transparent 30%),
    linear-gradient(135deg, #efe2d4, #f9f4ed);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  color: var(--muted);
}

.product-image .prod-img,
.product-main-image .prod-img {
  cursor: zoom-in;
}

.product-info {
  padding: 18px;
}

.product-info h3 {
  margin: 0 0 10px;
  font-family: Georgia, serif;
  font-size: 22px;
  font-weight: 400;
}

.product-info p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.5;
}

.product-info strong {
  color: var(--green);
  font-size: 18px;
}

@media (max-width: 980px) {
  .catalog-layout {
    grid-template-columns: 1fr;
  }

  .filters {
    position: static;
  }

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

@media (max-width: 600px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
}

.product-page-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 34px;
  align-items: start;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 28px;
  box-shadow: 0 10px 28px rgba(61, 58, 54, 0.05);
}

.product-main-image {
  position: relative;
  aspect-ratio: 4 / 5;
  min-height: unset;
  overflow: hidden;
  border-radius: 0;
  background:
    radial-gradient(circle at 30% 30%, rgba(217, 165, 158, 0.30), transparent 30%),
    radial-gradient(circle at 75% 45%, rgba(143, 150, 124, 0.24), transparent 30%),
    linear-gradient(135deg, #efe2d4, #f9f4ed);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px;
  color: var(--muted);
  font-size: 22px;
}

.product-main-info h1 {
  font-family: Georgia, serif;
  font-size: 44px;
  line-height: 1.1;
  font-weight: 400;
  margin: 0 0 18px;
}

.product-main-info p {
  color: var(--muted);
  line-height: 1.6;
  font-size: 17px;
}

.product-price {
  margin: 22px 0;
  font-size: 26px;
  color: var(--green);
  font-weight: 700;
}

.size-label {
  display: grid;
  gap: 8px;
  max-width: 220px;
  color: var(--muted);
  margin-bottom: 22px;
}

.size-label select {
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: 0;
  background: #f8f4ee;
  color: var(--text);
  padding: 0 12px;
}

@media (max-width: 800px) {
  .product-page-grid {
    grid-template-columns: 1fr;
  }

  .product-main-image {
    aspect-ratio: 4 / 5;
    min-height: unset;
  }

  .product-main-info h1 {
    font-size: 34px;
  }
}


.hero-agreed {
  padding: 18px 0 34px;
}

.hero-agreed-box {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 46px;
  align-items: center;
  background: #f7f1ea;
  border: 1px solid #ded3c6;
  border-radius: 0;
  padding: 64px;
  box-shadow: 0 20px 48px rgba(61, 58, 54, 0.08);
}

.hero-agreed-text {
  max-width: 650px;
}

.hero-agreed-label {
  margin: 0 0 28px;
  color: #8a8178;
  font-size: 18px;
  letter-spacing: 0.1em;
  font-weight: 700;
}

.hero-agreed h1 {
  margin: 0 0 28px;
  font-family: Georgia, serif;
  font-size: clamp(54px, 5.2vw, 86px);
  line-height: 0.96;
  font-weight: 400;
  letter-spacing: -0.04em;
  color: #3d3a36;
}

.hero-agreed-description {
  max-width: 590px;
  margin: 0;
  color: #7b746c;
  font-size: 20px;
  line-height: 1.85;
}

.hero-agreed-actions {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 34px;
}

.hero-agreed-actions .btn {
  min-height: 58px;
  padding: 0 30px;
  border-radius: 0;
  font-size: 17px;
}

.hero-agreed-visual {
  display: flex;
  justify-content: center;
}

.hero-agreed-frame {
  width: 100%;
  max-width: 680px;
  aspect-ratio: 1 / 0.82;
  background: #fffaf5;
  border: 1px solid #ded3c6;
  border-radius: 0;
  padding: 24px;
}

.hero-agreed-scene {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 0;
  background:
    radial-gradient(circle at 24% 26%, rgba(217, 165, 158, 0.34), transparent 32%),
    radial-gradient(circle at 78% 62%, rgba(143, 150, 124, 0.26), transparent 34%),
    linear-gradient(135deg, #eadfd3, #f8f1ea);
}

.soft-circle {
  position: absolute;
  border-radius: 0;
  filter: blur(4px);
}

.soft-circle.one {
  width: 190px;
  height: 190px;
  left: 8%;
  top: 12%;
  background: rgba(255, 255, 255, 0.28);
}

.soft-circle.two {
  width: 240px;
  height: 240px;
  right: 5%;
  bottom: 4%;
  background: rgba(255, 255, 255, 0.22);
}

.look-card {
  position: absolute;
  border-radius: 0;
  box-shadow: 0 18px 42px rgba(61, 58, 54, 0.10);
}

.look-left {
  width: 28%;
  height: 54%;
  left: 10%;
  top: 24%;
  background: linear-gradient(180deg, #f7efe7, #e6d6c6);
  transform: rotate(-10deg);
}

.look-main {
  width: 42%;
  height: 72%;
  left: 30%;
  top: 12%;
  background: linear-gradient(180deg, #fffaf5, #ead8c8);
  transform: rotate(3deg);
}

.look-right {
  width: 25%;
  height: 48%;
  right: 10%;
  top: 28%;
  background: linear-gradient(180deg, #e9ddd0, #d9c6b6);
  transform: rotate(12deg);
}

.dress {
  width: 48%;
  height: 50%;
  margin: 22% auto 0;
  border-radius: 0;
  background: linear-gradient(180deg, #d9a59e, #f2d6cf);
  opacity: 0.75;
}

.brand-pill {
  position: absolute;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  padding: 10px 22px;
  border-radius: 0;
  background: rgba(255,255,255,0.78);
  color: #7b746c;
  font-weight: 700;
  letter-spacing: 0.05em;
}

@media (max-width: 980px) {
  .hero-agreed-box {
    grid-template-columns: 1fr;
    padding: 38px;
  }
}

@media (max-width: 600px) {
  .hero-agreed-box {
    padding: 26px;
    border-radius: 0;
  }

  .hero-agreed h1 {
    font-size: 42px;
  }

  .hero-agreed-description {
    font-size: 16px;
  }

  .hero-agreed-actions {
    flex-direction: column;
  }

  .hero-agreed-actions .btn {
    width: 100%;
  }
}


.hero-photo-frame {
  width: 100%;
  max-width: 680px;
  aspect-ratio: 1 / 0.82;
  background: #fffaf5;
  border: 1px solid #ded3c6;
  border-radius: 0;
  padding: 24px;
  box-shadow: 0 18px 42px rgba(61, 58, 54, 0.08);
}

.hero-photo {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 0;
}

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

.hero-photo-frame {
  overflow: hidden;
}

.hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.product-card img,
.category-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.product-image,
.category-image,
.hero-image-placeholder {
  overflow: hidden;
}

@media (max-width: 768px) {
  .hero-photo-frame {
    aspect-ratio: 4 / 5;
  }

  .hero-photo {
    object-position: center top;
  }
}

.hero-photo-frame {
  padding: 0 !important;
  overflow: hidden !important;
  background: transparent !important;
}

.hero-photo {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center center !important;
  border-radius: 0;
}

@media (max-width: 768px) {
  .hero-photo-frame {
    aspect-ratio: 1 / 1 !important;
  }

  .hero-photo {
    object-position: center center !important;
  }
}

.cart-layout,
.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 28px;
  align-items: start;
}

.cart-box,
.cart-summary,
.checkout-form,
.checkout-summary {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 24px;
  box-shadow: 0 10px 28px rgba(61, 58, 54, 0.05);
}

.cart-item {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.cart-item h3 {
  margin: 0 0 8px;
  font-family: Georgia, serif;
  font-weight: 400;
}

.cart-item p {
  margin: 0 0 6px;
  color: var(--muted);
}

.cart-summary h3,
.checkout-summary h3 {
  margin: 0 0 14px;
  font-family: Georgia, serif;
  font-size: 28px;
  font-weight: 400;
}

.cart-summary .btn,
.checkout-form .btn {
  width: 100%;
  margin-top: 14px;
}

.checkout-form {
  display: grid;
  gap: 18px;
}

.checkout-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.checkout-form input,
.checkout-form textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 0;
  background: #f8f4ee;
  color: var(--text);
  padding: 14px;
  font-size: 16px;
  font-family: Arial, sans-serif;
}

.checkbox-line {
  display: flex !important;
  grid-template-columns: unset !important;
  align-items: center;
  gap: 10px !important;
}

.checkbox-line input {
  width: auto;
}

.checkout-total,
#cartTotal {
  font-size: 28px;
  font-weight: 700;
  color: var(--green);
}

.checkout-mini-item {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.checkout-mini-item p {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 900px) {
  .cart-layout,
  .checkout-layout {
    grid-template-columns: 1fr;
  }
}


.admin-toolbar {
  margin-bottom: 24px;
}

.admin-status {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.order-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 24px;
  margin-bottom: 18px;
  box-shadow: 0 10px 28px rgba(61, 58, 54, 0.05);
}

.order-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 16px;
}

.order-head h3 {
  margin: 0;
  font-family: Georgia, serif;
  font-size: 28px;
  font-weight: 400;
}

.order-head span {
  background: #f1eadf;
  color: var(--green);
  border-radius: 0;
  padding: 8px 14px;
  font-weight: 700;
}

.add-cart-btn {
  cursor: pointer;
  border: none;
}

.add-cart-btn.is-added {
  background: var(--accent-dark) !important;
  border-color: var(--accent-dark) !important;
}

.cart-item-editable {
  display: grid;
  grid-template-columns: 1fr 150px 160px;
  gap: 24px;
  align-items: center;
}

.cart-item-info h3 {
  margin-bottom: 8px;
}

.cart-qty-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: #f8f4ee;
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 8px 12px;
}

.cart-qty-control span {
  min-width: 28px;
  text-align: center;
  font-weight: 700;
}

.cart-qty-btn {
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 0;
  background: #ffffff;
  color: var(--text);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.cart-qty-btn:hover {
  background: var(--green);
  color: #ffffff;
}

.cart-item-sum {
  display: grid;
  gap: 12px;
  justify-items: end;
}

.cart-remove {
  border: none;
  background: transparent;
  color: #a06d65;
  cursor: pointer;
  font-weight: 700;
}

.cart-remove:hover {
  text-decoration: underline;
}

@media (max-width: 800px) {
  .cart-item-editable {
    grid-template-columns: 1fr;
  }

  .cart-item-sum {
    justify-items: start;
  }

  .cart-qty-control {
    justify-self: start;
  }
}


.cart-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cart-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 0;
  background: var(--green);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
}

.crm-toolbar {
  margin-bottom: 28px;
}

.crm-search {
  width: 100%;
  max-width: 460px;
  height: 56px;
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 0 18px;
  font-size: 18px;
  background: #ffffff;
  color: var(--text);
}

.crm-customer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.crm-customer-card {
  display: block;
  text-decoration: none;
  color: var(--text);
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 22px;
  box-shadow: 0 10px 28px rgba(61, 58, 54, 0.05);
}

.crm-customer-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}

.crm-customer-card-head h3 {
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
}

.crm-customer-card-head span {
  font-size: 18px;
  color: var(--muted);
}

.crm-meta {
  margin-top: 10px;
  color: var(--muted);
  font-size: 17px;
}

.crm-back-link {
  display: inline-block;
  margin-bottom: 20px;
  text-decoration: none;
  color: var(--accent);
  font-weight: 600;
}

.crm-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.crm-stat-box {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 22px;
  box-shadow: 0 10px 28px rgba(61, 58, 54, 0.05);
}

.crm-stat-label {
  color: var(--muted);
  font-size: 16px;
  margin-bottom: 10px;
}

.crm-stat-value {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
}

.crm-section {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 10px 28px rgba(61, 58, 54, 0.05);
}

.crm-section h2 {
  margin-top: 0;
  margin-bottom: 18px;
}

.crm-contact-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.crm-contact-row:last-child {
  border-bottom: 0;
}

.crm-contact-label {
  color: var(--muted);
  font-weight: 600;
}

.crm-contact-value {
  color: var(--text);
}

.crm-order-card {
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 22px;
  margin-bottom: 18px;
  background: #fcfaf6;
}

.crm-order-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 14px;
}

.crm-order-head h3 {
  margin: 0 0 6px 0;
}

.crm-order-head p {
  margin: 0;
  color: var(--muted);
}

.crm-order-total {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
}

.crm-order-status {
  margin-bottom: 14px;
  color: var(--muted);
}

.crm-order-items {
  display: grid;
  gap: 12px;
}

.crm-order-item {
  display: grid;
  grid-template-columns: 1fr 100px 120px;
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}

.crm-empty {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 24px;
  text-align: center;
  color: var(--muted);
}

@media (max-width: 1100px) {
  .crm-customer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .crm-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .crm-customer-grid {
    grid-template-columns: 1fr;
  }

  .crm-stat-grid {
    grid-template-columns: 1fr;
  }

  .crm-contact-row {
    grid-template-columns: 1fr;
  }

  .crm-order-head {
    flex-direction: column;
  }

  .crm-order-item {
    grid-template-columns: 1fr;
  }
}


.order-status-select {
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 0;
  background: #f8f4ee;
  color: var(--text);
  padding: 0 12px;
  font-weight: 700;
}

.admin-order-items {
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: 0;
  overflow: hidden;
}

.admin-order-item {
  display: grid;
  grid-template-columns: 1fr 80px 120px 120px;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: #fffaf5;
}

.admin-order-item:last-child {
  border-bottom: 0;
}

.admin-order-total {
  margin-top: 18px;
  font-size: 20px;
  color: var(--green);
}

@media (max-width: 760px) {
  .admin-order-item {
    grid-template-columns: 1fr;
  }
}


.order-card {
  border-left: 8px solid #e2d7cb;
}

.order-card.status-new {
  background: #ffffff;
  border-left-color: #c8b9a8;
}

.order-card.status-processing {
  background: #fff8df;
  border-left-color: #e2b93b;
}

.order-card.status-done {
  background: #eef7ec;
  border-left-color: #6f9f68;
}

.order-card.status-cancelled {
  background: #fff0ef;
  border-left-color: #c96b63;
}

.order-card.status-processing .order-status-select {
  background: #fff0b8;
  border-color: #e2b93b;
}

.order-card.status-done .order-status-select {
  background: #dff0dc;
  border-color: #6f9f68;
}

.order-card.status-cancelled .order-status-select {
  background: #ffd9d6;
  border-color: #c96b63;
}

.order-card.status-new .order-status-select {
  background: #f3eee8;
  border-color: #c8b9a8;
}

.order-stats {
  margin: 28px 0;
}

.order-stats .crm-stat-box {
  min-height: 120px;
}

.order-stats .stat-new {
  border-left: 8px solid #c8b9a8;
}

.order-stats .stat-processing {
  background: #fff8df;
  border-left: 8px solid #e2b93b;
}

.order-stats .stat-done {
  background: #eef7ec;
  border-left: 8px solid #6f9f68;
}

.order-stats .stat-cancelled {
  background: #fff0ef;
  border-left: 8px solid #c96b63;
}

.admin-toolbar {
  grid-template-columns: 170px 1fr 1fr 180px 140px 140px !important;
  gap: 8px !important;
  margin-bottom: 12px !important;
}

.admin-toolbar .btn {
  min-height: 40px !important;
  padding: 0 14px !important;
  font-size: 14px !important;
  border-radius: 0;
}

.admin-toolbar .crm-search {
  height: 40px !important;
  min-height: 40px !important;
  padding: 0 12px !important;
  font-size: 14px !important;
  border-radius: 0;
}

.admin-status {
  font-size: 13px !important;
  margin: 8px 0 0 !important;
}

.order-stats {
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  gap: 8px !important;
  margin: 10px 0 18px !important;
}

.order-stats .crm-stat-box {
  min-height: 58px !important;
  padding: 10px 12px !important;
  border-radius: 0;
  box-shadow: 0 6px 16px rgba(61, 58, 54, 0.04) !important;
}

.order-stats .crm-stat-label {
  font-size: 12px !important;
  margin-bottom: 4px !important;
}

.order-stats .crm-stat-value {
  font-size: 18px !important;
  line-height: 1.1 !important;
}

.order-card {
  padding: 18px !important;
  border-radius: 0;
  margin-bottom: 14px !important;
}

.order-head h3 {
  font-size: 24px !important;
}

.order-status-select {
  min-height: 38px !important;
  font-size: 14px !important;
  border-radius: 0;
}

.admin-order-item {
  padding: 9px 12px !important;
  font-size: 14px !important;
}

.admin-order-total {
  font-size: 17px !important;
  margin-top: 12px !important;
}

@media (max-width: 1200px) {
  .admin-toolbar {
    grid-template-columns: 1fr 1fr !important;
  }

  .order-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 700px) {
  .admin-toolbar {
    grid-template-columns: 1fr !important;
  }

  .order-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

.order-period-info {
  margin: 8px 0 10px;
  font-size: 14px;
  color: var(--muted);
  font-weight: 600;
}

#orderDateSingle,
#orderDateFrom,
#orderDateTo {
  display: none;
}

.admin-toolbar {
  grid-template-columns: 170px 160px 1fr 1fr 180px 140px 140px 140px !important;
  gap: 8px !important;
}

.admin-toolbar .admin-status {
  grid-column: 1 / -1;
}

.order-period-info {
  margin: 8px 0 10px;
  font-size: 14px;
  color: var(--muted);
  font-weight: 700;
}

#orderDateSingle,
#orderDateFrom,
#orderDateTo {
  display: none;
}

@media (max-width: 1200px) {
  .admin-toolbar {
    grid-template-columns: 1fr 1fr !important;
  }
}

@media (max-width: 700px) {
  .admin-toolbar {
    grid-template-columns: 1fr !important;
  }
}

/* ===== CRM toolbar compact single-line ===== */
.admin-toolbar {
  display: grid !important;
  grid-template-columns: 190px 190px 230px 230px 220px 150px 150px 150px !important;
  gap: 10px !important;
  align-items: center !important;
}

.admin-toolbar .btn,
.admin-toolbar .crm-search,
.admin-toolbar select,
.admin-toolbar input {
  height: 48px !important;
  min-height: 48px !important;
  padding: 0 16px !important;
  font-size: 16px !important;
  border-radius: 0;
  margin: 0 !important;
}

#orderDateSingle,
#orderDateFrom,
#orderDateTo {
  width: 150px !important;
  min-width: 150px !important;
  max-width: 150px !important;
}

.admin-toolbar .admin-status {
  grid-column: 1 / -1 !important;
  margin-top: 2px !important;
  font-size: 14px !important;
}

.order-period-info {
  margin: 4px 0 10px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
}

.crm-stat-grid.order-stats {
  gap: 10px !important;
}

.order-stats .crm-stat-card,
.crm-stat-card {
  padding: 12px 16px !important;
  border-radius: 0;
  min-height: auto !important;
}

.order-stats .crm-stat-card h3,
.crm-stat-card h3 {
  font-size: 14px !important;
  margin-bottom: 6px !important;
}

.order-stats .crm-stat-card .crm-stat-value,
.crm-stat-card .crm-stat-value {
  font-size: 18px !important;
  line-height: 1.2 !important;
}

/* Планшет */
@media (max-width: 1600px) {
  .admin-toolbar {
    grid-template-columns: 180px 180px 220px 220px 200px 140px 140px 140px !important;
  }
}

/* Небольшой ноутбук */
@media (max-width: 1350px) {
  .admin-toolbar {
    grid-template-columns: 1fr 1fr 1fr !important;
  }

  #orderDateSingle,
  #orderDateFrom,
  #orderDateTo {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
  }
}

/* Телефон */
@media (max-width: 900px) {
  .admin-toolbar {
    grid-template-columns: 1fr !important;
  }
}

.order-stats {
  margin-bottom: 28px;
}

.order-stats .crm-stat-box {
  min-height: 120px;
}

.order-stats .status-new {
  border-left: 8px solid #c8b9a8;
}

.order-stats .status-processing {
  background: #fff8df;
  border-left: 8px solid #e2b93b;
}

.order-stats .status-done {
  background: #eef7ec;
  border-left: 8px solid #6f9f68;
}

.order-stats .status-cancelled {
  background: #fff0ef;
  border-left: 8px solid #c96b63;
}

/* ===== CRM compact layout final ===== */

.admin-toolbar {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 8px !important;
  overflow-x: auto !important;
  margin-bottom: 10px !important;
  padding-bottom: 4px !important;
}

.admin-toolbar .btn,
.admin-toolbar .crm-search,
.admin-toolbar select,
.admin-toolbar input {
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 130px !important;
  max-width: 190px !important;
  height: 36px !important;
  min-height: 36px !important;
  padding: 0 10px !important;
  font-size: 13px !important;
  border-radius: 0;
  white-space: nowrap !important;
}

.admin-toolbar .btn {
  min-width: 135px !important;
}

#orderStatusFilter {
  min-width: 135px !important;
}

#orderSort {
  min-width: 165px !important;
}

#orderPeriod {
  min-width: 155px !important;
}

#orderDateSingle,
#orderDateFrom,
#orderDateTo {
  min-width: 130px !important;
  max-width: 130px !important;
}

.admin-toolbar .admin-status {
  flex: 0 0 auto !important;
  min-width: 260px !important;
  margin: 0 !important;
  font-size: 12px !important;
  color: var(--muted) !important;
  white-space: nowrap !important;
}

.order-period-info {
  margin: 4px 0 8px !important;
  font-size: 13px !important;
  line-height: 1.2 !important;
}

.order-stats {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(90px, 1fr)) !important;
  gap: 8px !important;
  margin: 8px 0 14px !important;
}

.order-stats .crm-stat-box {
  min-height: 52px !important;
  padding: 8px 10px !important;
  border-radius: 0;
}

.order-stats .crm-stat-label {
  font-size: 11px !important;
  margin-bottom: 3px !important;
  line-height: 1.1 !important;
}

.order-stats .crm-stat-value {
  font-size: 16px !important;
  line-height: 1.1 !important;
}

.order-card {
  padding: 12px 14px !important;
  border-radius: 0;
  margin-bottom: 10px !important;
}

.order-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  margin-bottom: 8px !important;
}

.order-head h3 {
  font-size: 18px !important;
  margin: 0 0 2px !important;
}

.order-head p {
  font-size: 12px !important;
  margin: 0 !important;
}

.order-card p {
  margin: 4px 0 !important;
  font-size: 13px !important;
  line-height: 1.25 !important;
}

.order-status-select {
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 10px !important;
  font-size: 13px !important;
  border-radius: 0;
}

.admin-order-items {
  margin-top: 8px !important;
  border-radius: 0;
}

.admin-order-item {
  grid-template-columns: 1fr 60px 90px 90px !important;
  gap: 8px !important;
  padding: 7px 10px !important;
  font-size: 12px !important;
  align-items: center !important;
}

.admin-order-total {
  margin-top: 8px !important;
  font-size: 14px !important;
}

@media (max-width: 900px) {
  .admin-toolbar {
    flex-wrap: wrap !important;
    overflow-x: visible !important;
  }

  .admin-toolbar .btn,
  .admin-toolbar .crm-search,
  .admin-toolbar select,
  .admin-toolbar input {
    width: 100% !important;
    max-width: none !important;
  }

  .order-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .admin-order-item {
    grid-template-columns: 1fr !important;
  }
}

#orderSearch {
  min-width: 190px !important;
}

.crm-settings-panel {
  display: grid;
  grid-template-columns: 1.4fr 170px 170px 170px 130px 1fr;
  gap: 10px;
  align-items: end;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 14px;
  margin-bottom: 18px;
  box-shadow: 0 8px 18px rgba(61, 58, 54, 0.04);
}

.crm-settings-panel h3 {
  margin: 0;
  font-size: 18px;
}

.crm-settings-panel label {
  display: grid;
  gap: 5px;
  font-size: 12px;
  color: var(--muted);
}

.crm-settings-panel input {
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 0 10px;
  font-size: 14px;
}

.crm-settings-panel .btn {
  height: 36px;
  min-height: 36px;
  padding: 0 12px;
  font-size: 13px;
  border-radius: 0;
}

#crmSettingsStatus {
  font-size: 13px;
  color: var(--green);
}

@media (max-width: 1000px) {
  .crm-settings-panel {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 650px) {
  .crm-settings-panel {
    grid-template-columns: 1fr;
  }
}

/* ===== CRM client badges final fix ===== */

.crm-clients-toolbar {
  display: flex !important;
  gap: 10px !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  margin-bottom: 18px !important;
}

.crm-clients-toolbar .crm-search {
  height: 38px !important;
  min-height: 38px !important;
  border-radius: 0;
  font-size: 14px !important;
  padding: 0 12px !important;
}

#customerSearch {
  min-width: 320px !important;
}

#customerSegment {
  min-width: 160px !important;
}

#customerSort {
  min-width: 280px !important;
}

.client-badge {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 28px !important;
  padding: 4px 12px !important;
  border-radius: 0;
  font-size: 13px !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
}

.client-badge-new {
  background: #f3eee8 !important;
  color: #7b746c !important;
}

.client-badge-regular {
  background: #fff3c6 !important;
  color: #8a6500 !important;
}

.client-badge-vip {
  background: #e8f4e4 !important;
  color: #477340 !important;
}

.crm-customer-card.client-new {
  border-left: 8px solid #c8b9a8 !important;
}

.crm-customer-card.client-regular {
  border-left: 8px solid #e2b93b !important;
  background: #fffdf3 !important;
}

.crm-customer-card.client-vip {
  border-left: 8px solid #6f9f68 !important;
  background: #f4fbf2 !important;
}

@media (max-width: 900px) {
  .crm-clients-toolbar {
    flex-wrap: wrap !important;
  }

  #customerSearch,
  #customerSegment,
  #customerSort {
    width: 100% !important;
    min-width: 100% !important;
  }
}

.crm-order-item {
  grid-template-columns: 1fr 70px 110px 110px !important;
}

#crmCustomerName .client-badge {
  margin-left: 12px;
  vertical-align: middle;
}

.crm-order-card {
  border-left: 6px solid #c8b9a8;
}

@media (max-width: 760px) {
  .crm-order-item {
    grid-template-columns: 1fr !important;
  }
}

.crm-order-item {
  grid-template-columns: 1fr 70px 110px 110px !important;
}

#crmCustomerName .client-badge {
  margin-left: 12px;
  vertical-align: middle;
}

.crm-order-card {
  border-left: 6px solid #c8b9a8;
}

@media (max-width: 760px) {
  .crm-order-item {
    grid-template-columns: 1fr !important;
  }
}

.crm-note-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.crm-note-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
}

.crm-note-grid input,
.crm-note-grid textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 0;
  background: #f8f4ee;
  color: var(--text);
  padding: 12px;
  font-size: 15px;
  font-family: Arial, sans-serif;
}

.crm-note-grid label:nth-child(3),
.crm-note-grid label:nth-child(4) {
  grid-column: 1 / -1;
}

#saveCustomerNote {
  margin-top: 14px;
  min-height: 42px;
}

#customerNoteStatus {
  margin-left: 12px;
  color: var(--green);
  font-weight: 700;
}

@media (max-width: 760px) {
  .crm-note-grid {
    grid-template-columns: 1fr;
  }
}

.crm-client-note-preview {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.crm-client-note-preview strong {
  color: var(--text);
}

.crm-note-grid select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 0;
  background: #f8f4ee;
  color: var(--text);
  padding: 12px;
  font-size: 15px;
  font-family: Arial, sans-serif;
}

.delivery-cost-note {
  grid-column: 1 / -1;
  background: #fff8df;
  border: 1px solid #e2b93b;
  border-radius: 0;
  padding: 12px 14px;
  color: #7b6420;
  font-weight: 700;
  font-size: 15px;
}

.checkout-form select,
.crm-note-grid select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 0;
  background: #f8f4ee;
  color: var(--text);
  padding: 12px;
  font-size: 15px;
  font-family: Arial, sans-serif;
}

.consent-card {
  background: #fffaf5;
  border: 1px solid var(--border);
  border-left: 6px solid #c8b9a8;
  border-radius: 0;
  padding: 16px;
  margin-bottom: 12px;
}

.consent-card-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.consent-card-head h3 {
  margin: 0 0 4px;
  font-size: 20px;
}

.consent-card-head p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.consent-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 12px;
  border-radius: 0;
  background: #e8f4e4;
  color: #477340;
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
}

.consent-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
  color: var(--muted);
  font-size: 14px;
}

.consent-grid strong,
.consent-purpose strong {
  color: var(--text);
}

.consent-purpose {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
}

.consent-personal_data_processing {
  border-left-color: #6f9f68;
}

.consent-marketing_messages {
  border-left-color: #e2b93b;
}

.consent-order_notifications_max {
  border-left-color: #7fa7c7;
}

@media (max-width: 760px) {
  .consent-grid {
    grid-template-columns: 1fr;
  }

  .consent-card-head {
    display: grid;
  }
}

.consent-card {
  background: #fffaf5;
  border: 1px solid var(--border);
  border-left: 6px solid #c8b9a8;
  border-radius: 0;
  padding: 16px;
  margin-bottom: 12px;
}

.consent-card-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.consent-card-head h3 {
  margin: 0 0 4px;
  font-size: 20px;
}

.consent-card-head p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.consent-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 12px;
  border-radius: 0;
  background: #e8f4e4;
  color: #477340;
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
}

.consent-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
  color: var(--muted);
  font-size: 14px;
}

.consent-grid strong,
.consent-purpose strong {
  color: var(--text);
}

.consent-purpose {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
}

.consent-personal_data_processing {
  border-left-color: #6f9f68;
}

.consent-marketing_messages {
  border-left-color: #e2b93b;
}

.consent-order_notifications_max {
  border-left-color: #7fa7c7;
}

@media (max-width: 760px) {
  .consent-grid {
    grid-template-columns: 1fr;
  }

  .consent-card-head {
    display: grid;
  }
}

.consent-info-note {
  background: #fff8df;
  border: 1px solid #e2b93b;
  border-radius: 0;
  padding: 12px 14px;
  margin-bottom: 14px;
  color: #7b6420;
  font-size: 14px;
  font-weight: 700;
}

/* ===== Compact collapsible consents ===== */

.consent-info-note.compact {
  padding: 10px 14px !important;
  margin-bottom: 10px !important;
  font-size: 13px !important;
  border-radius: 0;
}

.consent-card {
  padding: 12px 14px !important;
  margin-bottom: 8px !important;
  border-radius: 0;
}

.consent-card-summary {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 14px !important;
}

.consent-card-summary h3 {
  margin: 0 0 3px !important;
  font-size: 18px !important;
  line-height: 1.1 !important;
}

.consent-card-summary p {
  margin: 0 !important;
  color: var(--muted) !important;
  font-size: 13px !important;
}

.consent-summary-actions {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-shrink: 0 !important;
}

.consent-toggle {
  min-height: 30px !important;
  border-radius: 0;
  border: 1px solid var(--border) !important;
  background: #ffffff !important;
  color: var(--text) !important;
  padding: 5px 12px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
}

.consent-card-details {
  display: none !important;
  margin-top: 12px !important;
  padding-top: 12px !important;
  border-top: 1px solid var(--border) !important;
}

.consent-card.consent-open .consent-card-details {
  display: block !important;
}

.consent-title {
  margin: 0 0 10px !important;
  color: var(--muted) !important;
  font-size: 14px !important;
}

.consent-grid {
  font-size: 13px !important;
  gap: 6px 14px !important;
}

.consent-purpose {
  margin-top: 10px !important;
  padding-top: 8px !important;
  font-size: 13px !important;
}

@media (max-width: 760px) {
  .consent-card-summary {
    display: grid !important;
  }

  .consent-summary-actions {
    justify-content: flex-start !important;
  }
}

/* ===== Compact collapsible consents ===== */

.consent-info-note.compact {
  padding: 10px 14px !important;
  margin-bottom: 10px !important;
  font-size: 13px !important;
  border-radius: 0;
}

.consent-card {
  padding: 12px 14px !important;
  margin-bottom: 8px !important;
  border-radius: 0;
}

.consent-card-summary {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 14px !important;
}

.consent-card-summary h3 {
  margin: 0 0 3px !important;
  font-size: 18px !important;
  line-height: 1.1 !important;
}

.consent-card-summary p {
  margin: 0 !important;
  color: var(--muted) !important;
  font-size: 13px !important;
}

.consent-summary-actions {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-shrink: 0 !important;
}

.consent-toggle {
  min-height: 30px !important;
  border-radius: 0;
  border: 1px solid var(--border) !important;
  background: #ffffff !important;
  color: var(--text) !important;
  padding: 5px 12px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
}

.consent-card-details {
  display: none !important;
  margin-top: 12px !important;
  padding-top: 12px !important;
  border-top: 1px solid var(--border) !important;
}

.consent-card.consent-open .consent-card-details {
  display: block !important;
}

.consent-title {
  margin: 0 0 10px !important;
  color: var(--muted) !important;
  font-size: 14px !important;
}

.consent-grid {
  font-size: 13px !important;
  gap: 6px 14px !important;
}

.consent-purpose {
  margin-top: 10px !important;
  padding-top: 8px !important;
  font-size: 13px !important;
}

@media (max-width: 760px) {
  .consent-card-summary {
    display: grid !important;
  }

  .consent-summary-actions {
    justify-content: flex-start !important;
  }
}

.consent-revoke-btn {
  min-height: 30px !important;
  border-radius: 0;
  border: 1px solid #c96b63 !important;
  background: #fff0ef !important;
  color: #a54842 !important;
  padding: 5px 12px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
}

.consent-badge-revoked {
  background: #fff0ef !important;
  color: #a54842 !important;
}

.consent-card.consent-revoked {
  border-left-color: #c96b63 !important;
  background: #fffafa !important;
}

.crm-marketing-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 3px 10px;
  border-radius: 0;
  font-size: 12px;
  font-weight: 700;
}

.crm-marketing-badge-allowed {
  background: #e8f4e4;
  color: #477340;
}

.crm-marketing-badge-blocked {
  background: #fff0ef;
  color: #a54842;
}

.crm-marketing-badge-empty {
  background: #f3eee8;
  color: #7b746c;
}

#customerMarketingFilter {
  min-width: 180px !important;
}

@media (max-width: 900px) {
  #customerMarketingFilter {
    width: 100% !important;
    min-width: 100% !important;
  }
}

.crm-marketing-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 3px 10px;
  border-radius: 0;
  font-size: 12px;
  font-weight: 700;
}

.crm-marketing-badge-allowed {
  background: #e8f4e4;
  color: #477340;
}

.crm-marketing-badge-blocked {
  background: #fff0ef;
  color: #a54842;
}

.crm-marketing-badge-empty {
  background: #f3eee8;
  color: #7b746c;
}

#customerMarketingFilter {
  min-width: 180px !important;
}

/* ===== Final compact client card styles ===== */

.client-card-summary-final {
  display: flex !important;
  justify-content: space-between !important;
  align-items: flex-start !important;
  gap: 16px !important;
}

.client-main-info h3 {
  margin: 0 0 8px !important;
  font-size: 28px !important;
  line-height: 1.1 !important;
}

.client-mini-line {
  display: flex !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
  font-size: 16px !important;
  color: var(--muted) !important;
}

.client-card-actions-final {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
  justify-content: flex-end !important;
}

.client-toggle-details {
  appearance: none !important;
  border: 1px solid var(--border) !important;
  background: #ffffff !important;
  color: var(--text) !important;
  min-height: 34px !important;
  border-radius: 0;
  padding: 6px 14px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  font-family: Arial, sans-serif !important;
}

.client-toggle-details:hover {
  background: #f8f4ee !important;
}

.client-open-link {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 34px !important;
  border-radius: 0;
  padding: 6px 14px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  border: 1px solid var(--green) !important;
  color: var(--green) !important;
  background: #ffffff !important;
}

.client-card-details {
  display: none !important;
  margin-top: 14px !important;
  padding-top: 14px !important;
  border-top: 1px solid var(--border) !important;
}

.crm-customer-card.is-open .client-card-details {
  display: block !important;
}

.crm-customer-card.is-collapsed .client-card-details {
  display: none !important;
}

.crm-customer-card.is-collapsed {
  min-height: auto !important;
}

@media (max-width: 700px) {
  .client-card-summary-final {
    display: grid !important;
  }

  .client-card-actions-final {
    justify-content: flex-start !important;
  }

  .client-main-info h3 {
    font-size: 24px !important;
  }
}

.marketing-consent-reminder {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(20px);
  z-index: 9999;
  width: min(560px, calc(100% - 32px));
  background: #fff8df;
  border: 1px solid #e2b93b;
  border-radius: 0;
  padding: 16px 18px;
  color: #5f4b13;
  font-size: 15px;
  line-height: 1.35;
  box-shadow: 0 14px 34px rgba(61, 58, 54, 0.18);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.marketing-consent-reminder.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.consent-required-note {
  grid-column: 1 / -1;
  background: #fff8df;
  border: 1px solid #e2b93b;
  border-radius: 0;
  padding: 12px 14px;
  color: #7b6420;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

.checkbox-row span {
  line-height: 1.35;
}

/* ===== Checkout checkbox alignment fix ===== */

.checkout-form .checkbox-row,
.checkbox-row {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  gap: 14px !important;
  width: 100% !important;
  margin: 16px 0 !important;
  text-align: left !important;
}

.checkout-form .checkbox-row input[type="checkbox"],
.checkbox-row input[type="checkbox"] {
  flex: 0 0 auto !important;
  width: 22px !important;
  height: 22px !important;
  margin: 4px 0 0 0 !important;
  display: inline-block !important;
}

.checkout-form .checkbox-row span,
.checkbox-row span {
  display: block !important;
  flex: 1 1 auto !important;
  line-height: 1.35 !important;
  text-align: left !important;
}

.consent-required-note {
  display: none !important;
}

/* ===== Marketing popup reminder ===== */

.marketing-consent-popup {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(20px);
  z-index: 99999;
  width: min(560px, calc(100% - 32px));
  background: #fff8df;
  border: 1px solid #e2b93b;
  border-radius: 0;
  padding: 16px 18px;
  color: #5f4b13;
  font-size: 15px;
  line-height: 1.35;
  box-shadow: 0 14px 34px rgba(61, 58, 54, 0.18);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.marketing-consent-popup.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===== Unified checkout checkbox style ===== */

.checkout-form .checkbox-row,
.checkbox-row {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  gap: 14px !important;
  width: 100% !important;
  margin: 18px 0 !important;
  text-align: left !important;
}

.checkout-form .checkbox-row input[type="checkbox"],
.checkbox-row input[type="checkbox"] {
  appearance: none !important;
  -webkit-appearance: none !important;
  flex: 0 0 24px !important;
  width: 24px !important;
  height: 24px !important;
  margin: 4px 0 0 0 !important;
  border: 2px solid #8f8a82 !important;
  border-radius: 0;
  background: #ffffff !important;
  cursor: pointer !important;
  position: relative !important;
}

.checkout-form .checkbox-row input[type="checkbox"]:checked,
.checkbox-row input[type="checkbox"]:checked {
  background: #5fa84a !important;
  border-color: #5fa84a !important;
}

.checkout-form .checkbox-row input[type="checkbox"]:checked::after,
.checkbox-row input[type="checkbox"]:checked::after {
  content: "" !important;
  position: absolute !important;
  left: 6px !important;
  top: 2px !important;
  width: 7px !important;
  height: 13px !important;
  border: solid #ffffff !important;
  border-width: 0 3px 3px 0 !important;
  transform: rotate(45deg) !important;
}

.checkout-form .checkbox-row input[type="checkbox"]:focus,
.checkbox-row input[type="checkbox"]:focus {
  outline: 3px solid rgba(95, 168, 74, 0.22) !important;
  outline-offset: 2px !important;
}

.checkout-form .checkbox-row span,
.checkbox-row span {
  display: block !important;
  flex: 1 1 auto !important;
  line-height: 1.35 !important;
  text-align: left !important;
  color: var(--muted) !important;
}

/* ===== Hard fix for checkout checkboxes ===== */

#personalDataAgree,
#maxAgree,
#marketingConsent {
  appearance: none !important;
  -webkit-appearance: none !important;
  box-sizing: border-box !important;
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  max-width: 24px !important;
  min-height: 24px !important;
  max-height: 24px !important;
  flex: 0 0 24px !important;
  margin: 4px 0 0 0 !important;
  padding: 0 !important;
  border: 2px solid #8f8a82 !important;
  border-radius: 0;
  background: #ffffff !important;
  cursor: pointer !important;
  position: relative !important;
  transform: none !important;
}

#personalDataAgree:checked,
#maxAgree:checked,
#marketingConsent:checked {
  background: #5fa84a !important;
  border-color: #5fa84a !important;
}

#personalDataAgree:checked::after,
#maxAgree:checked::after,
#marketingConsent:checked::after {
  content: "" !important;
  position: absolute !important;
  left: 6px !important;
  top: 2px !important;
  width: 7px !important;
  height: 13px !important;
  border: solid #ffffff !important;
  border-width: 0 3px 3px 0 !important;
  transform: rotate(45deg) !important;
}

.checkout-form .checkbox-row,
.checkbox-row,
.marketing-checkbox-row {
  display: flex !important;
  align-items: flex-start !important;
  gap: 14px !important;
  margin: 18px 0 !important;
  padding: 0 !important;
  width: 100% !important;
}

.checkout-form .checkbox-row span,
.checkbox-row span,
.marketing-checkbox-row span {
  display: block !important;
  flex: 1 1 auto !important;
  font-size: inherit !important;
  line-height: 1.35 !important;
  color: var(--muted) !important;
  text-align: left !important;
}

/* ===== Smaller neat checkout checkboxes ===== */

#personalDataAgree,
#maxAgree,
#marketingConsent {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  max-width: 18px !important;
  min-height: 18px !important;
  max-height: 18px !important;
  flex: 0 0 18px !important;
  margin: 5px 0 0 0 !important;
  border: 1.5px solid #8f8a82 !important;
  border-radius: 0;
  background: #ffffff !important;
}

#personalDataAgree:checked,
#maxAgree:checked,
#marketingConsent:checked {
  background: #6f765d !important;
  border-color: #6f765d !important;
}

#personalDataAgree:checked::after,
#maxAgree:checked::after,
#marketingConsent:checked::after {
  content: "" !important;
  position: absolute !important;
  left: 4px !important;
  top: 1px !important;
  width: 5px !important;
  height: 10px !important;
  border: solid #ffffff !important;
  border-width: 0 2px 2px 0 !important;
  transform: rotate(45deg) !important;
}

.checkout-form .checkbox-row,
.checkbox-row,
.marketing-checkbox-row {
  gap: 12px !important;
  margin: 12px 0 !important;
  align-items: flex-start !important;
}

.checkout-form .checkbox-row span,
.checkbox-row span,
.marketing-checkbox-row span {
  font-size: 18px !important;
  line-height: 1.3 !important;
  color: #7a746d !important;
  font-weight: 500 !important;
}

/* ===== Clean compact CRM client cards ===== */

.crm-customer-grid,
#customersList {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 16px !important;
}

.crm-customer-card {
  padding: 18px !important;
  border-radius: 0;
  min-height: auto !important;
  text-decoration: none !important;
  box-shadow: 0 10px 24px rgba(61, 58, 54, 0.06) !important;
}

.client-card-top {
  display: flex !important;
  justify-content: space-between !important;
  align-items: flex-start !important;
  gap: 14px !important;
}

.client-phone {
  font-size: 26px !important;
  font-weight: 800 !important;
  line-height: 1.1 !important;
  color: var(--text) !important;
  word-break: break-word !important;
}

.client-name {
  margin-top: 8px !important;
  font-size: 16px !important;
  color: var(--muted) !important;
  font-weight: 700 !important;
}

.client-card-side {
  display: grid !important;
  gap: 8px !important;
  justify-items: end !important;
  flex: 0 0 auto !important;
}

.client-card-short {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
  margin-top: 12px !important;
  font-size: 14px !important;
  color: var(--muted) !important;
  font-weight: 700 !important;
}

.client-toggle-details,
.client-open-link {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 32px !important;
  border-radius: 0;
  padding: 5px 14px !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  text-decoration: none !important;
  cursor: pointer !important;
  font-family: Arial, sans-serif !important;
}

.client-toggle-details {
  border: 1px solid var(--border) !important;
  background: #ffffff !important;
  color: var(--text) !important;
}

.client-open-link {
  border: 1px solid var(--crm-accent) !important;
  background: var(--crm-accent) !important;
  color: #ffffff !important;
}

.client-open-link:hover,
.client-open-link:focus,
.client-open-link:active {
  border-color: var(--crm-accent-dark) !important;
  background: var(--crm-accent-dark) !important;
  color: #ffffff !important;
}

.client-card-details {
  display: none !important;
  margin-top: 14px !important;
  padding-top: 14px !important;
  border-top: 1px solid var(--border) !important;
}

.crm-customer-card.is-open .client-card-details {
  display: block !important;
}

.client-detail-grid {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 6px !important;
  font-size: 14px !important;
  color: var(--muted) !important;
}

.client-detail-grid strong,
.client-notes strong {
  color: var(--text) !important;
}

.client-consent-row {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  margin: 12px 0 !important;
}

.client-notes {
  display: grid !important;
  gap: 6px !important;
  font-size: 14px !important;
  color: var(--muted) !important;
}

.crm-small-badge {
  display: inline-flex !important;
  align-items: center !important;
  min-height: 24px !important;
  border-radius: 0;
  padding: 3px 10px !important;
  font-size: 12px !important;
  font-weight: 800 !important;
}

.crm-small-badge-allowed {
  background: #e8f4e4 !important;
  color: #477340 !important;
}

.crm-small-badge-blocked {
  background: #fff0ef !important;
  color: #a54842 !important;
}

.crm-small-badge-empty {
  background: #f3eee8 !important;
  color: #7b746c !important;
}

@media (max-width: 1200px) {
  .crm-customer-grid,
  #customersList {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 760px) {
  .crm-customer-grid,
  #customersList {
    grid-template-columns: 1fr !important;
  }

  .client-phone {
    font-size: 22px !important;
  }
}

#exportMailingCsv {
  min-height: 52px !important;
  border-radius: 0;
  padding: 0 20px !important;
  white-space: nowrap !important;
}

#exportMailingCsv {
  min-height: 38px !important;
  height: 38px !important;
  border-radius: 0;
  padding: 0 14px !important;
  font-size: 14px !important;
  white-space: nowrap !important;
  background: #ffffff !important;
  color: var(--text) !important;
  border: 1px solid var(--border) !important;
}

#exportMailingCsv:hover,
#exportMailingCsv:focus,
#exportMailingCsv:active {
  background: #f5f0ea !important;
  border-color: #cdbfae !important;
  color: var(--text) !important;
}

/* ===== Order status moved to details ===== */

.order-detail-status-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  margin: 8px 0 12px !important;
  padding: 10px 12px !important;
  border: 1px solid var(--border) !important;
  border-radius: 0;
  background: #fffaf5 !important;
}

.order-detail-status-row .order-status-select {
  min-width: 210px !important;
  height: 36px !important;
  border-radius: 0;
  font-size: 14px !important;
}

.order-summary-actions .order-status-select {
  display: none !important;
}

@media (max-width: 700px) {
  .order-detail-status-row {
    display: grid !important;
  }

  .order-detail-status-row .order-status-select {
    width: 100% !important;
  }
}

/* ===== FINAL admin order compact layout ===== */

.order-card-summary {
  display: flex !important;
  justify-content: space-between !important;
  align-items: flex-start !important;
  gap: 18px !important;
}

.order-summary-actions {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
}

.order-card-details {
  display: none !important;
  margin-top: 14px !important;
  padding-top: 14px !important;
  border-top: 1px solid var(--border) !important;
}

.order-card.is-open .order-card-details {
  display: block !important;
}

.order-summary-actions .order-status-select {
  display: none !important;
}

.order-detail-status-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  margin: 8px 0 12px !important;
  padding: 10px 12px !important;
  border: 1px solid var(--border) !important;
  border-radius: 0;
  background: #fffaf5 !important;
}

.order-detail-status-row .order-status-select {
  display: block !important;
  min-width: 210px !important;
  height: 36px !important;
  border-radius: 0;
  font-size: 14px !important;
}

.order-status-pill {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 32px !important;
  border-radius: 0;
  padding: 5px 12px !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
}

.order-status-pill-new {
  background: #f3eee8 !important;
  color: #7b746c !important;
}

.order-status-pill-waiting_payment {
  background: #fff3c6 !important;
  color: #8a6500 !important;
}

.order-status-pill-payment_confirmed {
  background: #e8f4e4 !important;
  color: #477340 !important;
}

.order-status-pill-preparing {
  background: #e9f2fb !important;
  color: #426b8d !important;
}

.order-status-pill-shipped {
  background: #e4f3f1 !important;
  color: #3c7b73 !important;
}

.order-status-pill-cancelled {
  background: #fff0ef !important;
  color: #a54842 !important;
}

@media (max-width: 700px) {
  .order-card-summary {
    display: grid !important;
  }

  .order-detail-status-row {
    display: grid !important;
  }

  .order-detail-status-row .order-status-select {
    width: 100% !important;
  }
}

/* ===== Admin order expand fix ===== */

.order-card-summary {
  display: flex !important;
  justify-content: space-between !important;
  align-items: flex-start !important;
  gap: 18px !important;
  cursor: pointer !important;
}

.order-card-details {
  display: none !important;
  margin-top: 14px !important;
  padding-top: 14px !important;
  border-top: 1px solid var(--border) !important;
}

.order-card.is-open .order-card-details {
  display: block !important;
}

.order-card.is-collapsed .order-card-details {
  display: none !important;
}

.order-summary-actions {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
}

.order-summary-actions .order-status-select {
  display: none !important;
}

.order-toggle-details {
  min-height: 34px !important;
  border-radius: 0;
  border: 1px solid var(--border) !important;
  background: #fff !important;
  color: var(--text) !important;
  padding: 6px 14px !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  cursor: pointer !important;
}

.order-detail-status-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  margin: 8px 0 12px !important;
  padding: 10px 12px !important;
  border: 1px solid var(--border) !important;
  border-radius: 0;
  background: #fffaf5 !important;
}

.order-detail-status-row .order-status-select {
  display: block !important;
  min-width: 210px !important;
  height: 36px !important;
  border-radius: 0;
  font-size: 14px !important;
}

/* ===== Admin order details final fix ===== */

.order-card-summary {
  display: flex !important;
  justify-content: space-between !important;
  align-items: flex-start !important;
  gap: 18px !important;
  cursor: pointer !important;
}

.order-card-details {
  display: none !important;
  margin-top: 14px !important;
  padding-top: 14px !important;
  border-top: 1px solid var(--border) !important;
}

.order-card.is-open .order-card-details {
  display: block !important;
}

.order-card.is-collapsed .order-card-details {
  display: none !important;
}

.order-summary-actions {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
}

.order-toggle-details {
  min-height: 34px !important;
  border-radius: 0;
  border: 1px solid var(--border) !important;
  background: #fff !important;
  color: var(--text) !important;
  padding: 6px 14px !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  cursor: pointer !important;
}

.order-detail-status-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  margin: 8px 0 12px !important;
  padding: 10px 12px !important;
  border: 1px solid var(--border) !important;
  border-radius: 0;
  background: #fffaf5 !important;
}

.order-detail-status-row .order-status-select {
  display: block !important;
  min-width: 210px !important;
  height: 36px !important;
  border-radius: 0;
  font-size: 14px !important;
}

.order-status-pill {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 32px !important;
  border-radius: 0;
  padding: 5px 12px !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
}

.order-status-pill-new {
  background: #f3eee8 !important;
  color: #7b746c !important;
}

.order-status-pill-waiting_payment {
  background: #fff3c6 !important;
  color: #8a6500 !important;
}

.order-status-pill-payment_confirmed {
  background: #e8f4e4 !important;
  color: #477340 !important;
}

.order-status-pill-preparing {
  background: #e9f2fb !important;
  color: #426b8d !important;
}

.order-status-pill-shipped {
  background: #e4f3f1 !important;
  color: #3c7b73 !important;
}

.order-status-pill-cancelled {
  background: #fff0ef !important;
  color: #a54842 !important;
}

/* ===== Order history ===== */

.order-history-wrapper {
  margin-top: 18px !important;
  padding: 14px !important;
  border: 1px solid var(--border) !important;
  border-radius: 0;
  background: #fffaf5 !important;
}

.order-history-wrapper h4 {
  margin: 0 0 10px !important;
  font-size: 18px !important;
}

.order-history-box {
  display: grid !important;
  gap: 8px !important;
}

.order-history-item {
  padding: 10px 12px !important;
  border-radius: 0;
  background: #ffffff !important;
  border: 1px solid var(--border) !important;
}

.order-history-date {
  font-size: 12px !important;
  color: var(--muted) !important;
  margin-bottom: 4px !important;
}

.order-history-title {
  font-size: 14px !important;
  font-weight: 800 !important;
  color: var(--text) !important;
}

.order-history-details {
  margin-top: 4px !important;
  font-size: 13px !important;
  color: var(--muted) !important;
}

.order-history-empty,
.order-history-loading {
  color: var(--muted) !important;
  font-weight: 700 !important;
}

/* ===== Fix compact order card summary spacing ===== */

.order-card {
  overflow: hidden !important;
}

.order-card-summary {
  display: flex !important;
  justify-content: space-between !important;
  align-items: flex-start !important;
  gap: 18px !important;
}

.order-card-summary h3 {
  margin: 0 0 12px !important;
  font-size: 24px !important;
  line-height: 1.15 !important;
}

.order-card-summary p {
  margin: 0 0 10px !important;
  font-size: 15px !important;
  color: var(--muted) !important;
}

.order-summary-line {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 8px 18px !important;
  margin-top: 6px !important;
  font-size: 16px !important;
  line-height: 1.35 !important;
}

.order-summary-line span {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  white-space: nowrap !important;
}

.order-summary-line strong {
  font-weight: 800 !important;
  color: var(--text) !important;
}

.order-summary-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
  min-width: 260px !important;
}

.order-status-pill {
  min-height: 34px !important;
  padding: 6px 14px !important;
  border-radius: 0;
  font-size: 14px !important;
  font-weight: 800 !important;
}

.order-toggle-details {
  min-height: 38px !important;
  border-radius: 0;
  padding: 7px 16px !important;
  font-size: 15px !important;
  font-weight: 800 !important;
}

@media (max-width: 900px) {
  .order-card-summary {
    display: grid !important;
  }

  .order-summary-actions {
    justify-content: flex-start !important;
    min-width: 0 !important;
  }

  .order-summary-line {
    display: grid !important;
    gap: 6px !important;
  }

  .order-summary-line span {
    white-space: normal !important;
  }
}

/* ===== Fix compact order card summary spacing ===== */

.order-card {
  overflow: hidden !important;
}

.order-card-summary {
  display: flex !important;
  justify-content: space-between !important;
  align-items: flex-start !important;
  gap: 18px !important;
}

.order-card-summary h3 {
  margin: 0 0 12px !important;
  font-size: 24px !important;
  line-height: 1.15 !important;
}

.order-card-summary p {
  margin: 0 0 10px !important;
  font-size: 15px !important;
  color: var(--muted) !important;
}

.order-summary-line {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 8px 18px !important;
  margin-top: 6px !important;
  font-size: 16px !important;
  line-height: 1.35 !important;
}

.order-summary-line span {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  white-space: nowrap !important;
}

.order-summary-line strong {
  font-weight: 800 !important;
  color: var(--text) !important;
}

.order-summary-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
  min-width: 260px !important;
}

.order-status-pill {
  min-height: 34px !important;
  padding: 6px 14px !important;
  border-radius: 0;
  font-size: 14px !important;
  font-weight: 800 !important;
}

.order-toggle-details {
  min-height: 38px !important;
  border-radius: 0;
  padding: 7px 16px !important;
  font-size: 15px !important;
  font-weight: 800 !important;
}

@media (max-width: 900px) {
  .order-card-summary {
    display: grid !important;
  }

  .order-summary-actions {
    justify-content: flex-start !important;
    min-width: 0 !important;
  }

  .order-summary-line {
    display: grid !important;
    gap: 6px !important;
  }

  .order-summary-line span {
    white-space: normal !important;
  }
}

/* ===== FIX: Оплата и отправка ===== */

.fulfillment-box,
.payment-shipping-box,
.order-fulfillment-box {
  margin-top: 18px !important;
  padding: 18px !important;
  border: 1px solid #d8ccbc !important;
  border-radius: 0;
  background: #fffaf5 !important;
}

.fulfillment-grid {
  display: grid !important;
  gap: 14px !important;
  margin-top: 10px !important;
}

.fulfillment-row {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 12px 16px !important;
  align-items: flex-end !important;
}

.fulfillment-row--checks {
  align-items: center !important;
}

.fulfillment-row--checks label,
.fulfillment-inline-check label {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  color: #403a35 !important;
  margin: 0 !important;
}

.fulfillment-field {
  display: grid !important;
  gap: 6px !important;
  min-width: 220px !important;
  flex: 1 1 240px !important;
}

.fulfillment-field--wide {
  flex-basis: 100% !important;
}

.fulfillment-field__label {
  font-size: 15px !important;
  font-weight: 800 !important;
  color: #5a524b !important;
}

.fulfillment-field select,
.fulfillment-field input,
.fulfillment-field textarea {
  width: 100% !important;
  min-height: 46px !important;
  border: 1px solid #cfc2b0 !important;
  border-radius: 0;
  padding: 10px 12px !important;
  font-size: 16px !important;
  color: #3c3733 !important;
  background: #fff !important;
  box-sizing: border-box !important;
}

.fulfillment-field textarea {
  min-height: 90px !important;
  resize: vertical !important;
}

.fulfillment-inline-check {
  display: flex !important;
  align-items: center !important;
  min-height: 46px !important;
  padding-top: 24px !important;
}

.fulfillment-row--actions {
  align-items: center !important;
}

.fulfillment-row--actions button {
  min-height: 46px !important;
  padding: 0 18px !important;
  border-radius: 0;
  font-size: 15px !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
}

.fulfillment-action-status {
  display: flex !important;
  align-items: center !important;
  min-height: 46px !important;
  font-weight: 800 !important;
  color: #75865e !important;
}

@media (max-width: 900px) {
  .fulfillment-row {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .fulfillment-field,
  .fulfillment-field--wide {
    min-width: 100% !important;
    flex-basis: 100% !important;
  }

  .fulfillment-inline-check {
    padding-top: 0 !important;
    min-height: auto !important;
  }

  .fulfillment-row--actions button {
    width: 100% !important;
  }
}

/* ===== fulfillment compact fix v2 ===== */

.fulfillment-grid {
  display: grid !important;
  gap: 14px !important;
  margin-top: 12px !important;
}

.fulfillment-row {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 12px 16px !important;
  align-items: flex-end !important;
}

.fulfillment-row--checks {
  align-items: center !important;
}

.fulfillment-row--checks label,
.fulfillment-inline-check label {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 0 !important;
  font-size: 16px !important;
  font-weight: 800 !important;
  color: #403833 !important;
}

.fulfillment-field {
  display: grid !important;
  gap: 6px !important;
}

.fulfillment-field__label {
  font-size: 15px !important;
  font-weight: 800 !important;
  color: #5a5148 !important;
}

.fulfillment-field--delivery {
  flex: 0 0 320px !important;
  max-width: 320px !important;
  min-width: 260px !important;
}

.fulfillment-field--track {
  flex: 0 0 260px !important;
  max-width: 260px !important;
  min-width: 220px !important;
}

.fulfillment-field--wide {
  flex: 1 1 100% !important;
  width: 100% !important;
}

.fulfillment-field select,
.fulfillment-field input,
.fulfillment-field textarea {
  width: 100% !important;
  box-sizing: border-box !important;
  border: 1px solid #d0c3b3 !important;
  border-radius: 0;
  background: #fff !important;
  color: #3f3934 !important;
  font-size: 16px !important;
  padding: 10px 12px !important;
}

.fulfillment-field select,
.fulfillment-field input {
  min-height: 46px !important;
}

.fulfillment-field textarea {
  min-height: 90px !important;
  resize: vertical !important;
}

.fulfillment-inline-check {
  display: flex !important;
  align-items: center !important;
  min-height: 46px !important;
  padding-top: 26px !important;
}

.fulfillment-row--actions {
  align-items: center !important;
}

.fulfillment-row--actions button {
  min-height: 46px !important;
  padding: 0 18px !important;
  border-radius: 0;
  font-size: 15px !important;
  font-weight: 800 !important;
}

@media (max-width: 900px) {
  .fulfillment-row {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .fulfillment-field--delivery,
  .fulfillment-field--track,
  .fulfillment-field--wide {
    flex: 1 1 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
  }

  .fulfillment-inline-check {
    padding-top: 0 !important;
    min-height: auto !important;
  }

  .fulfillment-row--actions button {
    width: 100% !important;
  }
}

/* ===== Jamie Kay style size picker ===== */

.native-size-hidden {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.jk-size-picker {
  margin: 22px 0 24px !important;
  width: 100% !important;
}

.jk-size-header {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  margin-bottom: 14px !important;
  font-size: 18px !important;
  line-height: 1.2 !important;
  color: #3f3934 !important;
}

.jk-size-title {
  font-weight: 800 !important;
}

.jk-size-divider {
  color: #c7baaa !important;
}

.jk-size-current {
  font-weight: 500 !important;
}

.jk-size-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 12px !important;
  max-width: 760px !important;
}

.jk-size-option {
  min-height: 64px !important;
  border: 1px solid transparent !important;
  border-radius: 0;
  background: #eee9e1 !important;
  color: #3f3934 !important;
  font-size: 18px !important;
  font-weight: 800 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
  cursor: pointer !important;
  transition: background 0.18s ease, color 0.18s ease, transform 0.12s ease !important;
}

.jk-size-option:hover:not(:disabled) {
  transform: translateY(-1px) !important;
  background: #ded5c8 !important;
}

.jk-size-option.is-selected {
  background: #a07a48 !important;
  color: #ffffff !important;
}

.jk-size-option.is-disabled,
.jk-size-option:disabled {
  background: #f7f5f2 !important;
  color: #c8c3bc !important;
  cursor: not-allowed !important;
  opacity: 1 !important;
}

@media (max-width: 760px) {
  .jk-size-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  .jk-size-option {
    min-height: 56px !important;
    font-size: 16px !important;
  }
}

@media (max-width: 430px) {
  .jk-size-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* ===== Size picker shape like Jamie Kay ===== */

.jk-size-picker {
  margin: 24px 0 28px !important;
  max-width: 720px !important;
}

.jk-size-header {
  margin-bottom: 18px !important;
  font-size: 18px !important;
  color: #3f3934 !important;
}

.jk-size-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 164px) !important;
  gap: 14px 16px !important;
  max-width: none !important;
  width: auto !important;
}

.jk-size-option {
  width: 164px !important;
  height: 92px !important;
  min-height: 92px !important;
  padding: 0 !important;
  border-radius: 0;
  border: none !important;
  background: #eee9e1 !important;
  color: #3f3934 !important;
  font-size: 22px !important;
  font-weight: 800 !important;
  letter-spacing: 0.03em !important;
  text-transform: uppercase !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
}

.jk-size-option.is-selected {
  background: #a47d49 !important;
  color: #ffffff !important;
}

.jk-size-option:hover:not(:disabled) {
  background: #ded5c8 !important;
  transform: none !important;
}

.jk-size-option.is-selected:hover {
  background: #a47d49 !important;
  color: #ffffff !important;
}

.jk-size-option.is-disabled,
.jk-size-option:disabled {
  background: #f7f5f2 !important;
  color: #c9c4bd !important;
  opacity: 1 !important;
}

@media (max-width: 1100px) {
  .jk-size-grid {
    grid-template-columns: repeat(3, 150px) !important;
  }

  .jk-size-option {
    width: 150px !important;
    height: 82px !important;
    min-height: 82px !important;
    font-size: 20px !important;
  }
}

@media (max-width: 760px) {
  .jk-size-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    width: 100% !important;
  }

  .jk-size-option {
    width: 100% !important;
    height: 64px !important;
    min-height: 64px !important;
    font-size: 18px !important;
  }
}

/* ===== Size picker fit inside product column ===== */

.jk-size-picker {
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden !important;
  margin: 22px 0 26px !important;
}

.jk-size-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 14px !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden !important;
}

.jk-size-option {
  width: 100% !important;
  height: 86px !important;
  min-height: 86px !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  border-radius: 0;
  border: none !important;
  background: #eee9e1 !important;
  color: #3f3934 !important;
  font-size: 20px !important;
  font-weight: 800 !important;
  letter-spacing: 0.03em !important;
  text-transform: uppercase !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.jk-size-option.is-selected {
  background: #a47d49 !important;
  color: #ffffff !important;
}

.jk-size-option:hover:not(:disabled) {
  background: #ded5c8 !important;
  transform: none !important;
}

.jk-size-option.is-selected:hover {
  background: #a47d49 !important;
  color: #ffffff !important;
}

@media (max-width: 1100px) {
  .jk-size-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .jk-size-option {
    height: 78px !important;
    min-height: 78px !important;
    font-size: 19px !important;
  }
}

@media (max-width: 760px) {
  .jk-size-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  .jk-size-option {
    height: 64px !important;
    min-height: 64px !important;
    font-size: 17px !important;
  }
}

/* ===== Size picker final: correct rectangle shape ===== */

.jk-size-picker {
  width: 100% !important;
  max-width: 520px !important;
  margin: 22px 0 28px !important;
  overflow: visible !important;
}

.jk-size-header {
  margin-bottom: 18px !important;
  font-size: 18px !important;
  color: #3f3934 !important;
}

.jk-size-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 14px 16px !important;
  width: 100% !important;
  max-width: 520px !important;
}

.jk-size-option {
  width: 100% !important;
  aspect-ratio: 1.7 / 1 !important;
  height: auto !important;
  min-height: 72px !important;
  max-height: 90px !important;
  padding: 0 !important;
  box-sizing: border-box !important;

  border: none !important;
  border-radius: 0;

  background: #eee9e1 !important;
  color: #3f3934 !important;

  font-size: 21px !important;
  font-weight: 800 !important;
  letter-spacing: 0.03em !important;
  text-transform: uppercase !important;

  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  line-height: 1 !important;
  cursor: pointer !important;
  transform: none !important;
}

.jk-size-option.is-selected {
  background: #a47d49 !important;
  color: #ffffff !important;
}

.jk-size-option:hover:not(:disabled) {
  background: #ded5c8 !important;
  color: #3f3934 !important;
  transform: none !important;
}

.jk-size-option.is-selected:hover {
  background: #a47d49 !important;
  color: #ffffff !important;
}

.jk-size-option.is-disabled,
.jk-size-option:disabled {
  background: #f7f5f2 !important;
  color: #c9c4bd !important;
  opacity: 1 !important;
  cursor: not-allowed !important;
}

@media (max-width: 760px) {
  .jk-size-picker {
    max-width: 100% !important;
  }

  .jk-size-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    max-width: 100% !important;
  }

  .jk-size-option {
    min-height: 62px !important;
    font-size: 18px !important;
  }
}

/* ===== Size picker: more columns, fewer rows ===== */

.jk-size-picker {
  width: 100% !important;
  max-width: 560px !important;
  margin: 20px 0 26px !important;
}

.jk-size-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 12px 12px !important;
  width: 100% !important;
  max-width: 560px !important;
}

.jk-size-option {
  width: 100% !important;
  height: 68px !important;
  min-height: 68px !important;
  max-height: 68px !important;
  aspect-ratio: auto !important;

  padding: 0 !important;
  box-sizing: border-box !important;

  border: none !important;
  border-radius: 0;

  background: #eee9e1 !important;
  color: #3f3934 !important;

  font-size: 20px !important;
  font-weight: 800 !important;
  letter-spacing: 0.03em !important;
  text-transform: uppercase !important;

  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  line-height: 1 !important;
  cursor: pointer !important;
  transform: none !important;
}

.jk-size-option.is-selected {
  background: #a47d49 !important;
  color: #ffffff !important;
}

.jk-size-option:hover:not(:disabled) {
  background: #ded5c8 !important;
  color: #3f3934 !important;
  transform: none !important;
}

.jk-size-option.is-selected:hover {
  background: #a47d49 !important;
  color: #ffffff !important;
}

@media (max-width: 900px) {
  .jk-size-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  .jk-size-option {
    height: 60px !important;
    min-height: 60px !important;
    max-height: 60px !important;
    font-size: 18px !important;
  }
}

@media (max-width: 520px) {
  .jk-size-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .jk-size-option {
    height: 58px !important;
    min-height: 58px !important;
    max-height: 58px !important;
    font-size: 17px !important;
  }
}

/* ===== Size picker: more columns, fewer rows ===== */

.jk-size-picker {
  width: 100% !important;
  max-width: 560px !important;
  margin: 20px 0 26px !important;
}

.jk-size-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 12px 12px !important;
  width: 100% !important;
  max-width: 560px !important;
}

.jk-size-option {
  width: 100% !important;
  height: 68px !important;
  min-height: 68px !important;
  max-height: 68px !important;
  aspect-ratio: auto !important;

  padding: 0 !important;
  box-sizing: border-box !important;

  border: none !important;
  border-radius: 0;

  background: #eee9e1 !important;
  color: #3f3934 !important;

  font-size: 20px !important;
  font-weight: 800 !important;
  letter-spacing: 0.03em !important;
  text-transform: uppercase !important;

  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  line-height: 1 !important;
  cursor: pointer !important;
  transform: none !important;
}

.jk-size-option.is-selected {
  background: #a47d49 !important;
  color: #ffffff !important;
}

.jk-size-option:hover:not(:disabled) {
  background: #ded5c8 !important;
  color: #3f3934 !important;
  transform: none !important;
}

.jk-size-option.is-selected:hover {
  background: #a47d49 !important;
  color: #ffffff !important;
}

@media (max-width: 900px) {
  .jk-size-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  .jk-size-option {
    height: 60px !important;
    min-height: 60px !important;
    max-height: 60px !important;
    font-size: 18px !important;
  }
}

@media (max-width: 520px) {
  .jk-size-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .jk-size-option {
    height: 58px !important;
    min-height: 58px !important;
    max-height: 58px !important;
    font-size: 17px !important;
  }
}

/* ===== Restore native size selector ===== */

.jk-size-picker {
  display: none !important;
}

.native-size-hidden {
  position: static !important;
  left: auto !important;
  width: auto !important;
  height: auto !important;
  overflow: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

select.native-size-hidden {
  display: block !important;
  width: 100% !important;
  max-width: 360px !important;
  min-height: 46px !important;
  border: 1px solid var(--border, #d8ccbc) !important;
  border-radius: 0;
  background: #fffaf5 !important;
  color: var(--text, #3f3934) !important;
  font-size: 16px !important;
  padding: 10px 12px !important;
}

/* ===== Compact native size selector ===== */

.product-detail select,
.product-page select,
.product-info select,
select.native-size-hidden,
select[name*="size" i],
select[id*="size" i],
select[name*="размер" i],
select[id*="размер" i] {
  width: 150px !important;
  max-width: 150px !important;
  min-width: 120px !important;
  min-height: 54px !important;
  padding: 10px 42px 10px 16px !important;
  border-radius: 0;
  font-size: 18px !important;
  box-sizing: border-box !important;
}

@media (max-width: 520px) {
  .product-detail select,
  .product-page select,
  .product-info select,
  select.native-size-hidden,
  select[name*="size" i],
  select[id*="size" i],
  select[name*="размер" i],
  select[id*="размер" i] {
    width: 130px !important;
    max-width: 130px !important;
    min-width: 110px !important;
  }
}

/* ===== Force compact size select ===== */

.baby-size-select-compact {
  width: 132px !important;
  max-width: 132px !important;
  min-width: 132px !important;
  height: 54px !important;
  min-height: 54px !important;
  padding: 8px 36px 8px 16px !important;
  font-size: 18px !important;
  border-radius: 0;
  box-sizing: border-box !important;
  display: inline-block !important;
}

/* ===== Smaller compact size select ===== */

.baby-size-select-compact {
  width: 104px !important;
  max-width: 104px !important;
  min-width: 104px !important;
  height: 44px !important;
  min-height: 44px !important;
  padding: 6px 30px 6px 12px !important;
  font-size: 16px !important;
  border-radius: 0;
  box-sizing: border-box !important;
  display: inline-block !important;
}

.product-detail select.baby-size-select-compact,
.product-page select.baby-size-select-compact,
.product-info select.baby-size-select-compact {
  width: 104px !important;
  max-width: 104px !important;
  min-width: 104px !important;
  height: 44px !important;
  min-height: 44px !important;
  padding: 6px 30px 6px 12px !important;
  font-size: 16px !important;
  border-radius: 0;
}

/* ===== Tiny size select like label width ===== */

.baby-size-select-compact {
  width: 82px !important;
  max-width: 82px !important;
  min-width: 82px !important;
  height: 40px !important;
  min-height: 40px !important;
  padding: 5px 24px 5px 10px !important;
  font-size: 15px !important;
  border-radius: 0;
  box-sizing: border-box !important;
  display: inline-block !important;
}

.product-detail select.baby-size-select-compact,
.product-page select.baby-size-select-compact,
.product-info select.baby-size-select-compact {
  width: 82px !important;
  max-width: 82px !important;
  min-width: 82px !important;
  height: 40px !important;
  min-height: 40px !important;
  padding: 5px 24px 5px 10px !important;
  font-size: 15px !important;
  border-radius: 0;
}

/* ===== Кнопки товара уменьшены на 25% ===== */
.baby-product-buttons-row {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 14px !important;
  flex-wrap: nowrap !important;
  margin-top: 18px !important;
}

.baby-product-add-btn,
.baby-product-size-btn {
  width: 270px !important;
  min-width: 270px !important;
  max-width: 270px !important;

  height: 63px !important;
  min-height: 63px !important;
  max-height: 63px !important;

  padding: 0 18px !important;
  border-radius: 0;

  font-size: 17px !important;
  font-weight: 700 !important;
  line-height: 1 !important;

  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  white-space: nowrap !important;
}

.baby-product-add-btn {
  background: #9aa082 !important;
  color: #fff !important;
  border: 2px solid #9aa082 !important;
}

.baby-product-size-btn {
  background: #fff !important;
  color: #3f3934 !important;
  border: 2px solid #d8cec2 !important;
}

@media (max-width: 900px) {
  .baby-product-buttons-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
  }

  .baby-product-add-btn,
  .baby-product-size-btn {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
  }
}

/* ===== FIX: toast по центру ===== */
.cart-toast {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  right: auto !important;
  bottom: auto !important;
  transform: translate(-50%, -44%) scale(0.98) !important;
  z-index: 99999 !important;

  min-width: 320px !important;
  max-width: min(92vw, 420px) !important;

  padding: 18px 20px !important;
  border-radius: 0;
  background: #fffaf5 !important;
  border: 1px solid #d8cdbf !important;
  box-shadow: 0 24px 60px rgba(0,0,0,0.18) !important;

  opacity: 0 !important;
  pointer-events: none !important;
  text-align: center !important;
}

.cart-toast.is-visible {
  opacity: 1 !important;
  transform: translate(-50%, -50%) scale(1) !important;
  pointer-events: auto !important;
}

.cart-toast-title {
  font-size: 18px !important;
  font-weight: 800 !important;
  line-height: 1.3 !important;
  margin-bottom: 12px !important;
  color: #3f3934 !important;
}

.cart-toast-link {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 40px !important;
  padding: 0 18px !important;
  border-radius: 0;
  background: #9aa081 !important;
  color: #ffffff !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  text-decoration: none !important;
}

@media (max-width: 640px) {
  .cart-toast {
    min-width: 0 !important;
    width: calc(100vw - 32px) !important;
    max-width: calc(100vw - 32px) !important;
  }
}

/* ===== FIX: корзина в шапке ровно ===== */
.header-cart,
.cart-link,
a[href*="cart"] {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  vertical-align: middle !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

/* ===== FIX: счётчик корзины заметный ===== */
.cart-count,
.header-cart-count,
#cart-count,
[data-cart-count] {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  min-width: 22px !important;
  height: 22px !important;
  padding: 0 6px !important;

  border-radius: 0;
  background: #9aa081 !important;
  color: #ffffff !important;

  font-size: 12px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  box-sizing: border-box !important;
}

/* если счетчик оказался внутри ссылки корзины */
a[href*="cart"] .cart-count,
a[href*="cart"] .header-cart-count,
a[href*="cart"] #cart-count,
a[href*="cart"] [data-cart-count] {
  margin-left: 2px !important;
}

/* запасной вариант для светлого/бледного текста в корзине */
.header-cart *,
.cart-link * ,
a[href*="cart"] * {
  vertical-align: middle !important;
}

/* ===== Правое меню шапки: точное выравнивание ===== */

.baby-header-right,
.baby-header-actions,
.header-right,
.header-actions,
.site-header-right,
.site-header-actions {
  display: flex !important;
  align-items: center !important;
  gap: 24px !important;
}

.baby-header-right a,
.baby-header-actions a,
.header-right a,
.header-actions a,
.site-header-right a,
.site-header-actions a {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  height: 32px !important;
  margin: 0 !important;
  padding: 0 !important;
  vertical-align: middle !important;
}

.baby-header-cart-link,
.header-cart-link,
.site-header-cart-link {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  height: 32px !important;
  line-height: 1 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.baby-cart-text,
.cart-text,
.header-cart-text {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  margin: 0 !important;
  padding: 0 !important;
  position: relative !important;
  top: -2px !important;
}

.baby-cart-badge,
.cart-count,
.header-cart-count,
#cart-count,
[data-cart-count] {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 18px !important;
  height: 18px !important;
  padding: 0 6px !important;
  border-radius: 0;
  background: #969d82 !important;
  color: #fff !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  line-height: 18px !important;
  margin: 0 !important;
  position: relative !important;
  top: 0 !important;
}

/* ── Изображения товаров ── */

/* Карточка каталога — квадратное фото */
.product-image {
  aspect-ratio: 4 / 5;
  min-height: unset;
  padding: 0;
}

.product-image .prod-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: absolute;
  inset: 0;
  transition: transform 0.4s ease;
}

.product-card:hover .prod-img {
  transform: scale(1.04);
}

/* Страница товара — прямоугольное фото */
.product-main-image {
  aspect-ratio: 4 / 5;
  min-height: unset;
  padding: 0;
}

.product-main-image .prod-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: absolute;
  inset: 0;
}

/* Плейсхолдер — показывается если фото нет или сломано */
.prod-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
  padding: 20px;
  position: absolute;
  inset: 0;
}
