/**
 * EcommPaaS Porto V2 — Homepage Body Sections (iter16 / shared-header refactor)
 * Design inspired by Porto Demo 1. Own code, own class names.
 * Component prefix: .hp-  (homepage)
 *
 * Header components (promo bar, topbar, main header, nav) have been moved to
 * header-clean.css and are now rendered sitewide via default.xml.
 *
 * This file contains ONLY the homepage body sections (trust bar, layout,
 * sidebar, product panels) scoped under body.cms-home.
 *
 * Token variables (:root) are defined in header-clean.css which loads first.
 */

/* ============================================================
   0. LAYOUT GUARD — defeat Magento 2-column layout on /home URL
   The CMS page has page_layout=2columns-left in the database which
   injects a native .sidebar-main that competes with .hp-layout.
   The 2-column layout breaks the page to 3008px wide.
   cms_page_view_id_home.xml sets layout="1column" but that is
   overridden by the DB value — this CSS is the reliable fix.
   ============================================================ */
body.cms-home.page-layout-2columns-left .sidebar-main {
  display: none !important;
}

body.cms-home.page-layout-2columns-left .column.main {
  width: 100% !important;
  max-width: none !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Hide breadcrumb on /home — reference Porto Demo 1 homepage has no breadcrumb */
body.cms-home .breadcrumbs { display: none !important; }

/* ============================================================
   5. TRUST BAR
   ============================================================ */
body.cms-home .hp-trust-bar {
  background-color: transparent;
  border-top: 1px solid var(--hp-border);
  border-bottom: 1px solid var(--hp-border);
}

/* .hp-trust-bar is the phtml wrapper; .pt-trustbar is the CMS block rendered inside it.
   porto.css sets .pt-trustbar { background: #f4f4f4 } — override both to transparent
   so the reference white body background shows through on the homepage. */
body.cms-home .pt-trustbar { background: transparent; }

body.cms-home .hp-trust-bar__inner {
  max-width: var(--hp-max-width);
  margin: 0 auto;
  padding: 0 var(--hp-gap);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

/* R110: ref item height 59-61px with padding:12px. R111: gap 14px→12px (ref gap is 12px). */
body.cms-home .hp-trust-bar__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-right: 1px solid var(--hp-border);
}

body.cms-home .hp-trust-bar__item:last-child { border-right: none; }

body.cms-home .hp-trust-bar__icon {
  flex-shrink: 0;
  color: #444;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Porto icon font — font-face + scoped rules; porto-icons.woff2 is shipped with the theme
   but the @font-face and :before base rule were absent from porto.css */
@font-face {
  font-family: 'porto-icons';
  src: url('../fonts/porto-icons.woff2') format('woff2'),
       url('../fonts/porto-icons.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
body.cms-home [class^=porto-icon-]:before,
body.cms-home [class*=" porto-icon-"]:before {
  font-family: 'porto-icons';
  font-style: normal;
  font-weight: 400;
  speak: none;
  display: inline-block;
  text-align: center;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
/* Trust bar icon glyphs (codepoints from Porto icon font) */
body.cms-home .porto-icon-shipping:before { content: '\e80e'; }
body.cms-home .porto-icon-money:before { content: '\e80c'; }
body.cms-home .porto-icon-support:before { content: '\e80f'; }

/* Size and colour for porto-icon elements inside trust bar icon container.
   R143: 36px → 37px to match Porto Demo 1 reference (getComputedStyle font-size: 37px).
   R157b: Reference HTML uses per-icon inline sizes — shipping:35px, money:37px, support:37px.
   Default is 37px; shipping needs a specific 35px override. */
body.cms-home .hp-trust-bar__icon i[class*="porto-icon-"] {
  font-size: 37px;
  color: #222529;
  line-height: 1;
}

body.cms-home .hp-trust-bar__icon i.porto-icon-shipping {
  font-size: 35px;
}

/* R113: add line-height:1.2 to both lines (was ~1.6 inherited).
   R157b: Reference inline style for trust bar title is line-height:1 — update to match.
   Reference: font-weight:700; font-size:14px; line-height:1. */
body.cms-home .hp-trust-bar__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--hp-text);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 2px;
  line-height: 1;
}

/* R75: reference HTML: `font-weight:300; font-size:13px` (inline style on porto-sicon p element) */
body.cms-home .hp-trust-bar__sub {
  font-size: 13px;
  font-weight: 300;
  color: var(--hp-text-light);
  line-height: 1.2;
}

/* ============================================================
   6. LAYOUT (2-column: sidebar + main)
   ============================================================ */
body.cms-home .hp-layout {
  width: 100%;
  max-width: var(--hp-max-width);
  margin: 0 auto;
  padding: 24px var(--hp-gap);
  display: grid;
  grid-template-columns: var(--hp-sidebar-w) 1fr;
  gap: 24px;
  align-items: start;
}

body.cms-home .hp-sidebar { display: flex; flex-direction: column; gap: 16px; }
body.cms-home .hp-main { min-width: 0; display: flex; flex-direction: column; gap: 24px; }

/* ============================================================
   7. SIDEBAR — BROWSE CATEGORIES
   ============================================================ */
body.cms-home .hp-sidebar-nav {
  border: 1px solid var(--hp-border);
  border-radius: var(--hp-radius);
  overflow: hidden;
}

/* R98: Porto Demo 1 reference (computed) = bg:#f5f5f5, color:#222529, 15px/700, padding 14px 28px.
   R99: !important needed — porto.css L18970 `h3 { font-weight: 600 !important }` beats any
   non-!important rule regardless of specificity. With both carrying !important, our higher
   specificity (0,2,1 vs 0,0,1) wins. */
body.cms-home .hp-sidebar-nav__heading {
  background: #f5f5f5;
  color: #222529;
  font-size: 15px;
  font-weight: 700 !important;
  letter-spacing: 0;
  text-transform: uppercase;
  padding: 14px 28px;
  margin: 0;
}

body.cms-home .hp-sidebar-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

body.cms-home .hp-sidebar-nav__list li {
  border-bottom: 1px solid var(--hp-border);
}

body.cms-home .hp-sidebar-nav__list li:last-child { border-bottom: none; }

/* R98: ref catLink = 14px/500. Previous was 13px/400 (under-specified). */
body.cms-home .hp-sidebar-nav__list a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  color: #555 !important; /* porto.css `body .page-main a:not(...)` chain wins at (0,6,2) without !important */
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

body.cms-home .hp-sidebar-nav__list a:hover {
  background: var(--hp-blue-light);
  color: var(--hp-blue) !important; /* must match !important on base rule */
}

/* Trailing chevron — direct SVG child of <a> — pushed to far right */
body.cms-home .hp-sidebar-nav__list a > svg {
  color: var(--hp-text-light);
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  margin-left: auto;
}

/* Prefix icon wrapper — icon+text remain adjacent via gap: 6px on <a> */
body.cms-home .hp-sidebar-nav__list .hp-sidebar-nav__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  flex-shrink: 0;
}
body.cms-home .hp-sidebar-nav__list .hp-sidebar-nav__icon svg {
  width: 16px;
  height: 16px;
  color: var(--hp-text-light); /* use shared token, not hardcoded #888 */
}

/* ============================================================
   8. SIDEBAR — SALE BOX (Porto Demo 1 match: badge image + large discount text)
   ============================================================ */
body.cms-home .hp-sidebar-sale {
  border: 1px solid #e7e7e7;
  border-radius: 2px;
  padding: 20px 30px 16px;
  text-align: center;
  background: #fff;
}

/* Badge image replaces blue circle */
body.cms-home .hp-sidebar-sale__badge-img {
  display: block;
  width: 113px;
  height: 113px;
  margin: 0 auto 14px;
}

/* Discount wrap — centers the inline-block discount number */
body.cms-home .hp-sidebar-sale__discount-wrap {
  text-align: center;
  margin-bottom: 10px;
}

/* Large 70px discount number — matches Porto Demo 1 porto-sicon-title scale.
   Uses div (not h3) to avoid porto.css global h3 !important font-size overrides. */
body.cms-home .hp-sidebar-sale__discount {
  font-family: Poppins, sans-serif;
  font-size: 70px !important;
  font-weight: 700 !important;
  color: #222529 !important;
  line-height: 1 !important;
  letter-spacing: -0.05em;
  position: relative;
  display: inline-block;
  margin: 0 !important;
}

/* Rotated "UP TO" label — absolute, left of number, matches reference small element */
body.cms-home .hp-sidebar-sale__up-to {
  position: absolute;
  left: -21px;
  bottom: 32px;
  font-size: 10px;
  font-family: "Open Sans", sans-serif;
  font-weight: 700;
  color: #777;
  opacity: 0.6;
  transform: rotateZ(-90deg);
  letter-spacing: normal;
  white-space: nowrap;
  display: block;
}

/* Superscript "%" */
body.cms-home .hp-sidebar-sale__pct {
  font-weight: 700;
  font-size: 60%;
  letter-spacing: normal;
  vertical-align: super;
}

/* "off" sub-label — absolute, lower-right of number, matches reference sub element */
body.cms-home .hp-sidebar-sale__off {
  font-family: Poppins, sans-serif;
  font-size: 16px;
  text-transform: uppercase;
  font-weight: 700;
  position: absolute;
  right: 0;
  bottom: 7px;
  line-height: 1.4em;
  letter-spacing: normal;
}

body.cms-home .hp-sidebar-sale__desc {
  font-family: Poppins, sans-serif;
  font-size: 11px;
  color: var(--hp-text-light);
  margin-bottom: 14px;
  letter-spacing: -0.025em;
}

body.cms-home .hp-sidebar-sale__btn {
  display: inline-block;
  background: var(--hp-text);
  color: #fff !important; /* porto.css body .column.main a:not(.action) rule wins at (0,9,2); !important needed */
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  padding: 0.75em 2.25em;
  border-radius: 0;
  text-decoration: none;
  transition: background 0.2s;
}

body.cms-home .hp-sidebar-sale__btn:hover { background: var(--hp-blue); color: #fff !important; }

body.cms-home .hp-sidebar-sale__dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
  padding-bottom: 4px;
}

body.cms-home .hp-sidebar-sale__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--hp-border);
}

