/* ========================================================
   BABYSU / Giza CMS - STYLESHEET CHUNG
   Phong cách: Mẹ & Bé cao cấp, tông Hồng ngọt ngào & ấm áp
   ======================================================== */

@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&display=swap');
@import url('toast.css');

:root {
  --primary-color: #f35478;
  --primary-hover: #e03b60;
  --primary-light: #fff0f4;
  --primary-gradient: linear-gradient(135deg, #ff6b8b 0%, #f35478 100%);
  --secondary-color: #ff9f43;
  --text-color: #333333;
  --text-muted: #777777;
  --border-color: #f0f0f0;
  --bg-light: #f8f9fa;
  --bg-white: #ffffff;
  --price-color: #d63031;
  --old-price-color: #999999;
  --sale-badge-bg: #ff4757;
  --font-family: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --container-width: 1240px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 14px rgba(243, 84, 120, 0.08);
  --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.1);
  --transition: all 0.25s ease-in-out;
}

/* Reset CSS */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  overflow-x: clip;
  max-width: 100vw;
}

body {
  font-family: var(--font-family);
  color: var(--text-color);
  background-color: var(--bg-light);
  line-height: 1.5;
  font-size: 14px;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul,
ol {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  outline: none;
  border: none;
}

button {
  cursor: pointer;
  transition: var(--transition);
}

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 15px;
}

/* ========================================================
   HEADER STYLES
   ======================================================== */
.site-header {
  background-color: var(--header-bg, var(--bg-white));
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* Header Top */
.header-top {
  padding: 12px 0;
  border-bottom: 1px solid #f2f2f2;
}

.header-top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 24px;
  color: var(--primary-color);
  letter-spacing: -0.5px;
}

/* Chữ Thương Hiệu & Slogan Cạnh Logo */
.logo-brand-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.2;
  text-decoration: none;
}
.logo-brand-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--primary-color, #f35478);
  letter-spacing: -0.2px;
  text-transform: uppercase;
  white-space: nowrap;
}
.logo-brand-tagline {
  font-size: 11px;
  font-weight: 500;
  color: #64748b;
  letter-spacing: 0.1px;
  white-space: nowrap;
}
.brand-mobile-only {
  display: none !important;
}
.brand-always-show {
  display: flex !important;
}

.logo-badge {
  background: var(--primary-gradient);
  color: white;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.logo-text span {
  color: #333;
}

/* Search Box */
.header-search {
  flex: 1;
  max-width: 520px;
}

.search-box-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: #f5f6f8;
  border-radius: var(--radius-full);
  border: 1.5px solid transparent;
  transition: var(--transition);
}

.search-box-wrapper:focus-within {
  background: #fff;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(243, 84, 120, 0.15);
}

.search-box-wrapper input {
  width: 100%;
  padding: 10px 18px;
  background: transparent;
  color: #333;
  font-size: 13.5px;
}

