:root {
    --via-border-color: #ccc;
    --via-primary-color: #F5A623;
    --via-primary-hover: #F5BC34;
    --via-primary-light: #ffcc99;
    --via-max-width: 1444px;
}

/* =========================
	GENERAL
========================= */
.via-container {
  max-width: var(--via-max-width) !important;
}
/* Bảng sản phẩm kiểu WP admin cho front-end */

table.via-list-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5em;
    font-family: Arial, sans-serif;
    font-size: 14px;
}

table.via-list-table th,
table.via-list-table td {
    border: 1px solid #e1e1e1;
    padding: 10px 12px;
    text-align: left;
    vertical-align: middle;
}

table.via-list-table thead th {
    background-color: #ffbc34;
    color: #ffffff;
    font-weight: 700;
    text-align: center;
}

table.via-list-table tbody tr:nth-child(odd) {
    background-color: #f9f9f9;
}

table.via-list-table tbody tr:hover {
    background-color: #f1f1f1;
}

table.via-list-table.fixed th,
table.via-list-table.fixed td {
    table-layout: fixed;
}


/* Note */

.via-note {
    background-image: url("../images/note-147951_640.webp");
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center top;
    width: fit-content;
    height: fit-content;
    padding: 20px 26px 30px 54px;
    color: #111;
}

ul.via-note li,
ol.via-note li {
    margin-bottom: 0;
    max-width: 350px;
}

.via-list-h {
    border-left: 6px solid green;
    padding: 12px 20px 12px 26px;
    width: fit-content;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.3);
}

/* Section single product */
.section__content {
    background-color: #fff;
    border-top: 1px solid #f5a623;
    padding: 20px 16px;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

/* Glass Effect */
.via-glassmorphism {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    padding: 10px 20px !important;
    border-radius: 9px !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
}

/* Loader bar */
:root {
  --via-loader-height: 3px;
  --via-loader-color: #f5a623;
  --via-loader-duration: 10s;
}

/* áp dụng trực tiếp vào tiêu đề */
.via-loader-bar {
  position: relative;
  display: inline-block;
  padding-bottom: 10px;
  overflow: hidden; /* phòng lỗi tràn */
}

.via-loader-bar.quick {
  --via-loader-color: #008d86;
}

/* thanh loader */
.via-loader-bar::after {
  content: "";
  position: absolute;
  bottom: 0;
  height: var(--via-loader-height);
  background: var(--via-loader-color);
  border-radius: 10px;

  animation: via-loader-animate var(--via-loader-duration) ease-in-out infinite;
}

@keyframes via-loader-animate {
  0% {
    width: 0%;
    left: 0%;
  }
  25% {
    width: 100%;
    left: 0%;
  }
  50% {
    width: 0%;
    left: 100%;
  }

  75% {
    width: 100%;
    left: 0%;
  }
  100% {
    width: 0%;
    left: 0%;
  }
}

/* Card border style */
.via-bd-b1 {
  border: 1px solid #B4BDF6;
  border-radius: 9px;
  box-shadow: rgba(180, 189, 246, 0.8) 0px 0px 16px 0px inset;
}

.via-bd-o1 {
  border: 1px solid #FFCF97;
  border-radius: 9px;
  box-shadow: rgba(255, 207, 151, 0.8) 0px 0px 16px 0px inset;
}

/*********************************
 * TITLE STYLES
 *********************************/

/* ===============================
   Shared colors
=============================== */
:root {
    --via-title-green: #c0eb6a;
    --via-title-black: #000;
    --via-title-white: #fff;
    --via-title-dark: #111;
    --via-title-shadow: #333;
}


/* ===============================
   Title 1
   Gradient + hiệu ứng nổi
=============================== */
.via-title--1 {
    position: relative;
    z-index: 1;
    width: fit-content;
    padding: 1rem;
    color: var(--via-title-white) !important;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
    background: linear-gradient(0.25turn,
            var(--via-primary-color),
            var(--via-primary-hover));
}

.via-title--1::before,
.via-title--1::after {
    content: "";
    position: absolute;
}

.via-title--1::before {
    top: 0;
    right: 0;
    z-index: -1;
    width: 2.5rem;
    height: 100%;
    background-color: var(--via-primary-hover);
    transform: skewX(-15deg) translateX(75%);
}

.via-title--1::after {
    top: 50%;
    right: 0;
    z-index: -2;
    width: 2.5rem;
    height: 80%;
    background-color: var(--via-title-black);
    transform: skewX(-15deg) translate(75%, -50%);
}


/* ===============================
   Title 2
   Viền trái nổi bật
=============================== */
.via-title--2 {
    width: fit-content;
    margin: 6px;
    padding: 6px;
    background-color: var(--via-title-white);
    border: 1px solid var(--via-primary-color);
    border-left: 6px solid var(--via-primary-color);
}


/* ===============================
   Title 3
   Mũi tên chỉ xuống
=============================== */
.via-title--3 {
    position: relative;
    width: fit-content;
    padding: 15px 10px;
    border: none;
    background-color: var(--via-title-green);
}

.via-title--3::after {
    content: "";
    position: absolute;
    bottom: -9px;
    left: 0;
    z-index: 0;
    border-top: 10px solid var(--via-title-green);
    border-right: 36px solid transparent;
    border-left: 36px solid transparent;
}


/* ===============================
   Title 4
   Ribbon down / product nav
=============================== */
.via-title--4 {
    position: relative;
    width: fit-content;
    padding: 6px 0;
    border: none;
    background-color: var(--via-title-green);
}

.via-title--4::after {
    content: "";
    position: absolute;
    bottom: -9px;
    left: 0;
    z-index: 0;
    border-top: 10px solid var(--via-title-green);
    border-right: 36px solid transparent;
    border-left: 36px solid transparent;
}

.via-title--4:hover .wd-btn-next {
    transform: translateX(10px);
}

.via-title--4:hover .wd-btn-prev {
    transform: translateX(-10px);
}

.via-title--4:hover .wd-btn-back {
    animation: 0.5s ease infinite alternate bounce;
}

.via-title--4:hover .wd-btn-next,
.via-title--4:hover .wd-btn-prev,
.via-title--4:hover .wd-btn-back {
    color: var(--via-title-white);
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 1);
}


