/* ═══════════════════════════════════════════
   PRODUCTS SECTION
═══════════════════════════════════════════ */

.products {
  background: #e8eef8;
  padding: 180px 48px 56px;
  font-family: 'Inter', 'Segoe UI', sans-serif;
}

.products__hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 36px;
}

.products__eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: #1a56db;
  text-transform: uppercase;
  margin: 0 0 16px;
}

.products__title {
  font-size: 38px;
  font-weight: 700;
  line-height: 1.18;
  color: #0f1b2d;
  margin: 0;
}

.products__desc {
  max-width: 360px;
  font-size: 15px;
  line-height: 1.65;
  color: #4a5568;
  margin: 0;
  align-self: center;
}

.products__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ═══════════════════════════════════════════
   CARD CONTAINER
═══════════════════════════════════════════ */

.pcard {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  height: 280px;
  cursor: pointer;
  background: #1a1a1a;
}

/* ─── LEFT SIDE: photo + front text (always visible) ─── */
.pcard__left {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  border-radius: 20px;
  transition: right 0.45s cubic-bezier(0.33, 1.15, 0.62, 1), border-radius 0.45s ease;
}

/* при наведении контейнер фото реально сужается справа,
   уступая место панели — тогда object-fit:cover пересчитывает кадр */
.pcard:hover .pcard__left {
  right: 58%;
  border-radius: 20px 8px 8px 20px;
}

.pcard__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
  transition: transform 0.45s ease;
}

.pcard:hover .pcard__bg {
  transform: scale(1.08);
}

.pcard__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.05) 0%,
    rgba(0,0,0,0.20) 50%,
    rgba(0,0,0,0.62) 100%
  ),
  linear-gradient(
    to right,
    rgba(0,0,0,0) 70%,
    rgba(0,0,0,0.25) 100%
  );
}

.pcard__icon {
  position: absolute;
  top: 18px;
  left: 18px;
  width: 46px;
  height: 46px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: opacity 0.25s ease;
}

.pcard__body {
  position: absolute;
  bottom: 20px;
  left: 20px;
  right: 20px;
  z-index: 2;
  transition: opacity 0.2s ease, transform 0.3s ease;
}

.pcard__title {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 8px;
  line-height: 1.2;
  text-shadow: 0 1px 6px rgba(0,0,0,0.4);
}

.pcard__desc {
  font-size: 13px;
  color: rgba(255,255,255,0.88);
  line-height: 1.5;
  margin: 0;
  max-width: 75%;
}

/* on hover: shrink text width so it doesn't sit under the panel, fade icon */
.pcard:hover .pcard__icon { opacity: 0; }
.pcard:hover .pcard__desc { opacity: 0; }
.pcard:hover .pcard__title { transform: translateY(0); }

/* ═══════════════════════════════════════════
   RIGHT PANEL — slides in over the photo
═══════════════════════════════════════════ */

.pcard__right {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 62%;
  z-index: 3;
  display: flex;
  flex-direction: column;
  padding: 22px 22px 20px 30px;
  gap: 8px;
  overflow: hidden;

  /* мягкая дуга по левому краю — лёгкий выгиб по центру, как в референсе */
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M6,0 C2,0 0,8 0,50 C0,92 2,100 6,100 L100,100 L100,0 Z' fill='white'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M6,0 C2,0 0,8 0,50 C0,92 2,100 6,100 L100,100 L100,0 Z' fill='white'/%3E%3C/svg%3E");
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;

  transform: translateX(102%);
  transition: transform 0.45s cubic-bezier(0.33, 1.15, 0.62, 1);
}

.pcard:hover .pcard__right {
  transform: translateX(0%);
}

