/* =========================================================
   HOME PAGE — fluid responsive styles
   Uses clamp() + vw for smooth scaling across all screens
   ========================================================= */

/* ── Catalog container ── */
.catalog-wrap {
  width: min(90vw, 100%);
  margin-inline: auto;
  padding-inline: clamp(12px, 2vw, 32px);
}

/* ── Popular products container ── */
.container-baner {
  width: 100%;
  margin: 0 auto;
  padding: .5vw 5vw;
}


/* ═══════════════════════════════════════
   SECTION 1 — CATALOG GRID
═══════════════════════════════════════ */
.catalog-section {
  padding-top: clamp(24px, 4vw, 56px);
  padding-bottom: 0;
  background: #fff;
  text-align: center;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(10px, 1.2vw, 20px);
}

.catalog-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #fff;
  border: 1.5px solid #e8e8e8;
  border-radius: clamp(8px, 1vw, 14px);
  padding: clamp(12px, 1.4vw, 22px);
  text-decoration: none;
  color: #111;
  transition: box-shadow .22s, transform .22s, border-color .22s;
  overflow: hidden;
  position: relative;
}

.catalog-card:hover {
  box-shadow: 0 6px 28px rgba(0,0,0,.11);
  transform: translateY(-3px);
  border-color: #d0d0d0;
}

.catalog-card h3 {
  width: 100%;
  font-size: clamp(13px, 1.1vw, 16px);
  font-weight: 600;
  line-height: 1.35;
  margin: 0 0 clamp(8px, 1vw, 16px);
  color: #111;
  text-align: center;
}

.catalog-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: clamp(4px, 0.5vw, 8px);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  /* повне зображення всередині комірки, без обрізання країв / вотермарку */
  padding: clamp(4px, 0.55vw, 10px);
  box-sizing: border-box;
}

.catalog-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transition: transform .35s;
}

.catalog-card:hover .catalog-img img {
  transform: scale(1.03);
}

/* Address card */
.catalog-card--address {
  background: #fafafa;
  cursor: default;
  justify-content: center;
}

.catalog-card--address:hover {
  transform: none;
  box-shadow: none;
}

.catalog-card--address h3 {
  width: 100%;
  font-size: clamp(14px, 1.15vw, 17px);
  color: #333;
  margin-bottom: clamp(8px, .8vw, 14px);
  text-align: center;
}

.catalog-card--address p {
  width: 100%;
  font-size: clamp(12px, .95vw, 14px);
  color: #555;
  line-height: 1.55;
  margin: 0;
  text-align: center;
}

.addr-pin {
  width: clamp(20px, 2vw, 28px);
  height: auto;
  margin-top: clamp(10px, 1vw, 18px);
}


/* ═══════════════════════════════════════
   SECTION 2 — POPULAR PRODUCTS
═══════════════════════════════════════ */
.popular-section {
  padding-block: clamp(24px, 4vw, 56px);
  background: #fff;
}

/* Section header */
.section-header {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 28px);
  margin-bottom: clamp(20px, 2.5vw, 36px);
}

.section-title {
  display: flex;
  align-items: flex-start;
  gap: clamp(6px, .7vw, 10px);
  white-space: nowrap;
}

.fl-dot {
  display: block;
  width: clamp(7px, .7vw, 10px);
  height: clamp(7px, .7vw, 10px);
  border-radius: 50%;
  background: #e31720;
  margin-top: clamp(5px, .6vw, 9px);
  flex-shrink: 0;
}

.section-title h2 {
  font-size: clamp(18px, 3vw, 48px);
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
  color: #111;
}

.section-title h2 span {
  font-weight: 400;
  color: #555;
}

.section-subtitle {
  font-size: clamp(11px, 1.5vw, 28px);
  color: #888;
  margin-top: 2px;
}

.section-line {
  flex: 1;
  height: 1px;
  background: #e8e8e8;
}

.section-more {
  display: flex;
  align-items: center;
  gap: clamp(6px, .6vw, 10px);
  text-decoration: none;
  color: #111;
  font-size: clamp(12px, 1.4vw, 20px);
  font-weight: 600;
  white-space: nowrap;
  transition: color .2s;
}

.section-more:hover {
  color: #e31720;
}

.plus-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(22px, 2.2vw, 32px);
  height: clamp(22px, 2.2vw, 32px);
  border-radius: 50%;
  background: #f0e800;
  color: #111;
  font-size: clamp(14px, 1.4vw, 20px);
  font-weight: 700;
  line-height: 1;
  transition: background .2s, transform .2s;
}

