/* =============================================================
   InfoHub Store — shared base
   Same design system as the admin panel (assets/infohub-admin.css):
   semantic HSL tokens, Inter, 8px radius, bordered cards, no shadows.
   Tokens are prefixed --ih- so they never collide with theme or
   gateway CSS on public pages.

   1. Tokens            5. WooCommerce forms
   2. Base              6. WooCommerce notices
   3. Shell             7. WooCommerce tables & misc
   4. Components        8. Order details
   ============================================================= */

/* 1. Tokens ---------------------------------------------------- */

:root {
  --ih-background:         0 0% 98%;
  --ih-foreground:         240 10% 3.9%;
  --ih-card:               0 0% 100%;
  --ih-primary:            243 75% 59%;   /* overridden by InfoHub > Configurações */
  --ih-primary-foreground: 0 0% 100%;
  /* Buy buttons and cart: own colours from InfoHub > Loja, else the primary. */
  --ih-buy:                var(--ih-primary);
  --ih-buy-foreground:     var(--ih-primary-foreground);
  --ih-cart:               var(--ih-primary);
  --ih-cart-foreground:    var(--ih-primary-foreground);
  --ih-secondary:          240 4.8% 95.9%;
  --ih-muted:              240 4.8% 95.9%;
  --ih-muted-foreground:   240 3.8% 46.1%;
  --ih-accent:             240 4.8% 95.9%;
  --ih-accent-foreground:  240 5.9% 10%;
  --ih-destructive:        0 84.2% 60.2%;
  --ih-success:            142 71% 45%;
  --ih-warning:            38 92% 50%;
  --ih-border:             240 5.9% 90%;
  --ih-input:              240 5.9% 90%;
  --ih-ring:               243 75% 59%;
  /* --ih-brand-secondary (gradient end) exists only when the panel sets a secondary colour. */

  --ih-radius:      0.5rem;   /* 8px  — buttons, inputs */
  --ih-radius-lg:   0.75rem;  /* 12px — cards, tables */
  --ih-header-height: 64px;
  --ih-container:   1200px;
  --ih-gutter:      32px;
  --ih-control-height: 40px;
  --ih-font: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* 2. Base ------------------------------------------------------ */

.ih-store,
.ih-store *,
.ih-store *::before,
.ih-store *::after {
  box-sizing: border-box;
}

body.ih-store {
  margin: 0;
  font-family: var(--ih-font);
  font-size: 14px;
  line-height: 1.5;
  color: hsl(var(--ih-foreground));
  background-color: hsl(var(--ih-background));
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.ih-store h1,
.ih-store h2,
.ih-store h3,
.ih-store h4 {
  margin: 0 0 12px;
  font-weight: 600;
  line-height: 1.3;
  color: hsl(var(--ih-foreground));
}

.ih-store h1 { font-size: 24px; font-weight: 700; }
.ih-store h2 { font-size: 18px; }
.ih-store h3 { font-size: 16px; }
.ih-store p  { margin: 0 0 12px; }

.ih-store a {
  color: hsl(var(--ih-primary));
  text-decoration: none;
  transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease, opacity 150ms ease;
}

.ih-store a:hover { text-decoration: underline; }

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

.ih-store button,
.ih-store input,
.ih-store select,
.ih-store textarea {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
}

.ih-store :focus-visible {
  outline: 2px solid hsl(var(--ih-ring));
  outline-offset: 2px;
}

.ih-store .screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ih-store .clear { clear: both; }

.ih-skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 1000;
  padding: 8px 16px;
  border-radius: var(--ih-radius);
  background: hsl(var(--ih-primary));
  color: hsl(var(--ih-primary-foreground)) !important;
}

.ih-skip-link:focus { top: 16px; }

/* 3. Shell ----------------------------------------------------- */

.ih-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: hsl(var(--ih-muted) / 0.5);
}

.admin-bar .ih-shell { min-height: calc(100vh - 32px); }

.ih-main { flex: 1; }

