
/* ============================================================
   NELIK block (4-kaartlik grid, front-page-2026)
   ============================================================ */

/* Outer wrapper: horizontal padding from viewport edge */
.block-wrapper-nelik {
  box-sizing: border-box;
  padding: 0 20px;
}

/* Reduce gap between preceding section-heading block and nelik */
.block-wrapper + .block-wrapper-nelik {
  margin-top: -40px;
}

/* Editmode: preceding block's settings panel must stay above nelik */
.editmode .block-wrapper + .block-wrapper-nelik {
  margin-top: 24px;
}

/* Nelik grid itself (block-wrapper-split already sets 2-col grid;
   nelik uses separate_bg_pickers=true so each col is a block-structure) */
.block-wrapper-nelik.block-wrapper-split {
  gap: 20px;
  grid-template-columns: 1fr 1fr;
}

/* Stack to 1 col on mobile */
@media screen and (max-width: 720px) {
  .block-wrapper-nelik.block-wrapper-split {
    grid-template-columns: 1fr;
  }
  .block-wrapper-nelik {
    padding: 0 16px;
  }
}

/* Card block */
.block.nelik {
  position: relative;
  overflow: hidden;
  padding: 0;
  aspect-ratio: 370 / 320;
  min-height: 280px;
}

/* Editmode: let badge settings panel overflow the card */
.editmode .block.nelik {
  overflow: visible;
}

/* Wrapper fills the card, content at bottom by default — 2/3 width, 1/3 right stays empty */
.block.nelik .wrapper {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 66.67%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 32px;
  z-index: 2;
}

/* Content top: push content to top of card */
.block.nelik.content-top .wrapper {
  justify-content: flex-start;
}

/* h4 "This Month's Highlight" style — joon ulatub ainult viimase täheni */
.block.nelik .content-formatted h4 {
  font-family: "Raleway", sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #ffffff;
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.6);
  padding-bottom: 6px;
  margin-bottom: 10px;
  width: fit-content;
}

/* Base text color for untagged text nodes inside nelik cards */
.block.nelik .content-formatted {
  color: rgba(255, 255, 255, 0.9);
  font-family: "Raleway", sans-serif;
  font-size: 14px;
}

/* Buttons inside nelik cards */
.block.nelik .content-formatted .custom-btn:not(.custom-btn-disabled) {
  padding: 12px 14px;
  font-family: "Raleway", sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.65px;
  text-transform: uppercase;
  color: #000;
  background-color: #fff;
  border-color: #fff;
  min-width: 0;
  align-self: flex-start;
}

.block.nelik .content-formatted .custom-btn:not(.custom-btn-disabled):hover {
  background-color: #D70004;
  color: #fff;
  border-color: #D70004;
}

/* BG picker button: moved halfway toward top-left corner of card */
.block.nelik .voog-bg-picker-btn {
  top: 32px;
  left: 32px;
}

/* ---- Nelik edit-mode badge + sisu üles panel ---- */

/* Position panel in top-right of card */
.block.nelik .product-badge-settings.js-nelik-badge-settings {
  position: absolute;
  top: 12px;
  right: 12px;
  max-width: 170px;
  z-index: 10;
  padding: 8px;
  border-radius: 4px;
  background: rgba(255,255,255,0.95);
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}

/* ---- Uniform label + checkbox size for both badge toggle and sisu üles ---- */

/* Badge toggle row */
.block.nelik .product-badge-settings .badge-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  line-height: 1.3;
  cursor: pointer;
  margin: 0;
}

.block.nelik .product-badge-settings .badge-toggle input[type="checkbox"] {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: #D70004;
}

/* Sisu üles row — same sizing */
.block.nelik .nelik-content-top-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  line-height: 1.3;
  cursor: pointer;
  margin-top: 6px;
  white-space: nowrap;
}

.block.nelik .nelik-content-top-row input[type="checkbox"] {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: #D70004;
}

/* ============================================================
   HERO block (front-page-2026)
   Üks plokk, üks pilt, kaks sisuala wrapperis kõrvuti
   ============================================================ */

/* Hero: padding:0 et bg-image täidaks kogu kasti */
.block.hero {
  padding: 0;
  overflow: hidden;
  position: relative;
}

/* min-height kasutab header-height muutujat (mitte fikseeritud 128px) */
.block.hero.page-height {
  min-height: calc(100vh - var(--header-height));
}

/* Wrapper fills block: title (flex:1) | tagline+btn (flex-shrink:0) */
.block.hero .wrapper {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 0 80px;
  gap: 0;
  z-index: 2;
}

/* First content area: title võtab ülejäänud ruumi */
.block.hero .wrapper .content-formatted:first-child {
  flex: 1;
}

/* Second content area: tagline + nupp kõrvuti */
.block.hero .wrapper .content-formatted:last-child {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: 60px;
  flex-shrink: 0;
}

/* Hero background anchored to top */
.block.hero .block-bg-image {
  background-position: top center;
}

/* ---- Hero typography ---- */

/* Left column: suur pealkiri */
.block.hero .wrapper .content-formatted:first-child h1,
.block.hero .wrapper .content-formatted:first-child h2 {
  font-family: "Bodoni Moda", serif;
  font-size: 60px;
  font-weight: 400;
  line-height: 65px;
  color: #fff;
  margin: 0;
}