.section-more:hover .plus-btn {
  background: #e31720;
  color: #fff;
  transform: rotate(90deg);
}

/* Products grid */
.home-products {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: clamp(10px, 1.2vw, 20px);
  list-style: none;
  margin: 0;
  padding: 0;
}

.home-product-card {
  background: #fff;
  border: 1.5px solid #e8e8e8;
  border-radius: clamp(8px, 1vw, 14px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .22s, transform .22s;
}

.home-product-card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,.1);
  transform: translateY(-3px);
}

.home-product-img {
  position: relative;
  display: block;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: #f5f5f5;
}

.home-product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s;
}

.home-product-card:hover .home-product-img img {
  transform: scale(1.06);
}

.home-product-title {
  font-size: clamp(11px, .9vw, 13px);
  font-weight: 500;
  line-height: 1.4;
  margin: clamp(8px, .8vw, 12px) clamp(10px, 1vw, 16px) 0;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.home-product-title a {
  text-decoration: none;
  color: #111;
  transition: color .2s;
}

.home-product-title a:hover {
  color: #e31720;
}

.home-product-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(8px, .8vw, 14px) clamp(10px, 1vw, 16px);
  gap: 8px;
  margin-top: auto;
}

.home-product-price {
  font-size: clamp(14px, 1.3vw, 18px);
  font-weight: 700;
  color: #35c345;
  white-space: nowrap;
}

.home-product-price .woocommerce-Price-currencySymbol {
  font-size: .9em;
}

button.fastshop-add-to-cart {
  background: #e31720;
  color: #fff;
  border: none;
  border-radius: clamp(4px, .5vw, 8px);
  padding: clamp(6px, .6vw, 10px) clamp(10px, 1vw, 16px);
  font-size: clamp(11px, .85vw, 13px);
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, transform .15s;
  white-space: nowrap;
}

button.fastshop-add-to-cart:hover {
  background: #c0121a;
  transform: scale(1.04);
}

button.fastshop-add-to-cart.adding {
  background: #888;
  pointer-events: none;
}

button.fastshop-add-to-cart.added {
  background: #28a745;
}


/* ═══════════════════════════════════════
   SECTION 3 — CONSULTATION BLOCK (c7)
═══════════════════════════════════════ */
.c7 {
  background: #f9f9f9;
  padding-block: clamp(32px, 5vw, 80px);
}

.c7__wrap {
  width: 90%;
  max-width: 1600px;
  margin-inline: auto;
  padding-inline: 0;
}

.c7__row {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: clamp(24px, 4vw, 80px);
  align-items: stretch; /* both columns same height */
}

/* Left column */
.c7__title {
  font-size: clamp(22px, 3.2vw, 46px);
  font-weight: 800;
  line-height: 1.15;
  color: #111;
  margin: 0 0 clamp(10px, 1.2vw, 18px);
}

.c7__title::before {
  content: '·';
  color: #e31720;
  font-size: 1.3em;
  margin-right: .2em;
}

.c7__subtitle {
  font-size: clamp(13px, 1.1vw, 16px);
  color: #666;
  line-height: 1.6;
  margin: 0 0 clamp(18px, 2.2vw, 34px);
}

.c7__contacts {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: clamp(16px, 2.5vw, 40px);
}

/* Work block takes fixed width, phones fill the rest */
.c7__work {
  flex: 0 0 auto;
}

.c7__phones {
  flex: 1 1 auto;
}

.c7__work {
  display: flex;
  align-items: flex-start;
  gap: clamp(8px, .8vw, 12px);
  font-size: clamp(12px, 1vw, 15px);
  color: #555;
  line-height: 1.5;
}

.c7__work strong {
  color: #3db73d;
  font-weight: 600;
}

.c7__dot {
  display: block;
  width: clamp(8px, .8vw, 11px);
  height: clamp(8px, .8vw, 11px);
  border-radius: 50%;
  background: #3db73d;
  margin-top: 4px;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(61,183,61,.22);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%,100% { box-shadow: 0 0 0 3px rgba(61,183,61,.22); }
  50%      { box-shadow: 0 0 0 7px rgba(61,183,61,.08); }
}

.c7__phones {
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1vw, 16px);
}

.c7__group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.c7__label {
  font-size: clamp(11px, .85vw, 13px);
  color: #999;
  margin-left: 25px;
}

.c7__phone {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: clamp(14px, 1.5vw, 22px);
  font-weight: 700;
  color: #111;
  text-decoration: none;
  transition: color .2s;
}

