﻿/* =========================================================================
 * Web3s Theme - assets/css/theme.css
 * Giao dien E-commerce chuyen nghiep phong cach Flatsome
 * ========================================================================= */

:root {
  --primary: #e4342b;
  --primary-hover: #c0261f;
  --secondary: #1a1a2e;
  --text-color: #2b3445;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --bg-light: #f8fafc;
  --radius: 6px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-hover: 0 10px 25px rgba(0,0,0,0.12);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  margin: 0;
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-color);
  background-color: #fff;
  -webkit-font-smoothing: antialiased;
}

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

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

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  color: var(--secondary);
  margin-top: 0;
  line-height: 1.3;
}

/* -------------------------------------------------------------
 * BUTTONS
 * ------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 600;
  font-size: 14px;
  padding: 10px 22px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  line-height: 1.4;
}
.btn-primary {
  background-color: var(--primary);
  color: #fff !important;
  border-color: var(--primary);
}
.btn-primary:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
}
.btn-secondary {
  background-color: var(--secondary);
  color: #fff !important;
}
.btn-secondary:hover {
  background-color: #0f0f1a;
}
.btn-outline {
  background-color: transparent;
  color: var(--primary) !important;
  border-color: var(--primary);
}
.btn-outline:hover {
  background-color: var(--primary);
  color: #fff !important;
}
.btn-sm {
  padding: 6px 14px;
  font-size: 12px;
}
.btn-lg {
  padding: 14px 28px;
  font-size: 16px;
}
.btn-block {
  display: flex;
  width: 100%;
}
.btn-hotline {
  background: #f97316;
  color: #fff !important;
}
.btn-zalo {
  background: #06c755;
  color: #fff !important;
}

/* -------------------------------------------------------------
 * HEADER: 3 Tiers
 * ------------------------------------------------------------- */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border-color);
  position: relative;
  z-index: 100;
}

/* Top Bar */
.top-bar {
  background-color: var(--secondary);
  color: #e2e8f0;
  font-size: 12px;
  padding: 6px 0;
}
.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.top-bar-link {
  color: #e2e8f0;
  margin-left: 15px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.top-bar-link:hover {
  color: #fff;
}

/* Main Header */
.header-main {
  padding: 16px 0;
}
.header-main-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}
.header-logo .site-logo-img {
  max-height: 55px;
  width: auto;
}
.header-logo .site-logo-text {
  font-size: 24px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
}
.header-search {
  flex: 1;
  max-width: 550px;
}

/* Live Search */
.live-search-wrap {
  position: relative;
  width: 100%;
}
.live-search-form {
  display: flex;
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}
.live-search-input {
  flex: 1;
  padding: 10px 16px;
  border: none;
  outline: none;
  font-size: 14px;
}
.search-btn {
  background-color: var(--primary);
  color: #fff;
  border: none;
  padding: 0 18px;
  cursor: pointer;
  transition: var(--transition);
}
.search-btn:hover {
  background-color: var(--primary-hover);
}
.live-search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  border-radius: 0 0 var(--radius) var(--radius);
  z-index: 1000;
  max-height: 400px;
  overflow-y: auto;
}
.search-result-item {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid #f1f5f9;
  gap: 12px;
}
.search-result-item:hover {
  background-color: var(--bg-light);
}
.search-result-thumb {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 4px;
}
.search-result-info {
  flex: 1;
}
.search-result-title {
  font-weight: 600;
  font-size: 13px;
  color: var(--secondary);
}
.search-result-price {
  color: var(--primary);
  font-weight: 700;
  font-size: 12px;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}
.header-hotline {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 15px;
  color: var(--primary);
}
.cart-icon-btn {
  background: none;
  border: none;
  position: relative;
  cursor: pointer;
  padding: 6px;
  color: var(--secondary);
}
.cart-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hamburger-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--secondary);
  margin: 4px 0;
}

