:root {
  --pmb-blend-bg: #ffffff;            /* clean neutral background */
  --pmb-blend-card-bg: #ffffff;       /* crisp card surface */
  --pmb-blend-border: #e5e7eb;        /* soft neutral border */
  --pmb-blend-shadow: 0 6px 18px rgba(0,0,0,0.06);
  --pmb-blend-radius: 10px;
  --pmb-blend-header-bg: #f7f7f7;     /* subtle header strip */
  --pmb-blend-accent: #8a614a;        /* vintage accent */
  --pmb-blend-accent-strong: #5a3d2e; /* darker accent for titles */
  --pmb-blend-text: #222;
  --pmb-blend-muted: #666;
}

.pmb-category-wrapper.pmb-theme-blend {
  background: var(--pmb-blend-bg);
  padding: 0;
}
.pmb-category-card {
  --pmb-card-gutter: 35px;
}
@media (max-width: 650px) {
  .pmb-category-wrapper.pmb-theme-blend { padding-left: 5px; padding-right: 5px; }
}

.pmb-category-card {
  background: var(--pmb-blend-card-bg);
  border: 1px solid var(--pmb-blend-border);
  border-top-width: 0; /* avoid double line against banner */
  border-radius: 0 0 var(--pmb-blend-radius) var(--pmb-blend-radius);
  box-shadow: var(--pmb-blend-shadow);
  padding: 0; /* keep inner layout spacing */
  margin-left: 0;  /* desktop 0 as preferred */
}
@media (max-width: 650px) {
  .pmb-category-card { margin-left: 0px; }
}

/* Breadcrumb/header soft strip within card */
.pmb-category-card .breadcrumb,
.pmb-category-card .breadcrumb-search {
  background: transparent; /* remove strip background */
  border-bottom: none; /* cleaner, no divider line */
  padding: 12px var(--pmb-card-gutter) 12px;
  margin: 0;
}

.pmb-category-card .category-header {
  background: transparent; /* remove strip background */
  border-bottom: none; /* cleaner, no divider line */
  padding: 2px var(--pmb-card-gutter) 12px;
  margin: 0;
}
/* Breadcrumb links: gray instead of default blue/green */
.pmb-category-card .breadcrumb a {
  color: #666;
  font-size: 14px;
  transition: color 0.2s ease;
}
.pmb-category-card .breadcrumb a:hover {
  color: #cc0000;
}

/* Ensure the breadcrumb separator (» ) matches breadcrumb link color in this theme
   The global site stylesheet sets it to blue; increase specificity here to override. */
.pmb-category-card .breadcrumb > a:not(:last-child)::after,
.pmb-category-card .breadcrumb-search > a:not(:last-child)::after {
  color: #ccc; /* lighter separator */
  margin: 0 8px; /* more spacing */
}
.pmb-category-card .category-title { 
  color: var(--pmb-blend-accent-strong);
  font-size: 24px;            /* Larger, more prominent */
  line-height: 1.2;
  margin: 0px;
  font-weight: 600;
  letter-spacing: -0.02em;    /* Tighter tracking for elegance */
}
.pmb-category-card .category-title a {
  color: inherit;
  font-size: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}
.pmb-category-card .category-title a:hover {
  color: #cc0000;
}
.pmb-category-card .category-title__intro {
  font-size: 0.92em;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--pmb-blend-muted);
  margin-right: 6px;
}
.pmb-category-card .category-title__name {
  font-weight: 600;
  color: var(--pmb-blend-accent-strong);
}
.pmb-category-card .category-title__name a {
  text-decoration: none;
  color: inherit;
}
.pmb-category-card .category-title__summary {
  margin: 0 0 16px;
  color: var(--pmb-blend-muted);
  font-size: 15px;
  line-height: 1.6;
  max-width: 800px;
}

