/* Minimal, theme-friendly defaults. Themes are expected to restyle. */

/* --- Form controls ---
   Comfortable sizing by default. Themes can retune via the --prindustry-input-*
   custom properties, or override with any selector: :where() keeps this rule at
   zero specificity so a plain theme rule always wins. */
:where(
    .prindustry-product,
    .prindustry-print-product,
    .prindustry-cart,
    .prindustry-checkout,
    .prindustry-account
  )
  :where(
    input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not(
        [type="submit"]
      ):not([type="button"]),
    select,
    textarea
  ) {
  padding: var(--prindustry-input-padding, 0.65rem 0.85rem);
  font-size: var(--prindustry-input-font-size, 1rem);
  line-height: var(--prindustry-input-line-height, 1.4);
  border: var(--prindustry-input-border, 1px solid rgba(0, 0, 0, 0.2));
  border-radius: var(--prindustry-input-radius, 6px);
}

.prindustry-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.5rem;
}

.prindustry-category {
  padding: 0.35rem 0.9rem;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 999px;
  text-decoration: none;
}

.prindustry-category.is-active {
  border-color: currentColor;
  font-weight: 600;
}

.prindustry-products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
}

.prindustry-product-card {
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 6px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.prindustry-product-card img {
  max-width: 100%;
  height: auto;
}

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

.prindustry-cart-table th,
.prindustry-cart-table td {
  padding: 0.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  text-align: left;
}

/* --- Order cards ---
   Same override contract as the form controls above: every rule sits in
   :where() at zero specificity and reads --prindustry-order-* custom
   properties, so a theme can retune tokens or simply out-select any rule.
   Colors derive from currentColor so the theme palette carries through. */
:where(.prindustry-orders) {
  display: flex;
  flex-direction: column;
  gap: var(--prindustry-order-gap, 1.25rem);
}

:where(.prindustry-order-card) {
  border: var(--prindustry-order-border, 1px solid rgba(0, 0, 0, 0.1));
  border-radius: var(--prindustry-order-radius, 10px);
  padding: var(--prindustry-order-padding, 1.25rem 1.5rem);
  background: var(--prindustry-order-bg, rgba(255, 255, 255, 0.6));
  box-shadow: var(--prindustry-order-shadow, 0 1px 3px rgba(0, 0, 0, 0.05));
  transition: box-shadow 0.15s ease;
}

:where(.prindustry-order-card):hover {
  box-shadow: var(
    --prindustry-order-shadow-hover,
    0 3px 10px rgba(0, 0, 0, 0.08)
  );
}

:where(.prindustry-order-card-header) {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

:where(.prindustry-order-number) {
  font-weight: 700;
  font-size: 1.05em;
}

:where(.prindustry-order-date) {
  opacity: 0.6;
  margin-left: 0.5rem;
  font-size: 0.9em;
}

:where(.prindustry-order-card-meta) {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

:where(.prindustry-order-status) {
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78em;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--prindustry-order-status-color, currentColor);
  background: var(--prindustry-order-status-bg, rgba(0, 0, 0, 0.06));
}

/* Status tints. Shop\OrderStatus maps every CEC status to a tone and the
   template emits .prindustry-order-status--tone-{tone} plus a per-status
   slug class (e.g. --in-progress) for targeted theme overrides. Unknown
   statuses stay on the neutral pill. */
:where(.prindustry-order-status--tone-success) {
  color: var(--prindustry-order-status-success-color, #1e6f2d);
  background: var(
    --prindustry-order-status-success-bg,
    rgba(46, 125, 50, 0.12)
  );
}

:where(.prindustry-order-status--tone-info) {
  color: var(--prindustry-order-status-info-color, #8a5a00);
  background: var(--prindustry-order-status-info-bg, rgba(240, 160, 0, 0.14));
}

:where(.prindustry-order-status--tone-danger) {
  color: var(--prindustry-order-status-danger-color, #a02020);
  background: var(--prindustry-order-status-danger-bg, rgba(198, 40, 40, 0.12));
}

:where(.prindustry-order-total) {
  font-weight: 700;
  font-size: 1.05em;
}

:where(.prindustry-order-items) {
  list-style: none;
  margin: 0.25rem 0 0;
  padding: 0;
}

:where(.prindustry-order-item) {
  display: flex;
  flex-wrap: wrap; /* the print-file chip wraps to its own full-width row */
  justify-content: space-between;
  align-items: baseline;
  gap: 0.35rem 1rem;
  padding: 0.55rem 0;
}

:where(.prindustry-order-item + .prindustry-order-item) {
  border-top: 1px dashed rgba(0, 0, 0, 0.08);
}

:where(.prindustry-order-item-name) {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

:where(.prindustry-order-item-image) {
  width: var(--prindustry-order-item-image-size, 44px);
  height: var(--prindustry-order-item-image-size, 44px);
  flex-shrink: 0;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(0, 0, 0, 0.03);
}

/* Keeps mixed lists aligned when one line has no product image. */
:where(.prindustry-order-item-image--placeholder) {
  display: inline-block;
}

:where(.prindustry-order-item-qty) {
  display: inline-block;
  min-width: 2.25em;
  opacity: 0.6;
  font-variant-numeric: tabular-nums;
}

:where(.prindustry-order-item-price) {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

:where(.prindustry-order-item-printfile) {
  flex-basis: 100%;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  /* aligns under the item name, past the product image */
  padding-left: calc(var(--prindustry-order-item-image-size, 44px) + 0.65rem);
  font-size: 0.9em;
}

:where(.prindustry-order-item-printfile a:has(.prindustry-printfile-thumb)) {
  line-height: 0; /* no baseline gap under the linked thumb */
}

:where(.prindustry-printfile-download) {
  margin-left: 0.25rem;
  text-decoration: underline;
  opacity: 0.75;
}

:where(.prindustry-printfile-download):hover {
  opacity: 1;
}

:where(.prindustry-order-card-footer) {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

:where(.prindustry-order-reorder) {
  margin-left: auto;
}

:where(.prindustry-order-card-footer):not(:has(*)) {
  display: none;
}

:where(.prindustry-order-delivery) {
  display: block;
  font-size: 0.9em;
  opacity: 0.65;
}

:where(.prindustry-orders-empty) {
  text-align: center;
  padding: var(--prindustry-order-empty-padding, 2.5rem 1.5rem);
  border: var(--prindustry-order-border, 1px dashed rgba(0, 0, 0, 0.15));
  border-radius: var(--prindustry-order-radius, 10px);
}

:where(.prindustry-orders-empty p) {
  margin: 0 0 1rem;
  opacity: 0.7;
}

@media (max-width: 480px) {
  :where(.prindustry-order-card-header),
  :where(.prindustry-order-item) {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
}

.prindustry-notice {
  padding: 0.75rem 1rem;
  border-left: 4px solid #888;
  background: rgba(0, 0, 0, 0.04);
  margin: 1rem 0;
}

.prindustry-notice--success {
  border-left-color: #2e7d32;
}

.prindustry-notice--error {
  border-left-color: #c62828;
}

.prindustry-add-to-cart.is-added::after {
  content: " ✓";
}

.prindustry-printfile-hint {
  display: block;
  opacity: 0.7;
}

.prindustry-cart-item-printfile {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

.prindustry-printfile-thumb {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  object-fit: contain;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 6px;
  padding: 2px;
}

.prindustry-printfile-ok {
  color: #2e7d32;
  white-space: nowrap;
}

.prindustry-printfile-missing span {
  display: block;
  font-size: 0.85em;
  opacity: 0.7;
}

.prindustry-checkout-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* --- Category menu ([prindustry_categories], for headers/menus) --- */

.prindustry-category-menu ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.prindustry-category-menu a {
  text-decoration: none;
  color: inherit;
}

.prindustry-category-menu a:hover,
.prindustry-category-menu a.is-active {
  text-decoration: underline;
  text-underline-offset: 0.3em;
}

/* --- Category tiles (shop landing) --- */

.prindustry-category-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.25rem;
}

.prindustry-category-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease;
}

/* Tiles are cards, not text links. !important on purpose: themes underline
   content links with ID-level selectors (e.g. kalpa's `#content a`) that no
   class-based rule can outweigh. */
a.prindustry-category-tile,
a.prindustry-category-tile:hover,
a.prindustry-category-tile:focus {
  text-decoration: none !important;
  color: inherit !important;
}

.prindustry-category-tile:hover {
  transform: scale(1.025);
}

.prindustry-category-tile-media {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.03);
}

.prindustry-category-tile-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.prindustry-category-tile-shape {
  width: 60%;
  opacity: 0.25;
}

.prindustry-category-tile-name {
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.95);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  font-weight: 600;
}

/* Tile with description and/or order button (block toggles): the image
   keeps the square, the card grows below it. */
.prindustry-category-tile--extended {
  aspect-ratio: auto;
}

.prindustry-category-tile--extended .prindustry-category-tile-media {
  flex: none;
  aspect-ratio: 1 / 1;
}

.prindustry-category-tile-description {
  padding: 0 1rem 0.75rem;
  background: rgba(255, 255, 255, 0.95);
  font-size: 0.9em;
  line-height: 1.4;
  opacity: 0.75;
}

.prindustry-category-tile-action {
  margin-top: auto;
  padding: 0.25rem 1rem 1rem;
  background: rgba(255, 255, 255, 0.95);
}

.prindustry-category-tile-action .prindustry-button {
  display: inline-block;
}

/* --- Print product: image left, step selector right --- */

.prindustry-print-product {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
  /* Breathing room below the add-to-cart footer — some themes (e.g.
     Inspiro) run the content flush into the site footer. */
  margin-bottom: 2.5rem;
}

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

.prindustry-print-media {
  position: sticky;
  top: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 420px;
  height: min(70vh, 640px);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.04);
  overflow: hidden;
  /* Portal look: the image runs on behind the step column (-mr-12 there)
     and fades out under it via a mask gradient. */
  margin-right: -3.5rem;
  -webkit-mask-image: linear-gradient(to right, #000 55%, transparent 98%);
  mask-image: linear-gradient(to right, #000 55%, transparent 98%);
}

.prindustry-print-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* The step column paints above the bleeding image. */
.prindustry-print-configurator {
  position: relative;
  z-index: 1;
}

/* Tight column: title, description and the step card sit right on top of
   each other (theme heading margins would tear them apart). */
.prindustry-print-configurator h2 {
  margin: 0;
}

.prindustry-print-configurator .prindustry-description {
  margin: 0.25rem 0 0.75rem;
  opacity: 0.8;
}

.prindustry-print-configurator .prindustry-description p {
  margin: 0;
}

@media (max-width: 782px) {
  .prindustry-print-media {
    position: static;
    margin-right: 0;
    margin-bottom: -2rem;
    height: 40vh;
    min-height: 260px;
    -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent 98%);
    mask-image: linear-gradient(to bottom, #000 55%, transparent 98%);
  }
}

/* --- Step selector --- */

.prindustry-step-card {
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  margin-bottom: 1rem;
}

.prindustry-step-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  font-weight: 600;
}

.prindustry-step-card-header h3 {
  margin: 0;
  font-size: 0.9rem;
}

.prindustry-step-reset {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.8rem;
  text-decoration: underline;
  color: inherit;
  font-family: inherit;
  padding: 0;
  box-shadow: none;
}

.prindustry-step {
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.prindustry-step:last-child {
  border-bottom: none;
}

.prindustry-step-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 1rem;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  /* These are native <button>s: undo theme button styling (white-on-dark
     text, button fonts) so they read as list rows again. */
  color: inherit;
  font: inherit;
  border-radius: 0;
  box-shadow: none;
}

.prindustry-step.is-locked .prindustry-step-header {
  opacity: 0.5;
  cursor: default;
}

.prindustry-step.is-excluded .prindustry-step-header {
  opacity: 0.4;
  cursor: default;
  background: rgba(0, 0, 0, 0.04);
}

.prindustry-step-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  flex-shrink: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.1);
  font-weight: 700;
  font-size: 0.85rem;
}

.prindustry-step-badge.is-done {
  background: #2e7d32;
  color: #fff;
}

.prindustry-step-title {
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.prindustry-step-selected {
  margin-left: auto;
  font-size: 0.85rem;
  opacity: 0.7;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Collapsible step body: closed by default; stepselector.js animates
   max-height + opacity between renders (portal accordion recipe) and adds
   .is-open once settled. */
.prindustry-step-body {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
}

.prindustry-step-body.is-open {
  max-height: none;
  opacity: 1;
}

.prindustry-step-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.75rem;
  padding: 1rem 1rem;
}

.prindustry-step-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  text-align: center;
  color: inherit;
  font: inherit;
  box-shadow: none;
}

.prindustry-step-option img {
  width: 100%;
  height: 4.5rem;
  object-fit: contain;
}

.prindustry-step-option.is-selected {
  border-color: currentColor;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.04);
}

/* --- Free-entry (dynamic) option: inputs under the options grid --- */

.prindustry-step-dynamic {
  margin-top: 0.85rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.025);
}

.prindustry-step-dynamic-hint {
  margin: 0 0 0.5rem;
  font-size: 0.9em;
  font-weight: 600;
}

.prindustry-step-dynamic-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.6rem 0.9rem;
}

.prindustry-step-dynamic-field {
  display: inline-flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.85em;
}

.prindustry-step-dynamic-label {
  opacity: 0.7;
}

.prindustry-step-dynamic-input {
  width: 7.5rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  font: inherit;
  font-size: 1rem;
}

.prindustry-step-dynamic-unit {
  position: absolute;
  right: 0.6rem;
  bottom: 0.55rem;
  font-size: 0.8em;
  opacity: 0.55;
  pointer-events: none;
}

.prindustry-step-dynamic-field {
  position: relative;
}

.prindustry-step-dynamic-field .prindustry-step-dynamic-input {
  padding-right: 2.4rem;
}

.prindustry-step-dynamic-x {
  padding-bottom: 0.6rem;
  opacity: 0.6;
}

.prindustry-step-dynamic-bounds {
  margin: 0.5rem 0 0;
  font-size: 0.8em;
  opacity: 0.6;
}

.prindustry-step-dynamic-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.prindustry-step-dynamic-choice {
  padding: 0.35rem 0.75rem;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 999px;
  background: #fff;
  font: inherit;
  cursor: pointer;
}

.prindustry-step-dynamic-choice.is-selected {
  border-color: currentColor;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.06);
}

