﻿/* =========================================================
   SSL & Security — FINAL
   (dùng cho toàn section SSL; body giữ gradient toàn site)
   ========================================================= */


/* =========================================================
   1️⃣ Section khung tổng thể
   ========================================================= */
.ssl-section {
  width: 100%;
  background: transparent;
  padding: var(--body-section-py-lg) 0;
  box-sizing: border-box;
}

/* Container đồng bộ max-width toàn site */
.ssl-container {
  max-width: var(--body-inner-max);
  margin: 0 auto;
  padding: 0 var(--body-px);
  text-align: center;
}


/* =========================================================
   2️⃣ Heading + Subtitle
   ========================================================= */
.ssl-title {
  font-size: clamp(2.4rem, 3.2vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 10px;
  text-align: center;
  text-shadow: 0 3px 12px rgba(37, 99, 235, 0.25);
}

.ssl-subtitle {
  font-size: clamp(1rem, 1.2vw, 1.25rem);
  margin-bottom: 28px;
  text-align: center;
}

.ssl-tab-anchor {
  display: block;
  height: 0;
  overflow: hidden;
  scroll-margin-top: 96px;
}


/* =========================================================
   3️⃣ Tabs — Unified with AI Section Design
   ========================================================= */

/* SSL Tabs Container */
.ssl-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  width: fit-content;
  margin: 24px auto 32px;
  padding: 8px 10px;
  border-radius: 9999px;

  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.45),
    rgba(255, 255, 255, 0.25)
  );
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 8px 22px rgba(36, 74, 140, 0.12);

  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);

  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.ssl-tabs::-webkit-scrollbar { display: none; }

/* Single tab buttons */
.ssl-tabs .tab {
  position: relative;
  border: none;
  background: transparent;
  color: #1e293b;
  font-weight: 700;
  font-size: 1rem;
  padding: 10px 22px;
  border-radius: 9999px;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.25s, color 0.25s, box-shadow 0.25s;
}

/* Hover */
.ssl-tabs .tab:hover {
  background: rgba(255, 255, 255, 0.22);
}

/* Focus */
.ssl-tabs .tab:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.35);
}

/* Active */
.ssl-tabs .tab.is-active,
.ssl-tabs .tab[aria-selected="true"] {
  color: #0f172a;
  background: #fff;
  box-shadow:
    0 5px 16px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

/* Active underline */
.ssl-tabs .tab.is-active::after,
.ssl-tabs .tab[aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 2px;
  height: 1.5px;
  border-radius: 3px;
  background: linear-gradient(90deg, #1e3a8a, #2563eb);
}

.ssl-tabs .tab.is-active:focus-visible,
.ssl-tabs .tab[aria-selected="true"]:focus-visible {
  box-shadow:
    0 5px 16px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 0 0 3px rgba(37, 99, 235, 0.35);
}

.ssl-tabs .tab.is-active:focus-visible,
.ssl-tabs .tab[aria-selected="true"]:focus-visible {
  box-shadow:
    0 5px 16px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 0 0 3px rgba(37, 99, 235, 0.35);
}


/* =========================================================
   4️⃣ Grid — bố cục card SSL
   ========================================================= */
.ssl-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--body-grid-gap);
  align-items: stretch;
}


/* =========================================================
   5️⃣ Card
   ========================================================= */
.ssl-card {
  position: relative;
  background: #fff;
  border-radius: 16px;

  /* 🔧 GIẢM PADDING cho card bớt cao */
  padding: 20px 18px;

  display: flex;
  flex-direction: column;
  gap: 12px;          /* trước 14px – giảm nhẹ để tiết kiệm vertical space */
  min-height: 240px;
  text-align: left;
  box-shadow:
    0 8px 30px rgba(0, 0, 0, 0.06),
    0 4px 15px rgba(37, 99, 235, 0.08);
  transition: transform .25s, box-shadow .25s;
}

.ssl-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 26px rgba(0,0,0,.14);
}


/* =========================================================
   6️⃣ Badge — dòng đầu trong card
   ========================================================= */
.ssl-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  padding: 0 12px;
  border-radius: 12px;
  background: linear-gradient(135deg,#ff7a18,#ffb347);
  color: #fff;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .3px;
  width: fit-content;
}