.ih-container {
  width: 100%;
  max-width: calc(var(--ih-container) + var(--ih-gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--ih-gutter);
}

.ih-container--narrow { max-width: calc(820px + var(--ih-gutter) * 2); }

.ih-page { padding-top: 32px; padding-bottom: 56px; }

/* Header, navigation and footer live in layout.css. */

/* 4. Components ------------------------------------------------ */

.ih-icon { flex-shrink: 0; }

/* Buttons — .ih-btn is ours, .button is WooCommerce's. */
.ih-store .ih-btn,
.ih-store .button,
.ih-store .wp-element-button,
.ih-store .added_to_cart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--ih-control-height);
  padding: 8px 16px;
  border: 1px solid hsl(var(--ih-primary));
  border-radius: var(--ih-radius);
  background-color: hsl(var(--ih-primary));
  color: hsl(var(--ih-primary-foreground));
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: opacity 150ms ease, background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.ih-store .ih-btn:hover,
.ih-store .button:hover,
.ih-store .wp-element-button:hover {
  opacity: 0.9;
  color: hsl(var(--ih-primary-foreground));
  text-decoration: none;
}

.ih-store .button:disabled,
.ih-store .button.disabled,
.ih-store .ih-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Secondary actions. */
.ih-store .ih-btn--outline,
.ih-store .added_to_cart,
.ih-store .button[name="update_cart"],
.ih-store .button[name="apply_coupon"],
.ih-store .woocommerce-message .button,
.ih-store .woocommerce-info .button,
.ih-store .woocommerce-error .button,
.ih-store .woocommerce-pagination .button,
.ih-store table.shop_table .button:not(.alt):not(.checkout-button) {
  border-color: hsl(var(--ih-border));
  background-color: hsl(var(--ih-card));
  color: hsl(var(--ih-foreground));
}

.ih-store .ih-btn--outline:hover,
.ih-store .added_to_cart:hover,
.ih-store .button[name="update_cart"]:hover,
.ih-store .button[name="apply_coupon"]:hover,
.ih-store .woocommerce-message .button:hover,
.ih-store .woocommerce-info .button:hover,
.ih-store .woocommerce-error .button:hover,
.ih-store .woocommerce-pagination .button:hover,
.ih-store table.shop_table .button:not(.alt):not(.checkout-button):hover {
  opacity: 1;
  background-color: hsl(var(--ih-accent));
  color: hsl(var(--ih-foreground));
  text-decoration: none;
}

.ih-store .ih-btn--ghost {
  border-color: transparent;
  background-color: transparent;
  color: hsl(var(--ih-foreground));
}

.ih-store .ih-btn--ghost:hover {
  opacity: 1;
  background-color: hsl(var(--ih-accent));
  color: hsl(var(--ih-foreground));
}

.ih-store .ih-btn--sm,
.ih-store table.shop_table .button:not(.alt):not(.checkout-button),
.ih-store .woocommerce-message .button,
.ih-store .woocommerce-info .button {
  min-height: 36px;
  padding: 6px 12px;
  font-size: 13px;
}

.ih-store .ih-btn--block { width: 100%; }

/* AJAX add to cart: WooCommerce toggles .loading / .added. */
.ih-store .button.loading { opacity: 0.6; pointer-events: none; }

.ih-store .button.loading::after,
.ih-store .blockUI.blockOverlay::before {
  content: '';
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: ih-spin 700ms linear infinite;
}

.ih-store .blockUI.blockOverlay {
  background-color: hsl(var(--ih-card)) !important;
  border-radius: var(--ih-radius-lg);
}

.ih-store .blockUI.blockOverlay::before {
  position: absolute;
  top: calc(50% - 10px);
  left: calc(50% - 10px);
  width: 20px;
  height: 20px;
  color: hsl(var(--ih-primary));
}

@keyframes ih-spin { to { transform: rotate(360deg); } }

.ih-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--ih-control-height);
  height: var(--ih-control-height);
  padding: 0;
  border: 0;
  border-radius: var(--ih-radius);
  background: transparent;
  color: hsl(var(--ih-foreground)) !important;
  cursor: pointer;
}

.ih-icon-button:hover { background-color: hsl(var(--ih-accent)); }

.ih-link { font-size: 13px; font-weight: 500; }

.ih-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: hsl(var(--ih-primary) / 0.1);
  color: hsl(var(--ih-primary));
  font-size: 12px;
  font-weight: 600;
}