/* Bottom Nav */
.header-bottom-nav {
  background-color: #fff;
  border-top: 1px solid #f1f5f9;
}
.nav-inner {
  display: flex;
  align-items: center;
}
.cat-menu-toggle-wrap {
  position: relative;
  width: 260px;
}
.cat-menu-toggle {
  width: 100%;
  background-color: var(--primary);
  color: #fff;
  border: none;
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.vertical-cat-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: #fff;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  z-index: 500;
}
.cat-menu-toggle-wrap:hover .vertical-cat-menu,
.cat-menu-toggle-wrap.cat-menu-open .vertical-cat-menu {
  display: block;
}
.vertical-cat-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.vertical-cat-list li a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 18px;
  border-bottom: 1px solid #f8fafc;
  font-size: 13px;
  font-weight: 500;
}
.vertical-cat-list li a:hover {
  background: var(--bg-light);
  color: var(--primary);
  padding-left: 22px;
}
.vertical-cat-list li.has-children {
  position: relative;
}
.cat-submenu {
  display: none;
  position: absolute;
  top: 0;
  left: 100%;
  width: 220px;
  background: #fff;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  list-style: none;
  padding: 0;
}
.vertical-cat-list li.has-children:hover .cat-submenu {
  display: block;
}

.primary-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex: 1;
}
.primary-nav-list > li > a {
  display: block;
  padding: 12px 18px;
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  color: var(--secondary);
}
.primary-nav-list > li > a:hover {
  color: var(--primary);
}

/* Sticky Header */
.site-header.is-sticky {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  box-shadow: var(--shadow-md);
  animation: slideDown 0.3s ease;
}
@keyframes slideDown {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}

/* -------------------------------------------------------------
 * PRODUCT CARD (Flatsome Style)
 * ------------------------------------------------------------- */
.product-card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
  border-color: #cbd5e1;
}
.product-card-img {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #f8fafc;
}
.product-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.product-card-img .img-hover {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.product-card:hover .product-card-img .img-hover {
  opacity: 1;
}
.product-card:hover .product-card-img .img-main {
  transform: scale(1.05);
}

/* Badge */
.product-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  border-radius: 4px;
  color: #fff;
  z-index: 5;
}
.badge-hot { background: #ef4444; }
.badge-sale { background: #10b981; }
.badge-new { background: #3b82f6; }

/* Overlay actions */
.product-card-overlay {
  position: absolute;
  bottom: 10px;
  right: 10px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: calc(100% - 20px);
  opacity: 0;
  transform: translateY(8px);
  transition: var(--transition);
  z-index: 5;
}
/* Đồng bộ cỡ 4 nút trong overlay (xem nhanh / tim / so sánh / giỏ) */
.product-card-overlay .btn-wishlist,
.product-card-overlay .btn-compare { width: 34px; height: 34px; box-shadow: var(--shadow-sm); }
.product-card:hover .product-card-overlay {
  opacity: 1;
  transform: translateY(0);
}
.btn-quickview, .btn-add-cart-quick {
  background: #fff;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  color: var(--secondary);
  transition: var(--transition);
}
.btn-quickview:hover, .btn-add-cart-quick:hover {
  background: var(--primary);
  color: #fff;
}

.product-card-info {
  padding: 14px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.product-card-cats {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
  text-transform: uppercase;
}
.product-card-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.product-card-price {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
}
.product-card-price .contact-price {
  color: #f97316;
}
.product-card-actions .btn {
  width: 100%;
}

/* -------------------------------------------------------------
 * SINGLE PRODUCT PAGE
 * ------------------------------------------------------------- */
.single-product-layout {
  display: grid;
  grid-template-columns: 55% 45%;
  gap: 40px;
}
.product-gallery-main {
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}
.product-gallery-main img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}
.product-gallery-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  overflow-x: auto;
}
.gallery-thumb {
  width: 75px;
  height: 75px;
  border: 2px solid transparent;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
  opacity: 0.7;
  transition: var(--transition);
}
.gallery-thumb.active, .gallery-thumb:hover {
  border-color: var(--primary);
  opacity: 1;
}
.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-title {
  font-size: 26px;
  margin-bottom: 12px;
}
.product-price-wrap .price {
  font-size: 28px;
  font-weight: 800;
  color: var(--primary);
}
.product-quick-specs {
  display: flex;
  gap: 15px;
  background: var(--bg-light);
  padding: 10px 14px;
  border-radius: 4px;
  margin: 15px 0;
  font-size: 13px;
}
.product-cta-buttons {
  display: flex;
  gap: 12px;
  margin: 20px 0;
}
.product-contact-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

/* Tabs */
.product-tab-nav {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  border-bottom: 2px solid var(--border-color);
}
.tab-nav-btn {
  background: none;
  border: none;
  font-size: 15px;
  font-weight: 700;
  padding: 12px 24px;
  cursor: pointer;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
}
.tab-nav-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}
.product-tab-content {
  display: none;
  padding: 25px 0;
}
.product-tab-content.active {
  display: block;
}

/* -------------------------------------------------------------
 * CART DRAWER (Off-canvas)
 * ------------------------------------------------------------- */
.cart-drawer-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9998;
}
.cart-drawer {
  position: fixed;
  top: 0;
  right: -380px;
  width: 360px;
  max-width: 90vw;
  height: 100%;
  background: #fff;
  z-index: 9999;
  box-shadow: -5px 0 25px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.cart-drawer.open {
  right: 0;
}
.cart-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-color);
}
.cart-drawer-header h3 { margin: 0; }
.cart-drawer-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
}
.cart-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 15px 20px;
}
.cart-items-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.cart-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f1f5f9;
  position: relative;
}
.cart-item-thumb {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
}
.cart-item-info { flex: 1; }
.cart-item-title { font-weight: 600; font-size: 13px; }
.cart-item-price { color: var(--primary); font-weight: 700; margin: 4px 0; }
.cart-item-qty { display: flex; align-items: center; gap: 8px; }
.qty-btn {
  width: 24px;
  height: 24px;
  background: #f1f5f9;
  border: none;
  border-radius: 3px;
  cursor: pointer;
}
.cart-item-remove {
  background: none;
  border: none;
  font-size: 18px;
  color: #94a3b8;
  cursor: pointer;
}
.cart-drawer-footer {
  padding: 20px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-light);
}
.cart-total {
  display: flex;
  justify-content: space-between;
  font-size: 16px;
  margin-bottom: 15px;
}

