#flavio-configurator {
  --flavio-bg: #f8fafc;
  --flavio-card: #ffffff;
  --flavio-border: #cfd9ea;
  --flavio-border-strong: #aebfe0;
  --flavio-text: #0f2345;
  --flavio-muted: #65728a;
  --flavio-primary: #1d4ed8;
  --flavio-primary-soft: #eff6ff;
  --flavio-success: #0f7a2f;
  --flavio-success-soft: #ecfdf3;
  --flavio-success-border: #9de0b2;
  --flavio-warning: #b45309;
  --flavio-danger: #d64545;
  --flavio-shadow: 0 12px 28px rgba(15, 35, 69, 0.08);

  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 16px;
  width: 100%;
  max-width: 1220px;
  margin: 0 auto;
  color: var(--flavio-text);
  font-family: inherit;
  box-sizing: border-box;
}

#flavio-configurator *,
#flavio-configurator *::before,
#flavio-configurator *::after {
  box-sizing: border-box;
}

.flavio-sidebar,
.flavio-main {
  background: var(--flavio-card);
  border: 1px solid var(--flavio-border);
  border-radius: 14px;
  box-shadow: var(--flavio-shadow);
  overflow: hidden;
}

.flavio-sidebar {
  min-height: 540px;
}

.flavio-main {
  min-height: 540px;
}

.flavio-sidebar-header,
.flavio-main-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--flavio-border);
  background: #fff;
}

.flavio-sidebar-header h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 800;
  color: #001b3f;
}

.flavio-main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 62px;
}

.flavio-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.flavio-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid var(--flavio-border);
  border-radius: 999px;
  background: var(--flavio-primary-soft);
  color: #123462;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}

.flavio-pill strong {
  font-weight: 800;
  color: #001b3f;
}

.flavio-price-pill {
  color: #075b22;
  border-color: #86efac;
  background: #eafff1;
}

.flavio-clear {
  appearance: none;
  border: 1px solid var(--flavio-border-strong);
  background: #fff;
  color: #0b1f41;
  border-radius: 9px;
  min-height: 34px;
  padding: 7px 12px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.flavio-clear:hover {
  border-color: var(--flavio-primary);
  box-shadow: 0 4px 14px rgba(29, 78, 216, 0.12);
  transform: translateY(-1px);
}

.flavio-sidebar-body,
.flavio-main-body {
  padding: 14px 16px;
}

.flavio-help {
  margin: 0 0 10px;
  color: var(--flavio-muted);
  font-size: 13px;
  line-height: 1.35;
}

.flavio-status {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 800;
}

.flavio-ok {
  color: #008a2e;
}

.flavio-warn {
  color: var(--flavio-warning);
}

.flavio-module-list {
  display: grid;
  gap: 9px;
  max-height: 410px;
  overflow-y: auto;
  padding-right: 4px;
}

.flavio-module-list:empty {
  display: none;
}

.flavio-module-list::-webkit-scrollbar {
  width: 10px;
}

.flavio-module-list::-webkit-scrollbar-track {
  background: #eef3f8;
  border-radius: 999px;
}

.flavio-module-list::-webkit-scrollbar-thumb {
  background: #b7c4d6;
  border-radius: 999px;
}

.flavio-module-card {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 110px;
  padding: 10px;
  border: 1px solid var(--flavio-border);
  border-radius: 9px;
  background: #fff;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.flavio-module-card:hover {
  transform: translateY(-1px);
  border-color: var(--flavio-primary);
  box-shadow: 0 8px 18px rgba(29, 78, 216, 0.13);
}

.flavio-module-thumb {
  width: 92px;
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.flavio-module-thumb img {
  max-width: 100%;
  max-height: 74px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.flavio-meta h3 {
  margin: 0 0 4px;
  font-size: 17px;
  line-height: 1.1;
  font-weight: 800;
  color: #001b3f;
}

.flavio-meta p {
  margin: 0;
  color: #465574;
  font-size: 12px;
  line-height: 1.35;
}

.flavio-meta strong {
  color: #0b234a;
  font-weight: 800;
}

.flavio-tag {
  display: inline-flex;
  align-items: center;
  margin-top: 5px;
  padding: 3px 8px;
  border: 1px solid #d6deeb;
  border-radius: 999px;
  background: #f8fbff;
  color: #243b66;
  font-size: 11px;
  line-height: 1.2;
}

.flavio-controls {
  border: 1px solid var(--flavio-border);
  border-radius: 12px;
  padding: 12px;
  background: #fff;
  margin-bottom: 12px;
}

.flavio-select-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.75fr) minmax(190px, 0.7fr);
  gap: 10px;
  align-items: start;
}

.flavio-field {
  display: grid;
  grid-template-rows: 18px 40px;
  gap: 6px;
  min-width: 0;
}

.flavio-field label {
  display: flex;
  align-items: center;
  height: 18px;
  margin: 0;
  padding: 0;
  font-size: 12px;
  line-height: 18px;
  color: #0b1f41;
  font-weight: 800;
}

.flavio-field select,
.flavio-field input,
.flavio-group-box {
  display: flex;
  align-items: center;
  width: 100%;
  height: 40px;
  min-height: 40px;
  margin: 0;
  border: 1px solid var(--flavio-border);
  border-radius: 8px;
  background: #fff;
  color: #0b1f41;
  padding: 8px 10px;
  font-size: 14px;
  line-height: 22px;
  font-family: inherit;
  outline: none;
}

.flavio-field select:focus,
.flavio-field input:focus {
  border-color: var(--flavio-primary);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12);
}

