:root{
    /* FCNC Color Palette */
    --primary: #1F2A44;
    --accent-cta: #E77C3C;
    --accent-links: #7896F7;
    --surface-light: #F7F3EE;
    --surface-white: #FFFFFF;
    --text-primary: #222222;
    
    /* Legacy variables (for compatibility) */
    --accent:#7896F7;
    --muted:#6b7280;
    --text:#222222;
    --bg:#F7F3EE;
    --card:#ffffff;
    --radius:14px;
    --shadow:0 10px 28px rgba(16,30,50,.08);
    --shadow-sm:0 6px 16px rgba(16,30,50,.06);
    --maxw:1100px;
  
    /* typography defaults (may be overridden inline via CSS variables) */
    --fcnc-h1: 28px;
    --fcnc-lead: 15px;
    --fcnc-h2: 22px;
  
    --step-title-size: 17px;
    --step-title-size-mobile: 15px;
  }
  
  /* base wrapper */
  .fcnc-shell{font-family:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial;color:var(--text);background:transparent;padding:26px 5px;}
  .fcnc-wrap{max-width:var(--maxw);margin:0 auto;}
  
  /* headings & text */
  .fcnc-title{font-size:var(--fcnc-h1);line-height:1.2;margin:6px 0 10px;font-weight:700;}
  .fcnc-lead{color:var(--muted);font-size:var(--fcnc-lead);line-height:1.6;margin:0;}
  .fcnc-h2{font-size:var(--fcnc-h2);line-height:1.25;margin:0 0 12px;font-weight:600;}
  .fcnc-p{font-size:16px;line-height:1.6;color:var(--muted);margin:0 0 8px;}
  .fcnc-note{color:var(--muted);font-size:13px;margin-top:12px;}
  .fcnc-align-center{text-align:center;}
  .fcnc-align-left{text-align:left;}
  .fcnc-align-right{text-align:right;}
  
  /* sections & cards */
  .fcnc-section{padding:20px 0;}
  .fcnc-card{background:linear-gradient(180deg,#fff,#fbfdff);border-radius:var(--radius);padding:26px;border:1px solid rgba(10,20,40,.06);box-shadow:var(--shadow-sm);transition:transform .25s ease,box-shadow .25s ease;}
  .fcnc-card:hover{transform:translateY(-3px);box-shadow:var(--shadow);}
  
  /* two-column grids */
  .fcnc-two{display:grid;grid-template-columns:1fr 1fr;gap:18px;}
  @media (max-width:900px){.fcnc-two{grid-template-columns:1fr;}}
  
  /* steps */
  .fcnc-steps{display:grid;grid-template-columns:repeat(2,1fr);gap:16px;margin-top:14px;}
  @media (max-width:900px){.fcnc-steps{grid-template-columns:1fr;}}
  .fcnc-steps.tight{gap:14px;}
  
  .fcnc-step{display:flex;gap:12px;align-items:flex-start;background:#fff;border:1px solid rgba(10,20,40,.06);border-radius:12px;padding:16px;box-shadow:0 6px 16px rgba(16,30,50,.05);}
  .fcnc-ico{width:46px;height:46px;border-radius:50%;background:linear-gradient(135deg,#f0f8ff,#e8f4ff);border:1px solid rgba(0,115,170,.10);display:flex;align-items:center;justify-content:center;font-size:20px;flex-shrink:0;}
  .fcnc-step-title{margin:0 0 6px;color:var(--accent);line-height:1.3;font-size:var(--step-title-size);}
  .fcnc-step p{margin:0;color:var(--muted);font-size:16px;line-height:1.55;}
  @media (max-width:600px){.fcnc-ico{width:42px;height:42px;font-size:18px;}.fcnc-step-title{font-size:var(--step-title-size-mobile);}}
  
  /* center subheading inside a card */
  .fcnc-center-title{text-align:center;font-weight:700;font-size:20px;color:#0f2130;margin:0 0 6px;}
  
  /* divider inside card */
  .fcnc-divider{height:1px;background:rgba(10,20,40,.08);margin:16px 0 12px;border:0;display:block;}
  
  /* OPTIONS block (how to order) */
  .fcnc-options-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;}
  @media (max-width:900px){.fcnc-options-grid{grid-template-columns:1fr;}}
  .fcnc-option-card{display:flex;gap:12px;align-items:flex-start;background:linear-gradient(180deg,#fff,#fbfdff);border:1px solid rgba(10,20,40,.06);border-radius:14px;padding:20px;box-shadow:0 2px 8px rgba(16,30,50,.06);transition:transform .25s ease,box-shadow .25s ease;}
  .fcnc-option-card:hover{transform:translateY(-2px);box-shadow:0 10px 24px rgba(16,30,50,.08);}
  .fcnc-option-ico{width:60px;height:60px;flex:0 0 60px;display:flex;align-items:center;justify-content:center;border-radius:50%;background:linear-gradient(135deg,#f0f8ff,#e8f4ff);border:1px solid rgba(0,115,170,.10);font-size:20px;}
  .fcnc-option-body{flex:1;}
  .fcnc-option-title{margin:0 0 6px;color:#0f2130;font-size:20px;font-weight:600;}
  .fcnc-option-text{margin:0;color:#6b7280;font-size:16px;line-height:1.55;}
  @media (max-width:480px){.fcnc-option-card{padding:16px;border-radius:12px;}.fcnc-option-ico{width:42px;height:42px;font-size:18px;}}
  
  /* full-bleed on mobile (stretch to viewport edges only for landing) */
  @media (max-width:768px){
    .fcnc-shell.fcnc-bleed{margin-left:calc(50% - 50vw);margin-right:calc(50% - 50vw);padding-left:clamp(12px,4vw,20px);padding-right:clamp(12px,4vw,20px);}
    .fcnc-shell.fcnc-bleed .fcnc-wrap{max-width:95vw;margin:0;}
    .fcnc-card{padding:20px;border-radius:12px;}
  }
  
  /* ============================================================================
     FCNC: Кастомная карточка товара WooCommerce
     ============================================================================ */
  
  .fcnc-custom-product {
      max-width: 1400px;
      margin: 0 auto;
      padding: 30px 20px;
      background: #fff;
      border-radius: 8px;
  }
  
/* Убираем всё лишнее из карточки */
.fcnc-custom-product .entry-header,
.fcnc-custom-product .entry-meta,
.fcnc-custom-product .entry-footer,
.fcnc-custom-product .posted_in,
.fcnc-custom-product .tagged_as,
.fcnc-custom-product .product_meta {
    display: none !important;
}

/* Хлебные крошки */
.fcnc-breadcrumbs {
    margin-bottom: 20px;
    padding: 12px 0;
    font-size: 14px;
    line-height: 1.5;
    color: #666;
}

.fcnc-breadcrumbs a {
    color: #7896F7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.fcnc-breadcrumbs a:hover {
    color: #E77C3C;
    text-decoration: underline;
}

 /* Основная обертка для кастомной карточки */
 .fcnc-custom-product {
     max-width: 1200px;
     margin: 0 auto;
     padding: 30px 20px 0;
     box-sizing: border-box;
     border-radius: 8px;
   }
  
  /* Заголовок с ценой (на всю ширину) */
    .fcnc-product-header {
        background: linear-gradient(135deg, #f5f5fc 0%, #FFFFFF 100%);
        border: 1px solid #f5f5fc;
        border-radius: 8px;
        padding: 20px 24px;
        margin-bottom: 24px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        box-shadow: 0 4px 12px #5e81f542;
        width: 100%;
        box-sizing: border-box;
    }
  
  .fcnc-header-title h1 {
      font-size: 20px;
      font-weight: 600;
      color: #222222;
      margin: 0;
      line-height: 1.3;
  }
  
    .fcnc-header-price {
        white-space: nowrap;
        margin-left: 20px;
        background-color: #ff8c00;
        color: white;
        padding: 0px 30px;
        border-radius: 8px;
    }
  
  .fcnc-header-price .fcnc-average-price {
      font-size: 36px;
  }
  
   /* Основной контент (пропорции 40/60, высота 400px) */
   .fcnc-product-content {
       display: grid;
       grid-template-columns: 400px 1fr;
       gap: 30px;
       margin-bottom: 30px;
       min-height: 400px;
       max-width: 100%;
       margin-left: auto;
       margin-right: auto;
       align-items: start;
   }
  
  .fcnc-product-gallery {
      position: relative;
      width: 400px;
      height: 464px;
      overflow: hidden;
  }
  
  /* Фиксированный размер изображения 400×400px с обрезкой */
  .fcnc-product-gallery .woocommerce-product-gallery {
      width: 400px;
      height: 464px;
  }
  
  .fcnc-product-gallery .woocommerce-product-gallery__image img {
      width: 400px;
      height: 464px;
      object-fit: cover;
      border-radius: 8px;
  }
  
  .fcnc-product-gallery .flex-viewport {
      width: 400px !important;
      height: 464px !important;
  }
  
  /* Убираем лупу (зум) */
  .fcnc-product-gallery .woocommerce-product-gallery__trigger {
      display: none !important;
  }
  
  .fcnc-product-prices {
      position: relative;
      top: 0;
      height: fit-content;
      width: 100%;
      max-width: 100%;
      overflow: visible;
  }
  
  /* ============================================================================
     Стили для вкладок WooCommerce
     ============================================================================ */
  
  .fcnc-custom-product .woocommerce-tabs {
      margin-top: 30px;
      clear: both;
      width: 100%;
      box-sizing: border-box;
      max-width: 100%;
  }
  
  .fcnc-custom-product .woocommerce-tabs ul.tabs {
      list-style: none;
      padding: 0;
      margin: 0 0 -1px 0;
      border-bottom: 2px solid #ddd;
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
  }
  
  .fcnc-custom-product .woocommerce-tabs ul.tabs li {
      margin: 0;
      padding: 0;
      background: #f5f5fc;
      border: 1px solid #eeeeeec2;
      border-bottom: none;
      border-radius: 4px 4px 0 0;
      transition: all 0.3s ease;
  }
  
  .fcnc-custom-product .woocommerce-tabs ul.tabs li:hover {
      background: #fff;
  }
  
  .fcnc-custom-product .woocommerce-tabs ul.tabs li.active {
      background: #fff;
      border-bottom: 2px solid #fff;
      position: relative;
      z-index: 2;
      margin-bottom: -2px;
  }
  
  .fcnc-custom-product .woocommerce-tabs ul.tabs li a {
      display: block;
      padding: 12px 20px;
      color: #333;
      text-decoration: none;
      font-weight: 600;
      transition: color 0.3s ease;
  }
  
  .fcnc-custom-product .woocommerce-tabs ul.tabs li.active a {
      color: #222222;
  }
  
    .fcnc-custom-product .woocommerce-tabs .panel {
        padding: 1px;
        background: #fff;
        border-radius: 0 0 4px 4px;
        margin-top: 0;
        width: 100%;
        box-sizing: border-box;
        max-width: 100%;
    }
  
  /* Кнопки FCNC */
  .fcnc-btn {
      display: inline-block;
      border-radius: 8px;
      font-size: 16px;
      font-weight: 400;
      text-decoration: none;
      text-align: center;
      transition: all 0.3s ease;
      border: none;
      cursor: pointer;
      font-family: inherit;
      white-space: nowrap;
  }
  
  .fcnc-btn-primary {
      background: #ff8c00;
      color: #FFFFFF;
  }
  
  .fcnc-btn-primary:hover {
      background: #d16a2d;
      transform: translateY(-1px);
  }
  
  .fcnc-btn-secondary {
      background: #7896F7;
      color: #FFFFFF;
  }
  
  .fcnc-btn-secondary:hover {
      background: #5f7de6;
      transform: translateY(-1px);
      color: #FFFFFF;
      text-decoration: none;
  }
  
  .fcnc-mini-buttons {
      display: flex;
      gap: 10px;
      margin-top: 16px;
      flex-wrap: wrap;
      justify-content: center;
  }
  
  /* Информационный блок мини-таблицы */
  .fcnc-mini-info-blocktest {
      background: #f8f9fa;
      border-left: 4px solid var(--primary);
      padding: 20px 24px;
      margin-bottom: 24px;
      border-radius: 8px;
      line-height: 1.6;
  }
  
  .fcnc-mini-info-block p {
      margin: 0 0 12px 0;
      font-size: 14px;
      color: #495057;
  }
  
  .fcnc-mini-info-block p:last-child {
      margin-bottom: 0;
  }
  
  .fcnc-mini-info-block strong {
      color: #222222;
      font-weight: 600;
  }
  
  /* Контейнер фильтра и кнопок (3 колонки) */
  .fcnc-mini-controls {
      display: grid;
      grid-template-columns: 1fr 1fr 1fr;
      gap: 12px;
      margin-bottom: 10px;
      align-items: end;
  }
  
  /* Фильтр */
  .fcnc-mini-filter {
      display: flex;
      flex-direction: column;
      gap: 1px;
  }
  
    .fcnc-filter-label {
        font-size: 12px;
        font-weight: 600;
        color: #495057;
        margin-bottom: 1px;
    }
  
  .fcnc-thickness-select {
      width: 100%;
      padding: 10px 16px;
      font-size: 15px;
      color: #222222;
      background: #f5f5fc;
      border: 1px solid #dee2e6;
      border-radius: 8px;
      cursor: pointer;
      transition: all 0.3s ease;
      appearance: none;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='%23E77C3C' d='M0 0l6 8 6-8z'/%3E%3C/svg%3E");
      background-repeat: no-repeat;
      background-position: right 16px center;
      padding-right: 40px;
      box-sizing: border-box;
  }
  
  .fcnc-thickness-select:hover {
      border-color: #d16a2d;
      background-color: #FFFFFF;
  }
  
  .fcnc-thickness-select:focus {
      outline: none;
      border-color: #E77C3C;
      box-shadow: 0 0 0 3px rgba(231, 124, 60, 0.1);
  }
  
  /* Улучшения для мини-таблицы в карточке товара */
    .fcnc-product-prices .fcnc-mini-container {
        box-shadow: 0 4px 16px #5e81f524;
        border: 1px solid #f5f5fc;
        background: #FFFFFF;
        padding: 20px;
        border-radius: 12px;
        width: 100%;
        box-sizing: border-box;
        max-width: 100%;
    }
  
  
  /* Адаптивность для планшетов */
  @media (max-width: 968px) {
      .fcnc-product-content {
          grid-template-columns: 1fr;
          gap: 20px;
      }
  
      .fcnc-product-prices {
          position: static;
      }
  
      .fcnc-product-gallery {
          width: 100%;
          max-width: 400px;
          height: 400px;
          margin: 0 auto;
      }
  
      .fcnc-product-gallery .woocommerce-product-gallery,
      .fcnc-product-gallery .woocommerce-product-gallery__image img,
      .fcnc-product-gallery .flex-viewport {
          width: 100% !important;
          height: 400px !important;
      }
  
      .fcnc-product-header {
          flex-direction: column;
          text-align: center;
          padding: 16px 20px;
      }
  
      .fcnc-header-title h1 {
          font-size: 18px;
          margin-bottom: 10px;
      }
  
      .fcnc-header-price {
          margin-left: 0;
          font-size: 28px;
      }
  
      .fcnc-mini-buttons {
          flex-direction: column;
      }

      .fcnc-btn {
          width: 100%;
      }
      
      /* Адаптив для контролов мини-таблицы */
      .fcnc-mini-controls {
          grid-template-columns: 1fr 1fr;
          gap: 10px;
      }
      
      .fcnc-mini-filter {
          grid-column: 1 / -1;
      }
  }
  
/* Мобильная версия */
@media (max-width: 600px) {
    .fcnc-custom-product {
        padding: 12px;
    }

    /* Хлебные крошки на мобильных */
    .fcnc-breadcrumbs {
        font-size: 12px;
        padding: 8px 0;
        margin-bottom: 16px;
    }

    .fcnc-product-header {
        padding: 14px 16px;
        margin-bottom: 16px;
    }
  
      .fcnc-header-title h1 {
          font-size: 16px;
      }
  
      .fcnc-header-price {
          font-size: 24px;
      }
  
      .fcnc-header-price .fcnc-average-price {
          font-size: 28px;
      }
      
      /* Мобильная версия контролов - все в 1 колонку */
      .fcnc-mini-controls {
          grid-template-columns: 1fr;
          gap: 12px;
      }
      
      .fcnc-mini-filter {
          grid-column: auto;
      }
      
      .fcnc-mini-info-block {
          padding: 16px 18px;
          font-size: 13px;
      }
      
      .fcnc-mini-info-block p {
          font-size: 13px;
          margin-bottom: 10px;
      }
  
      .fcnc-product-content {
          gap: 16px;
          margin-bottom: 20px;
      }
  
      /* На мобилке порядок: заголовок+цена → фото → таблица */
      .fcnc-product-gallery {
          order: 1;
      }
  
      .fcnc-product-prices {
          order: 2;
      }
  }
  
  /* Скрываем стандартную цену WooCommerce, если она дублируется */
  .fcnc-custom-product .summary .price {
      display: none;
  }
  
   /* Скрываем стандартный заголовок (он теперь в fcnc-product-header) */
   .fcnc-custom-product .product_title {
       display: none;
   }

   /* ============================================================================
      Стили для похожих товаров (Другие ЧПУ-услуги)
      ============================================================================ */

   .related.products {
       margin-top: 60px;
       padding: 40px 0;
       border-radius: 12px;
   }

   .related.products h2 {
       font-size: 28px;
       font-weight: 700;
       color: #222222;
       text-align: center;
       margin-bottom: 40px;
   }

   .related.products ul.products {
       display: grid;
       grid-template-columns: repeat(3, 1fr);
       gap: 30px;
       list-style: none;
       padding: 0 30px;
       margin: 0;
   }

   .related.products ul.products li.product {
       background: #ffffff;
       border: 1px solid #e0e0e0;
       border-radius: 12px;
       padding: 20px;
       transition: all 0.3s ease;
       box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
   }

   .related.products ul.products li.product:hover {
       transform: translateY(-5px);
       box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
       border-color: #7896F7;
   }

   .related.products ul.products li.product img {
       width: 100%;
       height: 250px;
       object-fit: cover;
       border-radius: 8px;
       margin-bottom: 15px;
   }

   .related.products ul.products li.product h3,
   .related.products ul.products li.product .woocommerce-loop-product__title {
       font-size: 18px;
       font-weight: 600;
       color: #222222;
       margin-bottom: 12px;
       line-height: 1.4;
   }

   .related.products ul.products li.product h3 a,
   .related.products ul.products li.product .woocommerce-loop-product__title {
       color: #222222;
       text-decoration: none;
       transition: color 0.2s ease;
   }

   .related.products ul.products li.product h3 a:hover {
       color: #7896F7;
   }

   .related.products ul.products li.product .price {
       font-size: 22px;
       font-weight: 700;
       color: #ff8c00;
       margin-bottom: 15px;
   }

   .related.products ul.products li.product .button {
       display: inline-block;
       width: 100%;
       padding: 12px 20px;
       background: #7896F7;
       color: #ffffff;
       text-align: center;
       border-radius: 8px;
       font-weight: 600;
       text-decoration: none;
       transition: all 0.3s ease;
   }

   .related.products ul.products li.product .button:hover {
       background: #5f7de6;
       transform: translateY(-2px);
   }

   /* Адаптивность для похожих товаров */
   @media (max-width: 968px) {
       .related.products ul.products {
           grid-template-columns: repeat(2, 1fr);
           gap: 20px;
           padding: 0 20px;
       }

       .related.products h2 {
           font-size: 24px;
           margin-bottom: 30px;
       }
   }

   @media (max-width: 600px) {
       .related.products {
           margin-top: 40px;
           padding: 30px 15px;
       }

       .related.products ul.products {
           grid-template-columns: 1fr;
           gap: 20px;
           padding: 0 15px;
       }

       .related.products ul.products li.product img {
           height: 200px;
       }

       .related.products h2 {
           font-size: 22px;
       }
   }