/* Category meta badges - modern pill style */
.pmb-category-card .category-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  flex-wrap: wrap;
}
.pmb-category-card .category-meta__badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 500;
  color: #555;
  padding: 6px 12px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 20px;
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  transition: all 0.2s ease;
}
.pmb-category-card .category-meta__badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  border-color: rgba(0,0,0,0.12);
}
.pmb-category-card .category-meta__badge svg {
  flex-shrink: 0;
  opacity: 0.8;
}
.pmb-category-card .category-meta__separator {
  color: var(--pmb-blend-border);
  font-weight: 300;
}

/* Post list polish */
.pmb-category-card .catpost-postItem {
  border-bottom: 0; /* remove dotted dividers for an open look */
  padding-bottom: 10px; /* keep breathing room */
  margin-bottom: 10px;
}
.pmb-category-card .catpost-productName { color: var(--pmb-blend-text); }

/* Typography tuning */
.pmb-category-card .catpost-productName {
  font-size: 14px;
  line-height: 1.35;
  font-weight: 500;
}
.pmb-category-card .catpost-list-cat-item {
  font-size: 13px; /* subcategory chip text */
}
.pmb-category-card .product-comment,
.pmb-category-card .dateValueAdd,
.pmb-category-card .dateValueAddNew,
.pmb-category-card .catpost-location,
.pmb-category-card .product-address {
  font-size: 12px; /* meta/address smaller */
}

@media (max-width: 650px) {
  .pmb-category-card { --pmb-card-gutter: 18px; }
  .pmb-category-card .category-title { 
    font-size: 24px; 
    margin: 6px 0 10px;
    letter-spacing: -0.01em;
  }
  .pmb-category-card .category-title__summary { 
    margin: 0 0 12px; 
    font-size: 14px;
    line-height: 1.5;
  }
  .pmb-category-card .category-meta { 
    margin: 0 0 16px; 
    gap: 8px; 
  }
  .pmb-category-card .category-meta__badge { 
    font-size: 12px; 
    padding: 5px 10px; 
    gap: 4px;
  }
  .pmb-category-card .category-meta__badge svg {
    width: 12px;
    height: 12px;
  }
  .pmb-category-card .catpost-productName { font-size: 12px; }
  .pmb-category-card .catpost-list-cat-item { font-size: 12px; }
  .pmb-category-card .product-comment,
  .pmb-category-card .dateValueAdd,
  .pmb-category-card .dateValueAddNew,
  .pmb-category-card .catpost-location,
  .pmb-category-card .product-address { font-size: 11.5px; }
}
.pmb-category-card .listPrice {
  background: #f3f4f6;
  color: var(--pmb-blend-accent-strong);
  border: 1px solid #e5e7eb;
}
.pmb-category-card .product-comment,
.pmb-category-card .dateValueAdd,
.pmb-category-card .dateValueAddNew { color: var(--pmb-blend-muted); }

/* Safe tips box as subtle card */
.pmb-category-card .safe-tips {
  background: #f4f6f8;
  border: 1px solid var(--pmb-blend-border);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--pmb-blend-accent-strong);
}

/* Make subcategory scroll bar layout flex so arrows can stretch full height */
.pmb-category-card .catpost-scroll-nav {
  display: flex;
  align-items: center;       /* center content vertically */
  gap: 6px;
}
.pmb-category-card .catpost-scroll-nav-content {
  flex: 1 1 auto;             /* fill remaining width */
  align-items: center;        /* center chips vertically */
  display: flex;             /* ensure flex to use align-items */
}
.pmb-category-card .catpost-scroll-arrow {
  /* arrows removed from markup — kept for legacy compatibility; will be hidden if present */
  display: none !important;
}