/* -------------------------------------------------------------
 * CHECKOUT FORM (thiết kế lại chuyên nghiệp)
 * ------------------------------------------------------------- */
.web3s-checkout-wrap {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 30px;
  max-width: 1040px;
  margin: 30px auto;
  align-items: start;
}
/* Cột tóm tắt đơn — card, dính khi cuộn */
.checkout-cart-summary,
.checkout-form {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.checkout-cart-summary { order: 2; position: sticky; top: 90px; }
.checkout-form { order: 1; }
.checkout-cart-summary h3,
.checkout-form h3 {
  margin: 0 0 16px;
  font-size: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--bg-light);
}
.checkout-form h3:not(:first-of-type) { margin-top: 22px; }
.checkout-items-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.checkout-items-table thead th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .3px;
  color: var(--text-muted);
  font-weight: 600;
}
.checkout-items-table th, .checkout-items-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--border-color);
  text-align: left;
}
.checkout-items-table tfoot td { padding: 10px 8px; border: none; }
.checkout-items-table tfoot tr:last-child td {
  border-top: 2px solid var(--bg-light);
  font-size: 15px;
}
#checkout-grandtotal { color: var(--primary); font-size: 18px; }

.checkout-form .form-row { margin-bottom: 14px; }
.form-control {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  font-size: 14px;
  transition: var(--transition);
  box-sizing: border-box;
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(228,52,43,0.12);
}
textarea.form-control { min-height: 76px; resize: vertical; }

/* Mã giảm giá */
.coupon-row .form-control { margin: 0; }
#btn-apply-coupon {
  background: var(--secondary);
  color: #fff; border: none; border-radius: 10px;
  padding: 0 18px; font-weight: 600; cursor: pointer;
  transition: var(--transition);
}
#btn-apply-coupon:hover { background: var(--primary); }
#coupon-message { font-weight: 600; }