.pcard__right-top {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pcard__back-btn {
  align-self: flex-start;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.pcard__back-btn:hover {
  transform: scale(1.08);
}

.pcard__back-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  margin: 0;
  line-height: 1.2;
}

.pcard__back-desc {
  font-size: 11px;
  line-height: 1.45;
  color: rgba(255,255,255,0.85);
  margin: 4px 0 0;
}

/* ─── LIST with SVG checkmarks ─── */
.pcard__list {
  list-style: none;
  padding: 0;
  margin: 2px 0 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  z-index: 2;
  max-width: 62%;
}

.pcard__right-top {
  max-width: 70%;
  position: relative;
  z-index: 2;
}

.pcard__list li {
  font-size: 11.5px;
  color: rgba(255,255,255,0.95);
  line-height: 1.4;
  padding-left: 20px;
  position: relative;
}

.pcard__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

/* decorative bottom-right photo inside panel — масштабируется красиво по высоте панели */
.pcard__deco {
  position: absolute;
  bottom: 0;
  right: 0;
  height: 92%;
  width: auto;
  max-width: 42%;
  object-fit: contain;
  object-position: bottom right;
  opacity: 0.95;
  pointer-events: none;
  z-index: 1;
}

/* ═══════════════════════════════════════════
   THEME: ЗЕРНОВЫЕ — белая панель, синие акценты
═══════════════════════════════════════════ */

.pcard__right--white {
  background: #ffffff;
}

.pcard__back-title--blue { color: #1a56db; }

.pcard__back-desc--dark { color: #475569; }

.pcard__back-btn--blue {
  background: #eef3ff;
  border: 1.5px solid #1a56db;
}

.pcard__list--blue li { color: #1e2733; }

.pcard__list--blue li::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Ccircle cx='7' cy='7' r='6.3' fill='%23E8F0FE' stroke='%231A56DB' stroke-width='1.2'/%3E%3Cpath d='M4.3 7.2l1.8 1.8 3.4-3.6' stroke='%231A56DB' stroke-width='1.4' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* ═══════════════════════════════════════════
   THEME: МАСЛИЧНЫЕ — тёмно-синяя панель, белый текст
═══════════════════════════════════════════ */

.pcard__right--darkblue { background: #0d1f44; }

.pcard__right--darkblue .pcard__back-btn--onblue,
.pcard__right--darkblue .pcard__back-btn--onblue {
  background: #fff;
}

.pcard__right--darkblue .pcard__list li::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Ccircle cx='7' cy='7' r='6.3' fill='rgba(255,255,255,0.15)' stroke='white' stroke-width='1.2'/%3E%3Cpath d='M4.3 7.2l1.8 1.8 3.4-3.6' stroke='white' stroke-width='1.4' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* ═══════════════════════════════════════════
   THEME: БОБОВЫЕ — зелёная панель, белый текст
═══════════════════════════════════════════ */

.pcard__right--green { background: #1b4d30; }

.pcard__right--green .pcard__back-btn--ongreen {
  background: #fff;
}

.pcard__right--green .pcard__list li::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Ccircle cx='7' cy='7' r='6.3' fill='rgba(255,255,255,0.15)' stroke='white' stroke-width='1.2'/%3E%3Cpath d='M4.3 7.2l1.8 1.8 3.4-3.6' stroke='white' stroke-width='1.4' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* ═══════════════════════════════════════════
   THEME: СЕМЕНА — жёлтая панель, белый текст
═══════════════════════════════════════════ */

.pcard__right--orange { background: #e9a400; }

.pcard__right--orange .pcard__back-btn--onorange {
  background: #fff;
}

.pcard__right--orange .pcard__list li::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Ccircle cx='7' cy='7' r='6.3' fill='rgba(255,255,255,0.18)' stroke='white' stroke-width='1.2'/%3E%3Cpath d='M4.3 7.2l1.8 1.8 3.4-3.6' stroke='white' stroke-width='1.4' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* ═══════════════════════════════════════════
   BOTTOM HINT
═══════════════════════════════════════════ */

.products__hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
  color: #8a9ab5;
  font-size: 13px;
}

/* =========================================================
   TABLET
========================================================= */

@media (max-width:992px){

    .products{
        padding:140px 20px 70px;
    }

    .products__hero{
        flex-direction:column;
        gap:20px;
        margin-bottom:28px;
    }

    .products__desc{
        max-width:100%;
    }

    .products__grid{
        grid-template-columns:1fr;
        gap:18px;
    }

    .pcard{
        height:300px;
    }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width:768px){

    .products{
        padding:110px 16px 55px;
    }

    .products__eyebrow{
        font-size:12px;
        letter-spacing:3px;
        margin-bottom:10px;
    }

    .products__title{
        font-size:34px;
        line-height:1.08;
    }

    .products__desc{
        font-size:15px;
        line-height:1.6;
    }

    .products__grid{
        grid-template-columns:1fr;
        gap:14px;
    }

    .pcard{
        height:250px;
        border-radius:18px;
    }

    .pcard__left,
    .pcard:hover .pcard__left{
        right:0;
        border-radius:18px;
    }

    /* На телефоне убираем выезжающую панель */

    .pcard__right{
        display:none;
    }

    .pcard__icon{
        width:42px;
        height:42px;
        top:14px;
        left:14px;
        border-radius:11px;
    }

    .pcard__icon img,
    .pcard__icon svg{
        width:22px;
        height:22px;
    }

    .pcard__body{
        left:16px;
        right:16px;
        bottom:16px;
    }

    .pcard__title{
        font-size:22px;
        margin-bottom:6px;
    }

    .pcard__desc{
        display:block;
        max-width:100%;
        opacity:1 !important;
        font-size:13px;
        line-height:1.45;
    }

    .pcard:hover .pcard__bg{
        transform:none;
    }

    .products__hint{
        display:none;
    }

}


/* =========================================================
   SMALL PHONE
========================================================= */

@media (max-width:480px){

    .products{
        padding:95px 14px 45px;
    }

    .products__title{
        font-size:30px;
    }

    .products__desc{
        font-size:14px;
    }

    .pcard{
        height:220px;
    }

    .pcard__icon{
        width:38px;
        height:38px;
    }

    .pcard__icon img,
    .pcard__icon svg{
        width:19px;
        height:19px;
    }

    .pcard__title{
        font-size:18px;
    }

    .pcard__desc{
        font-size:12px;
        line-height:1.35;
    }

}