.c7__phone:hover { color: #e31720; }

/* phone-ico inside c7__phones — dark fill matching text color */
.c7__phone .phone-ico {
  fill: #3db73d;
  width: clamp(14px, 1.4vw, 20px);
  height: clamp(14px, 1.4vw, 20px);
  flex-shrink: 0;
}

/* phone-ico inside c7__btn — white */
.c7__btn .phone-ico,
.phone-ico--white {
  fill: #fff;
  width: clamp(14px, 1.4vw, 18px);
  height: clamp(14px, 1.4vw, 18px);
  flex-shrink: 0;
}

/* Right column — 2 grid cols (info | button) + person absolute */
.c7__right {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: clamp(16px, 2vw, 32px);
  align-items: center;
  background: #f0f0f0;
  border-radius: clamp(12px, 1.5vw, 20px);
  padding: clamp(20px, 2.5vw, 40px);
  padding-right: clamp(20px, 22vw, 340px); /* reserve space for person */
  position: relative;
  overflow: visible;
}

.c7__card {
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 1.2vw, 18px);
}

/* Button column — centered vertically */
.c7__btn-col {
  display: flex;
  align-items: center;
  justify-content: center;
}

.c7__card-title {
  font-size: clamp(16px, 1.6vw, 22px);
  font-weight: 700;
  color: #111;
  margin: 0;
}

.c7__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(8px, .8vw, 12px);
}

.c7__list li {
  font-size: clamp(12px, .95vw, 14px);
  color: #555;
  line-height: 1.5;
  padding-left: clamp(14px, 1.4vw, 20px);
  position: relative;
}

.c7__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: .45em;
  width: clamp(6px, .6vw, 8px);
  height: clamp(6px, .6vw, 8px);
  border-radius: 50%;
  background: #e31720;
}

.c7__list li strong {
  color: #111;
  font-weight: 600;
}

.c7__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e31720;
  color: #fff;
  text-decoration: none;
  font-size: clamp(12px, 1.1vw, 16px);
  font-weight: 700;
  padding: clamp(10px, 1vw, 16px) clamp(16px, 1.8vw, 28px);
  border-radius: clamp(6px, .7vw, 10px);
  transition: background .2s, transform .15s;
  white-space: nowrap;
}

.c7__btn:hover {
  background: #c0121a;
  transform: scale(1.03);
}

/* Person image — absolutely positioned, head overflows card top */
.c7__person {
  position: absolute;
  bottom: 0;
  right: -2vw;
  line-height: 0;
  pointer-events: none;
}

.c7__person img {
  display: block;
  width: 18vw;
  max-width: none;
  height: auto;
  object-fit: contain;
  object-position: bottom;
}


/* ═══════════════════════════════════════
   RESPONSIVE — Tablet (≤ 1024px)
═══════════════════════════════════════ */
@media (max-width: 1024px) {
  .catalog-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .home-products {
    grid-template-columns: repeat(3, 1fr);
  }

  .c7__wrap {
    width: 92%;
  }

  /* Tablet: stack left/right vertically */
  .c7__row {
    grid-template-columns: 1fr;
  }

  .c7__right {
    padding-right: clamp(20px, 22vw, 300px); /* keep space for person */
  }

  .c7__person img {
    width: 22vw;
  }
}


/* ═══════════════════════════════════════
   RESPONSIVE — Large mobile (≤ 768px)
═══════════════════════════════════════ */
@media (max-width: 768px) {
  .catalog-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .catalog-card h3 {
    font-size: clamp(12px, 3.5vw, 15px);
  }

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

  .section-header {
    flex-wrap: wrap;
  }

  .section-line {
    display: none;
  }

  .section-more {
    margin-left: auto;
  }

  .c7__wrap {
    width: 94%;
  }

  /* Mobile: contacts стають вертикальними */
  .c7__contacts {
    flex-direction: column;
    gap: clamp(12px, 3vw, 20px);
  }

  .c7__phones {
    flex: none;
  }

  /* Mobile: hide person, reset padding */
  .c7__right {
    padding: clamp(16px, 4vw, 28px);
    overflow: hidden;
  }

  .c7__person {
    display: none;
  }
}


/* ═══════════════════════════════════════
   RESPONSIVE — Small mobile (≤ 480px)
═══════════════════════════════════════ */
@media (max-width: 480px) {
  .catalog-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .catalog-card {
    padding: 10px;
  }

  .home-products {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .home-product-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  button.fastshop-add-to-cart {
    width: 100%;
    text-align: center;
  }

  .c7__wrap {
    width: 96%;
  }

  .c7__title {
    font-size: clamp(20px, 7vw, 30px);
  }
}
