/**
 * Flatlogic Ecommerce — header + homepage (culori Tricotur)
 */

:root {
  --ec-primary: var(--red, #0b8796);
  --ec-primary-dark: var(--red-dk, #075b66);
  --ec-primary-soft: var(--red-lt, #e8f8fa);
  --ec-ink: var(--ink, #111111);
  --ec-muted: var(--muted, #666666);
  --ec-line: var(--line, #e8e8e8);
  --ec-soft: var(--soft, #f8f7f5);
  --ec-white: var(--white, #ffffff);
  --ec-shadow: 0 4px 20px rgba(17, 17, 17, 0.1);
}

/* ── Header Flatlogic ────────────────────────────── */
.tc-ec-header {
  box-shadow: var(--ec-shadow);
  border-bottom: 0;
}

.tc-ec-header .tc-topbar {
  display: none;
}

.tc-ec-header .tc-navbar {
  height: 80px;
  gap: 24px;
}

.tc-ec-header .tc-logo img {
  height: 56px;
}

.tc-ec-menu {
  flex: 1;
  display: flex;
  justify-content: center;
  margin-left: 0;
}

.tc-ec-menu__list {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.tc-ec-menu__item {
  position: relative;
}

.tc-ec-menu__item::before {
  content: "";
  position: absolute;
  top: calc(50% - 1px);
  left: -14px;
  width: 14px;
  height: 2px;
  border-radius: 4px;
  background: var(--ec-primary);
  opacity: 0;
  transition: opacity 0.35s ease, left 0.35s ease;
}

.tc-ec-menu__link,
.tc-ec-menu__trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ec-ink);
  background: none;
  border: 0;
  cursor: pointer;
  line-height: 1.4;
  transition: color 0.2s ease;
}

.tc-ec-menu__trigger svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.5;
  transition: transform 0.2s ease;
}

.tc-ec-menu__item:hover::before,
.tc-ec-menu__item:focus-within::before,
.tc-ec-menu__item.is-active::before {
  opacity: 1;
  left: -1px;
}

.tc-ec-menu__item:hover .tc-ec-menu__link,
.tc-ec-menu__item:hover .tc-ec-menu__trigger,
.tc-ec-menu__item:focus-within .tc-ec-menu__link,
.tc-ec-menu__item:focus-within .tc-ec-menu__trigger,
.tc-ec-menu__link.is-active,
.tc-ec-menu__item.is-active .tc-ec-menu__trigger {
  color: var(--ec-primary);
}

.tc-ec-menu__item:hover .tc-ec-menu__trigger svg,
.tc-ec-menu__item:focus-within .tc-ec-menu__trigger svg {
  transform: rotate(180deg);
}

.tc-ec-menu__sub {
  position: absolute;
  top: calc(100% + 14px);
  left: 0;
  min-width: 220px;
  padding: 12px 0;
  background: var(--ec-white);
  border: 1px solid var(--ec-line);
  box-shadow: var(--ec-shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(24px);
  transition: opacity 0.35s ease, transform 0.35s ease, visibility 0.35s;
  z-index: 120;
}

.tc-ec-menu__sub--wide {
  left: 50%;
  transform: translateX(-50%) translateY(24px);
  width: min(640px, calc(100vw - 32px));
  min-width: 0;
  max-height: min(70vh, 520px);
  overflow-y: auto;
  padding: 18px 22px;
}

.tc-ec-menu__item:hover .tc-ec-menu__sub,
.tc-ec-menu__item:focus-within .tc-ec-menu__sub {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.tc-ec-menu__item:hover .tc-ec-menu__sub--wide,
.tc-ec-menu__item:focus-within .tc-ec-menu__sub--wide {
  transform: translateX(-50%) translateY(0);
}

.tc-ec-menu__sub a {
  display: block;
  padding: 8px 24px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ec-muted);
  transition: color 0.2s ease, font-weight 0.2s ease, border-color 0.2s ease;
}

.tc-ec-menu__sub a:hover {
  color: var(--ec-primary);
  font-weight: 700;
}

.tc-ec-menu__sub-all {
  display: block;
  font-weight: 700 !important;
  color: var(--ec-ink) !important;
  margin-bottom: 14px;
  padding: 0 !important;
}

.tc-ec-menu__shop-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 18px 32px;
}

.tc-ec-menu__shop-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.tc-ec-menu__shop-parent {
  display: block;
  padding: 0 0 6px !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ec-ink) !important;
  line-height: 1.3;
  white-space: normal;
}

.tc-ec-menu__shop-parent:hover {
  color: var(--ec-primary) !important;
}

.tc-ec-menu__shop-child {
  display: block;
  padding: 5px 0 5px 10px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  color: var(--ec-muted) !important;
  line-height: 1.35;
  white-space: normal;
  border-left: 2px solid var(--ec-line);
}

.tc-ec-menu__shop-child:hover {
  color: var(--ec-primary) !important;
  border-left-color: var(--ec-primary);
}

.tc-ec-menu__sub-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tc-ec-menu__sub-links--inline {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 16px 24px;
}

.tc-ec-menu__sub-links a {
  padding: 6px 0 !important;
  white-space: nowrap;
}

.tc-ec-menu__sub-divider {
  height: 1px;
  background: var(--ec-line);
  margin: 14px 0 12px;
}

.tc-ec-menu__sub-label {
  margin: 0 0 8px;
  padding: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ec-muted);
}

.tc-ec-header .tc-nav-actions {
  margin-left: auto;
  gap: 8px;
}

.tc-ec-header .tc-icon-link {
  width: 44px;
  height: 44px;
  border-radius: 0;
}

.tc-ec-header .tc-icon-link:hover {
  transform: none;
  color: var(--ec-primary);
}

/* ── Homepage hero (split layout — produs vizibil) ─ */
.tc-ec-home {
  background: var(--ec-white);
}

.tc-ec-hero {
  position: relative;
  min-height: min(620px, 72vh);
  overflow: hidden;
  background: var(--ec-soft);
}

.tc-ec-hero__track {
  position: relative;
  min-height: min(620px, 72vh);
}

.tc-ec-hero__slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  background: var(--ec-soft);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.55s ease, visibility 0.55s ease;
}

.tc-ec-hero__slide.is-active {
  opacity: 1;
  visibility: visible;
  z-index: 1;
}

.tc-ec-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
  min-height: 520px;
  padding: 48px 0 64px;
}

.tc-ec-hero__copy {
  max-width: 560px;
}

.tc-ec-hero__tag {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ec-primary);
}

.tc-ec-hero__line {
  margin: 0 0 6px;
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 400;
  line-height: 1.2;
  color: var(--ec-ink);
}

.tc-ec-hero__title {
  margin: 0 0 14px;
  font-size: clamp(28px, 4.2vw, 46px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.08;
  text-transform: none;
  color: var(--ec-ink);
}

.tc-ec-hero__price {
  margin: 0 0 28px;
  font-size: 22px;
  font-weight: 700;
  color: var(--ec-primary);
}

.tc-ec-hero__media {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.tc-ec-hero__product-img {
  display: block;
  max-width: 100%;
  max-height: min(400px, 46vh);
  width: auto;
  height: auto;
  object-fit: contain;
}

/* Slide brand — imagine full-width pe tot hero-ul */
.tc-ec-hero__slide--brand {
  background: #111;
}

.tc-ec-hero__slide--fullscreen {
  align-items: stretch;
}

.tc-ec-hero__backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: var(--tc-hero-bg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.tc-ec-hero__backdrop::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(17, 17, 17, 0.9) 0%,
    rgba(17, 17, 17, 0.62) 38%,
    rgba(17, 17, 17, 0.18) 100%
  );
}

.tc-ec-hero__inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  min-height: min(620px, 72vh);
  padding: 72px 0 96px;
}

.tc-ec-hero__slide--brand .tc-ec-hero__tag {
  color: var(--ec-primary);
}

.tc-ec-hero__slide--brand .tc-ec-hero__line,
.tc-ec-hero__slide--brand .tc-ec-hero__title {
  color: #fff;
}

.tc-ec-hero__slide--brand .tc-ec-btn--outline {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.85);
}

