/* ==========================================================================
   ICRUSH — static pages, 404, search
   ========================================================================== */

.ic-page-content {
  padding-block: 2.5rem 5rem;
}

.ic-page-content__title {
  margin: 0 0 2rem;
  font-family: var(--ic-font-heading);
  font-weight: 700;
  font-size: 40px;
  line-height: 1.1;
  letter-spacing: .02em;
}

@media screen and (max-width: 699px) {
  .ic-page-content__title {
    font-size: 30px;
  }
}

.ic-page-content__body {
  max-width: 50rem; /* ~800px reading width for legal pages */
  margin-inline: auto;
  color: rgb(var(--ic-text) / .82);
  font-size: var(--ic-text-base);
  line-height: 1.7;
}

.ic-page-content__body > * + * {
  margin-top: 1.25rem;
}

.ic-page-content__body h2,
.ic-page-content__body h3 {
  margin-top: 2rem;
  color: rgb(var(--ic-text));
}

.ic-page-content__body h2 {
  font-size: var(--ic-text-h3);
}

.ic-page-content__body h3 {
  font-size: var(--ic-text-h4);
}

.ic-page-content__body ul,
.ic-page-content__body ol {
  padding-inline-start: 1.5rem;
}

.ic-page-content__body a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ic-page-content__body table {
  width: 100%;
  border-collapse: collapse;
}

.ic-page-content__body th,
.ic-page-content__body td {
  padding: .6rem .75rem;
  border: 1px solid rgb(var(--ic-border));
  text-align: start;
}

/* 404 */
.ic-404 {
  padding-block: 4rem 6rem;
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 1rem;
}

.ic-404__code {
  margin: 0;
  font-size: 96px;
  line-height: 1;
  letter-spacing: .08em;
  color: rgb(var(--ic-text) / .12);
}

.ic-404__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  justify-content: center;
  margin-block: 1rem;
}

.ic-404 .search-form {
  display: flex;
  gap: .5rem;
  width: 100%;
  max-width: 28rem;
}

.ic-404 .search-form input[type="search"] {
  flex: 1 1 auto;
}

/* search page */
.ic-search-page {
  padding-block: 2.5rem 5rem;
}

.ic-search-page .ic-collection__grid {
  margin-block-start: 2rem;
}

.ic-search-page__item {
  grid-column: 1 / -1;
  padding-block: 1rem;
  border-block-end: 1px solid rgb(var(--ic-border));
}

/* account page */
.woocommerce-account .woocommerce-MyAccount-navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .5rem;
}

.woocommerce-account .woocommerce-MyAccount-navigation a {
  color: rgb(var(--ic-text) / .7);
}

.woocommerce-account .woocommerce-MyAccount-content {
  color: rgb(var(--ic-text) / .82);
}

/* ==========================================================================
   Cookie banner (local only)
   ========================================================================== */

.ic-cookie {
  position: fixed;
  inset-inline: 0;
  inset-block-end: 0;
  z-index: 870;
  width: 100%;
  background: rgb(var(--ic-text));
  color: #fff;
  padding: .9rem var(--ic-gutter);
  box-shadow: 0 -6px 24px rgb(0 0 0 / .18);
  pointer-events: none;
}

body.ic-cookie-open {
  padding-block-end: 88px;
}

.ic-cookie__inner,
.ic-cookie__actions,
.ic-cookie__text {
  pointer-events: auto;
}

.ic-cookie[hidden] { display: none !important; }

.ic-cookie__inner {
  max-width: var(--ic-container-lg);
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 1.5rem;
}

.ic-cookie__text {
  margin: 0;
  max-width: 46rem;
  font-size: 12px;
  line-height: 1.5;
  color: rgb(255 255 255 / .85);
}

.ic-cookie__text a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ic-cookie__actions {
  display: flex;
  gap: .5rem;
  flex: 0 0 auto;
}

.ic-cookie__actions .button {
  min-height: 40px;
  padding: .5rem 1.25rem;
  font-size: 12px;
  --ic-btn-bg: 255 255 255;
  --ic-btn-text: 28 28 28;
}

.ic-cookie__actions .button--outline {
  background: transparent;
  color: #fff;
  border-color: rgb(255 255 255 / .5);
}

.ic-cookie__actions .button--outline:hover {
  background: rgb(255 255 255 / .12);
  color: #fff;
}

@media screen and (max-width: 699px) {
  .ic-cookie {
    padding: .9rem 1rem;
  }

  .ic-cookie__text {
    font-size: 11px;
  }
}


/* Wide tables (shipping / legal pages) must never cause horizontal overflow. */
.ic-page-content__body {
  overflow-wrap: anywhere;
}

.ic-page-content__body table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media screen and (max-width: 699px) {
  .ic-page-content__body table,
  .ic-page-content__body tbody,
  .ic-page-content__body thead,
  .ic-page-content__body tr {
    display: block;
    width: 100%;
  }

  .ic-page-content__body th,
  .ic-page-content__body td {
    display: block;
    width: auto;
    border-width: 0 0 1px;
  }

  .ic-page-content__body tr {
    border-block-end: 1px solid rgb(var(--ic-border));
  }
}


/* Never let the consent banner sit above drawers/overlays. */
body.ic-layer-open .ic-cookie {
  display: none;
}