/* Phương thức thanh toán — thẻ chọn được, có trạng thái active */
.payment-options { display: flex; flex-direction: column; gap: 10px; }
.payment-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border: 1.5px solid var(--border-color);
  border-radius: 10px;
  margin: 0;
  cursor: pointer;
  transition: var(--transition);
  font-weight: 500;
}
.payment-option:hover { border-color: var(--primary); background: #fff7f6; }
.payment-option input[type="radio"] { accent-color: var(--primary); width: 18px; height: 18px; }
.payment-option:has(input:checked) {
  border-color: var(--primary);
  background: #fff7f6;
  box-shadow: 0 0 0 3px rgba(228,52,43,0.08);
}
#bank-info { border: 1px dashed var(--border-color); }

/* Nút đặt hàng */
#web3s-place-order { border-radius: 10px; font-size: 15px; padding: 14px; }

/* Thông báo */
.web3s-notice { padding: 12px 16px; border-radius: 10px; font-size: 14px; }
.web3s-notice-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.web3s-notice-error   { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

/* Cart drawer: nút & qty đẹp hơn */
.cart-drawer-footer .btn-block { border-radius: 10px; }

/* Thanh freeship trong giỏ */
.cart-freeship { background: #fff7f6; border: 1px solid #fecaca; color: #7c2d12; border-radius: 10px; padding: 10px 12px; font-size: 13px; margin-bottom: 12px; }
.cart-freeship.done { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.cart-freeship-bar { display: block; height: 6px; background: #fde2e0; border-radius: 6px; margin-top: 8px; overflow: hidden; }
.cart-freeship-bar i { display: block; height: 100%; background: var(--primary); border-radius: 6px; transition: width .3s ease; }
.qty-btn { transition: var(--transition); }
.qty-btn:hover { background: var(--primary); color: #fff; }
.cart-item-remove:hover { color: var(--primary); }

/* Footer full-width (tùy chọn admin) */
.site-footer--fullwidth .footer-top > .container,
.site-footer--fullwidth .footer-copyright > .container {
  max-width: 100%;
  padding-left: 30px;
  padding-right: 30px;
}

/* -------------------------------------------------------------
 * SHORTCODES: Banner, Title, Features
 * ------------------------------------------------------------- */
.web3s-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  border-radius: var(--radius);
  margin-bottom: 30px;
}
.web3s-banner-text {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 20px;
}
.web3s-section-title {
  margin-bottom: 25px;
  position: relative;
}
.web3s-title-line h2 {
  display: inline-block;
  position: relative;
  padding-bottom: 10px;
}
.web3s-title-line h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
}
.web3s-features-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin: 30px 0;
}
.web3s-feature-item {
  background: #fff;
  border: 1px solid var(--border-color);
  padding: 24px 20px;
  border-radius: var(--radius);
  text-align: center;
}
.feature-icon {
  font-size: 36px;
  color: var(--primary);
  margin-bottom: 10px;
}
.feature-title { font-size: 16px; margin-bottom: 6px; }
.feature-desc { font-size: 13px; color: var(--text-muted); margin: 0; }

/* -------------------------------------------------------------
 * FOOTER
 * ------------------------------------------------------------- */
.site-footer {
  --footer-bg: var(--secondary);
  --footer-text: #cbd5e1;
  --footer-head: #ffffff;
  --footer-link: var(--primary);
  background: var(--footer-bg);
  color: var(--footer-text);
  margin-top: 50px;
}
.footer-top {
  padding: 50px 0 30px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 30px;
}
.footer-col h4,
.footer-col .widget-title,
.footer-col .widgettitle {
  color: var(--footer-head);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 18px;
  padding-bottom: 8px;
  position: relative;
}
/* Gach nhan tieu de cot -> gon gang chuyen nghiep */
.footer-col h4::after,
.footer-col .widget-title::after,
.footer-col .widgettitle::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 34px; height: 2px;
  background: var(--footer-link);
}
.site-footer a { color: var(--footer-text); }
.site-footer a:hover { color: var(--footer-link); }

/* ===== FIX: Widget footer (menu/danh mục) đẹp, KHÔNG còn chấm bullet xấu ===== */
.site-footer .widget { margin-bottom: 22px; }
.site-footer .widget ul,
.site-footer .footer-nav-list,
.site-footer .footer-col .menu {
  list-style: none;
  padding: 0;
  margin: 0;
}
.site-footer .widget ul li,
.site-footer .footer-nav-list li {
  margin: 0 0 9px;
  padding: 0;
  font-size: 13.5px;
  line-height: 1.5;
}
/* Mũi tên nhỏ trước link thay cho chấm bullet */
.site-footer .widget ul li a,
.site-footer .footer-nav-list li a {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  color: var(--footer-text);
  transition: var(--transition);
}
.site-footer .widget ul li a::before,
.site-footer .footer-nav-list li a::before {
  content: "\203A";           /* › */
  color: var(--footer-link);
  font-weight: 700;
  transform: translateY(-1px);
}
.site-footer .widget ul li a:hover,
.site-footer .footer-nav-list li a:hover {
  color: var(--footer-link);
  transform: translateX(2px);
}
.site-footer .widget ul .children,
.site-footer .widget ul .sub-menu {
  padding-left: 14px;
  margin-top: 8px;
}
/* Đếm số bài (Categories widget) gọn */
.site-footer .widget ul li .count,
.site-footer .widget ul li span.count { opacity: .6; font-size: 12px; }
.footer-desc { font-size: 13px; line-height: 1.7; }
.footer-contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-contact-list li {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.footer-social-links {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}
.social-link {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.social-link:hover {
  background: var(--primary);
}
.footer-copyright {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 16px 0;
  text-align: center;
  font-size: 12px;
}

/* Breadcrumb */
.breadcrumb {
  margin-bottom: 15px;
}
.breadcrumb ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}
.breadcrumb-sep { color: #cbd5e1; }

/* Header/Footer dạng Widget hoặc UX Block */
.web3s-header-widgets {
  background: #fff;
  border-bottom: 1px solid var(--border-color);
  padding: 12px 0;
}
.web3s-header-widgets .widget { margin: 0; }
.site-footer-widgets .footer-col .widget { margin-bottom: 20px; }
.web3s-hf-block { width: 100%; }

/* =========================================================================
 * DANH MUC SAN PHAM (category cards) - thiet ke lai dep
 * ========================================================================= */
.product-categories-grid {
  display: grid;
  gap: 18px;
  margin: 10px 0 30px;
}
.product-categories-grid.product-grid-2 { grid-template-columns: repeat(2, 1fr); }
.product-categories-grid.product-grid-3 { grid-template-columns: repeat(3, 1fr); }
.product-categories-grid.product-grid-4 { grid-template-columns: repeat(4, 1fr); }
.product-categories-grid.product-grid-5 { grid-template-columns: repeat(5, 1fr); }

.category-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}
.category-card > a {
  display: block;
  color: inherit;
}
.category-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: transparent;
}
.category-card-img {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background-size: cover;
  background-position: center;
  background-color: var(--bg-light);
  transition: transform 0.4s ease;
}
.category-card:hover .category-card-img {
  transform: scale(1.06);
}
/* Lop phu gradient de chu de doc */
.category-card-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(0,0,0,0.55) 100%);
  opacity: 0;
  transition: var(--transition);
}
.category-card:hover .category-card-img::after { opacity: 1; }