.search-btn {
  background: var(--primary-gradient);
  color: white;
  width: 38px;
  height: 34px;
  margin-right: 4px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.search-btn:hover {
  opacity: 0.9;
}

.quick-search-tags {
  display: flex;
  flex-wrap: wrap-reverse;
  gap: 10px;
  margin-top: 5px;
  padding-left: 10px;
  font-size: 12px;
  color: var(--text-muted);
}

.quick-search-tags a {
  color: #666;
}

.quick-search-tags a:hover {
  color: var(--primary-color);
}

/* Header Right Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 22px;
}

.header-action-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #444;
}

.action-icon {
  font-size: 22px;
  color: var(--primary-color);
}

.action-text {
  font-size: 12px;
  line-height: 1.3;
}

.action-text strong {
  display: block;
  font-size: 13.5px;
  color: #222;
  font-weight: 600;
}

.cart-icon-wrapper {
  position: relative;
}

.cart-badge {
  position: absolute;
  top: -6px;
  right: -8px;
  background: var(--price-color);
  color: white;
  font-size: 11px;
  font-weight: 700;
  height: 18px;
  min-width: 18px;
  line-height: 18px;
  border-radius: 9px;
  text-align: center;
  padding: 0 4px;
  border: 2px solid white;
}

/* Header Bottom Nav */
.header-nav {
  background: var(--nav-bg, var(--primary-gradient));
  color: var(--nav-text-color, white);
  position: relative;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ========================================================
   MEGA MENU DROPDOWN (ĐA TẦNG CHUYÊN NGHIỆP)
   ======================================================== */
.category-dropdown-wrapper {
  position: relative;
}

/* Mega Menu Trigger */
.category-dropdown-btn {
  background: rgba(0, 0, 0, 0.14);
  color: var(--nav-text-color, white);
  padding: 12px 20px;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  border: none;
  min-width: 250px;
  transition: var(--transition);
}

.category-dropdown-btn:hover,
.category-dropdown-btn.is-active {
  background: rgba(0, 0, 0, 0.24);
}

.category-dropdown-btn .arrow-icon {
  margin-left: auto;
  font-size: 11px;
  transition: transform 0.25s ease;
}

.category-dropdown-btn.is-active .arrow-icon {
  transform: rotate(180deg);
}

/* Mega Menu Box */
.mega-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  width: 960px;
  background: #fff;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.16);
  border: 1px solid #eee;
  border-top: none;
  display: flex;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1050;
  overflow: hidden;
}

/* Open state via hover or class */
@media (min-width: 993px) {
  .category-dropdown-wrapper:hover .mega-dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }
}

.category-dropdown-wrapper.open .mega-dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

/* Left Category List (Parent Column) */
.mega-cat-list {
  width: 250px;
  background: #ffffff;
  border-right: 1px solid #f0f0f0;
  padding: 10px 0;
  flex-shrink: 0;
}

.mega-cat-item a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 18px;
  font-size: 13.5px;
  color: #333;
  font-weight: 500;
  transition: var(--transition);
}

.mega-cat-item i.cat-icon {
  color: var(--primary-color);
  font-size: 15px;
  width: 20px;
  text-align: center;
}

.mega-cat-item .cat-arrow {
  margin-left: auto;
  font-size: 10px;
  color: #bbb;
  transition: var(--transition);
}

.mega-cat-item:hover a,
.mega-cat-item.active a {
  background: var(--primary-light);
  color: var(--primary-color);
  font-weight: 700;
  padding-left: 22px;
}

.mega-cat-item:hover .cat-arrow,
.mega-cat-item.active .cat-arrow {
  color: var(--primary-color);
  transform: translateX(3px);
}

/* Right Flyout Content */
.mega-flyout-content {
  flex: 1;
  padding: 24px 28px;
  background: #ffffff;
  min-height: 480px;
  border-left: 1px solid #f1f5f9;
}

.mega-subpanel {
  display: none;
  animation: fadeInPanel 0.2s ease-in-out;
}

.mega-subpanel.active {
  display: block;
}