body.cms-home .hp-sidebar-sale__dot--active { background: var(--hp-blue); }

/* ============================================================
   9. SIDEBAR — NEWSLETTER
   ============================================================ */
/* R105: Porto Demo 1 ref .sidebar-content .box-newsletter { background:#f4f4f4 } (no border).
   Our white+border differs visually from the reference gray box. Match reference. */
body.cms-home .hp-sidebar-newsletter {
  border: none;
  border-radius: 0;
  padding: 20px 16px;
  background: #f4f4f4;
}

/* R103: ref "Subscribe Newsletter" h3 is 15px (Browse Categories is also 15px/700). Was 13px. */
body.cms-home .hp-sidebar-newsletter__heading {
  font-size: 15px;
  font-weight: 700 !important; /* porto.css L18970: h3 { fw:600 !important } — same override needed */
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--hp-text);
  margin: 0 0 8px;
}

body.cms-home .hp-sidebar-newsletter__sub {
  font-size: 12px;
  color: var(--hp-text-light);
  margin-bottom: 14px;
}

body.cms-home .hp-sidebar-newsletter__form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* R104: ref sidebar newsletter input is pill-shaped (30px radius), no border, 48px height,
   background #fff. paddingLeft 22px (ref has 40px for an icon we don't have). */
body.cms-home .hp-sidebar-newsletter__form input {
  border: none;
  border-radius: 30px;
  height: 48px;
  padding: 0 16px 0 40px;
  font-size: 13px;
  color: var(--hp-text);
  background: #fff;
  outline: none;
  width: 100%;
  box-sizing: border-box;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

body.cms-home .hp-sidebar-newsletter__form input:focus {
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

/* R104: ref input is pill (30px). R109: ref button is flat (0px) — distinct from input. */
body.cms-home .hp-sidebar-newsletter__form button {
  background: var(--hp-blue);
  color: #fff;
  border: none;
  border-radius: 0;
  height: 44px;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s;
  width: 100%;
}

body.cms-home .hp-sidebar-newsletter__form button:hover { background: var(--hp-blue-dark); }

/* ============================================================
   10. HERO BANNER
   ============================================================ */
/* R75: reference slide min-height is 428px (inline style on slider element) */
/* R179: 3-slide carousel wrapper. Background is on each .hp-hero__slide, not the wrapper. */
body.cms-home .hp-hero {
  border-radius: var(--hp-radius);
  overflow: hidden;
  position: relative;
  background: none !important; /* slides carry their own backgrounds */
  min-height: 428px;
  display: block;
}

/* Sliding track — 300% wide so each of 3 slides occupies 1/3 */
body.cms-home .hp-hero__track {
  display: flex;
  width: 300%;
  min-height: 428px;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

/* Each slide: 1/3 of track = 100% viewport width of the hero */
body.cms-home .hp-hero__slide {
  flex: 0 0 calc(100% / 3);
  min-height: 428px;
  display: flex;
  align-items: stretch;
  background-size: cover !important;
  background-position: center center !important;
}

body.cms-home .hp-hero__content {
  flex: 1;
  padding: 40px 40px 40px 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  z-index: 1;
  max-width: 55%;
  /* Porto Demo 1 has no overlay on content column */
}

/* Light slides (2 & 3): dark text on light background */
body.cms-home .hp-hero__slide--light .hp-hero__subtitle {
  color: rgba(34,37,41,0.7) !important;
}
body.cms-home .hp-hero__slide--light .hp-hero__title {
  color: #222529 !important;
}
body.cms-home .hp-hero__slide--light .hp-hero__cta {
  background: #0088cc;
  border-color: #0088cc;
  color: #fff !important;
}
body.cms-home .hp-hero__slide--light .hp-hero__cta:hover {
  background: transparent;
  color: #0088cc !important;
  border-color: #0088cc;
}

body.cms-home .hp-hero__subtitle {
  font-size: 22px; /* Porto Demo 1 slide-1 subtitle = 1.54em×14px = 21.56px */
  font-weight: 500;
  color: rgba(255,255,255,0.7) !important; /* porto.css overrides paragraph color #777 !important */
  letter-spacing: 1.12px; /* R179: Porto ls-80 class = 0.08em×14px = 1.12px; was 0.5px */
  margin-bottom: 8px;
}

body.cms-home .hp-hero__title {
  font-size: 61px; /* R178: Porto Demo 1 slide-1 title = 4.375em×14px = 61.25px; was 44px */
  font-weight: 700;
  color: #fff !important; /* porto.css: html body p { color: #777 !important } beats without !important */
  font-style: normal;
  line-height: 1.1;
  margin-bottom: 12px;
}

/* R73: Segoe Script is a script typeface — font-style:normal; the script appearance is
   intrinsic to the letterforms. Reference Porto Demo 1 uses font-weight:700 (bold). */
body.cms-home .hp-hero__title em {
  font-style: normal;
  font-family: "Segoe Script", "Savoye LET", cursive;
  font-weight: 700;
}

body.cms-home .hp-hero__discount {
  font-size: 106px; /* R178: Porto Demo 1 slide-1 discount = 7.6em×14px = 106.4px; was 64px */
  font-weight: 700;
  color: #fff !important; /* porto.css paragraph override */
  line-height: 1;
  margin-bottom: 16px;
  letter-spacing: -2px;
}

body.cms-home .hp-hero__starting {
  font-size: 11px;
  color: rgba(255,255,255,0.7) !important; /* porto.css paragraph override */
  letter-spacing: 1px;
  text-transform: uppercase;
}

body.cms-home .hp-hero__price-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

body.cms-home .hp-hero__price {
  background: #ffcc00;
  color: var(--hp-text);
  font-size: 22px;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: var(--hp-radius);
  line-height: 1;
}

body.cms-home .hp-hero__price sup { font-size: 12px; vertical-align: super; }

body.cms-home .hp-hero__cta {
  display: inline-block;
  background: #222529;
  color: #fff !important;
  border: 2px solid #222529;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 11px 26px;
  border-radius: 0;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  align-self: flex-start;
}

body.cms-home .hp-hero__cta:hover { background: transparent; color: #222529 !important; border-color: #222529; }

/* R177: Hide right-side product overlay — promo-slide-1 is full-bleed so the
   disconnected chair image (hero-slide-2.jpg) is no longer needed. */
body.cms-home .hp-hero__image {
  display: none !important;
}

/* R166: Porto OWL carousel dots use left:5.5% (percentage) not a fixed pixel value.
   At 1140px container 5.5% ≈ 63px vs our previous 48px. Match reference responsive positioning. */
body.cms-home .hp-hero__dots {
  position: absolute;
  bottom: 2rem;
  left: 5.5%;
  display: flex;
  gap: 8px;
}

body.cms-home .hp-hero__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: transparent;
  border: 2px solid #222529; /* R178: Porto owl-dots use dark #222529 border to match reference */
  cursor: pointer;
  padding: 0;
}

/* R178: Porto owl-dot active = filled dark circle */
body.cms-home .hp-hero__dot--active { background: #222529; border-color: #222529; }
/* R181: Porto hero uses nav:false (dots-only). No prev/next arrows. Arrow CSS removed. */

/* ============================================================
   11. SALE TILES (3-column row below hero) — Porto Demo 1 style
   190px full-image banner tiles matching .home-ads reference
   ============================================================ */
body.cms-home .hp-sale-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--hp-border);
  border-radius: var(--hp-radius);
  overflow: hidden;
}

/* R163: reference min-height is 170px (was 190px) */
body.cms-home .hp-sale-tile {
  position: relative;
  display: block;
  height: 170px;
  border-right: 1px solid var(--hp-border);
  text-decoration: none;
  overflow: hidden;
}

body.cms-home .hp-sale-tile:last-child { border-right: none; }

/* Full-height background image — covers the entire tile */
body.cms-home .hp-sale-tile__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

body.cms-home .hp-sale-tile:hover .hp-sale-tile__img {
  transform: scale(1.04);
}

/* Text overlay — sits above the image.
   R163: reference has no dark scrim — removed background overlay. */
body.cms-home .hp-sale-tile__text {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  padding: 20px 22px;
  background: transparent;
}

body.cms-home .hp-sale-tile__name {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  display: block;
  margin-bottom: 4px;
  line-height: 1.15;
}

body.cms-home .hp-sale-tile__discount {
  font-size: 15px;
  font-weight: 800;
  color: #ff6b6b;
  display: block;
  line-height: 1.2;
  margin-bottom: 2px;
}

body.cms-home .hp-sale-tile__old {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.75);
  display: block;
  margin-bottom: 2px;
}

body.cms-home .hp-sale-tile__badges {
  display: flex;
  gap: 5px;
  margin-bottom: 6px;
  flex-wrap: nowrap;
}

body.cms-home .hp-sale-tile__badge {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #222529;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  white-space: nowrap;
}

body.cms-home .hp-sale-tile__cta {
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  display: block;
  margin-top: 8px;
}

/* ============================================================
   12. FEATURED PRODUCTS
   ============================================================ */
body.cms-home .hp-featured {
  display: block;
}

/* R173: Match Porto Demo 1 .section-title.slider-title pattern —
   title text + horizontal gray line filling remaining width.
   Nav buttons hidden: static grid has no carousel to drive. */
body.cms-home .hp-featured__header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin: 30px 0 20px;
  padding-bottom: 0;
  border-bottom: none;
}