.flavio-group-box {
  font-weight: 800;
  background: #f5f7fc;
}

#flavioFabricGroupBox {
  transform: translateY(-1px);
}

.flavio-price-box {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--flavio-success-border);
  border-radius: 10px;
  background: var(--flavio-success-soft);
}

.flavio-price-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.flavio-price-title {
  margin: 0;
  color: #06451d;
  font-size: 15px;
  font-weight: 800;
}

.flavio-price-value {
  color: #06451d;
  font-size: 26px;
  line-height: 1;
  font-weight: 900;
  white-space: nowrap;
}

.flavio-price-breakdown {
  margin-top: 8px;
  border-top: 1px solid rgba(15, 122, 47, 0.15);
}

.flavio-price-breakdown-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 5px 0;
  border-bottom: 1px solid rgba(15, 122, 47, 0.12);
  color: #244b31;
  font-size: 12px;
  line-height: 1.2;
}

.flavio-price-breakdown-row:last-child {
  border-bottom: 0;
}

.flavio-price-breakdown-row strong {
  color: #063f1b;
  font-weight: 900;
  white-space: nowrap;
}

.flavio-formula {
  min-height: 31px;
  margin-bottom: 10px;
  padding: 7px 10px;
  border: 1px solid var(--flavio-border);
  border-radius: 9px;
  background: #f6f8fc;
  color: #0b1f41;
  font-size: 13px;
  line-height: 1.25;
}

.flavio-formula:empty {
  display: block;
}

.flavio-formula strong {
  font-weight: 900;
}

.flavio-formula-code {
  color: #003399;
  font-weight: 800;
}

.flavio-matched-layout-preview {
  display: none;
}

.flavio-matched-layout-preview.flavio-active {
  display: block;
  margin-top: 8px;
  margin-bottom: 14px;
  border: 1px solid #d7e0ef;
  border-radius: 10px;
  background: #fff;
  padding: 18px;
}

.flavio-matched-layout-preview-body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 220px;
}

.flavio-matched-layout-preview-body img {
  max-width: 100%;
  max-height: 330px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.flavio-drop-zone {
  position: relative;
  min-height: 158px;
  border: 2px dashed var(--flavio-border-strong);
  border-radius: 12px;
  background: #fff;
  padding: 10px;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.flavio-drop-zone.flavio-dragover {
  border-color: var(--flavio-primary);
  background: var(--flavio-primary-soft);
}

.flavio-empty {
  min-height: 132px;
  display: grid;
  place-items: center;
  text-align: center;
  color: #77839a;
  font-size: 14px;
  line-height: 1.35;
  padding: 18px;
}

.flavio-sequence {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
}

.flavio-placed {
  position: relative;
  width: 150px;
  min-height: 170px;
  padding: 10px 8px 9px;
  border: 1px solid var(--flavio-border);
  border-radius: 9px;
  background: #fff;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  gap: 5px;
}

.flavio-placed h4 {
  margin: 0;
  padding-right: 24px;
  font-size: 13px;
  line-height: 1.1;
  font-weight: 900;
  color: #001b3f;
}

.flavio-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 999px;
  background: #fff0f0;
  color: var(--flavio-danger);
  font-size: 18px;
  line-height: 20px;
  cursor: pointer;
}

.flavio-remove:hover {
  background: #ffe0e0;
}

.flavio-placed-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 78px;
  overflow: hidden;
}

.flavio-placed-preview img {
  max-width: 100%;
  max-height: 82px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.flavio-placed small {
  color: #64748b;
  font-size: 11px;
  text-align: right;
  line-height: 1.15;
}

.flavio-placed-price {
  color: #06451d;
  font-size: 12px;
  font-weight: 900;
  text-align: right;
  line-height: 1.1;
}

@media (max-width: 980px) {
  #flavio-configurator {
    grid-template-columns: 1fr;
    max-width: 100%;
  }

  .flavio-sidebar {
    min-height: auto;
  }

  .flavio-module-list {
    max-height: none;
  }

  .flavio-main-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .flavio-select-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  #flavio-configurator {
    gap: 12px;
  }

  .flavio-sidebar-body,
  .flavio-main-body,
  .flavio-sidebar-header,
  .flavio-main-header {
    padding-left: 12px;
    padding-right: 12px;
  }

  .flavio-module-card {
    grid-template-columns: 82px 1fr;
    min-height: 98px;
  }

  .flavio-module-thumb {
    width: 82px;
  }

  .flavio-price-top {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .flavio-price-value {
    font-size: 23px;
  }

  .flavio-placed {
    width: calc(50% - 5px);
  }
}
.single-product form.cart .single_add_to_cart_button.disabled,
.single-product form.cart .single_add_to_cart_button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}
.flavio-configure-notice {
    font-size: 20px;
    font-weight: 700;
    color: #001f3f;
}