/* --- Micro-animations (portal-style) --- */

@keyframes prindustry-rise {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.prindustry-anim-rise {
  animation: prindustry-rise 0.25s ease-out;
}

.prindustry-pricelist-loading,
.prindustry-step-selected {
  animation: prindustry-rise 0.2s ease-out;
}

.prindustry-step-header {
  transition: background-color 0.15s ease;
}

.prindustry-step-header:not(:disabled):hover {
  background: rgba(0, 0, 0, 0.03);
}

.prindustry-step-option {
  transition:
    background-color 0.1s ease,
    border-color 0.1s ease;
}

.prindustry-step-option:hover {
  background: rgba(0, 0, 0, 0.04);
}

.prindustry-price-row {
  transition: background-color 0.1s ease;
}

@media (prefers-reduced-motion: reduce) {
  .prindustry-anim-rise,
  .prindustry-pricelist-loading,
  .prindustry-step-selected {
    animation: none;
  }
}

/* --- Price list --- */

.prindustry-pricelist-card {
  margin-top: 1rem;
}

.prindustry-pricelist-body {
  padding: 0.5rem 1rem 1rem;
}

.prindustry-pricelist-body p {
  margin: 0.5rem 0 0;
}

.prindustry-pricelist {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.5rem;
}

.prindustry-pricelist th,
.prindustry-pricelist td {
  padding: 0.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  text-align: left;
}

.prindustry-pricelist tr:last-child td {
  border-bottom: none;
}

.prindustry-price-dlv small {
  display: block;
  font-weight: 400;
  opacity: 0.7;
}

.prindustry-price-cell {
  cursor: pointer;
  transition: background-color 0.1s ease;
}

.prindustry-price-cell:hover {
  background: rgba(0, 0, 0, 0.04);
}

.prindustry-price-cell.is-selected {
  background: rgba(0, 0, 0, 0.07);
  font-weight: 700;
}

.prindustry-price-cell.is-empty {
  cursor: default;
  opacity: 0.4;
}

.prindustry-step-footer {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

/* --- CO₂ footprint card (configurator, optional via settings) --- */

.prindustry-co2-card {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1rem;
  padding: 0.9rem 1.1rem;
  border: 1px solid rgba(46, 125, 50, 0.35);
  border-radius: 10px;
  background: rgba(46, 125, 50, 0.07);
  color: #2e7d32;
  animation: prindustry-rise 0.25s ease-out;
  transition: opacity 0.15s ease;
}

.prindustry-co2-card.is-updating {
  opacity: 0.55;
}

.prindustry-co2-icon {
  flex-shrink: 0;
  width: 1.8rem;
  height: 1.8rem;
}

.prindustry-co2-icon svg {
  width: 100%;
  height: 100%;
}

.prindustry-co2-main {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 9rem;
}

.prindustry-co2-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.85;
}

.prindustry-co2-total {
  font-size: 1.15rem;
  line-height: 1.2;
}

.prindustry-co2-per-piece {
  font-size: 0.85rem;
  opacity: 0.8;
}

.prindustry-co2-breakdown {
  list-style: none;
  margin: 0 0 0 auto;
  padding: 0;
  font-size: 0.85rem;
}

.prindustry-co2-breakdown li {
  display: flex;
  justify-content: space-between;
  gap: 1.25rem;
}

.prindustry-co2-part-label {
  opacity: 0.8;
}

@media (prefers-reduced-motion: reduce) {
  .prindustry-co2-card {
    animation: none;
  }
}

/* --- Print file dropzone (configurator footer) ---
   Theme-aware: colors ride the theme's presets with neutral fallbacks. */

/* The footer's flex gap already spaces the card from the CTA button;
   without this the card's own margin would double that up. */
.prindustry-upload-card {
  margin-bottom: 0;
}

.prindustry-upload-card-body {
  padding: 1rem;
}

.prindustry-dropzone {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1rem 1.1rem;
  border: 2px dashed
    color-mix(
      in srgb,
      var(--wp--preset--color--contrast, #1d1d1f) 30%,
      transparent
    );
  border-radius: 10px;
  background: color-mix(
    in srgb,
    var(--wp--preset--color--contrast, #1d1d1f) 4%,
    transparent
  );
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background-color 0.15s ease;
}

.prindustry-dropzone:hover,
.prindustry-dropzone.is-dragover {
  border-color: var(--wp--preset--color--contrast, #1d1d1f);
  background: color-mix(
    in srgb,
    var(--wp--preset--color--contrast, #1d1d1f) 8%,
    transparent
  );
}

.prindustry-dropzone input[type="file"] {
  display: none;
}

.prindustry-dropzone-icon {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  color: var(--wp--preset--color--contrast, #1d1d1f);
  opacity: 0.75;
}

.prindustry-dropzone-thumb {
  flex-shrink: 0;
  width: 3.25rem;
  height: 3.25rem;
  object-fit: contain;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 6px;
  padding: 2px;
}

.prindustry-dropzone-text {
  min-width: 0;
}

.prindustry-dropzone-title {
  display: block;
  font-weight: 600;
}

.prindustry-dropzone-hint {
  display: block;
  font-size: 0.85em;
  opacity: 0.65;
}

.prindustry-dropzone.has-file {
  border-style: solid;
  border-color: #2e7d32;
  background: rgba(46, 125, 50, 0.07);
}

.prindustry-dropzone-file {
  display: block;
  font-weight: 600;
  color: #2e7d32;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prindustry-dropzone-remove {
  flex-shrink: 0;
  margin-left: auto;
  border: none;
  background: none;
  font-size: 1.1rem;
  line-height: 1;
  opacity: 0.6;
  cursor: pointer;
}

.prindustry-dropzone-remove:hover {
  opacity: 1;
}

/* --- Buttons --- */

/* Every clickable plugin element shows a pointer — themes don't reliably
   set it on wp-element-button, and native buttons default to the arrow. */
.prindustry-button,
.prindustry-add-to-cart,
.prindustry-step-header:not(:disabled),
.prindustry-step-option,
.prindustry-step-reset,
.prindustry-price-cell:not(.is-empty),
.prindustry-cart-remove,
.prindustry-checkout-submit:not(:disabled) {
  cursor: pointer;
}

/* Fallback button look for classic themes. Buttons that also carry
   wp-element-button inherit the theme's own button styling (block themes
   style that class from theme.json), so the visual rules step aside. */
.prindustry-button {
  display: inline-block;
  text-align: center;
  cursor: pointer;
}

.prindustry-button:not(.wp-element-button) {
  padding: 0.6rem 1.5rem;
  border: 1px solid rgba(0, 0, 0, 0.8);
  border-radius: 999px;
  background: #fff;
  color: inherit;
  font-weight: 600;
  text-decoration: none;
}

.prindustry-button:not(.wp-element-button):hover {
  background: rgba(0, 0, 0, 0.05);
}

.prindustry-button--primary:not(.wp-element-button) {
  background: #1d1d1f;
  border-color: #1d1d1f;
  color: #fff;
}

.prindustry-button--primary:not(.wp-element-button):hover {
  background: #000;
}

.prindustry-button--small {
  padding: 0.3rem 0.9rem;
  font-size: 0.85em;
}

.prindustry-button.is-disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* --- Added-to-cart confirmation --- */

.prindustry-added-notice {
  margin-top: 0.75rem;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  border: 1px solid #2e7d32;
  background: rgba(46, 125, 50, 0.08);
}

.prindustry-added-notice a {
  font-weight: 600;
}

/* --- Cart: modern print-product layout --- */

.prindustry-cart-layout,
.prindustry-checkout-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
  gap: 1.5rem;
  align-items: start;
}

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

.prindustry-cart-items {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.prindustry-cart-item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.prindustry-cart-item-media {
  flex-shrink: 0;
  width: 84px;
  height: 84px;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
}

.prindustry-cart-item-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.prindustry-cart-item-shape {
  width: 55%;
  color: rgba(0, 0, 0, 0.12);
}

.prindustry-cart-item-main {
  flex: 1;
  min-width: 0;
}

.prindustry-cart-item-name {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.prindustry-cart-item-config {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  margin: 0 0 0.75rem;
  padding: 0;
}

.prindustry-cart-item-config li {
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
  font-size: 0.85em;
}

.prindustry-config-key::after {
  content: ": ";
  opacity: 0.6;
}

.prindustry-printfile-warning {
  display: inline-block;
  margin-right: 0.5rem;
  color: #c62828;
  font-size: 0.9em;
}

.prindustry-cart-item-printfile input[type="file"] {
  display: none;
}

.prindustry-printfile-actions {
  display: inline-flex;
  gap: 0.75rem;
  margin-left: 0.6rem;
}

.prindustry-printfile-action {
  border: none;
  background: none;
  padding: 0;
  font-size: 0.85em;
  text-decoration: underline;
  opacity: 0.7;
  cursor: pointer;
}

.prindustry-printfile-action:hover {
  opacity: 1;
}

.prindustry-cart-item-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  flex-shrink: 0;
}

.prindustry-cart-item-qty {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85em;
}

.prindustry-cart-item-qty input {
  width: 5rem;
}

.prindustry-cart-item-price {
  font-weight: 700;
  font-size: 1.1rem;
}

.prindustry-cart-remove {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.85em;
  opacity: 0.6;
  text-decoration: underline;
  color: inherit;
  font-family: inherit;
  padding: 0;
  box-shadow: none;
}

.prindustry-cart-remove:hover {
  opacity: 1;
  color: #c62828;
}

.prindustry-cart-summary {
  position: sticky;
  top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.25rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.02);
}

.prindustry-cart-summary h3 {
  margin: 0;
}

.prindustry-cart-summary dl {
  margin: 0;
}

.prindustry-summary-row {
  display: flex;
  justify-content: space-between;
  padding: 0.35rem 0;
}

.prindustry-summary-row dd {
  margin: 0;
}

.prindustry-summary-row--total {
  border-top: 1px solid rgba(0, 0, 0, 0.15);
  font-weight: 700;
}

.prindustry-summary-warning {
  margin: 0;
  color: #c62828;
  font-size: 0.9em;
}

.prindustry-cart-continue {
  font-size: 0.9em;
  text-align: center;
}

.prindustry-cart-empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  padding: 2rem 0;
}

/* --- Checkout --- */

.prindustry-checkout-auth {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

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

.prindustry-auth-panel {
  padding: 1.25rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
}

.prindustry-auth-panel h3 {
  margin-top: 0;
}

/* "Forgot your password?" & co. under an auth form. */
.prindustry-auth-links {
  margin: 0.75rem 0 0;
  font-size: 0.9em;
}

/* Guest checkout spans the login/register pair. */
.prindustry-auth-panel--guest {
  grid-column: 1 / -1;
}

.prindustry-auth-intro {
  margin: -0.25rem 0 0.75rem;
  opacity: 0.75;
  font-size: 0.95em;
}

.prindustry-guest-form .prindustry-field-grid input {
  width: 100%;
  box-sizing: border-box;
}

/* The password-reset flow is one panel, not the login/register pair. */
.prindustry-checkout-auth--single {
  grid-template-columns: minmax(0, 34rem);
}

/* Forms fill their panel/column instead of the browser-default input width. */
.prindustry-auth-panel input:not([type="checkbox"]):not([type="radio"]),
.prindustry-checkout-main input[type="text"],
.prindustry-checkout-main textarea {
  width: 100%;
  box-sizing: border-box;
}

.prindustry-checkout-main form {
  max-width: 34rem;
}

.prindustry-checkout-account {
  opacity: 0.8;
}

.prindustry-checkout-lines {
  list-style: none;
  margin: 0;
  padding: 0;
}

.prindustry-checkout-line {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  font-size: 0.9em;
}

.prindustry-checkout-line small {
  opacity: 0.6;
}

.prindustry-checkout-line-thumb {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 6px;
  object-fit: cover;
  background: rgba(0, 0, 0, 0.04);
}

.prindustry-checkout-line .prindustry-checkout-line-name {
  flex: 1;
  min-width: 0;
}

.prindustry-field-hint {
  display: inline-block;
  margin-top: 0.25rem;
  font-size: 0.8em;
  opacity: 0.65;
  max-width: 34ch;
}

/* --- My account --- */

.prindustry-account-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.prindustry-account-greeting {
  margin: 0;
}

.prindustry-account-email {
  margin: 0.25rem 0 0;
  opacity: 0.7;
}

.prindustry-account-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  align-items: start;
}

.prindustry-account-card {
  padding: 1.25rem 1.5rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  background: var(--wp--preset--color--base-2, #fff);
}

.prindustry-account-card h3 {
  margin: 0 0 0.75rem;
}

.prindustry-account-form p {
  margin: 0 0 0.75rem;
}

.prindustry-account-form input {
  width: 100%;
  max-width: 22rem;
}

.prindustry-account-muted {
  opacity: 0.7;
}

.prindustry-account-hint {
  font-size: 0.85em;
  margin-bottom: 0;
}

.prindustry-address-list {
  list-style: none;
  margin: 0 0 0.75rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.prindustry-address {
  padding: 0.6rem 0.8rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 6px;
}

.prindustry-address.is-default {
  border-color: currentColor;
}

.prindustry-address-badge {
  display: inline-block;
  margin-right: 0.5rem;
  padding: 0.05rem 0.5rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.08);
  font-size: 0.75em;
  font-weight: 600;
}

.prindustry-account-continue {
  margin-top: 1.5rem;
}

.prindustry-account-logout {
  white-space: nowrap;
}

/* --- Address form + selection (account & checkout) --- */

.prindustry-field-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.75rem 1rem;
}

.prindustry-field-grid p {
  margin: 0;
  grid-column: span 3;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.prindustry-field-grid label {
  font-size: 0.85em;
  opacity: 0.8;
}

.prindustry-field-grid input,
.prindustry-field-grid select {
  width: 100%;
}

/* --- Address form: searchable country combobox + address search --- */

.prindustry-visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.prindustry-combobox {
  position: relative;
}

.prindustry-combobox-list,
.prindustry-address-suggestions {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  max-height: 16rem;
  margin: 0.25rem 0 0;
  padding: 0.3rem;
  overflow-y: auto;
  list-style: none;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.prindustry-combobox-list li,
.prindustry-address-suggestions li {
  padding: 0.45rem 0.65rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95em;
}

.prindustry-combobox-list li:hover,
.prindustry-combobox-list li.is-active,
.prindustry-address-suggestions li:hover {
  background: rgba(0, 0, 0, 0.06);
}

.prindustry-combobox-list li[aria-selected="true"] {
  font-weight: 600;
}

.prindustry-combobox-list li.is-empty,
.prindustry-address-suggestions li.is-empty {
  cursor: default;
  opacity: 0.6;
}

.prindustry-address-lookup {
  position: relative;
  margin-bottom: 1rem;
}

.prindustry-address-lookup label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.9em;
  font-weight: 600;
}

.prindustry-address-lookup input[type="search"] {
  width: 100%;
  box-sizing: border-box;
}

.prindustry-address-lookup.is-loading input[type="search"] {
  background-image: linear-gradient(90deg, transparent 40%, rgba(0, 0, 0, 0.06) 50%, transparent 60%);
  background-size: 200% 100%;
  animation: prindustry-lookup-shimmer 1.2s linear infinite;
}

@keyframes prindustry-lookup-shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

.prindustry-field-wide {
  grid-column: span 6;
}
.prindustry-field-street {
  grid-column: span 4;
}
.prindustry-field-number {
  grid-column: span 2;
}
.prindustry-field-zip {
  grid-column: span 2;
}
.prindustry-field-city {
  grid-column: span 4;
}
.prindustry-field-region {
  grid-column: span 3;
}
.prindustry-field-country {
  grid-column: span 3;
}

@media (max-width: 600px) {
  .prindustry-field-grid > p {
    grid-column: span 6 !important;
  }
}

.prindustry-field-check {
  margin: 0.75rem 0 0;
}

.prindustry-field-check label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.prindustry-address-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.prindustry-address-form button {
  align-self: flex-start;
  margin-top: 0.5rem;
}

.prindustry-address-add {
  margin-top: 0.75rem;
}

.prindustry-address-add > summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9em;
}

/* Checkout: choose a delivery address */

.prindustry-checkout-address {
  margin: 1.25rem 0;
}

.prindustry-address-choices {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.prindustry-address-choice {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  cursor: pointer;
}

.prindustry-address-choice:has(input:checked) {
  border-color: currentColor;
  background: rgba(0, 0, 0, 0.03);
}

.prindustry-address-choice input {
  margin-top: 0.2rem;
}