.ih-avatar--lg { width: 40px; height: 40px; font-size: 14px; }

.ih-card {
  background-color: hsl(var(--ih-card));
  border: 1px solid hsl(var(--ih-border));
  border-radius: var(--ih-radius-lg);
}

.ih-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border: 1px solid transparent;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}

.ih-badge--success { background-color: hsl(var(--ih-success) / 0.1); border-color: hsl(var(--ih-success) / 0.2); color: hsl(142 72% 29%); }
.ih-badge--warning { background-color: hsl(var(--ih-warning) / 0.1); border-color: hsl(var(--ih-warning) / 0.2); color: hsl(32 81% 29%); }
.ih-badge--danger  { background-color: hsl(var(--ih-destructive) / 0.1); border-color: hsl(var(--ih-destructive) / 0.2); color: hsl(0 72% 45%); }
.ih-badge--muted   { background-color: hsl(var(--ih-muted)); border-color: hsl(var(--ih-border)); color: hsl(var(--ih-muted-foreground)); }

/* Page header — icon tile + title + subtitle + actions. */
.ih-page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.ih-page-header__group {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.ih-page-header__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background-color: hsl(var(--ih-primary) / 0.1);
  color: hsl(var(--ih-primary));
}

.ih-store .ih-page-header__title {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.25;
}

.ih-page-header__subtitle {
  margin: 2px 0 0 !important;
  color: hsl(var(--ih-muted-foreground));
}

.ih-page-header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Purchase steps. */
.ih-steps {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
  color: hsl(var(--ih-muted-foreground));
  font-size: 13px;
  font-weight: 500;
}

.ih-steps__item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ih-steps__item + .ih-steps__item::before {
  content: '';
  width: 32px;
  height: 1px;
  margin-right: 4px;
  background-color: hsl(var(--ih-border));
}

.ih-steps__marker {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 1px solid hsl(var(--ih-border));
  border-radius: 50%;
  background-color: hsl(var(--ih-card));
  font-size: 12px;
  font-weight: 600;
}

.ih-steps__item.is-current { color: hsl(var(--ih-foreground)); }

.ih-steps__item.is-current .ih-steps__marker,
.ih-steps__item.is-done .ih-steps__marker {
  border-color: hsl(var(--ih-primary));
  background-color: hsl(var(--ih-primary));
  color: hsl(var(--ih-primary-foreground));
}

/* Empty state. */
.ih-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 56px 24px;
  text-align: center;
}

.ih-empty--inline { padding: 32px 24px; }

.ih-empty__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-bottom: 16px;
  border-radius: 16px;
  background-color: hsl(var(--ih-muted));
  color: hsl(var(--ih-muted-foreground));
}

.ih-store .ih-empty__title,
.ih-store .ih-empty .wc-empty-cart-message .cart-empty {
  margin: 0 0 4px;
  padding: 0;
  border: 0;
  background: none;
  color: hsl(var(--ih-foreground));
  font-size: 18px;
  font-weight: 600;
}

.ih-empty__text {
  max-width: 420px;
  margin: 0 0 20px !important;
  color: hsl(var(--ih-muted-foreground));
}

.ih-empty .return-to-shop { margin: 0; }

/* Tabs. */
.ih-tabs {
  display: flex;
  gap: 2px;
  margin-bottom: 24px;
  padding: 4px;
  border-radius: var(--ih-radius);
  background-color: hsl(var(--ih-muted));
}

.ih-tabs__trigger {
  flex: 1;
  padding: 6px 14px;
  border-radius: calc(var(--ih-radius) - 2px);
  color: hsl(var(--ih-muted-foreground)) !important;
  font-weight: 500;
  text-align: center;
  text-decoration: none !important;
}

.ih-tabs__trigger:hover { color: hsl(var(--ih-foreground)) !important; }

.ih-tabs__trigger.is-active {
  background-color: hsl(var(--ih-card));
  color: hsl(var(--ih-foreground)) !important;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.08);
}

/* KPI cards. */
.ih-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.ih-kpi {
  padding: 16px;
  background-color: hsl(var(--ih-card));
  border: 1px solid hsl(var(--ih-border));
  border-radius: var(--ih-radius-lg);
}

