/*===========================
    1.ral card
    2.ral color
===========================*/

.ral-card .ral-color {
  position: relative;
  overflow: hidden; }
  .ral-card .ral-color a {
    display: block; }
  .ral-card .ral-color img {
    width: 100%;
    -webkit-transition: all 0.4s ease-out 0s;
    -moz-transition: all 0.4s ease-out 0s;
    -ms-transition: all 0.4s ease-out 0s;
    -o-transition: all 0.4s ease-out 0s;
    transition: all 0.4s ease-out 0s; }
  .ral-card .ral-color .product-discount-tag {
    width: 70px;
    height: 70px;
    background-color: var(--brand-primary, #F85922);
    position: absolute;
    top: 20px;
    right: 20px;
    text-align: center;
    border-radius: 50%; }
    .ral-card .ral-color .product-discount-tag p {
      color: #fff;
      font-weight: 600;
      font-size: 22px;
      line-height: 70px; }
.ral-card .product-item-content .product-title a {
  font-size: 20px;
  color: #333;
  -webkit-transition: all 0.4s ease-out 0s;
  -moz-transition: all 0.4s ease-out 0s;
  -ms-transition: all 0.4s ease-out 0s;
  -o-transition: all 0.4s ease-out 0s;
  transition: all 0.4s ease-out 0s; }
  .ral-card .product-item-content .product-title a:hover {
    color: var(--brand-primary, #F85922); }
.ral-card .product-item-content .rating li {
  color: var(--brand-primary, #F85922);
  font-size: 12px;
  display: inline-block; }
.ral-card .product-item-content span {
  margin: 0 3px;
  font-size: 16px;
  font-weight: 600;
  position: relative; }
.ral-card .product-item-content .regular-price {
  color: var(--brand-primary, #F85922); }
.ral-card .product-item-content .discount-price {
  color: #c4c4c4; }
  .ral-card .product-item-content .discount-price::before {
    position: absolute;
    content: '';
    width: 100%;
    height: 1px;
    background-color: #222;
    left: 0;
    top: 50%;
    -webkit-transform: translateY(-50%);
    -moz-transform: translateY(-50%);
    -ms-transform: translateY(-50%);
    -o-transform: translateY(-50%);
    transform: translateY(-50%); }
.ral-card:hover .ral-color img {
  -webkit-transform: scale(1.1);
  -moz-transform: scale(1.1);
  -ms-transform: scale(1.1);
  -o-transform: scale(1.1);
  transform: scale(1.1); }
  .ral-color{
	border: 2px black;
	border-radius:12px;
	height: 250px;
	width: 100%;
  }

/*===========================
    RAL SEARCH MODULE
===========================*/

.ral-wrap{
  max-width:100%;
  margin:20px auto;
}

.ral-title{
  margin-bottom:10px;
}

.ral-input{
  width:100%;
  padding:12px;
  border:1px solid #ddd;
  border-radius:10px;
  outline:none;
}

.ral-result{
  margin-top:15px;
  display:flex;
  flex-direction:column;
  gap:10px;
}

.ral-card{
  display:flex;
  gap:12px;
  padding:12px;
  background:#fff;
  border:1px solid #eee;
  border-radius:10px;
  align-items:center;
}

.ral-box{
  width:60px;
  height:60px;
  border-radius:8px;
  border:1px solid #ddd;
}

.ral-code{
  font-weight:600;
}

.ral-name{
  font-size:13px;
  color:#666;
}

.ral-hex{
  font-size:12px;
  color:#999;
}

.ral-empty{
  text-align:center;
  padding:10px;
  color:#888;
}

/*===========================
    RAL GRID — BƯỚC 2
===========================*/

/* Filter nhóm màu */
.ral-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 20px;
}

.ral-filter-btn {
  padding: 8px 16px;
  border: 1px solid #ddd;
  background: var(--ral-filter-bg, #fff);
  color: var(--ral-filter-color, #333);
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ral-filter-btn:hover {
  border-color: var(--ral-filter-active-bg, var(--brand-primary, #F85922));
  color: var(--ral-filter-active-bg, var(--brand-primary, #F85922));
}

.ral-filter-btn.active {
  background: var(--ral-filter-active-bg, var(--brand-primary, #F85922));
  border-color: var(--ral-filter-active-bg, var(--brand-primary, #F85922));
  color: var(--ral-filter-active-color, #fff);
}

/* Grid item */
.ral-item {
  transition: opacity 0.2s ease;
}

.ral-item.is-hidden {
  display: none;
}

/* Swatch card */
.ral-swatch-card {
  display: flex;
  flex-direction: column;
  border: 1px solid #eee;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ral-swatch-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

/* Ô màu */
.ral-swatch {
  width: 100%;
  height: var(--ral-swatch-height, 120px);
  border-bottom: 1px solid #eee;
}

/* Thông tin dưới ô màu */
.ral-swatch-info {
  padding: 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ral-swatch-code {
  font-size: 14px;
  color: #222;
}

.ral-swatch-name {
  font-size: 12px;
  color: #666;
  line-height: 1.3;
}

.ral-swatch-hex {
  font-size: 11px;
  color: #999;
  font-family: monospace;
  margin-top: 2px;
}

/* Toast */
.ral-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ral-toast-bg, var(--brand-primary, #F85922));
  color: var(--ral-toast-color, #fff);
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  z-index: 9999;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.ral-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Responsive mobile cho Grid */
@media (max-width: 575.98px) {
  .ral-swatch {
    height: var(--ral-swatch-height-mobile, 90px);
  }
  .ral-swatch-code {
    font-size: 12px;
  }
  .ral-swatch-name {
    font-size: 11px;
  }
  .ral-filter-btn {
    padding: 6px 12px;
    font-size: 13px;
  }
}

/*===========================
    RAL INTRO — SPLIT SHOWCASE
===========================*/

.ral-intro-divider {
  border: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--brand-primary, #F85922), transparent);
  opacity: .4;
  margin: 40px 0;
}

.ral-intro-wrap {
  margin-bottom: 20px;
}

/* Cột trái: visual */
.ral-intro-visual {
  background: linear-gradient(135deg, #FFF8F3 0%, #FFE8D9 100%);
  border-radius: 20px;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  position: relative;
  overflow: hidden;
  height: 100%;
}

.ral-intro-visual::before {
  content: "";
  position: absolute;
  top: -60px;
  right: -60px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(248, 89, 34, 0.15), transparent 70%);
  pointer-events: none;
}

.ral-intro-logo {
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.1));
}

.ral-intro-logo img {
  display: block;
  width: 140px;
  max-width: 100%;
  height: auto;
}

/* Dải swatch trang trí */
.ral-intro-swatches {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(16, 1fr);
  gap: 4px;
  width: 100%;
  max-width: 360px;
}

.ral-mini-swatch {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 3px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease;
}

.ral-mini-swatch:hover {
  transform: scale(1.4);
  z-index: 2;
  position: relative;
}

/* Cột phải: nội dung */
.ral-intro-content {
  padding: 8px 0;
}

.ral-intro-title {
  font-size: 26px;
  font-weight: 700;
  color: #222;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  line-height: 1.3;
}

.ral-intro-title-bar {
  display: inline-block;
  width: 6px;
  height: 32px;
  background: var(--brand-primary, #F85922);
  border-radius: 3px;
  flex-shrink: 0;
}

.ral-intro-lead {
  font-size: 15px;
  color: #444;
  line-height: 1.7;
  margin-bottom: 24px;
}

/* Features grid */
.ral-intro-features {
  background: #FFFBF8;
  border-left: 4px solid var(--brand-primary, #F85922);
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 24px;
}

.ral-features-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--brand-primary, #F85922);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ral-features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.ral-feature {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: #333;
  line-height: 1.5;
}

.ral-feature i {
  color: var(--brand-primary, #F85922);
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 2px;
}

/* Đoạn văn dài */
.ral-intro-desc {
  font-size: 15px;
  color: #444;
  line-height: 1.75;
  margin-bottom: 14px;
}

.ral-intro-desc:last-of-type {
  margin-bottom: 0;
}

.ral-intro-link {
  color: var(--brand-primary, #F85922);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px dashed var(--brand-primary, #F85922);
}

.ral-intro-link:hover {
  color: var(--brand-primary-dark, #d9481a);
  border-bottom-style: solid;
}

/* Nút CTA */
.ral-intro-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.ral-btn-primary,
.ral-btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  border: 2px solid var(--brand-primary, #F85922);
}

.ral-btn-primary {
  background: var(--brand-primary, #F85922);
  color: #fff;
}

.ral-btn-primary:hover {
  background: var(--brand-primary-dark, #d9481a);
  border-color: var(--brand-primary-dark, #d9481a);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(248, 89, 34, 0.3);
}

.ral-btn-outline {
  background: transparent;
  color: var(--brand-primary, #F85922);
}

.ral-btn-outline:hover {
  background: var(--brand-primary, #F85922);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(248, 89, 34, 0.25);
}

.ral-btn-primary i,
.ral-btn-outline i {
  font-size: 16px;
}

/* Responsive */
@media (max-width: 991.98px) {
  .ral-intro-visual {
    max-width: 420px;
    margin: 0 auto;
  }
  .ral-intro-title {
    font-size: 22px;
  }
  .ral-intro-title-bar {
    height: 26px;
  }
}

@media (max-width: 575.98px) {
  .ral-intro-visual {
    padding: 24px 16px;
    gap: 18px;
  }
  .ral-intro-logo img {
    width: 110px;
  }
  .ral-intro-swatches {
    grid-template-columns: repeat(12, 1fr);
    max-width: 260px;
  }
  .ral-intro-title {
    font-size: 19px;
    gap: 8px;
  }
  .ral-intro-title-bar {
    height: 22px;
    width: 4px;
  }
  .ral-intro-actions {
    flex-direction: column;
  }
  .ral-btn-primary,
  .ral-btn-outline {
    justify-content: center;
    width: 100%;
  }
}

/*===========================
    RAL SEARCH CARD (Giao diện mới)
===========================*/

.ral-search-card {
  background: #fff;
  border: 1px solid #ffe0d0;
  border-radius: 16px;
  padding: 24px 32px;
  margin-bottom: 32px;
  box-shadow: 0 4px 20px rgba(248, 89, 34, 0.05);
}

.ral-search-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.ral-search-logo img {
  width: 64px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.ral-search-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--brand-primary, #F85922);
  margin: 0 0 4px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ral-search-subtitle {
  font-size: 14px;
  color: #666;
  margin: 0;
}

.ral-search-card .ral-input {
  background: #fcfcfc;
  border: 1px solid #ddd;
  transition: all 0.2s ease;
}

.ral-search-card .ral-input:focus {
  background: #fff;
  border-color: var(--brand-primary, #F85922);
  box-shadow: 0 0 0 3px rgba(248, 89, 34, 0.1);
}

/* Responsive cho khung search */
@media (max-width: 575.98px) {
  .ral-search-card {
    padding: 16px;
  }
  .ral-search-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .ral-search-logo img {
    width: 48px;
  }
  .ral-search-title {
    font-size: 18px;
  }
}

/*===========================
    RAL SEARCH CLEAR BUTTON (Nút Xóa)
===========================*/

.ral-input-group {
  position: relative;
  width: 100%;
}

/* Đẩy chữ sang trái một chút để không bị đè lên nút X */
.ral-input-group .ral-input {
  padding-right: 40px; 
}

.ral-clear-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #ccc;
  font-size: 20px;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
  line-height: 1;
}

.ral-clear-btn:hover {
  color: var(--brand-primary, #F85922);
}