/* Hero Section */
.hero-section {
    display: grid;
    grid-template-columns: 250px 1fr 250px;
    gap: 20px;
    margin-top: 20px;
}

.sidebar {
    width: 250px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    overflow: visible;
    position: relative;
}

.sidebar ul {
    list-style: none;
    padding: 8px 0;
    margin: 0;
}

.sidebar ul li {
    position: relative;
    padding: 0;
    margin: 0;
}

.sidebar ul li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 11px 18px;
    font-size: 13.5px;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.25s ease;
    border-left: 3px solid transparent;
}

.sidebar ul li:hover > a {
    color: #ee4d2d;
    background-color: #fff6f3;
    font-weight: 600;
    border-left-color: #ee4d2d;
    padding-left: 22px;
}

.sidebar .submenu {
    display: none;
    position: absolute;
    top: 0;
    left: 100%;
    width: 230px;
    background: #ffffff;
    box-shadow: 4px 6px 20px rgba(0,0,0,0.12);
    border-radius: 8px;
    z-index: 9999;
    padding: 6px 0;
    border: 1px solid #f0f0f0;
}

.sidebar ul li:hover .submenu {
    display: block;
}

.sidebar .submenu li a {
    padding: 10px 16px;
    font-size: 13px;
    color: #444;
    font-weight: 400;
    border-bottom: 1px solid #f8f8f8;
    border-left: 3px solid transparent;
}

.sidebar .submenu li a:hover {
    color: #ee4d2d;
    background: #fff6f3;
    border-left-color: #ee4d2d;
    padding-left: 20px;
    font-weight: 600;
}

.flash-sale {
    background: linear-gradient(135deg, #1e1e1e 0%, #333333 100%);
    color: #ffffff;
    text-align: center;
    padding: 14px 10px;
    font-size: 13.5px;
    font-weight: 800;
    letter-spacing: 0.5px;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    margin-top: auto;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-transform: uppercase;
}

.flash-sale:hover {
    background: linear-gradient(135deg, #ee4d2d 0%, #ff6b4a 100%);
    box-shadow: 0 4px 12px rgba(238, 77, 45, 0.4);
}

.main-slider {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    height: 100%;
    width: 100%;
}

.slider-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.slide-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: fill;
    object-position: center;
    border-radius: 12px;
    display: block;
    opacity: 0;
    transition: opacity 0.7s ease-in-out;
    pointer-events: none;
}

.slide-img.active {
    opacity: 1;
    pointer-events: auto;
}

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.35);
    color: #ffffff;
    border: 1.5px solid rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.25s ease;
    backdrop-filter: blur(4px);
}

.slider-arrow:hover {
    background: rgba(238, 77, 45, 0.9);
    border-color: #ffffff;
    transform: translateY(-50%) scale(1.1);
}

.slider-arrow.prev { left: 12px; }
.slider-arrow.next { right: 12px; }

.slider-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.slider-dots .dot {
    width: 25px;
    height: 5px;
    background-color: rgba(255,255,255,0.5);
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.slider-dots .dot.active {
    background-color: #ee4d2d;
}

.right-banners {
    width: 250px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 100%;
}

.right-banners a,
.right-banners img {
    flex: 1;
    height: 0;
    min-height: 0;
    display: block;
    border-radius: 12px;
    overflow: hidden;
}

.right-banners img {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    object-fit: fill;
}

/* Main Content */
.main-content {
    margin-top: 40px;
    margin-bottom: 40px;
}

.section-header h2 {
    color: #c00000;
    font-size: 22px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 2px solid #ddd;
    padding-bottom: 10px;
}

.product-layout {
    display: flex;
    gap: 20px;
}

.left-banner {
    width: 250px;
    flex-shrink: 0;
}
.tall-banner {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}
.tall-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.tall-banner img:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.product-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.product-card {
    background: white;
    border-radius: 5px;
    padding: 15px;
    position: relative;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}

.product-card .badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: #c00000;
    color: white;
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 3px;
}

.product-card img {
    width: 100%;
    height: 150px;
    object-fit: contain;
    margin-bottom: 15px;
}

.product-name {
    font-size: 14px;
    color: #333;
    margin-bottom: 10px;
    line-height: 1.4;
    height: 40px;
    overflow: hidden;
}

.old-price {
    font-size: 12px;
    color: #999;
    text-decoration: line-through;
}

.new-price {
    font-size: 16px;
    color: #c00000;
    font-weight: bold;
    margin-bottom: 15px;
}