/* 🔧 giữ đúng chiều cao nhưng ẩn badge → layout các card vẫn align */
.ssl-badge.empty {
  background: linear-gradient(135deg,#ff7a18,#ffb347);
  padding: 0 12px;
  visibility: hidden;
}


/* =========================================================
   7️⃣ Card header: logo + tên sản phẩm
   ========================================================= */
.ssl-card-header {
  position: relative;
  display: flex;
  flex-direction: column;   /* ✅ logo trên, tên dưới (2 hàng) */
  align-items: center;      /* ✅ canh giữa theo chiều ngang */
  text-align: center;       /* ✅ chữ trong header cũng canh giữa */
  gap: 10px;
  margin-bottom: 4px;
}

.ssl-card-detail-link {
  position: absolute;
  top: 2px;
  right: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(15, 23, 42, 0.62);
  cursor: pointer;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1;
}

.ssl-card-detail-link:hover {
  color: rgba(15, 23, 42, 0.78);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ssl-card-detail-ico {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  color: rgba(15, 23, 42, 0.55);
  font-size: 0.78rem;
  font-weight: 900;
}

.ssl-card-detail-arrow {
  opacity: 0.55;
}

.ssl-card-logo {
  width: 140px;             /* chiều rộng khung cố định */
  height: 40px;             /* chiều cao cố định */
  display: flex;
  align-items: center;
  justify-content: flex-start; /* logo bám trái */
}

.ssl-card-logo img {
  max-height: 100%;         /* co theo chiều cao khung */
  max-width: 100%;          /* không tràn ra ngoài */
  width: auto;
  height: auto;
  object-fit: contain;       /* giữ đúng tỷ lệ */
}


.ssl-name,
.ssl-card-header h3 {
  margin: 0;
  font-size: 1.45rem;
  line-height: 1.25;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  
  /* Allow up to 2 lines for longer titles */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
  min-height: 2.3rem;
}


/* =========================================================
   8️⃣ Mô tả / Features & Giá
   ========================================================= */

/* Nếu vẫn dùng <p class="ssl-desc"> thì style như cũ */
.ssl-desc {
  font-size: 1rem;
  color: #475569;
  line-height: 1.55;
  min-height: 56px; /* các card đều nhau */
  flex: 1;
}

/* --- NEW: khối main chia 2 cột: features + price --- */
.ssl-card-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;                   /* 🔧 giảm 24 → 20 */
  margin-top: 8px;             /* 🔧 giảm 12 → 8 */
  padding-top: 12px;           /* 🔧 giảm 16 → 12 */
  border-top: 1px solid rgba(148,163,184,0.35);
}

/* 3 dòng feature bên trái */
.ssl-features {
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1 1 50%;
}

.ssl-features li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 6px;
  font-size: 0.95rem;
  color: #475569;
  line-height: 1.5;
}
.ssl-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: #16a34a;
  font-size: 0.8rem;
}

/* Cột giá bên phải */
.ssl-price-col {
  flex: 0 0 40%;
  text-align: right;
}

/* Giá gốc */
.ssl-price-old {
  display: block;
  font-size: 0.9rem;
  color: #94a3b8;
  text-decoration: line-through;
  margin-bottom: 2px;
}

/* Giá hiện tại */
.ssl-price-current {
  display: block;
  font-size: 1.08rem;
  font-weight: 700;
  color: #1e3a8a;
}

/* "Từ" label — small, above main price */
.ssl-price-prefix {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  color: #64748b;
  margin-top: 6px;
  line-height: 1.2;
}

/* Discount badge */
.ssl-price-discount {
  display: inline-block;
  margin-top: 5px;
  padding: 2px 8px;
  border-radius: 4px;
  background: #dcfce7;
  color: #16a34a;
  font-size: 0.78rem;
  font-weight: 700;
}

/* Ghi chú nhỏ dưới giá */
.ssl-price-note {
  display: block;
  margin-top: 4px;
  font-size: 0.8rem;
  color: #64748b;
}


/* =========================================================
   9️⃣ Card footer — CTA layout
   ========================================================= */

/* footer trong card – override footer global */
.ssl-card-footer {
  background: transparent !important;
  padding: 0 !important;
  margin-top: auto;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
}

/* Primary CTA: fill remaining space, text on 1 line */
.ssl-card-footer .kuma-btn--primary {
  flex: 1 1 0;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.88rem;
}

/* Secondary/ghost: shrink to content */
.ssl-card-footer .kuma-btn--ghost {
  flex: 0 0 auto;
}



/* =========================================================
   🔟 Responsive layout (media queries)
   ========================================================= */
@media (min-width: 641px) and (max-width: 1024px) {
  .ssl-container {
    max-width: var(--body-tablet-rail-max);
    padding: 0px;
  }

  .ssl-card-grid {
    grid-template-columns: 1fr;
    width: 100%;
    max-width: none;
    margin-inline: 0;
  }
}
@media (max-width:640px) {
  .ssl-card-grid {
    grid-template-columns: 1fr;
    width: 100%;
    max-width: none;
    margin-inline: 0;
  }
  .ssl-card-main {
    /* flex-direction: column; */
    align-items: stretch;
  }
  .ssl-container {
    padding: 0 var(--body-px);
  }
  /* .ssl-price-col {
    text-align: left;
  } */
}