/* Mobile polish: hide scrollbar, keep swipe; improve tap targets and arrow buttons */
@media (max-width: 650px) {
  .catpost-scroll-nav-content {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    padding: 6px 0;       /* equal top and bottom */
    align-items: center;
    display: flex;
    /* Enable horizontal snap and pad for overlay arrows */
    scroll-snap-type: x mandatory;
    scroll-padding: 0 44px;
  }
  /* default: do not hide scrollbars here; use pointer media queries below */

  /* Increase tap target height a bit for subcategory items */
  .pmb-category-card .catpost-list-cat-item {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    /* Each chip snaps to center */
    scroll-snap-align: center;
  }

  /* arrows removed from markup; keep selector only if added later */
}
@media (min-width: 651px) {
  .pmb-category-card .catpost-scroll-nav { position: relative; }
  .pmb-category-card .catpost-scroll-nav-content { padding-left: 30px; }
  }
/* Mobile overlay arrows pinned to screen edges */
@media (max-width: 650px) {
  .pmb-category-card .catpost-scroll-nav { position: relative; }
  .pmb-category-card .catpost-scroll-nav-content { padding-left: 12px; padding-right: 12px; align-items:center; display:flex; }
  }

/* Block Editor Uploading Indicator */
.sbe-uploading-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #666;
  font-size: 14px;
}