/* ===============================
   Title 5
   Gạch dưới chân
=============================== */
.via-title--5 {
    position: relative;
    padding-bottom: 5px;
    color: var(--via-title-dark);
    font-size: 28px;
    font-weight: 600;
    letter-spacing: 0;
}

.via-title--5::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 55px;
    height: 5px;
    background-color: var(--via-primary-color);
    border-radius: 2px;
}

.via-title--5::after {
    content: "";
    position: absolute;
    bottom: 2px;
    left: 0;
    width: 95%;
    max-width: 255px;
    height: 1px;
    background-color: var(--via-primary-color);
}


/* ===============================
   Title 6
   Ribbon image tail
=============================== */
.via-title--6 {
    --bg: #f5a623;
    --padding-y: 14px;

    position: relative;
    display: inline-flex;
    align-items: center;
    width: fit-content !important;
    margin: 0;
    padding: var(--padding-y) 20px;

    color: var(--via-title-white);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;

    background-color: var(--bg);
    border-radius: 6px 0 0 0;
    box-shadow: -2px 0 6px rgba(0, 0, 0, 0.08);
}

.via-title--6::before {
    content: "";
    position: absolute;
    top: 0;
    left: 100%;
    width: 40px;
    height: 100%;
    pointer-events: none;
    background: url("../images/bf-r.png") no-repeat right center / 100% 100%;
}

@media (max-width: 480px) {
    .via-title--6 {
        padding: 10px 16px;
        font-size: 16px;
    }
}