.tc-ec-hero__slide--brand .tc-ec-btn--outline:hover {
  color: var(--ec-ink);
  background: #fff;
  border-color: #fff;
}

.tc-ec-hero__slide--brand .tc-ec-btn__arrow {
  filter: brightness(0) invert(1);
}

.tc-ec-hero__slide--brand .tc-ec-btn--outline:hover .tc-ec-btn__arrow {
  filter: none;
}

.tc-ec-hero.is-brand-slide .tc-ec-hero__dot {
  background: rgba(255, 255, 255, 0.35);
}

.tc-ec-hero.is-brand-slide .tc-ec-hero__dot.is-active {
  background: #fff;
}

.tc-ec-hero.is-brand-slide .tc-ec-hero__arrow {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(255, 255, 255, 0.2);
}

.tc-ec-hero__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 50%;
  background: #fff;
  color: var(--ec-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(17, 17, 17, 0.12);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.tc-ec-hero__arrow:hover {
  background: var(--ec-primary);
  border-color: var(--ec-primary);
  color: #fff;
}

.tc-ec-hero__arrow svg {
  width: 22px;
  height: 22px;
}

.tc-ec-hero__arrow--prev {
  left: 24px;
}

.tc-ec-hero__arrow--next {
  right: 24px;
}

.tc-ec-hero__dots {
  position: absolute;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 8px;
}

.tc-ec-hero__dot {
  width: 32px;
  height: 4px;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: rgba(17, 17, 17, 0.18);
  cursor: pointer;
  transition: background 0.2s ease, width 0.2s ease;
}

.tc-ec-hero__dot.is-active {
  background: var(--ec-primary);
  width: 44px;
}

/* ── Buttons ─────────────────────────────────────── */
.tc-ec-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 0;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.tc-ec-btn--outline {
  color: var(--ec-primary);
  background: transparent;
  border: 2px solid var(--ec-primary);
}

.tc-ec-btn--outline:hover {
  color: #fff;
  background: var(--ec-primary);
}

.tc-ec-btn__arrow {
  width: 20px;
  height: 20px;
  background: url("../img/ec/arrow-right.svg") no-repeat center / contain;
  transition: transform 0.25s ease, background-image 0.25s ease;
}

.tc-ec-btn--outline:hover .tc-ec-btn__arrow {
  transform: translateX(6px);
  background-image: url("../img/ec/arrow-right-hover.svg");
}

/* ── Sections ────────────────────────────────────── */
.tc-ec-section {
  padding: 80px 0;
}

.tc-ec-section__title {
  margin: 0 0 16px;
  text-align: center;
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 800;
  color: var(--ec-ink);
}

.tc-ec-section__lead {
  max-width: 680px;
  margin: 0 auto 48px;
  text-align: center;
  font-size: 15px;
  line-height: 1.7;
  color: var(--ec-muted);
}

.tc-ec-section__cta {
  display: flex;
  justify-content: center;
  margin-top: 48px;
}

.tc-ec-section__empty {
  text-align: center;
  color: var(--ec-muted);
}

.tc-ec-products-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 40px 28px;
}