/* Decorative line fills remaining space after title — matches .section-title .line */
body.cms-home .hp-featured__header::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--hp-border);
}

body.cms-home .hp-featured__title {
  flex: 0 0 auto;
  font-size: 20px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--hp-text);
  letter-spacing: normal;
  margin: 0;
}

body.cms-home .hp-featured__nav { display: none; }

/* R140: Featured Products — 5 cards matching Porto Demo 1 reference (was 4) */
body.cms-home .hp-featured__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}
@media (max-width: 1024px) {
  body.cms-home .hp-featured__grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 768px) {
  body.cms-home .hp-featured__grid { grid-template-columns: repeat(2, 1fr); }
}

body.cms-home .hp-featured-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--hp-text);
  border: none;
  overflow: hidden;
  transition: box-shadow 0.2s;
}

body.cms-home .hp-featured-card:hover { box-shadow: 0 2px 12px rgba(0,0,0,0.1); }

body.cms-home .hp-featured-card__img-wrap {
  background: var(--hp-bg-grey);
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

body.cms-home .hp-featured-card__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

body.cms-home .hp-featured-card__body {
  padding: 10px 12px;
}

body.cms-home .hp-featured-card__name-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 4px;
  margin-bottom: 4px;
}

body.cms-home .hp-featured-card__name-row .hp-featured-card__name {
  margin-bottom: 0;
}