/* Right column: tagline */
.block.hero .wrapper .content-formatted:last-child p {
  font-family: "Raleway", sans-serif;
  font-size: 18px;
  font-weight: 500;
  line-height: 32px;
  letter-spacing: 1.8px;
  color: #fff;
  margin: 0;
  white-space: nowrap;
}

/* Right column: Shop Now nupp — läbipaistev taust, valge ääris */
.block.hero .wrapper .content-formatted:last-child .custom-btn:not(.custom-btn-disabled) {
  font-family: "Raleway", sans-serif;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 1.8px;
  color: #fff;
  background: transparent;
  background-color: transparent;
  border: 1px solid rgba(255,255,255,0.85);
  border-radius: 0;
  padding: 17px 18px 19px 20px;
  white-space: nowrap;
  min-width: 0;
}

.block.hero .wrapper .content-formatted:last-child .custom-btn:not(.custom-btn-disabled):hover {
  background-color: #fff;
  color: #000;
  border-color: #fff;
}

/* Hero gradient overlay */
.block.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(0,0,0,0.38) 0%, rgba(0,0,0,0.18) 55%, rgba(0,0,0,0.22) 100%);
  z-index: 1;
  pointer-events: none;
}

/* Tablet: sisualad vertikaalselt, sisu all */
@media screen and (max-width: 900px) {
  .block.hero .wrapper {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 0 32px 80px;
    gap: 28px;
  }
  /* flex:1 ei tööta kolonnis — pealkiri ei tohi kogu kõrgust täita */
  .block.hero .wrapper .content-formatted:first-child {
    flex: none;
  }
  .block.hero .wrapper .content-formatted:first-child h1,
  .block.hero .wrapper .content-formatted:first-child h2 {
    font-size: 40px;
    line-height: 46px;
  }
  .block.hero .wrapper .content-formatted:last-child {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
  .block.hero .wrapper .content-formatted:last-child p {
    white-space: normal;
  }
}

/* Mobile */
@media screen and (max-width: 640px) {
  .block.hero .wrapper {
    padding: 0 32px 30px;
    gap: 100px;
  }
  .block.hero .wrapper .content-formatted:first-child h1,
  .block.hero .wrapper .content-formatted:first-child h2 {
    font-size: 48px;
    line-height: 48px;
  }
  .block.hero .wrapper .content-formatted:last-child {
    flex-direction: row;
    align-items: center;
    gap: 20px;
  }
  .block.hero .wrapper .content-formatted:last-child p {
    font-size: 14px;
    line-height: 20px;
    letter-spacing: 1.4px;
  }
  .block.hero .wrapper .content-formatted:last-child .custom-btn:not(.custom-btn-disabled) {
    font-size: 14px;
    padding: 12px 16px;
    flex-shrink: 0;
  }
}

/* ---- Nelik typography ---- */

/* Card title */
.block.nelik .content-formatted h1,
.block.nelik .content-formatted h2,
.block.nelik .content-formatted h3 {
  font-family: "Bodoni 72 Book", serif;
  font-size: 44px;
  font-weight: 400;
  line-height: 46px;
  color: #fff;
  margin: 0 0 10px;
}

/* Card description */
.block.nelik .content-formatted p {
  font-family: "Raleway", sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  color: rgba(255,255,255,0.9);
  margin: 0 0 18px;
}

/* Gradient overlay — bottom-to-top by default */
.block.nelik::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.62) 0%,
    rgba(0,0,0,0.2) 40%,
    rgba(0,0,0,0) 70%
  );
  z-index: 1;
  pointer-events: none;
}

/* ---- Block 5-1: same large-text sizing as block 8 ---- */
.front-page-2026 .block-wrapper[data-block-key="5-1"] .content-formatted {
  font-size: 30px;
}
@media screen and (max-width: 900px) {
  .front-page-2026 .block-wrapper[data-block-key="5-1"] .content-formatted {
    font-size: 24px;
  }
}
@media screen and (max-width: 640px) {
  .front-page-2026 .block-wrapper[data-block-key="5-1"] .content-formatted {
    font-size: 18px;
  }
}

/* ---- Hero mobile: tagline left, button right ---- */
@media screen and (max-width: 640px) {
  .block.hero .wrapper .content-formatted:last-child {
    justify-content: space-between;
    width: 100%;
  }
}

/* ---- Nelik badge: Raleway font + cleaner sizing ---- */
.block.nelik .product-badge {
  font-family: "Raleway", sans-serif;
  font-weight: 500;
  font-size: 16px;
}
@media screen and (max-width: 900px) {
  .block.nelik .product-badge {
    font-size: 12px;
    width: 56px;
    height: 56px;
  }
}
@media screen and (max-width: 640px) {
  .block.nelik .product-badge {
    top: 10px;
    right: 10px;
    font-size: 10px;
    width: 48px;
    height: 48px;
  }
}

/* Flip gradient when content is at the top */
.block.nelik.content-top::before {
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.55) 0%,
    rgba(0,0,0,0.18) 40%,
    rgba(0,0,0,0) 70%
  );
}