.ih-kpi__label {
  margin: 0 0 4px !important;
  color: hsl(var(--ih-muted-foreground));
  font-size: 12px;
}

.ih-kpi__value {
  margin: 0 !important;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
}

.ih-kpi__value--badge { display: flex; align-items: center; min-height: 28px; }

/* Section card. */
.ih-section { margin-bottom: 24px; }

.ih-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid hsl(var(--ih-border));
}

.ih-store .ih-section__title { margin: 0; font-size: 15px; font-weight: 600; }

/* Long-form text (policy pages). */
.ih-prose {
  padding: 32px;
  font-size: 15px;
  line-height: 1.7;
}

.ih-prose > :first-child { margin-top: 0; }
.ih-prose > :last-child  { margin-bottom: 0; }
.ih-prose p  { margin: 0 0 16px; color: hsl(240 5% 26%); }
.ih-prose h2 { margin: 32px 0 12px; font-size: 18px; }
.ih-prose h3 { margin: 24px 0 8px; font-size: 16px; }
.ih-prose ul,
.ih-prose ol { margin: 0 0 16px; padding-left: 20px; color: hsl(240 5% 26%); }
.ih-prose li + li { margin-top: 6px; }

.ih-prose .ih-placeholder-notice {
  padding: 12px 16px;
  border: 1px solid hsl(var(--ih-warning) / 0.3);
  border-radius: var(--ih-radius);
  background-color: hsl(var(--ih-warning) / 0.08);
  color: hsl(32 81% 29%);
  font-size: 14px;
}

.ih-prose .ih-placeholder {
  padding: 1px 6px;
  border-radius: 4px;
  background-color: hsl(var(--ih-warning) / 0.15);
  color: hsl(32 81% 29%);
  font-weight: 500;
}

/* Blog / archive list. */
.ih-post-list { display: flex; flex-direction: column; gap: 16px; }
.ih-post-card { padding: 20px 24px; }
.ih-store .ih-post-card__title { margin: 0 0 2px; font-size: 16px; }
.ih-store .ih-post-card__title a { color: hsl(var(--ih-foreground)); }
.ih-post-card__meta { margin: 0 0 8px !important; color: hsl(var(--ih-muted-foreground)); font-size: 12px; }
.ih-post-card__excerpt p:last-child { margin-bottom: 0; }

/* 5. WooCommerce forms ---------------------------------------- */

.ih-store .form-row {
  margin: 0 0 16px;
  padding: 0;
}

.ih-store .form-row-first { float: left;  width: calc(50% - 8px); }
.ih-store .form-row-last  { float: right; width: calc(50% - 8px); }
.ih-store .form-row-wide  { clear: both; }

.ih-store form::after,
.ih-store .woocommerce-billing-fields__field-wrapper::after,
.ih-store .woocommerce-shipping-fields__field-wrapper::after,
.ih-store .woocommerce-address-fields__field-wrapper::after,
.ih-store fieldset::after {
  content: '';
  display: table;
  clear: both;
}

.ih-store label {
  display: block;
  margin-bottom: 4px;
  font-weight: 500;
}

.ih-store .required { color: hsl(var(--ih-destructive)); text-decoration: none; }
.ih-store .optional { color: hsl(var(--ih-muted-foreground)); font-weight: 400; }