body.cms-home .hp-featured-card__wish {
  color: #c8c8c8;
  flex-shrink: 0;
  line-height: 1;
  display: block;
}
body.cms-home .hp-featured-card__wish svg { display: block; }
body.cms-home .hp-featured-card:hover .hp-featured-card__wish { color: #e74c3c; }

body.cms-home .hp-featured-card__stars {
  color: #c8c8c8;
  font-size: 11px;
  letter-spacing: 2px;
  margin-bottom: 5px;
  display: block;
}

/* R102: Demo 1 product-item-link is 15px sitewide. R101 was 14px — corrected. */
body.cms-home .hp-featured-card__name {
  font-size: 15px;
  font-weight: 400;
  color: var(--hp-text);
  margin-bottom: 4px;
  line-height: 1.3;
}

/* R98: ref featured price fontWeight=600. Previous was 700 (over-specified, same fix as R86 category). */
body.cms-home .hp-featured-card__price {
  font-size: 14px;
  font-weight: 600;
  color: #444; /* ref: rgb(68,68,68) — prices are gray, not blue */
}

/* Let porto.css product grid cards render as-is inside .hp-featured */
body.cms-home .hp-featured .products.product-grid { margin: 0; }

/* ============================================================
   13. BRANDS ROW
   ============================================================ */
/* R166: Porto Demo 1 .porto-brand.mb-4 uses only border-top/border-bottom (no left/right, no radius).
   Full box border was wrong — reference spans full-width as a divider strip, not a card. */
body.cms-home .hp-brands {
  border-top: 1px solid var(--hp-border);
  border-bottom: 1px solid var(--hp-border);
  padding: 2rem 0;
  background: var(--hp-bg);
}

body.cms-home .hp-brands__inner {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: var(--hp-gap);
}

body.cms-home .hp-brands__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  transition: opacity 0.2s;
}