.sbe-uploading-indicator .spinner {
  width: 24px;
  height: 24px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.moderator-info {
    text-align: right;
    font-size: 12px;
    color: #aaa;
    padding: 10px 15px 0;
    margin: 40px 10px 10px 10px;
    font-family: Tahoma, Verdana, Arial, sans-serif;
    letter-spacing: 0.2px;
}
.moderator-info a {
	font-size: 12px !important;
}
@media (max-width: 600px) {
    .moderator-info {
        text-align: center; /* Mobile canh giữa */
    }
}

.safe-tips {
    background-color: #fff8dc; /* Vàng nhạt cảnh báo */
    border: 1px solid #f0c36d;
    color: #555;
    font-size: 13px;
    padding: 10px 15px;
    margin: 30px 10px 10px 10px;
    border-radius: 4px;
}

.safe-tips strong {
    color: #d33; /* Nhấn mạnh tiêu đề */
}

/* Category description - với margin xung quanh */
.category-description {
    background: #ffffff;
    padding: 20px var(--pmb-card-gutter);
    margin: 20px 10px;
    border-radius: 8px;
    border: 1px solid var(--pmb-blend-border);
    color: var(--pmb-blend-text);
    font-size: 14px;
    line-height: 1.6;
}
.category-description a {
    color: #cc0000;
    text-decoration: none;
    font-weight: 500;
}
.category-description a:hover {
    text-decoration: underline;
}
@media (max-width: 650px) {
    .category-description {
        padding: 16px 18px;
        margin: 16px 5px;
        font-size: 13px;
    }
}

.listVIPBar {	
	/*background-image:url(/images/background/leather.gif);*/
	color:#96711a; margin:0px 0px 0px 0px; background-color: #f3f3f3;
	font-size: 14px; font-weight: bold;
	padding: 15px 15px 15px 15px;
}
.listVIPBar .bar-name {
	border: 1px solid #ab8d48; border-radius: 3px; padding: 2px 6px;
}
.listBar {
	margin:0px 0px 0px 0px;
	font-size: 14px; 
	background-color: #f3f3f3;	color:#555;
	font-weight: bold;
	padding: 15px 15px 15px 15px;
}
.listBar a {
	color: #666;
}
.listViewMore{
	margin:0px 0px 0px 0px;
	font-size: 14px; 
	background-color: #f3f3f3;	color:#222;
	font-weight: normal;
	padding: 15px 15px 15px 15px;
}
.listDevider {
	width: 100%; height: 1px; background: #FFFFFF; overflow: hidden; margin-top:0px; margin-bottom:0px; border-bottom: 1px dotted #DDDDDD;
}
.listCatInner {
  overflow:visible;
  padding: 0px !important;	
  display:block;
}
.listCatLeftNav,
.listCatLeftNav.w3-col {
  width:230px !important;
  float:left;
  height: 100%;
  margin-left: 5px;
  background-color: transparent;
  border: 0;
  padding-top: 0;
  display:block;
}
.listWithoutLeftNav {
	display:none !important;
}
.listWithoutLeftNavInline {
	display:none !important;
}

.listCatInner,
.listCatInner.w3-col {
  width: -webkit-calc(100% - 235px) !important;
   	width: calc(100% - 235px) !important;
  float:left;
  display:block;
  overflow:visible;
}

@media only screen and (max-width: 900px) {
	/* At narrower widths the previous calc made the left nav expand too large
	   (causing the main column to drop below). Use a fixed sidebar width here
	   and shrink the main column accordingly so both fit side-by-side. */
  .listCatLeftNav,
  .listCatLeftNav.w3-col {
    width: 205px !important;
  }

	.listCatLeftNav .banner-top-inner[user-logged-in='1'] {
		position: relative;
	}

	.listCatLeftNav .banner-top-inner[user-logged-in='1'] .hdrLogin {
		position: absolute;
		right: 10px;
		top: 50%;
		transform: translateY(-50%);
		margin: 0;
		z-index: 2;
	}

	/* Ensure the inner column accounts for the sidebar width on this breakpoint */
  .listCatInner,
  .listCatInner.w3-col {
    width: calc(100% - 215px) !important;
  }
}
@media only screen and (max-width: 750px) {		
	.listCatLeftNav {
		display:none !important;
	}	
	.listWithoutLeftNav {
		display:block !important;
		padding:0px 0px 10px 0px;
	}	
	.listWithoutLeftNavInline {
		display:inline !important;
	}
  .listCatInner,
  .listCatInner.w3-col {
    width: 100% !important;
  }	
}

/* ===== GRID VIEW (Masonry Layout via CSS Grid) ===== */
.catpost-gridView {
	display: grid;
	grid-gap: 15px;
	grid-auto-rows: 1px;
	grid-template-columns: repeat(2, 1fr);
}

/* For tablet and wider screens */
@media (min-width: 768px) {
	.catpost-gridView {
		grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	}
}

.catpost-gridView .catpost-postItem {
	width: 100%;
	box-sizing: border-box;
	margin-bottom: 0; /* Reset margin from list view */
}

.catpost-listView .catpost-postItem {
	width: 100%;
	margin-bottom: 15px;
	border-bottom: 1px solid #eee;
	padding-bottom: 15px;
}
/* ...existing code... */
.catpost-postItem {
	display: flex;
	flex-direction: column;
	background-color: #fff;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 2px 5px rgba(0,0,0,0.05);
	transition: box-shadow 0.2s ease;
	height: fit-content; /* Important for masonry calculation */
}

.catpost-postItem:hover {
	box-shadow: none !important;
	transform: none !important;
}

/* Hide items while masonry layout is being calculated */
.catpost-postItem.is-loading-content {
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.3s ease;
}

/* Reveal items after layout is applied */
.catpost-postItem:not(.is-loading-content) {
	opacity: 1;
}
.catpost-gridView .catpost-postImageWrapper {
	background: #f8f8f8;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	width: 100%;
	flex-shrink: 0;
}
.catpost-gridView .catpost-postImageWrapper img {
	width: 100%;
	height: auto;
	display: block;
	object-fit: cover;
	transition: transform 0.3s ease;
}
.catpost-gridView .catpost-postItem:hover .catpost-postImageWrapper img {
	transform: none !important;
}
.catpost-gridView .catpost-postInfoWrapper {
	padding: 10px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 8px;
	flex: 1;
}
.catpost-gridView .catpost-listAuthorInfo {
    margin-top: 6px;
}
@media (max-width: 1200px) {
  .catpost-gridView {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 768px) {
  .catpost-gridView {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .catpost-gridView .catpost-productName {
    font-size: 14px;
    line-height: 1.3;
  }
  .catpost-gridView .catpost-postInfoWrapper {
    padding: 8px;
  }
  
  /* Menu bar mobile */
  .catpost-menu-bar {
    padding: 10px 12px;
    margin: 0 5px 12px;
    flex-wrap: wrap;
    gap: 10px;
  }
  .catpost-dropdown-toggle {
    padding: 7px 12px;
    font-size: 13px;
  }
  .catpost-toggle {
    gap: 4px;
  }
  .catpost-view {
    padding: 5px;
  }
  
  /* Subcategory items mobile */
  .catpost-list-cat-item {
    padding: 6px 12px;
    font-size: 13px;
  }
}
@media (max-width: 600px) {
  .catpost-gridView {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
}
/* iPhone SE (375px) và các thiết bị trở lên: 2 cột */
@media (min-width: 375px) and (max-width: 767px) {
  .catpost-gridView {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
}
@media (max-width: 374px) {
    .catpost-gridView {
        grid-template-columns: 1fr;
    }
}
  /* ===== LIST VIEW ===== */
  .catpost-listView .catpost-postItem {
	display: grid;
	grid-template-columns: auto 1fr;
 	 gap: 10px;
	align-items: stretch;
	padding: 12px 0;
	
  }
  .catpost-listView .catpost-postImageWrapper {
	flex-shrink: 0;
	width: 160px;
	min-height: 90px;
    max-height: 180px;
    height: auto;
	margin-right: 10px;
	overflow: hidden;
	background-color: #f8f8f8;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .catpost-listView .catpost-postImageWrapper img {
	width: 100%;
 	 height: 100%;
 	 object-fit: cover;
  }
  .catpost-listView .catpost-postInfoWrapper {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 10px;
	width: 100%;
	min-width: 0;
	margin-top: 6px;
  }

  .catpost-listView .catpost-listProductName {
	flex: 1;
  }
 
  /* ===== RESPONSIVE ===== */
@media (max-width: 820px) {
	.catpost-listView .catpost-postInfoWrapper {
		flex-direction: column;
		align-items: flex-start;
	}
}
  @media (max-width: 600px) {
	.catpost-listView .catpost-postItem {
	  flex-direction: row;
	  align-items: flex-start;
	  padding: 14px 0;
	}
	.catpost-listView .catpost-productName {
        font-size: 15px;
		line-height: 1.4;
    }
	.catpost-listView .catpost-postImageWrapper {
		width: 140px;
        min-height: 90px;
        max-height: 180px;
	  
	}
	.catpost-listView .catpost-postInfoWrapper {
	  flex-direction: column;
	  align-items: flex-start;
	}
	
  }

  /* ========== CAT POST TOP MENU ========== */

  .catpost-scroll-nav {
	position: relative;
	overflow: hidden;
	margin: 10px 0 16px;
      display: flex;
      align-items: center;
  }
  
  .catpost-scroll-nav-content {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    gap: 10px;
    padding: 10px 12px 10px 0px; /* remove arrow space */
  }
  
  
  .catpost-list-cat-item {
	white-space: nowrap;
    padding: 7px 14px;
    display: inline-flex;
    align-items: center;
	background: #ffffff;
	border-radius: 24px;
	font-size: 14px;
    font-weight: 500;
	border: 1px solid #e0e0e0;
	text-decoration: none;
	color: #444;
	flex-shrink: 0;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  }
  
  .catpost-list-cat-item.on {
	background: linear-gradient(135deg, #F5F5DC 0%, #EDE4C8 100%);
	color: #444;
	font-weight: 600;
	border-color: #D2B48C;
    box-shadow: 0 2px 8px rgba(245,245,220,0.3);
    transform: translateY(-1px);
  }
  
  .catpost-list-cat-item:hover {
	background: #f8f9fa;
    border-color: #ccc;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  }
  
  .catpost-list-cat-item.on:hover {
    background: linear-gradient(135deg, #EDE4C8 0%, #D2B48C 100%);
  }

/* Hide native scrollbars on touch devices; show default scrollbars on pointer devices */
@media (pointer: coarse), (hover: none) {
  .catpost-scroll-nav-content {
    -ms-overflow-style: none; /* IE/Edge */
    scrollbar-width: none; /* Firefox */
  }
  .catpost-scroll-nav-content::-webkit-scrollbar { display: none; height: 0; }
}

@media (pointer: fine) {
  .catpost-scroll-nav-content {
    -ms-overflow-style: auto; /* IE/Edge */
    scrollbar-width: auto; /* Firefox */
  }
  .catpost-scroll-nav-content::-webkit-scrollbar { display: initial; height: initial; }
}

  /* =========== CAT POST MENU BAR ========== */

  .catpost-menu-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    margin: 0 10px 16px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    flex-wrap: wrap;
    gap: 12px;
}

/* Desktop (> 768px): hide dropdown, show 2 buttons */
.catpost-dropdown-mobile {
    display: none !important;
}
.catpost-sort-buttons-desktop {
    display: flex !important;
    gap: 8px;
}

/* Mobile (<= 768px): show dropdown, hide 2 buttons */
@media (max-width: 768px) {
    .catpost-dropdown-mobile-old {
        display: none !important;
    }
    .catpost-sort-buttons-desktop {
        display: none !important;
    }
}
  
  .catpost-dropdown {
	position: relative;
	display: inline-block;
  }
  
  .catpost-dropdown-toggle {
    cursor: pointer;
    padding: 8px 14px;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    background: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    font-size: 14px;
    color: #333;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.catpost-dropdown-toggle:hover {
    background: #f8f9fa;
    border-color: #b0b0b0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}
  
.catpost-dropdown-toggle .caret {
	display: none;
}

.catpost-dropdown-menu {
    display: none;
    position: absolute;
    background: #fff;
    border: 1px solid #d0d0d0;
    border-radius: 8px;
    margin-top: 8px;
    min-width: 180px;
    z-index: 99;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    overflow: hidden;
}  
.catpost-dropdown.open .catpost-dropdown-menu {
    display: block;
    animation: slideDown 0.2s ease;
}
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.catpost-dropdown .bi-caret-down-fill {
    transition: transform 0.2s ease;
    font-size: 10px;
}
.catpost-dropdown.open .bi-caret-down-fill {
    transform: rotate(180deg);
}  
.catpost-dropdown-menu a {
	display: block;
	padding: 10px 14px;
	color: #333;
	text-decoration: none;
    font-size: 14px;
    transition: all 0.15s ease;
}

.catpost-dropdown-menu a:hover {
	background-color: #f0f4f8;
    color: #cc0000;
    padding-left: 18px;
}

/* 2 sort buttons cho desktop */
.catpost-sort-buttons-desktop {
    display: flex;
    gap: 8px;
}

.catpost-sort-btn {
    padding: 8px 16px;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    background: #ffffff;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.catpost-sort-btn:hover {
    background: #f8f9fa;
    border-color: #b0b0b0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

.catpost-sort-btn.active {
    background: var(--gradient-vintage);
    color: #5a3d2e;
    border-color: #d9c4a0;
    box-shadow: 0 2px 8px rgba(168,127,89,0.25);
    font-weight: 600;
}

.catpost-sort-btn.active:hover {
    background: var(--gradient-vintage-hover);
    box-shadow: 0 3px 10px rgba(168,127,89,0.35);
}

/* Mobile icon-only sort buttons */
.catpost-sort-buttons-mobile {
    display: none;
    gap: 8px;
}

.catpost-sort-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    background: #ffffff;
    color: #333;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    font-size: 16px;
}

.catpost-sort-btn-icon:hover {
    background: #f5f5f5;
    border-color: #dcdcdc;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

.catpost-sort-btn-icon.active {
    background: #e0e0e0;
    color: #333;
    border-color: #c4c4c4;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.catpost-sort-btn-icon.active:hover {
    background: #d9d9d9;
    border-color: #bcbcbc;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

/* Sort indicator text for mobile */
.catpost-sort-indicator {
    display: none;
    font-size: 12px;
    color: #666;
    font-weight: 500;
    white-space: nowrap;
    padding: 0 8px;
    line-height: 40px;
    margin-left: 4px;
}

/* Responsive: show mobile buttons, hide desktop buttons on mobile */
@media (max-width: 768px) {
    .catpost-sort-buttons-mobile {
        display: flex;
        align-items: center;
    }
    .catpost-sort-indicator {
        display: inline-block;
    }
    .catpost-sort-buttons-desktop {
        display: none;
    }
}
  
.catpost-post-button {
	background: #337ab7;
	color: #fff;
	padding: 6px 10px;
	border-radius: 4px;
	display: flex;
	align-items: center;
	gap: 6px;
	text-decoration: none;
	font-size: 14px;
}

.catpost-post-button:hover {
	background: #286090;
} 
  
.catpost-toggle-container {
	margin-left: auto;
	display: flex;
	gap: 4px;
}
.catpost-toggle {
    display: flex;
    gap: 0;
    background: #fff;
    padding: 4px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    position: relative;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}
.catpost-toggle a {
	display: flex;
	align-items: center;
    padding: 2px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    position: absolute;
}
.catpost-toggle a:hover {
    background-color: #f8f9fa;
}
  
.catpost-dropdown-menu {
    display: none;
}
.catpost-dropdown.open .catpost-dropdown-menu {
    display: block;
}

.catpost-view.catpost-list {
    background: url("/images/icon/svg/list.svg") no-repeat center center;
    background-size: contain;
    width: 24px;
    height: 24px;
    display: none;
    align-items: center;
    justify-content: center;
}

.catpost-view.catpost-grid {
    background: url("/images/icon/svg/grid-four.svg") no-repeat center center;
    background-size: contain;
    width: 24px;
    height: 24px;
    display: none;
    align-items: center;
    justify-content: center;
}

/* Hiển thị icon của chế độ KHÁC với chế độ hiện tại */
.catpost-view {
	background-color: transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 6px;
    align-items: center;
    justify-content: center;
}
.catpost-view:hover {
    background-color: #e9ecef;
    transform: scale(1.05);
}

/* Hiển thị icon của chế độ không phải active (để user chuyển sang) */
.catpost-view:not(.on) {
    display: flex !important;
}

/* Icon active ẩn đi */
.catpost-view.on {
	background-color: transparent;
    filter: none;
    transform: scale(1);
    display: none !important;
}
.catpost-view.on:hover {
    background-color: transparent;
}
  /* ============ category post list page =========== */
.catpost-postListContainer { opacity: 0; }
body.catpost-ready .catpost-postListContainer { opacity: 1; transition: opacity 0.3s ease; }

.catpost-postListContainer {
		padding: 10px 10px;
}
.catpost-item-attr {
    padding:0px;  font-size:11px;
    margin-top:5px; z-index: 1; min-width: 150px;	
}
.catpost-postItem {
  border-bottom: 1px solid #f0f0f0;
  padding: 0px 0px;
  transition: background-color 0.2s ease;
}
.catpost-postItem:hover {
  background-color: transparent !important;
}  

.catpost-postImageWrapper img {
  width: 100%;
  height: auto;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.catpost-postItem:hover .catpost-postImageWrapper img {
  transform: none !important;
}  

.catpost-productName, .catpost-listProductName {
  font-size: 16px;
  font-weight: 600;
  color: #004C99;
  line-height: 1.45;
  text-decoration: none;
  transition: color 0.2s ease;
}
.catpost-productName:hover, .catpost-listProductName:hover {
  color: #CC0000;
}

/* Giá */
.catpost-listPrice {
  color: #e53935;
  font-weight: 700;
  margin-top: 4px;
  font-size: 15px;
}
.catpost-listAuthorInfo {
    display: flex;
    align-items: center;
    gap: 5px;
    width: 200px;
    flex-shrink: 0;
    min-width: 0;

}
.catpost-listAuthorText {
    display: flex;
    flex-direction: column;
	  min-width: 0;
}
  
.catpost-listAuthorInfo img.catpost-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%; margin-right: 8px;
}

@media (max-width: 600px) {
	.catpost-listAuthorInfo img.catpost-avatar {
		width: 24px;
		height: 24px;
	}
	.catpost-listAuthorInfo {
		gap: 0px;
	}
}


.list-item {
	display:inline-block; border:1px solid #ccc; padding:6px 9px; margin-top:8px; background-color:#fff; color:#000; border-radius: 2px;
}
.list-item:hover {
	background-color:#cab287; color:#fff;
}
.list-item.on {
	background-color:#666; color:#fff;border:1px solid #222;
}
.list-item.on:hover {
	background-color:#cab287; color:#fff;
}
.sidebar-card {
	background: #ffffff;
	border: 1px solid #e4e8f1;
	border-radius: 14px;
	box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  padding: 20px 20px 20px;
	margin-bottom: 12px;
	transition: box-shadow 0.2s ease;
}
.sidebar-card:hover {
	box-shadow: 0 14px 32px rgba(15, 23, 42, 0.12);
}
.sidebar-card .listCatLeftHead {
	margin-top: 0;
}
.sidebar-card .listCatLeftRow {
	margin-left: 0;
}
.sidebar-card .listCatLeftRow a {
	display: block;
	border-radius: 8px;
	padding: 6px 10px;
	color: #333;
	transition: background-color 0.15s ease, color 0.15s ease;
}
.sidebar-card .listCatLeftRow a:hover {
	background-color: #f4f6f9;
	color: #cc0000;
}
.sidebar-card .listCatLeftRow a:focus-visible {
	outline: 2px solid #cc0000;
	outline-offset: 2px;
	background-color: #f9fafc;
}
.sidebar-card .listCatLeftRow:last-child {
	margin-bottom: 0;
}
@media (max-width: 650px) {
	.sidebar-card {
		padding: 16px;
		border-radius: 12px;
		margin-bottom: 14px;
	}
	.sidebar-card .listCatLeftRow a {
		padding: 6px 8px;
	}
}

.sidebar-card--scroll {
	padding: 16px 16px 14px;
}
.sidebar-card--scroll nav {
	margin-top: 4px;
}
.sidebar-scroll-list {
	margin: 0;
	padding: 6px 0;
	max-height: 120px;
	overflow-y: auto;
	overflow-x: hidden;
	list-style: none;
	background: #f8f9fb;
	border: 1px solid #e4e8f1;
	border-radius: 10px;
}
.sidebar-scroll-list li {
	margin: 0;
	padding: 0;
}
.sidebar-scroll-link {
	display: block;
	padding: 6px 12px;
	color: #333;
	font-size: 14px;
	border-radius: 6px;
	transition: background-color 0.15s ease, color 0.15s ease;
}
.sidebar-scroll-link:hover {
	background-color: #f0f3f8;
	color: #cc0000;
}
.sidebar-scroll-link.is-active {
	color: #cc0000;
	font-weight: 600;
}
.sidebar-scroll-link:focus-visible {
	outline: 2px solid #cc0000;
	outline-offset: 2px;
}
.listCatLeft {
	padding-left:10px;
}
.listCatLeftHead {
	margin-bottom:10px; color: #555; font-weight: bold; 	
	font-size: 15px;
}
.listCatLeftHead a {
	color: #333 !important;
}
.listCatLeftRow {
	padding:3px 5px 3px 0px; margin-left:0px ; margin-bottom:3px; 
}
.listCatLeftRow a {
	font-size:14px; padding:2px 0px; color:#333;
}
.listCatLeftRow a:hover {
	color:#CC0000;
}
.listCatLeftSearch {
	padding-left: 0px; margin-bottom:8px; color: #000;  padding-top:10px;
}
.listCatMenu {
	display:flex; justify-content: space-between;
}
.listCatMenu .boxAction {
	margin-top:5px;
}
.listCatMenu .list-cat-item {
	padding: 3px 0px; color: #666; margin: 5px; font-size: 14px;
}
.listCatMenu .list-cat-item.on {	
	border-bottom: 2px solid #b7bfcb;
}