/**
 * IAK site-wide UI — breadcrumbs, pagination, and add-to-cart toast.
 * Ported from the "B2B Redesign" prototype. Loaded on every page via
 * common/header.php so these three patterns look identical everywhere.
 *
 * Palette mirrors the prototype's iak-red tokens; dark mode remaps under
 * [data-theme="dark"] to the prototype's neutral-grey dark set.
 */
:root {
  --iakg-accent: #C13538;
  --iakg-accent-hover: #A1282B;
  --iakg-ink: #18181a;
  --iakg-ink-2: #2c2c2e;
  --iakg-mute: #848688;
  --iakg-line: #e6e2dc;
  --iakg-card: #ffffff;
  --iakg-toast-bg: #18181a;
  --iakg-toast-fg: #ffffff;
}
[data-theme="dark"] {
  --iakg-accent: #E0524F;
  --iakg-accent-hover: #F26B5F;
  --iakg-ink: #f5f5f7;
  --iakg-ink-2: #e4e4e7;
  --iakg-mute: #8a8a8e;
  --iakg-line: rgba(255,255,255,.14);
  --iakg-card: #1a1a1c;
  --iakg-toast-bg: #f5f5f7;
  --iakg-toast-fg: #18181a;
}

/* ── Breadcrumbs (site-wide, minimal prototype style) ── */
ul.breadcrumb {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  list-style: none;
  margin: 0 0 16px;
  padding: 0 !important;
  background: transparent !important;
  border-radius: 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--iakg-mute);
  text-transform: uppercase;
}
ul.breadcrumb > li { display: inline-flex; align-items: center; }
ul.breadcrumb > li,
ul.breadcrumb > li span { color: var(--iakg-mute); }
ul.breadcrumb > li a { color: var(--iakg-mute); text-decoration: none; transition: color .12s; }
ul.breadcrumb > li a:hover { color: var(--iakg-accent); text-decoration: none; }
/* Current page (last crumb) reads darker + medium weight */
ul.breadcrumb > li:last-child,
ul.breadcrumb > li:last-child span,
ul.breadcrumb > li:last-child a { color: var(--iakg-ink-2); font-weight: 500; }
/* Normalise the explicit separator glyph (some templates use ">", some "/") to "/" */
ul.breadcrumb > li .icon,
ul.breadcrumb > li .separator { color: #bdbdbf; margin: 0 8px; font-size: 0; }
ul.breadcrumb > li .icon::before,
ul.breadcrumb > li .separator::before { content: "/"; font-size: 12px; }
/* Bootstrap's default ::before separator — suppress so we don't double up */
ul.breadcrumb > li + li::before { content: none !important; }

/* ── Pagination (site-wide, standard OpenCart .pagination) ── */
/* Scoped to plain .pagination; the home featured module + account pages keep their own. */
.pagination {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.pagination > li > a,
.pagination > li > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 14px;
  /* border: 1px solid var(--iakg-line); */
  border-radius: 10px;
  background: var(--iakg-card) !important;
  color: var(--iakg-ink-2) !important;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none !important;
  transition: border-color .12s, color .12s, background .12s;
}
.pagination > li > a:hover {
  border-color: var(--iakg-accent);
  color: var(--iakg-accent) !important;
  background: var(--iakg-card) !important;
}
.pagination > li.active > span,
.pagination > li.active > span:hover {
  background: var(--iakg-accent) !important;
  border-color: var(--iakg-accent);
  color: #fff !important;
}
.pagination > li.disabled > span { opacity: .45; cursor: default; }
.pagination > li.page-ellipsis > span { cursor: default; color: var(--iakg-mute); letter-spacing: 1px; }
/* "Showing 1 to N of M" results line that usually sits beside the pager */
.results, .text-right .results { font-size: 13px; color: var(--iakg-mute); }

/* ── Add-to-cart toast ── */
/* When JS is on, common.js converts every server-rendered success banner into the
   bottom toast below. Hide the banner up-front so it never paints-then-vanishes
   (the "blink") in the gap before the deferred script runs. common.js still reads
   the hidden banner's text to build the toast. No-JS pages keep the banner visible. */
html.iak-js .alert-success { display: none !important; }

.iak-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--iakg-toast-bg);
  color: var(--iakg-toast-fg);
  padding: 12px 18px;
  border-radius: 12px;
  box-shadow: 0 14px 34px rgba(0,0,0,.28), 0 4px 10px rgba(0,0,0,.18);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  z-index: 100020;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100vw - 32px);
  animation: iakToastUp .25s cubic-bezier(.2,.7,.2,1);
}
.iak-toast__ico { flex-shrink: 0; }
.iak-toast--error { background: var(--iakg-accent); color: #fff; }
.iak-toast.is-leaving { opacity: 0; transform: translateX(-50%) translateY(8px); transition: opacity .2s, transform .2s; }
@keyframes iakToastUp {
  from { opacity: 0; transform: translateX(-50%) translateY(8px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ── Information page hero (About Us / Privacy / Terms / Delivery) ── */
.iak-page-hero {
  position: relative;
  background: rgb(20, 20, 22);
  overflow: hidden;
}
.iak-page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 120% at 85% -10%, rgba(193, 53, 56, 0.55), transparent 55%);
  pointer-events: none;
}
.iak-page-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(90% 90% at 0% 110%, rgba(246, 141, 80, 0.18), transparent 60%);
  pointer-events: none;
}
.iak-page-hero > .container {
  position: relative;
  padding-top: 64px;
  padding-bottom: 64px;
}
.iak-page-hero__label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgb(250, 179, 114);
  margin: 0 0 16px;
}
.iak-page-hero__title {
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  font-weight: 800;
  color: #fff;
  margin: 0;
  max-width: 820px;
}
.iak-page-hero__sub {
  font-size: 18px;
  line-height: 1.55;
  color: rgba(255,255,255,.72);
  margin: 18px 0 0;
  max-width: 620px;
}