body.cms-home .hp-brands__logo:hover { opacity: 0.7; }

body.cms-home .hp-brands__logo img {
  max-height: 48px;
  max-width: 120px;
  object-fit: contain;
  display: block;
  height: auto;
}

/* ============================================================
   14. PRODUCT TABS — 3 static columns side by side (Fix 7)
   No JS tab-switching: Top Rated | Best Selling | Latest shown simultaneously
   R163: removed outer border (reference has no box around the 3-col section)
   ============================================================ */
body.cms-home .hp-product-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: none;
  border-radius: 0;
  overflow: hidden;
  background: var(--hp-bg);
}

/* R163: removed column border — reference uses grid gutter only for separation */
body.cms-home .hp-product-tabs__col {
  border-right: none;
}

body.cms-home .hp-product-tabs__col:last-child { border-right: none; }

/* R163: 20px matches reference Porto h2 default (~20px) — was 16px */
body.cms-home .hp-product-tabs__col-heading {
  font-size: 20px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: normal;
  color: var(--hp-text);
  padding: 13px 16px 15px;
  border-bottom: none;
  background: transparent;
}

body.cms-home .hp-product-tabs__list {
  list-style: none;
  margin: 0;
  padding: 0 16px;
}

body.cms-home .hp-product-tabs__list li { margin: 0; padding: 0; }