.product-card a {
    text-decoration: none !important;
}

.btn-more {
    margin-top: auto;
    width: 100%;
    background-color: white;
    border: 1px solid #c00000;
    color: #c00000;
    padding: 10px;
    font-weight: bold;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    text-decoration: none !important;
}

.btn-more, .btn-more * {
    text-decoration: none !important;
}

.btn-more:hover {
    background-color: #c00000;
    color: white;
    text-decoration: none !important;
}

/* ==========================================
   MAIN POPUP MODAL & MINI BANNER POPUP
   ========================================== */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.popup-overlay.show {
  opacity: 1;
  visibility: visible;
}

.popup-card {
  background: #ffffff;
  border-radius: 24px;
  width: 100%;
  max-width: 480px;
  position: relative;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  transform: scale(0.85) translateY(20px);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.popup-overlay.show .popup-card {
  transform: scale(1) translateY(0);
}

.popup-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  z-index: 20;
  transition: all 0.25s ease;
  backdrop-filter: blur(4px);
}

.popup-close-btn:hover {
  background: rgba(204, 0, 0, 0.9);
  transform: scale(1.1) rotate(90deg);
  border-color: #ffffff;
}

.popup-banner-container {
  width: 100%;
  position: relative;
  background: #000;
}

.popup-banner-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.popup-option {
  padding: 14px 24px 4px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.custom-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  font-size: 13.5px;
  color: #64748b;
  font-weight: 600;
  transition: color 0.2s ease;
}

.custom-checkbox:hover {
  color: #121212;
}

.custom-checkbox input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkbox-mark {
  width: 18px;
  height: 18px;
  background-color: #f1f5f9;
  border: 2px solid #cbd5e1;
  border-radius: 5px;
  transition: all 0.2s ease;
  position: relative;
  flex-shrink: 0;
}

.custom-checkbox input:checked ~ .checkbox-mark {
  background-color: #c00000;
  border-color: #c00000;
}

.checkbox-mark:after {
  content: "";
  position: absolute;
  display: none;
  left: 5px;
  top: 2px;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.custom-checkbox input:checked ~ .checkbox-mark:after {
  display: block;
}

.popup-footer {
  display: flex;
  gap: 12px;
  padding: 16px 20px 20px 20px;
  background: #ffffff;
}

.popup-btn {
  border: none;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 700;
  padding: 14px 20px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-dismiss {
  flex: 1;
  background: #eef2f6;
  color: #475569;
}

.btn-dismiss:hover {
  background: #e2e8f0;
  color: #1e293b;
}

.btn-cta {
  flex: 1.6;
  background: #c00000;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 6px 18px rgba(204, 0, 0, 0.35);
}

.btn-cta:hover {
  background: #a30000;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(204, 0, 0, 0.45);
}

/* Mini Banner Corner Widget */
.mini-banner-popup {
  position: fixed;
  bottom: 88px;
  left: 88px;
  width: 320px;
  background: #ffffff;
  border-radius: 16px;
  border: 1.5px solid rgba(204, 0, 0, 0.25);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  z-index: 10005; /* Hiển thị phía trên thanh gợi ý sản phẩm và nằm ngay bên cạnh nút Zalo */
  transform: translateY(40px) scale(0.95);
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mini-banner-popup.show {
  transform: translateY(0) scale(1);
  opacity: 1;
  visibility: visible;
}

.mini-banner-close {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #333333;
  color: #ffffff;
  border: 2px solid #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  transition: transform 0.2s ease, background 0.2s ease;
}

.mini-banner-close:hover {
  background: #c00000;
  transform: scale(1.15);
}

.mini-banner-thumb {
  width: 75px;
  height: 75px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
}

.mini-banner-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mini-banner-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mini-tag {
  font-size: 10px;
  font-weight: 800;
  color: #c00000;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mini-title {
  font-size: 12px;
  font-weight: 700;
  color: #121212;
  line-height: 1.3;
}

.mini-btn-open {
  margin-top: 4px;
  align-self: flex-start;
  background: #c00000;
  color: #fff;
  border: none;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: background 0.2s ease;
}

.mini-btn-open:hover {
  background: #a30000;
}

@media (max-width: 640px) {
  .mini-banner-popup {
    bottom: 75px;
    left: 68px;
    width: calc(100vw - 80px);
    max-width: 300px;
    z-index: 10005;
  }
}
