/* The storefront rules only the Django port needs.
 *
 * styles.css is generated from apps/shop and stays untouched; what lives here
 * styles the native controls the port uses where React drew scripted ones
 * (a checkbox is an <input>, a select a <select>), and the drawers the islands
 * open from a <template>. Tokens only, like every Aents stylesheet.
 */

/* A native select inside the shared field chrome: the chevron beside it is
   the shared adornment, so the browser's own arrow goes. The bare one (the
   order of the results) is as wide as the option on show, as React's button
   was, so a long result count does not push it onto a second line. */
.aents-select__trigger > select {
  appearance: none;
  cursor: pointer;
}

.aents-field--bare .aents-select__trigger > select {
  field-sizing: content;
}

.aents-check--native .aents-check__native {
  flex: 0 0 auto;
  width: var(--icon-base);
  height: var(--icon-base);
  margin: 0;
  accent-color: var(--primary);
  cursor: inherit;
}

.aents-check--native .aents-check__native:focus-visible {
  outline: 3px solid var(--shop-focus-ring);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .shop-drawer__panel,
  .shop-mobile-menu__panel,
  .shop-filter-panel {
    animation: none;
    transition: none;
  }
}

/* Productos Aents under a free store's footer row: clear of the floating contact button. */
.shop-root .aents-shop-footer__offers {
  padding-block-end: var(--spacing-xl);
}
.shop-root:has(.aents-fab) .aents-shop-footer__offers {
  padding-block-end: 5rem;
}

/* Subtotal and shipping sit above the total as one block: the separating
   rule and the generous padding stay with the total itself. */
.shop-cart-total--detail {
  padding-block: var(--spacing-xs);
  border-top: 0;
}
.shop-cart-total--detail + .shop-cart-total:not(.shop-cart-total--detail) {
  margin-block-start: var(--spacing-sm);
}

/* "Add $X more for free shipping", and its reached state. */
.shop-shipping-progress {
  margin: 0;
  color: var(--text-secondary);
}
.shop-shipping-progress.is-free {
  color: var(--success-strong);
}

/* A store's own primary and secondary colours (storefront/theme.py). Each
   falls back to the accent wiring styles.css already has, so a store that
   chose neither renders exactly as before. */
.shop-root {
  --primary: var(--shop-primary, var(--shop-accent));
  --on-primary: var(--shop-primary-foreground, var(--shop-accent-foreground));
  --primary-strong: var(--shop-primary-strong, var(--shop-accent-strong));
  --primary-pressed: color-mix(in srgb, var(--primary) 85%, var(--on-primary));
}
.shop-announcement {
  background: var(--shop-secondary, var(--primary));
  color: var(--shop-secondary-foreground, var(--on-primary));
}