/* Product list inside columns: small horizontal cards */
body.cms-home .hp-product-tabs .hp-tab-product {
  display: flex;
  align-items: center;
  gap: 20px; /* R175: Porto custom.css small-list photo margin-right:20px */
  padding: 10px 0;
  border-bottom: 1px solid var(--hp-border);
  text-decoration: none;
  color: var(--hp-text);
}

body.cms-home .hp-product-tabs__list li:last-child .hp-tab-product { border-bottom: none; }

/* R175: Porto custom.css small-list photo is flex:0 0 84px (not 60px).
   width="150" in img tag is server-cache resolution for retina; CSS constrains display to 84px. */
body.cms-home .hp-product-tabs .hp-tab-product__img {
  flex: 0 0 84px;
  width: 84px;
  height: 84px;
  object-fit: cover;
  border-radius: var(--hp-radius);
  background: var(--hp-bg-grey);
  display: block;
}

/* R102: Demo 1 product-item-link is 15px sitewide. Was 14px (R101). */
body.cms-home .hp-product-tabs .hp-tab-product__name {
  font-size: 15px;
  color: var(--hp-text);
  margin-bottom: 4px;
  display: block;
  line-height: 1.3;
}

body.cms-home .hp-product-tabs .hp-tab-product__name:hover { color: var(--hp-blue); }

body.cms-home .hp-product-tabs .hp-tab-product__price {
  font-size: 14px;
  font-weight: 700;
  color: #444; /* ref: rgb(68,68,68) — prices are gray, not blue */
}

body.cms-home .hp-product-tabs .hp-tab-product__price-old {
  font-size: 12px;
  color: var(--hp-text-light);
  text-decoration: line-through;
  margin-right: 4px;
}

/* ============================================================
   15. TESTIMONIAL + BLOG (2-column)
   ============================================================ */