.tc-ec-products-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 40px 28px;
}

/* ── Promo block ─────────────────────────────────── */
.tc-ec-promo {
  background: var(--ec-soft);
  min-height: 500px;
  display: flex;
  align-items: center;
  background-image: linear-gradient(90deg, var(--ec-soft) 55%, rgba(248, 247, 245, 0.2) 100%);
}

.tc-ec-promo__inner {
  padding: 80px 0;
}

.tc-ec-promo__kicker {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ec-ink);
}

.tc-ec-promo__title {
  margin: 0 0 20px;
  font-size: clamp(36px, 5vw, 50px);
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ec-ink);
}

.tc-ec-stroke {
  display: block;
  width: 64px;
  height: 0;
  border: 0;
  border-top: 5px solid var(--ec-primary);
  border-radius: 30px;
  margin-bottom: 28px;
}

.tc-ec-stroke--sm {
  width: 30px;
  border-top-width: 3px;
  margin: 8px 0 12px;
}

.tc-ec-countdown {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 28px;
}

.tc-ec-countdown__block {
  width: 64px;
  height: 64px;
  border: 1px solid var(--ec-ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.tc-ec-countdown__num {
  font-size: 18px;
  font-weight: 800;
  color: var(--ec-primary);
  line-height: 1;
}

.tc-ec-countdown__lbl {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ec-muted);
  margin-top: 4px;
}

.tc-ec-promo__note {
  margin: 0;
  font-size: 14px;
  color: var(--ec-muted);
}

/* ── Category promo grid ─────────────────────────── */
.tc-ec-promo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.tc-ec-promo-grid__side {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.tc-ec-promo-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 208px;
  padding: 28px 24px;
  background-color: var(--ec-soft);
  background-size: cover;
  background-position: center;
  color: var(--ec-ink);
  overflow: hidden;
  transition: background-size 0.35s ease;
}

.tc-ec-promo-tile:hover {
  color: var(--ec-ink);
}

.tc-ec-promo-tile--main {
  min-height: 446px;
  padding: 48px 32px;
}

.tc-ec-promo-tile--main strong {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
}

.tc-ec-promo-tile__tag {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ec-primary);
  margin-bottom: 8px;
}