@keyframes fadeInPanel {
  from {
    opacity: 0;
    transform: translateX(5px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.subpanel-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  align-items: start;
}

.subpanel-col {
  display: flex;
  flex-direction: column;
}

.subpanel-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid #f1f5f9;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  position: relative;
}

.subpanel-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 28px;
  height: 2px;
  background: var(--primary-color, #f35478);
  border-radius: 2px;
}

.subpanel-title a {
  color: #1e293b;
  transition: color 0.15s ease;
}

.subpanel-title a:hover {
  color: var(--primary-color, #f35478);
}

.subpanel-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.subpanel-links li a {
  font-size: 13px;
  color: #475569;
  line-height: 1.45;
  display: inline-block;
  transition: all 0.2s ease;
}

.subpanel-links li a:hover {
  color: var(--primary-color, #f35478);
  transform: translateX(4px);
}

/* Brand Tags & Chips in Flyout */
.brand-chips,
.subpanel-brand-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.brand-chip-tag {
  display: inline-flex;
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  transition: all 0.2s ease;
}

.brand-chip-tag:hover {
  background: var(--primary-color, #f35478);
  color: #ffffff;
  border-color: var(--primary-color, #f35478);
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(243, 84, 120, 0.25);
}

/* Promo Banner Inside Mega Menu */
.subpanel-promo {
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: linear-gradient(135deg, #fff0f3 0%, #ffd4de 100%);
  border: 1px solid #ffccd9;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.subpanel-promo .badge-mini {
  display: inline-block;
  background: var(--primary-color);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  margin-bottom: 8px;
  align-self: flex-start;
}

.subpanel-promo h4 {
  font-size: 15px;
  font-weight: 800;
  color: #222;
  line-height: 1.3;
  margin-bottom: 6px;
}

.subpanel-promo p {
  font-size: 11.5px;
  color: #666;
  line-height: 1.4;
  margin-bottom: 12px;
}

.btn-sub-promo {
  display: inline-block;
  background: #fff;
  color: var(--primary-color);
  font-size: 11.5px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  text-align: center;
  border: 1px solid rgba(243, 84, 120, 0.3);
  transition: var(--transition);
}

.btn-sub-promo:hover {
  background: var(--primary-color);
  color: white;
}

/* Backdrop Overlay - Disabled to keep clean view */
.menu-backdrop {
  display: none !important;
}

.main-nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-link-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 500;
  padding: 12px 0;
  color: rgba(255, 255, 255, 0.95);
}

.nav-link-item:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* ========================================================
   PRODUCT CARD COMPONENT (DÙNG CHUNG CÁC TRANG)
   ======================================================== */
.product-card {
  background: #fff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  overflow: hidden;
  position: relative;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(243, 84, 120, 0.3);
}

.product-thumb-link {
  position: relative;
  display: block;
  overflow: hidden;
  padding-top: 100%;
  /* 1:1 Aspect ratio */
  background: #fff;
}

.product-thumb-link img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
  transition: transform 0.3s ease;
}

.product-card:hover .product-thumb-link img {
  transform: scale(1.05);
}

/* Badges */
.badge-discount {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--sale-badge-bg);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  z-index: 2;
}

.badge-tag-banner {
  background: #f35478;
  color: white;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  text-align: center;
  margin: 0 10px;
  border-radius: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-info {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-brand {
  font-size: 11.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 4px;
}

.product-title {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 8px;
  color: #222;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 38px;
}

.product-title a:hover {
  color: var(--primary-color);
}

.product-prices {
  margin-top: auto;
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.price-current {
  color: var(--price-color);
  font-size: 16px;
  font-weight: 700;
}

.price-old {
  color: var(--old-price-color);
  font-size: 12px;
  text-decoration: line-through;
}

/* Action button inside card */
.product-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}

/* ========================================================
   GLOBAL PRODUCT GRIDS (DÙNG CHO TẤT CẢ CÁC TRANG)
   ======================================================== */
.product-grid-5 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 15px;
}

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

.btn-add-cart-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  border: 1px solid rgba(243, 84, 120, 0.2);
  transition: var(--transition);
}

.btn-add-cart-circle:hover {
  background: var(--primary-color);
  color: white;
  transform: scale(1.1);
}

/* Flash sale progress bar */
.sale-progress-bar {
  background: #ffd5de;
  border-radius: var(--radius-full);
  height: 14px;
  position: relative;
  overflow: hidden;
  margin-top: 8px;
}

.sale-progress-fill {
  background: var(--primary-gradient);
  height: 100%;
  border-radius: var(--radius-full);
}

.sale-progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
}

/* ========================================================
   SECTION TITLES & TABS
   ======================================================== */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-title {
  font-size: 20px;
  font-weight: 800;
  color: #222;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 20px;
  background: var(--primary-color);
  border-radius: 3px;
}

.section-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.section-tab-item {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: #f0f2f5;
  color: #555;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.section-tab-item:hover,
.section-tab-item.active {
  background: var(--primary-color);
  color: white;
}

@media (max-width: 600px) {
  .section-header {
    flex-direction: column;
    gap: 20px;
  }
}

/* View all pill button */
.btn-view-all {
  display: inline-block;
  padding: 8px 24px;
  background: #fff;
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
  font-weight: 600;
  border-radius: var(--radius-full);
  font-size: 13.5px;
  text-align: center;
  transition: var(--transition);
}

.btn-view-all:hover {
  background: var(--primary-color);
  color: white;
}

/* ========================================================
   FOOTER STYLES (3 CỘT HIỆN ĐẠI & TINH TẾ)
   ======================================================== */
.site-footer {
  background: var(--footer-bg, #111827);
  color: #cbd5e1;
  padding-top: 55px;
  margin-top: 60px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.site-footer .footer-logo-wrap {
  max-width: 100% !important;
  display: flex !important;
  align-items: center;
  gap: 12px;
}

.footer-logo-img.is-rounded {
  border-radius: 50%;
  background: #ffffff;
  padding: 2px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.footer-logo-text-group {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.2;
}

.footer-logo-text {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary-color, #f35478);
  letter-spacing: -0.3px;
}

.footer-logo-text span {
  color: #ffffff;
}

.footer-logo-tagline {
  font-size: 12px;
  font-weight: 500;
  color: #94a3b8;
  margin-top: 2px;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.8fr 1.1fr 1.1fr;
  gap: 40px;
  padding-bottom: 35px;
}

.footer-col-title {
  font-size: 14.5px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 18px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  padding-bottom: 8px;
}

.footer-col-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 32px;
  height: 2px;
  background: var(--primary-color, #f35478);
  border-radius: 2px;
}

.footer-col p {
  color: #94a3b8;
  font-size: 13.5px;
  margin-bottom: 11px;
  line-height: 1.6;
}

.footer-col p strong {
  color: #ffffff;
}

.footer-col ul li {
  margin-bottom: 9px;
}

.footer-col ul li a {
  color: #cbd5e1;
  font-size: 13.5px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.footer-col ul li a::before {
  content: '›';
  color: var(--primary-color, #f35478);
  font-size: 14px;
  font-weight: 700;
  transition: transform 0.2s ease;
}

.footer-col ul li a:hover {
  color: #ffffff;
  transform: translateX(4px);
}

.footer-col ul li a:hover::before {
  transform: translateX(2px);
}

.footer-social-links {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.social-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.25s ease;
}

.social-icon-btn:hover {
  background: var(--primary-color, #f35478);
  color: #ffffff;
  border-color: var(--primary-color, #f35478);
  transform: translateY(-2px);
}

/* Footer Commitments Bar (Cam kết vàng) */
.footer-commitments-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding: 24px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.commitment-item {
  display: flex;
  align-items: center;
  gap: 14px;
}

.commit-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(243, 84, 120, 0.12);
  color: var(--primary-color, #f35478);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.commit-text strong {
  display: block;
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 700;
  margin-bottom: 2px;
}

.commit-text span {
  display: block;
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.35;
}

.footer-bottom {
  padding: 22px 0;
  text-align: center;
  font-size: 13px;
  color: #64748b;
}

/* ========================================================
   FLOATING ACTION BUTTONS (ZALO, HOTLINE, BACK TO TOP)
   ======================================================== */
.floating-widgets {
  position: fixed;
  right: 20px;
  bottom: 25px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 9999;
}

.float-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: var(--transition);
  position: relative;
}

.float-btn:hover {
  transform: scale(1.1);
}

.float-hotline {
  background: #e74c3c;
  animation: pulse-hotline 2s infinite;
}

.float-zalo {
  background: #0088ff;
}

.float-backtotop {
  background: var(--primary-color);
  opacity: 0.85;
}

@keyframes pulse-hotline {
  0% {
    box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.6);
  }

  70% {
    box-shadow: 0 0 0 12px rgba(231, 76, 60, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(231, 76, 60, 0);
  }
}

/* Responsive cơ bản */
@media (max-width: 1200px) {
  .product-grid-5 {
    grid-template-columns: repeat(4, 1fr);
  }

  .header-actions {
    gap: 14px;
  }

  .header-action-item .action-text span {
    font-size: 11px;
  }

  .header-action-item .action-text strong {
    font-size: 12px;
  }
}

@media (max-width: 992px) {

  /* Không cố định (sticky/fixed) Header trên Mobile để mở rộng tối đa không gian lướt web */
  .site-header {
    position: relative !important;
    top: auto !important;
  }

  /* Header Top Bar trên Mobile: Logo bên trái, 3 Action Icons bên phải */
  .header-top {
    padding: 10px 0 12px;
  }

  .header-top-inner {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
    row-gap: 10px !important;
    column-gap: 12px !important;
  }

  /* Hàng 1 - Trái: Logo */
  .logo {
    order: 1 !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex: 0 1 auto !important;
    max-width: calc(100% - 135px) !important;
    margin: 0 !important;
    overflow: hidden !important;
  }

  .logo img {
    max-height: var(--logo-mob-h, 42px) !important;
    max-width: 120px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    flex-shrink: 0 !important;
  }

  .brand-mobile-only {
    display: flex !important;
  }

  .logo-brand-info {
    overflow: hidden;
    min-width: 0;
  }

  .logo-brand-name {
    font-size: 14.5px;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .logo-brand-tagline {
    font-size: 10.5px;
    font-weight: 500;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .logo-badge {
    width: 34px;
    height: 34px;
    font-size: 16px;
  }

  .logo-text {
    font-size: 20px;
    letter-spacing: -0.5px;
  }

  /* Hàng 1 - Phải: 3 Action Icons (Hotline, Tài khoản, Giỏ hàng) */
  .header-actions {
    order: 2 !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-left: auto !important;
    flex: 0 0 auto !important;
  }

  .header-action-item {
    padding: 6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #334155;
    position: relative;
    transition: all 0.2s ease;
  }

  .header-action-item:active {
    background: #f1f5f9;
    transform: scale(0.95);
  }

  /* Ẩn text dài của hotline, tài khoản và giá tiền giỏ hàng trên mobile */
  .header-action-item .action-text {
    display: none !important;
  }

  .action-icon {
    font-size: 20px;
    color: var(--primary-color);
  }

  .header-action-item i.fa-phone-volume {
    font-size: 19px;
    color: #e11d48;
    background: #ffe4e6;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .header-action-item i.fa-user,
  .header-action-item i.fa-circle-user {
    font-size: 19px;
    color: #475569;
    background: #f1f5f9;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .header-cart-link {
    background: #fff1f2;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0;
  }

  .header-cart-link i.fa-bag-shopping {
    font-size: 18px;
    color: var(--primary-color);
  }

  .header-cart-link .cart-badge {
    top: -4px;
    right: -4px;
    height: 18px;
    min-width: 18px;
    line-height: 16px;
    font-size: 10.5px;
    padding: 0 4px;
    border: 2px solid #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  }

  /* Hàng 2: Thanh Search Box chiếm trọn 100% chiều ngang */
  .header-search {
    order: 3 !important;
    flex: 0 0 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 4px !important;
  }

  .search-box-wrapper {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    height: 42px;
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    border-radius: 9999px !important;
  }

  .search-box-wrapper input {
    flex: 1 !important;
    min-width: 0 !important;
    width: 100% !important;
    padding: 8px 14px !important;
    font-size: 13px !important;
    background: transparent !important;
    border: none !important;
    outline: none !important;
  }

  .search-btn {
    width: 34px !important;
    height: 32px !important;
    font-size: 13px !important;
    flex-shrink: 0 !important;
    margin-right: 4px !important;
    border-radius: 9999px !important;
    background: var(--primary-gradient) !important;
    color: #fff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: none !important;
  }

  /* Gợi ý từ khóa: dạng Chips cuộn ngang mượt mà (Horizontal Swipe), không bị rớt hàng */
  .quick-search-tags {
    margin-top: 6px !important;
    padding: 2px 0 !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 6px !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .quick-search-tags::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }

  .quick-search-tags span {
    font-size: 11px !important;
    color: #94a3b8 !important;
    font-weight: 600 !important;
    flex-shrink: 0 !important;
    margin-right: 2px;
  }

  .quick-search-tags a {
    font-size: 11.5px !important;
    color: #475569 !important;
    background: #f1f5f9 !important;
    padding: 2px 10px !important;
    border-radius: 12px !important;
    flex-shrink: 0 !important;
    text-decoration: none !important;
    border: 1px solid #e2e8f0 !important;
    transition: all 0.15s ease !important;
    white-space: nowrap !important;
    display: inline-block !important;
  }

  .quick-search-tags a:active,
  .quick-search-tags a:hover {
    background: #ffe4e6 !important;
    color: var(--primary-color) !important;
    border-color: #fecdd3 !important;
  }

  /* Header Navigation Bar trên Mobile */
  .header-nav {
    padding: 0;
    background: var(--primary-gradient);
  }

  .nav-inner {
    padding: 0;
    display: block;
  }

  .category-dropdown-wrapper {
    width: 100%;
    position: relative;
  }

  .category-dropdown-btn {
    width: 100%;
    min-width: unset;
    border-radius: 0;
    padding: 12px 18px;
    font-size: 14px;
    justify-content: flex-start;
  }

  .category-dropdown-btn .arrow-icon {
    margin-left: auto;
  }

  .category-dropdown-wrapper.open .category-dropdown-btn {
    border-radius: 0;
  }

  /* Mega Menu Box trên Mobile: Tràn 100% bề rộng, không bị tràn màn hình */
  .mega-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    min-width: unset !important;
    max-width: 100% !important;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
    display: flex;
    flex-direction: column;
    z-index: 1050;
    overflow: hidden;
  }

  /* ẨN HOÀN TOÀN KHỐI FLYOUT TRÊN MOBILE THEO YÊU CẦU */
  .mega-flyout-content {
    display: none !important;
  }

  /* Danh mục sản phẩm dạng danh sách dọc 100% chiều rộng */
  .mega-cat-list {
    width: 100% !important;
    border-right: none !important;
    max-height: 60vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 4px 0;
    background: #ffffff;
  }

  .mega-cat-item {
    border-bottom: 1px solid #f1f5f9;
  }

  .mega-cat-item:last-child {
    border-bottom: none;
  }

  .mega-cat-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    transition: all 0.15s ease;
  }

  .mega-cat-item i.cat-icon {
    color: var(--primary-color);
    font-size: 16px;
    width: 22px;
    text-align: center;
  }

  .mega-cat-item .cat-arrow {
    margin-left: auto;
    font-size: 11px;
    color: #94a3b8;
  }

  .mega-cat-item:active a,
  .mega-cat-item:hover a {
    background: #fff1f2;
    color: var(--primary-color);
    padding-left: 20px;
  }

  /* Ẩn hoàn toàn thanh liên kết main-nav-links trên Mobile theo yêu cầu */
  .main-nav-links {
    display: none !important;
  }

  .product-grid-4,
  .product-grid-5 {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }

  .footer-commitments-bar {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

@media (max-width: 576px) {

  .product-grid-4,
  .product-grid-5 {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .footer-commitments-bar {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

/* ========================================================
   CUSTOMER HEADER DROPDOWN
   ======================================================== */
.user-dropdown-wrapper {
  position: relative;
  cursor: pointer;
}

.user-action-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.user-name-truncated {
  max-width: 110px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.user-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  width: 220px;
  background: #ffffff;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1000;
}

.user-dropdown-wrapper:hover .user-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-dropdown-header {
  padding: 10px 16px;
  border-bottom: 1px solid #f1f5f9;
  background: #f8fafc;
}

.user-dropdown-header strong {
  display: block;
  font-size: 13.5px;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-dropdown-header small {
  font-size: 11.5px;
  color: #64748b;
}

.user-dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  font-size: 13px;
  color: #334155;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.user-dropdown-menu a:hover {
  background: #f8fafc;
  color: var(--primary-color, #e11d48);
}

.user-dropdown-menu a i {
  width: 16px;
  color: #94a3b8;
  transition: color 0.15s ease;
}

.user-dropdown-menu a:hover i {
  color: var(--primary-color, #e11d48);
}

.dropdown-divider {
  height: 1px;
  background: #f1f5f9;
  margin: 6px 0;
}

.dropdown-logout {
  color: #ef4444 !important;
}

.dropdown-logout:hover {
  background: #fef2f2 !important;
  color: #dc2626 !important;
}

.dropdown-logout i {
  color: #ef4444 !important;
}