body.cms-home .hp-testimonial-blog {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* R105: Porto Demo 1 ref sidebar-testimonials has border:3px solid #0188cc;border-radius:2px
   (inline style). #0188cc is one red-channel unit from Porto standard blue #0088cc — almost
   certainly a typo in the reference. Use var(--hp-blue) = #0088cc for token consistency. */
body.cms-home .hp-testimonial {
  border: 3px solid var(--hp-blue);
  border-radius: 2px;
  padding: 20px;
  background: var(--hp-bg);
}

/* R104: 14px body text. R107: porto.css `html body p{color:#777 !important}` always wins here.
   Both clone and reference render #777. Explicit !important to document the cascade. lh:1.2 correct. */
body.cms-home .hp-testimonial__body {
  font-size: 14px;
  color: #777 !important;
  line-height: 1.2;
  margin-bottom: 14px;
  font-style: italic;
}

body.cms-home .hp-testimonial__author {
  display: flex;
  align-items: center;
  gap: 12px;
}

body.cms-home .hp-testimonial__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--hp-bg-grey);
  flex-shrink: 0;
  display: block;
}

body.cms-home .hp-testimonial__name {
  font-size: 13px;
  font-weight: 700;
  color: var(--hp-text);
}

body.cms-home .hp-testimonial__role {
  font-size: 11px;
  color: var(--hp-text-light);
}

body.cms-home .hp-testimonial__dots {
  display: flex;
  gap: 6px;
  margin-top: 14px;
}

body.cms-home .hp-testimonial__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--hp-border);
}

body.cms-home .hp-testimonial__dot--active { background: var(--hp-blue); }

/* R152: Testimonial slider — 3 items in markup, only first visible (matches Porto Demo 1 3-item carousel).
   Dots are inside the first .hp-testimonial (inside the blue border box). Items 2+3 are
   hidden via sibling combinator. */
body.cms-home .hp-testimonial-slider .hp-testimonial ~ .hp-testimonial { display: none !important; }

/* R184: Blog moved to main content area — 3-column grid matching Porto Demo 1.
   Sidebar blog slider (hp-blog-slider) removed; hp-blog-main is the new wrapper. */
body.cms-home .hp-blog-main {
  margin: 0 0 24px;
}

body.cms-home .hp-blog-main__header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin: 30px 0 20px;
}

/* Decorative line matching .hp-featured__header pattern */
body.cms-home .hp-blog-main__header::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--hp-border);
}

body.cms-home .hp-blog-main__title {
  flex: 0 0 auto;
  font-size: 20px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--hp-text);
  letter-spacing: normal;
  margin: 0;
}

body.cms-home .hp-blog-main__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* All 3 blog teasers visible in main grid */
body.cms-home .hp-blog-main .hp-blog-teaser {
  margin-bottom: 0;
}

body.cms-home .hp-blog-teaser {
  border: 1px solid var(--hp-border);
  border-radius: var(--hp-radius);
  overflow: hidden;
  background: var(--hp-bg);
  margin-bottom: 20px;
}

body.cms-home .hp-blog-teaser__img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
  background: var(--hp-bg-grey);
}

/* Image wrapper provides position:relative context for the date badge overlay */
body.cms-home .hp-blog-teaser__img-wrap { position: relative; display: block; }

/* Porto-style date badge: dark 45×47px box overlaid top-left of image */
body.cms-home .hp-blog-teaser .post-date {
  position: absolute;
  top: 10px;
  left: 20px;
  width: 45px;
  background: rgb(34, 37, 41);
  text-align: center;
  z-index: 1;
}
body.cms-home .hp-blog-teaser .post-date .day {
  display: block;
  font-size: 18px;
  font-weight: 700;
  line-height: 18px;
  color: #fff;
  text-transform: none;
  padding-top: 9px;
}
body.cms-home .hp-blog-teaser .post-date .month {
  display: block;
  font-size: 11px;
  font-weight: 400;
  line-height: 11px;
  color: #fff;
  text-transform: uppercase;
  padding-bottom: 9px;
}

body.cms-home .hp-blog-teaser__body { padding: 16px; }

body.cms-home .hp-blog-teaser__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--hp-text);
  text-decoration: none;
  display: block;
  margin-bottom: 8px;
  line-height: 1.4;
  transition: color 0.2s;
}

body.cms-home .hp-blog-teaser__title:hover { color: var(--hp-blue); }

body.cms-home .hp-blog-teaser__excerpt {
  font-size: 12px;
  color: var(--hp-text-light);
  line-height: 1.6;
  margin-bottom: 12px;
}