/* ── About Us: floating stat cards (overlap hero bottom) ── */
.iak-stat-grid { position: relative; z-index: 2; }
.iak-stat-grid__row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: -56px;
}
.iak-stat-card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 6px 28px rgba(0,0,0,.10), 0 2px 6px rgba(0,0,0,.06);
}
[data-theme="dark"] .iak-stat-card { background: #1c1c1e; box-shadow: 0 6px 28px rgba(0,0,0,.4); }
.iak-stat-card__val {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #C13538;
  margin: 0 0 3px;
}
[data-theme="dark"] .iak-stat-card__val { color: #E0524F; }
.iak-stat-card__lbl { font-size: 13px; color: #848688; line-height: 1.4; }
[data-theme="dark"] .iak-stat-card__lbl { color: #8a8a8e; }

/* ── Information pages: article body with numbered sections ── */
.iak-about-body {
  max-width: 820px;
  margin: 0 auto;
  padding: 56px 32px 64px;
  display: flex;
  flex-direction: column;
  gap: 44px;
}
.iak-about-section__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.iak-about-section__num {
  font-size: 13px;
  font-weight: 500;
  color: #C13538;
  font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace;
}
[data-theme="dark"] .iak-about-section__num { color: #E0524F; }
.iak-about-section__title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
  color: #18181a;
  line-height: 1.15;
}
[data-theme="dark"] .iak-about-section__title { color: #f5f5f7; }
.iak-about-section__body { display: flex; flex-direction: column; gap: 16px; }
.iak-about-section__body p { font-size: 16px; line-height: 1.7; color: #505054; margin: 0; }
[data-theme="dark"] .iak-about-section__body p { color: #9a9a9e; }
.iak-about-section__body a { color: #C13538 !important; }
[data-theme="dark"] .iak-about-section__body a { color: #E0524F !important; }

/* ── Information pages: plain article (Terms / Privacy / Delivery fallback) ── */
.iak-info { max-width: 900px; margin: 0 auto; padding: 52px 32px 96px; }
.iak-info .page-breadcrumb { margin-bottom: 28px; }
.iak-info__title {
  font-size: 38px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--iakg-ink);
  margin: 0 0 28px;
  padding-bottom: 24px;
  border-bottom: 2px solid var(--iakg-line);
}
.iak-info__body { font-size: 16px; line-height: 1.75; color: var(--iakg-ink-2); }
.iak-info__body h2 { font-size: 22px; font-weight: 700; color: var(--iakg-ink); margin: 34px 0 12px; }
.iak-info__body h3 { font-size: 18px; font-weight: 700; color: var(--iakg-ink); margin: 24px 0 10px; }
.iak-info__body p { margin: 0 0 16px; }
.iak-info__body ul, .iak-info__body ol { margin: 0 0 16px; padding-left: 22px; }
.iak-info__body li { margin-bottom: 8px; }
.iak-info__body a { color: var(--iakg-accent) !important; text-decoration: none; }
.iak-info__body a:hover { text-decoration: underline; }
.iak-info__body strong, .iak-info__body b { color: var(--iakg-ink); font-weight: 700; }
.iak-info__body table { width: 100%; border-collapse: collapse; margin: 0 0 18px; font-size: 14.5px; }
.iak-info__body th, .iak-info__body td { border: 1px solid var(--iakg-line); padding: 10px 12px; text-align: left; }
.iak-info__body th { background: color-mix(in srgb, var(--iakg-ink) 4%, transparent); font-weight: 700; }

@media (max-width: 767px) {
  .iak-stat-grid__row { grid-template-columns: repeat(2, 1fr); }
  .iak-about-body { padding: 40px 20px 60px; gap: 32px; }
  .iak-about-section__title { font-size: 22px; }
}
@media (max-width: 479px) {
  .iak-page-hero > .container { padding-top: 40px; padding-bottom: 40px; }
  .iak-page-hero__title { font-size: 34px; }
  .iak-page-hero__sub { font-size: 15px; }
  .iak-stat-grid__row { grid-template-columns: 1fr 1fr; gap: 10px; margin-top: -40px; }
}

/* ── Wishlist heart: filled brand-red when the product is already saved ──
   .is-wishlisted is applied by iakMarkWishlisted() in common.js (on page load
   for already-wishlisted products, and immediately after a successful add). */
.wishlist-btn.is-wishlisted { color: var(--iak-brand-red, #a1282b); }
.wishlist-btn.is-wishlisted svg,
.wishlist-btn.is-wishlisted svg path {
  fill: var(--iak-brand-red, #a1282b);
  stroke: var(--iak-brand-red, #a1282b);
}

/* ============================================================
   Pagination — canonical, site-wide pager
   The markup (.shop-pagination > ul.pagination) is normalised to
   icon Prev/Next + ellipsis range + clickable "jump to page" by
   shop.js (loaded globally). These rules live here in the global
   sheet so every page that shows a pager is styled, not only the
   product-browse pages that load shop.css. shop.css carries an
   identical copy for the product pages; keep the two in sync.
   ============================================================ */
.shop-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 32px;
}
.shop-pagination.hidden,
.shop-pagination[style*="display: none"] {
    display: none !important;
}
.shop-pagination ul.pagination {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}
.shop-pagination ul.pagination li {
	display: flex;
	align-items: center;
	justify-content: center;
}
.shop-pagination ul.pagination li a,
.shop-pagination ul.pagination li span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #2c2c2e !important;
    text-decoration: none !important;
    font-family: "Public Sans";
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.shop-pagination ul.pagination li:hover {
    border-color: #C13538 !important;
}
.shop-pagination ul.pagination li:hover a,
.shop-pagination ul.pagination li:hover span {
    color: #C13538 !important;
}
.shop-pagination ul.pagination li.active {
    background: #C13538 !important;
    border-color: #C13538 !important;
}
.shop-pagination ul.pagination li.active span,
.shop-pagination ul.pagination li.active:hover span {
    color: #FFF !important;
}
.shop-pagination ul.pagination li.active:hover {
    background: #D13B27 !important;
    border-color: #D13B27 !important;
}

/* Icon-only Previous / Next buttons (SVG chevrons, square 40px) */
.shop-pagination ul.pagination li .iak-pg-ico {
    display: block;
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
}

/* Ellipsis — clickable "jump to page" */
.shop-pagination ul.pagination li.page-ellipsis { cursor: pointer; }
.shop-pagination ul.pagination li.page-ellipsis:hover { border-color: #C13538 !important; }
.shop-pagination ul.pagination li.page-ellipsis span { color: #848688 !important; letter-spacing: 1px; }
.shop-pagination ul.pagination li.page-ellipsis.is-editing { padding: 0; width: 56px; height: 36px; border-color: #C13538 !important; }
.shop-pagination ul.pagination li.page-ellipsis .iak-page-jump {
    width: 100%;
    height: 100%;
    border: 0;
    background: #fff;
    text-align: center;
    font-family: "Public Sans";
    font-size: 14px;
    font-weight: 600;
    color: #2c2c2e;
    outline: none;
    -moz-appearance: textfield;
    appearance: textfield;
	border-radius: 0.3125rem !important;
}
.shop-pagination ul.pagination li.page-ellipsis .iak-page-jump::-webkit-outer-spin-button,
.shop-pagination ul.pagination li.page-ellipsis .iak-page-jump::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

@media (max-width: 1200px) {
    .shop-pagination ul.pagination { gap: 0; }
    .shop-pagination ul.pagination li { min-width: 36px; height: 36px; padding: 0 10px; }
    .shop-pagination ul.pagination li.pagination-prev,
    .shop-pagination ul.pagination li.pagination-next,
    .shop-pagination ul.pagination li:has(.iak-pg-ico) { width: 36px; padding: 0; }
    .shop-pagination ul.pagination li.page-ellipsis.is-editing { width: 50px; }
}