/* ===============================
   Title Tag
   Thẻ gắn tiêu đề nổi bật
=============================== */
.via-title--tag {
    position: relative;
    width: fit-content;
    margin-left: 0;
    padding: 10px;
    color: var(--via-title-white);
    text-shadow: 0 1px rgba(0, 0, 0, 0.8);
    background-color: var(--via-primary-color);
    box-shadow: 1px 2px 4px var(--via-title-black);
}

.via-title--tag::before {
    content: "";
    position: absolute;
    top: 0;
    left: -10px;
    width: 10px;
    height: calc(100% + 10px);
    background-color: var(--via-primary-color);
    border-radius: 6px 0 0 6px;
}

.via-title--tag::after {
    content: "";
    position: absolute;
    bottom: -7px;
    left: -7px;
    width: 7px;
    height: 7px;
    background-color: var(--via-title-shadow);
    border-radius: 6px 0 0 6px;
}

/* ===============================
   LAYOUT: MÔ TẢ TRÁI - THÔNG SỐ PHẢI
   =============================== */

/* Sử dụng :has() để target cha trực tiếp chứa #via-section-sticky 
   Tránh trường hợp không biết chính xác class của phần nội dung mô tả
*/
#via-section-sticky .sticky-inner-wrap {
  max-height: 75vh;
  overflow-x: auto;
  overflow-y: scroll;
}

@media (min-width: 992px) {
    *:has(> #via-section-sticky) {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 350px; /* Cột trái linh hoạt, cột phải cố định 350px */
        gap: 0 40px;
        align-items: start;
    }

    /* Tất cả các section khác sẽ vào cột trái */
    *:has(> #via-section-sticky) > .section:not(#via-section-sticky) {
        grid-column: 1;
    }

    /* Section Sticky sẽ vào cột phải và sticky */
    #via-section-sticky {
        grid-column: 2;
        grid-row: 1 / 100;
        position: sticky;
        top: 50px;
        z-index: 10;
    }
    
    /* Chỉnh lại margin bottom để tránh lỗi khoảng trống */
    #via-section-sticky .section__content {
        margin-bottom: 0;
    }
}

/* Trên thiết bị di động, tự động fallback về 1 cột (mặc định block) */
@media (max-width: 991px) {
    #via-section-sticky {
        margin-top: 30px;
    }
}

/* =========================
	GIỚI THIỆU
========================= */

.bar {
  --color-main: #a047c6;
  --color-side: #6f3289;
  --padding: 10px 20px;
  --side-border-width: 4px;
  --height: 50px;

  color: #FFF;
  background-color: var(--color-main);
  padding: var(--padding);
  width: fit-content;
  height: var(--height);
  margin: 50px auto;
  text-align: center;
  position: relative;
  text-transform: uppercase;
  font: 18px/1.5 'Bree Serif', Courier, monospace;
  border: 2px transparent solid;
  box-shadow: 0 10px 30px -10px gray;
}

.bar p {
  margin: 0;
  position: relative;
  z-index: 2;
}

.bar span {
  position: absolute;
}

.bar span:nth-child(2),
.bar span:nth-child(4) {
  border-style: solid;
  border-width: var(--side-border-width);
  z-index: 1;
  top: 100%;
}

.bar span:nth-child(2) {
  border-color: #000 #000 transparent transparent;
  left: 0;
	transform: rotate(-90deg);
}
.bar span:nth-child(4) {
  border-color: #000 transparent transparent #000;
  right: 0;
	transform: rotate(90deg);
}

.bar span:nth-child(3),
.bar span:nth-child(5) {
  top: calc(var(--height) * 0.3);
  border-style: solid;
  border-width: calc(var(--height) / 2.5);
  z-index: 0;
}

.bar span:nth-child(3) {
  border-color: var(--color-side) var(--color-side) var(--color-side) transparent;
  right: 100%;
  box-shadow: 20px 20px 30px -10px grey;
}
.bar span:nth-child(5) {
  border-color: var(--color-side) transparent var(--color-side) var(--color-side);
  left: 100%;
  box-shadow: -20px 20px 30px -10px grey;
}