.ih-store input[type="text"],
.ih-store input[type="email"],
.ih-store input[type="tel"],
.ih-store input[type="password"],
.ih-store input[type="number"],
.ih-store input[type="search"],
.ih-store input[type="url"],
.ih-store input[type="date"],
.ih-store select,
.ih-store textarea,
.ih-store .select2-container--default .select2-selection--single {
  width: 100%;
  height: var(--ih-control-height);
  padding: 8px 12px;
  border: 1px solid hsl(var(--ih-input));
  border-radius: var(--ih-radius);
  background-color: hsl(var(--ih-card));
  color: hsl(var(--ih-foreground));
  outline: none;
  box-shadow: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.ih-store textarea {
  height: auto;
  min-height: 96px;
  resize: vertical;
}

.ih-store input::placeholder,
.ih-store textarea::placeholder { color: hsl(var(--ih-muted-foreground)); }

.ih-store input[type="text"]:focus,
.ih-store input[type="email"]:focus,
.ih-store input[type="tel"]:focus,
.ih-store input[type="password"]:focus,
.ih-store input[type="number"]:focus,
.ih-store input[type="search"]:focus,
.ih-store input[type="url"]:focus,
.ih-store input[type="date"]:focus,
.ih-store select:focus,
.ih-store textarea:focus,
.ih-store .select2-container--focus .select2-selection--single,
.ih-store .select2-container--open .select2-selection--single {
  border-color: hsl(var(--ih-ring));
  box-shadow: 0 0 0 2px hsl(var(--ih-ring) / 0.2);
  outline: none;
}

.ih-store .woocommerce-invalid input,
.ih-store .woocommerce-invalid select,
.ih-store .woocommerce-invalid .select2-selection--single {
  border-color: hsl(var(--ih-destructive));
}

.ih-store input[type="checkbox"],
.ih-store input[type="radio"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: hsl(var(--ih-primary));
}

.ih-store .woocommerce-form__label-for-checkbox,
.ih-store label.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-weight: 400;
  cursor: pointer;
}

.ih-store fieldset {
  margin: 24px 0 0;
  padding: 24px 0 0;
  border: 0;
  border-top: 1px solid hsl(var(--ih-border));
}

.ih-store legend {
  float: left;
  width: 100%;
  margin-bottom: 16px;
  padding: 0;
  font-size: 15px;
  font-weight: 600;
}

.ih-store .form-row em,
.ih-store .woocommerce-password-hint,
.ih-store .description {
  display: block;
  margin-top: 4px;
  color: hsl(var(--ih-muted-foreground));
  font-size: 12px;
  font-style: normal;
}

/* Password field: WooCommerce wraps it and injects the toggle button. */
.ih-store .password-input {
  position: relative;
  display: block;
}

.ih-store .password-input input { padding-right: 40px; }

.ih-store .show-password-input {
  position: absolute;
  top: 0;
  right: 0;
  width: var(--ih-control-height);
  height: var(--ih-control-height);
  padding: 0;
  border: 0;
  background-color: hsl(var(--ih-muted-foreground));
  cursor: pointer;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / 16px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / 16px no-repeat;
}

.ih-store .show-password-input:hover,
.ih-store .show-password-input.display-password { background-color: hsl(var(--ih-foreground)); }

.ih-store .woocommerce-password-strength {
  margin-top: 8px;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
}

.ih-store .woocommerce-password-strength.short,
.ih-store .woocommerce-password-strength.bad    { background-color: hsl(var(--ih-destructive) / 0.1); color: hsl(0 72% 45%); }
.ih-store .woocommerce-password-strength.good   { background-color: hsl(var(--ih-warning) / 0.1); color: hsl(32 81% 29%); }
.ih-store .woocommerce-password-strength.strong { background-color: hsl(var(--ih-success) / 0.1); color: hsl(142 72% 29%); }

/* Select2 (country / state fields). */
.ih-store .select2-container--default .select2-selection--single {
  display: flex;
  align-items: center;
  padding: 0 12px;
}

.ih-store .select2-container--default .select2-selection--single .select2-selection__rendered {
  flex: 1;
  padding: 0;
  color: hsl(var(--ih-foreground));
  line-height: 1.5;
}

.ih-store .select2-container--default .select2-selection--single .select2-selection__arrow {
  top: 0;
  right: 6px;
  height: 100%;
}

.ih-store .select2-dropdown {
  border-color: hsl(var(--ih-border));
  border-radius: var(--ih-radius);
  overflow: hidden;
  font-size: 14px;
}

.ih-store .select2-container--default .select2-results__option--highlighted[aria-selected],
.ih-store .select2-container--default .select2-results__option--highlighted[data-selected] {
  background-color: hsl(var(--ih-accent));
  color: hsl(var(--ih-accent-foreground));
}

.ih-store .select2-container--default .select2-search--dropdown .select2-search__field {
  border-color: hsl(var(--ih-input));
  border-radius: 6px;
}

/* Quantity. */
.ih-store .quantity .qty {
  width: 76px;
  text-align: center;
}

/* 6. WooCommerce notices -------------------------------------- */

.ih-store .woocommerce-notices-wrapper:empty { display: none; }