/* Card khong co anh: nen gradient nhe + icon */
.category-card-img--icon {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}
.category-card-img--icon .dashicons {
  font-size: 46px;
  width: 46px;
  height: 46px;
  color: #cbd5e1;
  transition: var(--transition);
}
.category-card:hover .category-card-img--icon { background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%); }
.category-card:hover .category-card-img--icon .dashicons { color: var(--primary); }
/* SVG icon danh muc (tu san-pham-plugin) */
.category-card-img--svg { color: var(--primary); }
.category-card-img--svg svg { width: 44px; height: 44px; transition: var(--transition); }
.category-card:hover .category-card-img--svg svg { transform: scale(1.12); }

.category-card-info {
  padding: 12px 14px;
  text-align: center;
}
.category-card-name {
  display: block;
  font-weight: 600;
  font-size: 15px;
  color: var(--text-color);
  line-height: 1.35;
  transition: var(--transition);
}
.category-card:hover .category-card-name { color: var(--primary); }
.category-card-count {
  display: inline-block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-light);
  padding: 2px 10px;
  border-radius: 20px;
}

@media (max-width: 992px) {
  .product-categories-grid.product-grid-4,
  .product-categories-grid.product-grid-5 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .product-categories-grid { gap: 12px; }
  .product-categories-grid.product-grid-3,
  .product-categories-grid.product-grid-4,
  .product-categories-grid.product-grid-5 { grid-template-columns: repeat(2, 1fr); }
  .category-card-name { font-size: 13px; }
}
@media (max-width: 400px) {
  .product-categories-grid.product-grid-3,
  .product-categories-grid.product-grid-4,
  .product-categories-grid.product-grid-5 { grid-template-columns: repeat(2, 1fr); }
  .category-card-info { padding: 8px; }
}