body.cms-home .hp-blog-teaser__link {
  font-size: 12px;
  font-weight: 700;
  color: var(--hp-blue);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

body.cms-home .hp-blog-teaser__link:hover { color: var(--hp-blue-dark); }

/* ============================================================
   16. INFO CARDS (Customer Support / Secured Payment / Returns)
   ============================================================ */
/* R173: Add separator above info cards matching porto-separator <hr> before trust bar in reference */
body.cms-home .hp-info-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 8px 0 8px;
  margin-top: 16px;
  border-top: 1px solid #e7e7e7;
}

/* Info cards — Porto reference uses borderless layout (no card box, no shadow).
   Cards just have icon, headings, and text in a flex column with right-side dividers. */
body.cms-home .hp-info-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px 16px;
  border: none;
  border-radius: 0;
  background: transparent;
}

/* Vertical divider between cards (reference style — thin grey line, except after last) */
body.cms-home .hp-info-card + .hp-info-card {
  border-left: 1px solid var(--hp-border);
}

body.cms-home .hp-info-card:hover { box-shadow: none; }

/* R163: 80px matches reference (was 72px); transparent bg (reference has no fill) */
body.cms-home .hp-info-card__icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: transparent;
  border: 2px solid var(--hp-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--hp-blue);
  margin-bottom: 14px;
}

body.cms-home .hp-info-card__icon svg { width: 32px; height: 32px; }

/* R163: 1rem (14px) matches reference — was 16px */
body.cms-home .hp-info-card__title {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--hp-text);
  margin-bottom: 6px;
}

body.cms-home .hp-info-card__sub {
  font-size: 12px;
  font-weight: 600;
  color: #555; /* ref: rgb(85,85,85) — service subtitles are dark gray, not blue */
  margin-bottom: 8px;
}

body.cms-home .hp-info-card__desc {
  font-size: 12px;
  color: var(--hp-text-light);
  line-height: 1.6;
}

/* ============================================================
   WRAPPER (full-width sections outside .hp-layout)
   ============================================================ */
body.cms-home .hp-section-full {
  width: 100%;
}

body.cms-home .hp-section-inner {
  max-width: var(--hp-max-width);
  margin: 0 auto;
  padding: 0 var(--hp-gap);
}

/* ============================================================
   PORTO.CSS OVERRIDES (only where needed to prevent legacy cascade)
   ============================================================ */
/* Prevent porto.css from hiding our hp-layout-contained content.
   body.cms-home matches both / (cms-index-index) and /home (cms-page-view)
   since both routes serve the home CMS page and get the cms-home body class. */
body.cms-home .page-main { padding: 0 !important; }
body.cms-home .page-wrapper { overflow-x: hidden; }

body.cms-home .columns { max-width: none; padding: 0; }
body.cms-home .column.main { padding: 0; }

/* === iter19 layout-width ===
   Magento blank theme sets max-width on .page-main / .columns / .column.main
   which squeezes the homepage to ~943px leaving empty whitespace on the right.
   Override those rules so .hp-layout can own its own 1200px centering.
*/
body.cms-home .page-main,
body.cms-home .columns,
body.cms-home .column.main {
  max-width: none !important;
  width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  box-sizing: border-box;
}

body.cms-home .hp-layout {
  max-width: 1200px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

/* Full-viewport bars — these must span 100% of viewport width, not be constrained */
body.cms-home .hp-promo-bar,
body.cms-home .hp-topbar,
body.cms-home .hp-header,
body.cms-home .hp-nav,
body.cms-home .hp-trust-bar {
  width: 100% !important;
  max-width: none !important;
}
/* === end iter19 layout-width === */
/* iter19 cache-trigger touch — force docker-build.yml to use push cache */
/* hung-build cancel + retry Wed Apr 29 18:56:27 CEST 2026 */

/* ============================================================
   R39 — Homepage parity fixes
   ============================================================ */

/* Featured Products card price: R39 audit found clone=14px, reference=18px.
   The homepage featured section uses .hp-featured-card__price (custom template),
   not the standard porto .price class — so we target the custom class here. */
body.cms-home .hp-featured-card__price {
    font-size: 18px !important;
}

/* R175: At ≤768px the 2-col layout (285px sidebar + 1fr main) makes each product-tabs
   column too narrow for 84px+20px cards. Revert to 60px/12px for mobile. */
@media (max-width: 768px) {
  body.cms-home .hp-product-tabs .hp-tab-product {
    gap: 12px;
  }
  body.cms-home .hp-product-tabs .hp-tab-product__img {
    flex: 0 0 60px;
    width: 60px;
    height: 60px;
  }
}