.tc-ec-promo-tile__note {
  font-size: 14px;
  color: var(--ec-muted);
}

.tc-ec-promo-tile__cat {
  font-size: 15px;
  font-weight: 700;
}

.tc-ec-promo-tile__badge {
  position: absolute;
  right: 0;
  bottom: 0;
  background: var(--ec-ink);
  color: #fff;
  padding: 14px 20px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ── Blog grid ───────────────────────────────────── */
.tc-ec-blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px 28px;
}

.tc-ec-blog-card__img-wrap {
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--ec-soft);
}

.tc-ec-blog-card__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.65s ease;
}

.tc-ec-blog-card:hover .tc-ec-blog-card__img-wrap img {
  transform: scale(1.08);
}

.tc-ec-blog-card__placeholder {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--ec-soft), #ece8e4);
}

.tc-ec-blog-card__date {
  display: block;
  margin-top: 14px;
  font-size: 13px;
  color: var(--ec-muted);
}

.tc-ec-blog-card__title {
  margin: 8px 0 10px;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
}

.tc-ec-blog-card__title a {
  color: var(--ec-ink);
}

.tc-ec-blog-card__title a:hover {
  color: var(--ec-primary);
}

.tc-ec-blog-card__more {
  font-size: 15px;
  font-weight: 800;
  color: var(--ec-primary);
}

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 1200px) {
  .tc-ec-products-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.tc-ec-home.tc-ec-store .tc-ec-products-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1200px) {
  .tc-ec-home.tc-ec-store .tc-ec-products-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .tc-ec-menu__shop-cols {
    grid-template-columns: 1fr;
  }

  .tc-ec-menu__sub--wide {
    width: min(320px, calc(100vw - 24px));
  }
}

@media (max-width: 992px) {
  .tc-ec-menu {
    display: none;
  }

  .tc-ec-home .tc-ec-products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tc-ec-promo-grid,
  .tc-ec-promo-grid__side {
    grid-template-columns: 1fr;
  }

  .tc-ec-promo-tile--main {
    min-height: 320px;
  }

  .tc-ec-blog-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .tc-ec-hero,
  .tc-ec-hero__track {
    min-height: 0;
  }

  .tc-ec-hero__slide.is-active {
    position: relative;
  }

  .tc-ec-hero__inner,
  .tc-ec-hero__grid {
    min-height: auto;
    padding: 28px 0 56px;
  }

  .tc-ec-hero__backdrop::after {
    background: linear-gradient(
      180deg,
      rgba(17, 17, 17, 0.88) 0%,
      rgba(17, 17, 17, 0.55) 55%,
      rgba(17, 17, 17, 0.2) 100%
    );
  }

  .tc-ec-hero__grid {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 28px 0 56px;
    gap: 20px;
  }

  .tc-ec-hero__media {
    order: -1;
    min-height: 240px;
    padding: 0;
  }

  .tc-ec-hero__product-img {
    max-height: 220px;
  }

  .tc-ec-hero__title {
    font-size: clamp(24px, 7vw, 32px);
  }

  .tc-ec-hero__arrow {
    width: 40px;
    height: 40px;
  }

  .tc-ec-hero__arrow--prev {
    left: 12px;
  }

  .tc-ec-hero__arrow--next {
    right: 12px;
  }

  .tc-ec-section {
    padding: 56px 0;
  }

  .tc-ec-home .tc-ec-products-grid,
  .tc-ec-blog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 12px;
  }
}