/* =========================================================================
 * MẪU HEADER (presets) — áp qua class .site-header--{style}
 * ========================================================================= */
/* classic = mặc định (không cần override) */

/* centered: logo ở giữa, tìm kiếm full phía dưới */
.site-header--centered .header-main-inner {
  flex-wrap: wrap;
  justify-content: center;
  text-align: center;
  gap: 12px;
}
.site-header--centered .header-logo { order: 1; flex: 0 0 100%; display: flex; justify-content: center; }
.site-header--centered .header-actions { order: 2; }
.site-header--centered .header-search { order: 3; flex: 1 1 100%; max-width: 640px; margin: 0 auto; }

/* gradient: header nổi bật, chữ sáng */
.site-header--gradient .header-main {
  background: linear-gradient(120deg, var(--primary) 0%, var(--secondary) 100%);
}
.site-header--gradient .site-logo-text,
.site-header--gradient .header-hotline,
.site-header--gradient .header-hotline .hotline-text,
.site-header--gradient .cart-icon-btn { color: #fff; }
.site-header--gradient .header-hotline { border-color: rgba(255,255,255,.4); }

/* minimal: mảnh, gọn, ẩn top-bar */
.site-header--minimal .top-bar { display: none; }
.site-header--minimal .header-main { padding-top: 6px; padding-bottom: 6px; }
.site-header--minimal .site-logo-img { max-height: 40px; }
.site-header--minimal .header-bottom-nav { border-top: 1px solid var(--border-color); }

/* =========================================================================
 * MẪU FOOTER (presets) — áp qua class .site-footer--{style}
 * ========================================================================= */
/* dark = mặc định (biến đã đặt sẵn) */

/* light: nền sáng, chữ tối */
.site-footer--light {
  --footer-bg: #f8fafc;
  --footer-text: #475569;
  --footer-head: #1a1a2e;
  --footer-link: var(--primary);
  border-top: 1px solid var(--border-color);
}
.site-footer--light .social-link { background: rgba(0,0,0,.06); color: #334155; }
.site-footer--light .footer-copyright { border-top-color: rgba(0,0,0,.08); }

/* gradient: nền chuyển màu cao cấp */
.site-footer--gradient {
  --footer-bg: transparent;
  --footer-text: #e2e8f0;
  --footer-head: #ffffff;
  --footer-link: #ffd4d0;
  background: linear-gradient(135deg, #0f172a 0%, #3b1d1b 55%, var(--primary) 130%);
}

/* minimal: gọn, padding nhỏ, tiêu đề không gạch chân */
.site-footer--minimal .footer-top { padding: 28px 0 14px; }
.site-footer--minimal .footer-col h4::after,
.site-footer--minimal .footer-col .widget-title::after { display: none; }
.site-footer--minimal .footer-grid { gap: 22px; }

/* centered: mọi cột căn giữa */
.site-footer--centered .footer-grid { text-align: center; }
.site-footer--centered .footer-col h4::after,
.site-footer--centered .footer-col .widget-title::after { left: 50%; transform: translateX(-50%); }
.site-footer--centered .footer-contact-list li,
.site-footer--centered .footer-social-links { justify-content: center; }
.site-footer--centered .site-footer .widget ul li a { justify-content: center; }

/* Tablet: footer 2 cột cho các preset */
@media (max-width: 992px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* =========================================================================
 * TÀI KHOẢN — nút header + dropdown
 * ========================================================================= */
.header-account { position: relative; display: inline-flex; align-items: center; }
.acc-login-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 600; font-size: 14px; color: var(--secondary);
  padding: 6px 8px; white-space: nowrap;
}
.acc-login-btn:hover { color: var(--primary); }
.acc-login-btn .dashicons { font-size: 20px; }
.acc-trigger {
  display: inline-flex; align-items: center; gap: 7px;
  background: none; border: none; cursor: pointer; color: var(--secondary);
  font-size: 12.5px; line-height: 1.2; text-align: left;
}
.acc-trigger .dashicons { font-size: 22px; color: var(--primary); }
.acc-hi strong { display: block; font-size: 13px; }
.acc-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  min-width: 210px; background: #fff;
  border: 1px solid var(--border-color); border-radius: 12px;
  box-shadow: var(--shadow-hover); padding: 8px; z-index: 1000;
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: var(--transition);
}
.header-account.is-logged:hover .acc-dropdown,
.header-account.is-logged:focus-within .acc-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.acc-dropdown a {
  display: block; padding: 9px 12px; border-radius: 8px;
  font-size: 13.5px; color: var(--text-color);
}
.acc-dropdown a:hover { background: var(--bg-light); color: var(--primary); }
.acc-dropdown .acc-logout { color: #b91c1c; border-top: 1px solid var(--border-color); margin-top: 4px; padding-top: 11px; }

/* =========================================================================
 * TRANG TÀI KHOẢN
 * ========================================================================= */
.web3s-account { max-width: 980px; margin: 24px auto; }
.acc-auth { max-width: 460px; margin: 0 auto; }
.acc-tabs { display: flex; border-bottom: 2px solid var(--border-color); margin-bottom: 22px; }
.acc-tab {
  flex: 1; text-align: center; padding: 12px; font-weight: 600;
  color: var(--text-muted); border-bottom: 3px solid transparent; margin-bottom: -2px;
}
.acc-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.acc-form { background: #fff; border: 1px solid var(--border-color); border-radius: 14px; padding: 24px; box-shadow: var(--shadow-sm); }
.acc-form h3 { margin: 0 0 16px; font-size: 18px; }
.acc-form .form-control { margin-bottom: 12px; }
.acc-form label { display: block; font-size: 13px; font-weight: 600; margin: 6px 0 4px; color: var(--text-muted); }
.acc-agree, .acc-remember { display: flex; align-items: flex-start; gap: 8px; font-size: 13.5px; font-weight: 400; margin: 6px 0 14px; color: var(--text-color); }
.acc-agree input, .acc-remember input { accent-color: var(--primary); margin-top: 2px; }
.acc-agree label, .acc-remember label { all: unset; }
.acc-alt { text-align: center; margin: 14px 0 0; font-size: 13.5px; }
.acc-hint { font-size: 13px; color: var(--text-muted); margin: 0 0 14px; }
.acc-terms-box { margin-top: 16px; background: var(--bg-light); border: 1px solid var(--border-color); border-radius: 12px; padding: 16px 18px; font-size: 13.5px; max-height: 260px; overflow-y: auto; }
.acc-terms-box h4 { margin: 0 0 8px; }

/* Dashboard */
.acc-dash { display: grid; grid-template-columns: 250px 1fr; gap: 24px; align-items: start; }
.acc-side { background: #fff; border: 1px solid var(--border-color); border-radius: 14px; padding: 18px; box-shadow: var(--shadow-sm); position: sticky; top: 90px; }
.acc-hello { font-size: 14px; color: var(--text-muted); padding-bottom: 14px; margin-bottom: 10px; border-bottom: 1px solid var(--border-color); }
.acc-hello strong { color: var(--text-color); font-size: 16px; }
.acc-menu { list-style: none; padding: 0; margin: 0; }
.acc-menu li a { display: block; padding: 11px 12px; border-radius: 9px; font-weight: 500; font-size: 14px; color: var(--text-color); }
.acc-menu li a:hover { background: var(--bg-light); }
.acc-menu li a.active { background: var(--primary); color: #fff; }
.acc-menu .acc-logout { color: #b91c1c; }
.acc-content { background: #fff; border: 1px solid var(--border-color); border-radius: 14px; padding: 24px; box-shadow: var(--shadow-sm); min-height: 300px; }
.acc-content h3 { margin: 0 0 18px; font-size: 18px; }
.acc-content .acc-form { border: none; box-shadow: none; padding: 0; }
.acc-empty { color: var(--text-muted); padding: 30px 0; text-align: center; }
.acc-orders { width: 100%; border-collapse: collapse; }
.acc-orders th, .acc-orders td { padding: 12px 10px; border-bottom: 1px solid var(--border-color); text-align: left; font-size: 14px; }
.acc-orders thead th { font-size: 12px; text-transform: uppercase; color: var(--text-muted); }
.acc-status { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; color: #fff; }
.acc-status-pending { background: #f59e0b; }
.acc-status-confirmed { background: #3b82f6; }
.acc-status-shipping { background: #8b5cf6; }
.acc-status-completed { background: #46b450; }
.acc-status-cancelled { background: #999; }
.mobile-nav-account { margin-bottom: 14px; }

/* =========================================================================
 * TRANG DANH MỤC SẢN PHẨM (taxonomy) — sidebar + danh mục con
 * ========================================================================= */
.taxonomy-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 30px;
  align-items: start;
}
.category-hero { border-radius: 12px; overflow: hidden; margin-bottom: 20px; }
.category-title { font-size: 24px; margin: 0; }

.category-sidebar {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 18px;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 90px;
}
.sidebar-close { display: none; }         /* chỉ hiện ở drawer mobile */
.sidebar-section { margin-bottom: 22px; }
.sidebar-section:last-child { margin-bottom: 0; }
.sidebar-section h4 {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 700;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--bg-light);
  color: var(--secondary);
}
.sidebar-cat-list { list-style: none; padding: 0; margin: 0; }
.sidebar-cat-list li { margin: 0; }
.sidebar-cat-list li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-color);
  transition: var(--transition);
}
.sidebar-cat-list li a:hover { background: var(--bg-light); color: var(--primary); padding-left: 14px; }
.sidebar-cat-list li a.active { background: var(--primary); color: #fff; font-weight: 600; }
.sidebar-cat-list li a span { font-size: 12px; opacity: 0.7; }

.category-main { min-width: 0; }
.product-sort-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.sort-left { display: flex; align-items: center; gap: 14px; }
.products-count { color: var(--text-muted); font-size: 14px; }
.sort-right { display: flex; align-items: center; gap: 8px; }
.product-sort-select {
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 14px;
}
.view-toggle-btn {
  width: 38px; height: 38px;
  border: 1px solid var(--border-color);
  background: #fff; border-radius: 8px; cursor: pointer;
  color: var(--text-muted);
  display: inline-flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.view-toggle-btn.active, .view-toggle-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
#open-filter-btn { display: none; }        /* desktop: sidebar luôn hiện, không cần nút Lọc */
.sidebar-overlay { display: none; }

@media (max-width: 768px) {
  #open-filter-btn { display: inline-flex; }
  .product-sort-bar { padding: 10px 12px; }
  .category-title { font-size: 20px; }
}

@media (max-width: 768px) {
  .acc-dash { grid-template-columns: 1fr; }
  .acc-side { position: static; }
  /* Ẩn nút tài khoản trong header-main desktop trên mobile (đã có trong drawer) */
  .header-actions .header-account { display: none; }
  .acc-orders { font-size: 13px; }
}