.ih-store .woocommerce-message,
.ih-store .woocommerce-info,
.ih-store .woocommerce-error,
.ih-store .woocommerce-notice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin: 0 0 16px;
  padding: 12px 16px;
  border: 1px solid hsl(var(--ih-border));
  border-left-width: 3px;
  border-radius: var(--ih-radius);
  background-color: hsl(var(--ih-card));
  color: hsl(var(--ih-foreground));
  list-style: none;
  outline: none;
}

.ih-store .woocommerce-message,
.ih-store .woocommerce-notice--success { border-left-color: hsl(var(--ih-success)); }
.ih-store .woocommerce-info  { border-left-color: hsl(var(--ih-primary)); }
.ih-store .woocommerce-error { border-left-color: hsl(var(--ih-destructive)); flex-direction: column; align-items: flex-start; }

.ih-store .woocommerce-error li { margin: 0; }

.ih-store .woocommerce-message .button,
.ih-store .woocommerce-info .button,
.ih-store .woocommerce-error .button {
  order: 2;
  margin-left: auto;
}

/* 7. WooCommerce tables & misc -------------------------------- */

.ih-store table.shop_table {
  width: 100%;
  margin: 0 0 24px;
  border: 1px solid hsl(var(--ih-border));
  border-radius: var(--ih-radius-lg);
  border-collapse: separate;
  border-spacing: 0;
  background-color: hsl(var(--ih-card));
  overflow: hidden;
}

.ih-store table.shop_table th,
.ih-store table.shop_table td {
  padding: 14px 16px;
  border: 0;
  text-align: left;
  vertical-align: middle;
}

.ih-store table.shop_table thead th {
  height: 48px;
  padding-top: 0;
  padding-bottom: 0;
  background-color: hsl(var(--ih-muted) / 0.5);
  color: hsl(var(--ih-muted-foreground));
  font-weight: 500;
}

.ih-store table.shop_table tbody th,
.ih-store table.shop_table tbody td,
.ih-store table.shop_table tfoot th,
.ih-store table.shop_table tfoot td {
  border-top: 1px solid hsl(var(--ih-border));
}

.ih-store table.shop_table tbody tr:first-child th,
.ih-store table.shop_table tbody tr:first-child td { border-top: 0; }

.ih-store table.shop_table thead + tbody tr:first-child th,
.ih-store table.shop_table thead + tbody tr:first-child td { border-top: 1px solid hsl(var(--ih-border)); }

.ih-store table.shop_table tfoot th {
  color: hsl(var(--ih-muted-foreground));
  font-weight: 500;
}

.ih-store table.shop_table tfoot tr:last-child th,
.ih-store table.shop_table tfoot tr:last-child td {
  color: hsl(var(--ih-foreground));
  font-weight: 600;
}

.ih-store .amount { font-variant-numeric: tabular-nums; }

.ih-store .price del,
.ih-store del .amount { color: hsl(var(--ih-muted-foreground)); font-weight: 400; }
.ih-store ins { text-decoration: none; }

.ih-store .woocommerce-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 24px;
  color: hsl(var(--ih-muted-foreground));
  font-size: 13px;
}

.ih-store .woocommerce-breadcrumb a { color: hsl(var(--ih-muted-foreground)); }
.ih-store .woocommerce-breadcrumb a:hover { color: hsl(var(--ih-foreground)); text-decoration: none; }

.ih-store .woocommerce-pagination { margin-top: 32px; }

.ih-store .woocommerce-pagination ul.page-numbers {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ih-store .woocommerce-pagination .page-numbers a,
.ih-store .woocommerce-pagination .page-numbers span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid hsl(var(--ih-border));
  border-radius: 6px;
  background-color: hsl(var(--ih-card));
  color: hsl(var(--ih-foreground));
  font-weight: 500;
  text-decoration: none;
}

.ih-store .woocommerce-pagination .page-numbers a:hover { background-color: hsl(var(--ih-accent)); }

.ih-store .woocommerce-pagination .page-numbers span.current {
  border-color: hsl(var(--ih-primary));
  background-color: hsl(var(--ih-primary));
  color: hsl(var(--ih-primary-foreground));
}

/* 8. Order details (confirmation page + account "view order") -- */

.ih-store .woocommerce-order-details,
.ih-store .woocommerce-customer-details { margin-top: 24px; }

.ih-store .woocommerce-order-details__title,
.ih-store .woocommerce-column__title,
.ih-store .woocommerce-order-downloads__title {
  margin-bottom: 12px;
  font-size: 15px;
}

.ih-store ul.order_details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

.ih-store ul.order_details li {
  padding: 16px;
  border: 1px solid hsl(var(--ih-border));
  border-radius: var(--ih-radius-lg);
  background-color: hsl(var(--ih-card));
  color: hsl(var(--ih-muted-foreground));
  font-size: 12px;
}

.ih-store ul.order_details li strong {
  display: block;
  margin-top: 4px;
  color: hsl(var(--ih-foreground));
  font-size: 15px;
  font-weight: 600;
  word-break: break-word;
}

.ih-store .woocommerce-columns--addresses {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.ih-store address {
  padding: 16px;
  border: 1px solid hsl(var(--ih-border));
  border-radius: var(--ih-radius-lg);
  background-color: hsl(var(--ih-card));
  font-style: normal;
  line-height: 1.7;
}

.ih-store address p { margin: 8px 0 0; }

.ih-store mark {
  background: none;
  color: inherit;
  font-weight: 600;
}

/* Responsive --------------------------------------------------- */

@media (max-width: 782px) {

  .admin-bar .ih-shell  { min-height: calc(100vh - 46px); }
}

@media (max-width: 768px) {
  :root { --ih-gutter: 16px; --ih-header-height: 56px; }

  .ih-page { padding-top: 24px; padding-bottom: 40px; }

  .ih-store .ih-page-header__title { font-size: 20px; }

  .ih-steps { gap: 8px; }
  .ih-steps__item + .ih-steps__item::before { width: 16px; margin-right: 0; }
  .ih-steps__item:not(.is-current) .ih-steps__label { display: none; }

  .ih-prose { padding: 20px; }

  /* Tables marked responsive by WooCommerce collapse into stacked rows;
     block layout keeps them inside the viewport. */
  .ih-store table.shop_table_responsive,
  .ih-store table.shop_table_responsive tbody { display: block; }

  .ih-store table.shop_table_responsive thead { display: none; }

  .ih-store table.shop_table_responsive tbody tr {
    display: block;
    padding: 8px 0;
    border-top: 1px solid hsl(var(--ih-border));
  }

  .ih-store table.shop_table_responsive tbody tr:first-child { border-top: 0; }

  .ih-store table.shop_table_responsive tbody th,
  .ih-store table.shop_table_responsive tbody td {
    display: block;
    padding: 8px 16px;
    border: 0 !important;
    overflow: hidden;
    text-align: right;
  }

  /* Row headers without a label (e.g. totals) repeat the cell's data-title. */
  .ih-store table.shop_table_responsive tbody th:not([data-title]) { display: none; }

  .ih-store table.shop_table_responsive tbody th::before,
  .ih-store table.shop_table_responsive tbody td::before {
    content: attr(data-title);
    float: left;
    margin-right: 16px;
    color: hsl(var(--ih-muted-foreground));
    font-weight: 500;
  }

  .ih-store table.shop_table_responsive tbody td[data-title=""]::before,
  .ih-store table.shop_table_responsive tbody td:not([data-title])::before { content: none; }
}

@media (max-width: 560px) {
  .ih-store .form-row-first,
  .ih-store .form-row-last {
    float: none;
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ih-store *,
  .ih-store *::before,
  .ih-store *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* Buy buttons (card "Comprar", product "Comprar agora", cart and checkout
   final buttons) take the buy colour instead of the store colour. */
:root .ih-store .ih-card-actions .ih-card-buy,
:root .ih-store .ih-page--product form.cart .ih-buy-now,
:root .ih-store .ih-page--product form.cart .single_add_to_cart_button:only-of-type,
:root .ih-store .wc-proceed-to-checkout .checkout-button,
:root .ih-store #place_order {
  border-color: hsl(var(--ih-buy));
  background-color: hsl(var(--ih-buy));
  color: hsl(var(--ih-buy-foreground));
}
