/*
Theme Name: Ant Furniture
Description: Child theme for Hello Elementor, optimized for Ant Furniture design.
Template: hello-elementor
Text Domain: ant-furniture
Version: 1.0.0
*/

/* ================= BIẾN MÀU SẮC & CƠ BẢN ================= */
:root {
  --red: #e31e24;
  --dark: #222222;
  --gray-light: #f5f5f5;
  --text-main: #333333;
  --text-muted: #777777;
  --border: #eeeeee;
  --container-width: 1200px;
  --orange: #ff8c00;
  --blue: #1e88e5;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: "Roboto", sans-serif;
  color: var(--text-main);
  font-size: 14px;
  background-color: #fff;
  line-height: 1.5;
}
a {
  text-decoration: none;
  color: inherit;
  transition: 0.3s;
}
ul {
  list-style: none;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
input,
button,
textarea {
  font-family: inherit;
  outline: none;
}

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

/* ================= HELPER UTILITIES ================= */
.mt-15 { margin-top: 15px !important; }
.mb-15 { margin-bottom: 15px !important; }
.mb-30 { margin-bottom: 30px !important; }
.ms-auto { margin-left: auto !important; }
.text-white { color: #ffffff !important; }
.text-red { color: var(--red) !important; }
.text-center { text-align: center !important; }
.font-italic { font-style: italic !important; }
.bg-gradient-blue { background: linear-gradient(135deg, #1e88e5, #1565c0) !important; color: white !important; }
.bg-dark { background: #333 !important; color: #fff !important; }
.bg-red { background: var(--red) !important; color: #fff !important; }
.bg-transparent { background: transparent !important; }
.bg-lightblue { background: #a8d5db !important; }
.bg-grayblue { background: #7b8b9a !important; color: white !important; }
.bg-brown { background: #5b454e !important; color: white !important; }
.radius-3 { border-radius: 3px !important; }
.radius-50 { border-radius: 50% !important; }
.p-20 { padding: 20px !important; }

/* ================= HEADER, TOP BAR & NAVBAR ================= */
.top-bar {
  background: var(--gray-light);
  border-bottom: 1px solid #e5e5e5;
  padding: 6px 0;
  font-size: 12px;
  color: var(--text-muted);
}
.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header {
  padding: 25px 0;
}
.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 32px;
  font-weight: bold;
}
.logo-text {
  color: var(--red);
}
.logo-text span {
  color: var(--dark);
}

.header-policy {
  display: flex;
  gap: 40px;
}
.policy-item {
  display: flex;
  align-items: center;
  gap: 10px;
}
.policy-icon {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--text-muted);
}
.policy-info strong {
  display: block;
  font-size: 13px;
  color: #000;
  margin-bottom: 2px;
}
.policy-info span {
  font-size: 12px;
  color: var(--text-muted);
}

.header-cart {
  display: flex;
  align-items: center;
  gap: 15px;
  font-weight: bold;
  font-size: 15px;
}
.cart-icon {
  position: relative;
  font-size: 24px;
  color: var(--text-main);
}
.cart-count {
  position: absolute;
  top: -5px;
  right: -8px;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.navbar {
  background: var(--dark);
  color: #fff;
}
.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.nav-links {
  display: flex;
}
.nav-links li > a {
  display: block;
  padding: 15px 25px;
  font-weight: bold;
  text-transform: uppercase;
  font-size: 13px;
  color: #fff;
}
.nav-links li.active > a,
.nav-links li > a:hover {
  background: var(--red);
}

.search-box {
  position: relative;
  width: 250px;
}
.search-box input {
  width: 100%;
  background: #333;
  border: none;
  padding: 8px 35px 8px 15px;
  border-radius: 20px;
  color: #fff;
  outline: none;
  font-size: 13px;
}
.search-box button {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #aaa;
  cursor: pointer;
}

/* ================= BREADCRUMB ================= */
.breadcrumb {
  padding: 15px 0;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 30px;
  border-bottom: 1px solid var(--border);
}
.breadcrumb a {
  color: var(--text-main);
}
.breadcrumb a:hover {
  color: var(--red);
}
.breadcrumb span {
  margin: 0 10px;
  font-size: 10px;
}
.breadcrumb .current {
  color: var(--red);
}

/* ================= SHARED COMPONENTS (Product Cards, Banners, Ads) ================= */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}
.product-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; }
.product-grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 15px; margin-bottom: 40px; }

.product-card {
  text-align: center;
  position: relative;
  transition: 0.3s;
  padding-bottom: 10px;
}
.product-card:hover {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  transform: translateY(-3px);
}
.product-img {
  position: relative;
  margin-bottom: 10px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background-color: #f8f8f8;
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
}
.discount-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #8bc34a;
  color: #fff;
  font-size: 11px;
  padding: 2px 5px;
  font-weight: bold;
  border-radius: 3px;
  z-index: 2;
}
.product-name {
  font-size: 13px;
  color: var(--text-main);
  margin-bottom: 5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  padding: 0 10px;
  height: 38px;
}
.product-name:hover {
  color: var(--red);
}
.product-price {
  color: var(--red);
  font-weight: bold;
  font-size: 14px;
}
.product-old-price {
  color: #aaa;
  text-decoration: line-through;
  font-size: 12px;
  font-weight: normal;
  margin-left: 5px;
}

/* Category Sidebar Widget & Similar filters */
.sidebar-col { width: 260px; flex-shrink: 0; }
.filter-box, .sidebar-widget { border: 1px solid var(--border); margin-bottom: 20px; }
.filter-title, .widget-title { font-size: 14px; font-weight: bold; text-transform: uppercase; padding: 15px; border-bottom: 1px solid var(--border); background: #fff; }

.cat-list, .cat-menu { padding: 10px 0; }
.cat-list li, .cat-menu li { padding: 8px 15px; }
.cat-list li a, .cat-menu li a { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--text-main); }
.cat-list li a:hover, .cat-list li.active > a, .cat-menu li a:hover, .cat-menu li a.active { color: var(--red); }
.cat-list li i.fa-caret-right, .cat-menu li i { font-size: 10px; color: #ccc; }
.cat-list li.active i.fa-caret-right { color: var(--red); }

/* Promo Sidebar Widget */
.promo-widget { border: 1px solid var(--red); }
.promo-widget .widget-title { text-align: center; color: var(--red); border-bottom-color: var(--red); }
.promo-main-post { padding: 15px; border-bottom: 1px dotted var(--border); }
.promo-main-post img { width: 100%; height: 140px; object-fit: cover; margin-bottom: 10px; }
.promo-main-post h4 { font-size: 14px; font-weight: bold; line-height: 1.4; margin-bottom: 5px; }
.promo-main-post h4 a:hover { color: var(--red); }

.banner-content { padding: 15px; text-align: center; background: #f9f9f9; }
.banner-content h3 { font-size: 20px; color: var(--dark); margin-bottom: 5px; }
.banner-content p.subtitle { color: var(--text-muted); font-size: 13px; }
.banner-content p.price { color: #4caf50; font-size: 18px; font-weight: bold; margin-top: 10px; }

/* Mini Posts List */
.mini-list-wrapper { padding: 15px; }
.mini-post { display: flex; gap: 15px; margin-bottom: 15px; padding-bottom: 15px; border-bottom: 1px dotted var(--border); }
.mini-post:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.mini-post-img { width: 70px; height: 50px; flex-shrink: 0; overflow: hidden; }
.mini-post-img img { width: 100%; height: 100%; object-fit: cover; }
.mini-post-title { font-size: 13px; line-height: 1.4; color: var(--text-main); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mini-post-title:hover { color: var(--red); }
.btn-view-more { display: block; text-align: center; margin-top: 15px; font-size: 13px; color: var(--text-muted); }
.btn-view-more:hover { color: var(--red); }

/* ================= FRONT PAGE LAYOUT ================= */
.hero-banner { width: 100%; height: 500px; background: url("https://via.placeholder.com/1920x600/e0e0e0/666666?text=Main+Banner+Image") center/cover; position: relative; }
.promo-banners { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 30px auto; max-width: var(--container-width); padding: 0 15px; }
.promo-item { height: 200px; background-color: #f0f0f0; display: flex; align-items: center; justify-content: center; font-weight: bold; color: #555; text-align: center; }

.section-header { display: flex; justify-content: space-between; border-bottom: 2px solid var(--red); margin-bottom: 20px; }
.section-header .title { background: var(--red); color: #fff; padding: 8px 15px; font-weight: bold; text-transform: uppercase; }
.section-header .links { display: flex; gap: 15px; align-items: center; padding-right: 10px; font-size: 13px; }

/* Front page product grids - override WooCommerce float with !important */
.product-grid-4 {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 20px !important;
  margin-bottom: 50px !important;
  float: none !important;
  width: 100% !important;
  padding-bottom: 10px;
}
.product-grid-5 {
  display: grid !important;
  grid-template-columns: repeat(5, 1fr) !important;
  gap: 15px !important;
  margin-bottom: 60px !important;
  float: none !important;
  width: 100% !important;
  padding-bottom: 10px;
}
/* Force product cards inside grids to not float */
.product-grid-4 .product-card,
.product-grid-5 .product-card {
  float: none !important;
  width: 100% !important;
  margin: 0 !important;
}

.mid-banner { margin: 40px 0; text-align: center; }
.mid-banner img { width: 100%; height: auto; }
.split-section { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 50px; margin-bottom: 40px; clear: both; }
.testimonial-box { background-color: var(--red); color: white; padding: 40px; text-align: center; }
.delivery-box { background: url("https://via.placeholder.com/600x300/dddddd/333333?text=Anh+Ban+Giao+Khach+Hang") center/cover; position: relative; }
.delivery-text { position: absolute; bottom: 0; left: 0; width: 100%; background: color-mix(in srgb, var(--red) 90%, transparent); color: white; padding: 15px; }

.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 40px; }
.news-card img { width: 100%; height: 200px; object-fit: cover; margin-bottom: 15px; }
.news-card h3 { font-size: 14px; margin-bottom: 10px; }
.news-meta { font-size: 12px; color: var(--text-muted); margin-bottom: 10px; }
.news-excerpt { font-size: 13px; color: var(--text-muted); margin-bottom: 15px; }

/* ================= PRODUCT ARCHIVE / CATEGORY LAYOUT ================= */
.category-layout { display: flex; gap: 30px; margin-bottom: 50px; }
.main-content { flex-grow: 1; min-width: 0; }
.page-title { font-size: 24px; font-weight: bold; margin-bottom: 20px; }
.top-banner { margin-bottom: 30px; }

/* Sub categories */
.sub-cat-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 15px; margin-bottom: 30px; }
.sub-cat-item { text-align: center; }
.sub-cat-img { background: #999; aspect-ratio: 4/3; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; font-size: 12px; margin-bottom: 10px; font-weight: bold; }
.sub-cat-name { font-size: 13px; color: var(--text-main); }

/* Product grid – archive/category page */
.product-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 20px !important;
  margin-bottom: 30px !important;
}
.product-grid .product-card,
.product-grid li.product {
  float: none !important;
  width: 100% !important;
  margin: 0 !important;
}

/* Sort Bar */
.sort-bar { display: flex; align-items: center; gap: 20px; padding: 15px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin-bottom: 30px; font-size: 13px; }
.sort-bar strong { font-weight: normal; color: var(--text-main); }
.sort-options { display: flex; gap: 15px; }
.sort-radio { display: flex; align-items: center; gap: 5px; cursor: pointer; color: var(--text-muted); }
.sort-radio input[type="radio"] { accent-color: var(--red); cursor: pointer; }

/* Filter Items */
.filter-content { padding: 15px; }
.search-brand { display: flex; margin-bottom: 15px; }
.search-brand input { flex: 1; border: 1px solid var(--border); padding: 8px 10px; outline: none; border-right: none; font-size: 13px; }
.search-brand button { background: var(--red); color: #fff; border: none; padding: 0 15px; cursor: pointer; }

.checkbox-list { max-height: 150px; overflow-y: auto; padding-right: 5px; }
.checkbox-list::-webkit-scrollbar { width: 4px; }
.checkbox-list::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }
.checkbox-item { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; cursor: pointer; font-size: 13px; color: var(--text-main); }
.checkbox-item input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--red); cursor: pointer; }
.checkbox-item.active-filter { color: var(--red); font-weight: bold; }

/* Pagination */
.pagination { display: flex; justify-content: center; gap: 5px; margin-top: 30px; flex-wrap: wrap; align-items: center; }
.pagination .page-numbers-item { display: contents; }
.pagination a.page-numbers,
.pagination span.page-numbers { display: flex; align-items: center; justify-content: center; min-width: 32px; height: 32px; padding: 0 8px; border: 1px solid var(--border); color: var(--text-main); font-size: 13px; transition: 0.3s; text-decoration: none; }
.pagination a.page-numbers:hover { border-color: var(--red); color: var(--red); }
.pagination span.page-numbers.active,
.pagination span.page-numbers.current { background: var(--red); color: #fff; border-color: var(--red); font-weight: bold; }

/* ================= PRODUCT DETAIL ================= */
.product-top-section { display: flex; gap: 40px; margin-bottom: 50px; }
.product-main-col { flex: 1; display: flex; gap: 40px; }
.product-images { width: 50%; }
.main-image { border: 1px solid var(--border); margin-bottom: 15px; padding: 20px; text-align: center; position: relative; overflow: hidden; }
.main-image a { display: block; }
.main-image img { cursor: zoom-in; transition: transform 0.3s ease; }
.main-image:hover img { transform: scale(1.03); }
.thumbnail-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.thumb-item { border: 1px solid var(--border); cursor: pointer; padding: 5px; opacity: 0.6; transition: 0.3s; }
.thumb-item:hover, .thumb-item.active { opacity: 1; border-color: var(--red); }
.product-info-col { width: 50%; }
.product-title { font-size: 26px; font-weight: bold; color: var(--dark); margin-bottom: 10px; }
.product-meta { font-size: 13px; margin-bottom: 15px; color: var(--text-main); display: flex; flex-direction: column; gap: 6px; }
.product-meta div { display: flex; align-items: center; gap: 5px; }
.product-meta i { color: var(--red); flex-shrink: 0; }
.status-instock { color: #4caf50; }
.product-price-large { font-size: 28px; font-weight: bold; color: var(--red); margin-bottom: 15px; }
.product-short-desc { font-size: 13px; color: var(--text-muted); margin-bottom: 25px; line-height: 1.6; }
.quantity-area { margin-bottom: 20px; font-size: 13px; font-weight: bold; }
.quantity-area { margin-bottom: 20px; font-size: 13px; font-weight: bold; }
.quantity-selector { display: inline-flex !important; align-items: stretch; border: 1px solid var(--border); margin-top: 8px; width: auto !important; max-width: 160px !important; }
.qty-input { width: 60px !important; height: 50px !important; min-width: 0 !important; border: none !important; text-align: center !important; font-weight: bold; font-size: 1em !important; color: var(--dark); padding: 0 2px !important; margin: 0 !important; -moz-appearance: textfield; box-shadow: none !important; }
.qty-btn { width: 40px !important; height: 50px !important; background: #fff !important; border: none !important; border-right: 1px solid var(--border) !important; font-size: 18px; cursor: pointer; color: var(--text-main) !important; flex-shrink: 0; display: flex !important; align-items: center; justify-content: center; padding: 0 !important; box-shadow: none !important; }
.qty-btn:last-child { border-right: none !important; border-left: 1px solid var(--border) !important; }
.qty-btn:hover { background: var(--gray-light) !important; }
.qty-input::-webkit-outer-spin-button, .qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.buy-btn { width: 100%; display: block; background: var(--orange); color: #fff; text-align: center; padding: 15px 0; font-size: 15px; font-weight: bold; border: none; cursor: pointer; text-transform: uppercase; margin-bottom: 10px; transition: 0.3s; box-sizing: border-box; }
.buy-btn:hover { background: #e67e22; }
/* Override WooCommerce cart form margin */
.product-info-col form.cart { margin: 0 0 10px 0; }
.action-btns { display: flex; gap: 10px; margin-top: 0; }
.action-btns .btn-blue { flex: 1; background: var(--blue); color: #fff; border: none; padding: 13px 0; font-size: 14px; font-weight: bold; cursor: pointer; transition: 0.3s; display: flex; align-items: center; justify-content: center; gap: 8px; }
.action-btns .btn-blue:hover { background: #1976d2; }
.product-sidebar-col { width: 280px; flex-shrink: 0; }
.policy-box-container { border: 1px solid var(--border); padding: 0 15px; }
.policy-item-large { text-align: center; padding: 25px 0; border-bottom: 1px solid var(--border); }
.policy-item-large:last-child { border-bottom: none; }
.policy-item-large i { font-size: 32px; color: var(--text-muted); margin-bottom: 15px; }
.policy-item-large h4 { font-size: 14px; font-weight: bold; margin-bottom: 10px; }
.policy-item-large p { font-size: 13px; color: var(--text-muted); line-height: 1.5; }

.product-bottom-section { display: flex; gap: 40px; margin-bottom: 60px; }
.product-description-area { flex: 1; }
.tabs-header { display: flex; border-bottom: 2px solid var(--dark); margin-bottom: 20px; }
.tab-btn { padding: 12px 25px; font-weight: bold; font-size: 13px; text-transform: uppercase; color: #fff; background: var(--dark); cursor: pointer; border: none; margin-right: 5px; }
.tab-btn.active { background: var(--red); }
.tab-content { font-size: 14px; color: var(--text-main); line-height: 1.6; }
.tab-content p { margin-bottom: 20px; }
.spec-table { width: 100%; border-collapse: collapse; margin-top: 20px; }
.spec-table td { border: 1px solid var(--border); padding: 15px; font-size: 13px; }
.spec-table tr td:first-child { width: 30%; background: #fafafa; font-weight: 500; }
.related-section { margin-bottom: 60px; }
.section-heading { font-size: 20px; font-weight: bold; text-transform: uppercase; padding-bottom: 10px; border-bottom: 2px solid var(--red); margin-bottom: 30px; display: inline-block; }

/* ================= CONTACT LAYOUT ================= */
.contact-layout { display: flex; gap: 40px; margin-bottom: 80px; }
.contact-info-col { width: 35%; flex-shrink: 0; }
.contact-heading { font-size: 16px; font-weight: bold; text-transform: uppercase; margin-bottom: 20px; color: var(--dark); }
.contact-list { margin-bottom: 30px; }
.contact-list li { display: flex; gap: 15px; margin-bottom: 15px; align-items: flex-start; color: var(--text-main); font-size: 14px; }
.contact-list li i { font-size: 16px; color: var(--dark); margin-top: 3px; width: 16px; text-align: center; }
.contact-map { width: 100%; height: 350px; border: 1px solid var(--border); background-color: #eee; }
.contact-map iframe { width: 100%; height: 100%; border: 0; display: block; }
.contact-form-col { flex: 1; }
.form-heading-wrapper { text-align: center; margin-bottom: 30px; }
.form-heading-wrapper h2 { font-size: 24px; font-weight: bold; color: var(--dark); margin-bottom: 10px; }
.heading-divider { width: 50px; height: 2px; background-color: var(--red); margin: 0 auto 15px; }
.form-desc { font-size: 14px; color: var(--text-main); text-align: center; margin-bottom: 30px; }

.contact-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.contact-form .form-group { margin-bottom: 20px; }
.contact-form label { display: block; font-size: 13px; font-weight: bold; margin-bottom: 8px; color: var(--dark); }
.contact-form label span { color: var(--red); }
.contact-form input, .contact-form textarea { width: 100%; padding: 12px 15px; border: 1px solid var(--border); font-size: 14px; color: var(--text-main); background: #fff; transition: 0.3s; }
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--red); box-shadow: 0 0 5px color-mix(in srgb, var(--red) 20%, transparent); }
.contact-form textarea { resize: vertical; min-height: 150px; }
.btn-submit { display: inline-block; padding: 10px 30px; background: transparent; color: var(--red); border: 1px solid var(--red); font-size: 13px; font-weight: bold; text-transform: uppercase; cursor: pointer; transition: 0.3s; }
.btn-submit:hover { background: var(--red); color: #fff; }

/* ================= NEWS & ARTICLE LAYOUT ================= */
.news-layout, .article-layout { display: flex; gap: 30px; margin-bottom: 60px; }
.news-main-col, .article-main-col { flex: 1; min-width: 0; }
.featured-news-grid { display: grid; grid-template-columns: 60% 40%; gap: 20px; margin-bottom: 40px; }
.featured-main img { width: 100%; aspect-ratio: 16/9; object-fit: cover; margin-bottom: 15px; }
.featured-main h2 { font-size: 20px; font-weight: bold; margin-bottom: 10px; line-height: 1.4; }
.featured-main h2 a:hover { color: var(--red); }
.featured-main p { font-size: 14px; color: var(--text-muted); line-height: 1.5; }
.featured-side .top-side-post img { width: 100%; height: 180px; object-fit: cover; margin-bottom: 10px; }
.featured-side .top-side-post h3 { font-size: 16px; font-weight: bold; margin-bottom: 15px; line-height: 1.4; }
.featured-side .top-side-post h3 a:hover { color: var(--red); }
.side-post-links { border-top: 1px solid var(--border); }
.side-post-links li { border-bottom: 1px solid var(--border); }
.side-post-links li a { display: block; padding: 12px 0; font-size: 14px; color: var(--text-main); line-height: 1.5; }
.side-post-links li a:hover { color: var(--red); }

.news-list-item { display: flex; gap: 20px; margin-bottom: 25px; padding-bottom: 25px; border-bottom: 1px solid var(--border); }
.news-list-item:last-child { border-bottom: none; }
.news-item-img { width: 280px; flex-shrink: 0; }
.news-item-img img { width: 100%; height: 180px; object-fit: cover; }
.news-item-content h3 { font-size: 18px; font-weight: bold; margin-bottom: 5px; line-height: 1.4; }
.news-item-content h3 a:hover { color: var(--red); }
.news-item-meta { font-size: 12px; color: #999; margin-bottom: 10px; font-style: italic; }
.news-item-desc { font-size: 14px; color: var(--text-muted); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

/* Article Details */
.article-title { font-size: 26px; font-weight: bold; color: var(--dark); margin-bottom: 15px; line-height: 1.3; }
.article-meta { font-size: 13px; color: var(--text-muted); margin-bottom: 25px; font-style: italic; }
.article-meta span { color: var(--text-main); font-style: normal; font-weight: 500; }
.related-links { margin-bottom: 30px; }
.related-links li { margin-bottom: 10px; }
.related-links li a { color: var(--red); font-size: 14px; display: flex; align-items: flex-start; gap: 8px; line-height: 1.4; transition: 0.3s; }
.related-links li a:hover { opacity: 0.8; text-decoration: underline; }
.article-content { color: var(--text-main); font-size: 15px; line-height: 1.6; }
.article-content p { margin-bottom: 20px; }
.article-content strong { font-weight: bold; color: var(--dark); }
.article-content img { width: 100%; max-width: 100%; height: auto; margin: 15px 0 10px 0; border: 1px solid var(--border); }
.article-caption { display: block; text-align: center; font-size: 13px; color: var(--text-muted); font-style: italic; margin-bottom: 30px; }

/* Comment section */
.comment-section { margin-top: 50px; padding-top: 30px; border-top: 1px solid var(--border); }
.comment-title { font-size: 15px; font-weight: normal; text-transform: uppercase; margin-bottom: 20px; color: var(--text-main); }
.comment-form .form-group { margin-bottom: 15px; }
.comment-form input, .comment-form textarea { width: 100%; padding: 12px 15px; border: 1px solid var(--border); font-size: 14px; outline: none; background: #fff; transition: 0.3s; }
.comment-form input:focus, .comment-form textarea:focus { border-color: var(--red); }
.comment-form textarea { resize: vertical; min-height: 120px; }
.comment-form button { background: var(--red); color: #fff; border: none; padding: 10px 25px; font-size: 13px; font-weight: bold; cursor: pointer; transition: 0.3s; display: inline-flex; align-items: center; gap: 8px; }
.comment-form button:hover { background: color-mix(in srgb, var(--red) 80%, #000); }

/* ================= SEARCH LAYOUT ================= */
.search-layout { display: flex; gap: 30px; margin-bottom: 60px; }
.search-main-col { flex: 1; min-width: 0; }
.search-heading { font-size: 24px; font-weight: bold; color: var(--dark); text-align: center; margin-bottom: 40px; }

/* ================= FOOTER ================= */
.footer {
  background: #fafafa;
  border-top: 1px solid var(--border);
  padding-top: 50px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 2fr;
  gap: 30px;
  margin-bottom: 30px;
}
.footer-logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--red);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.footer-logo span {
  color: var(--dark);
}
.footer-info li {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--text-muted);
}
.footer-title {
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 20px;
  text-transform: uppercase;
}
.footer-links li {
  margin-bottom: 10px;
}
.footer-links a {
  font-size: 13px;
  color: var(--text-muted);
}
.footer-links a:hover {
  color: var(--red);
  padding-left: 5px;
}
.subscribe-form {
  display: flex;
}
.subscribe-form input {
  flex: 1;
  padding: 10px 15px;
  border: 1px solid var(--border);
  outline: none;
  font-size: 13px;
}
.subscribe-form button {
  background: var(--red);
  color: #fff;
  border: none;
  padding: 0 20px;
  font-weight: bold;
  cursor: pointer;
}
.social-icons {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.social-icons a {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: #eee;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}
.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 15px 0;
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.payment-methods {
  display: flex;
  gap: 10px;
  font-size: 24px;
}

/* ================= FRONT PAGE SPECIFIC ================= */
.promo-banners {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 30px auto;
}
.promo-item {
  height: 200px;
  background-color: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: #555;
  text-align: center;
}

.mid-banner { margin: 40px 0; text-align: center; }
.mid-banner img { width: 100%; height: auto; }

.split-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 40px;
}
.split-section > div {
  display: flex;
  flex-direction: column;
}
.testimonial-box {
  background-color: var(--red);
  color: white;
  padding: 40px;
  text-align: center;
  flex-grow: 1;
}
.delivery-box {
  background: url("https://via.placeholder.com/600x300/dddddd/333333?text=Anh+Ban+Giao+Khach+Hang") center/cover;
  position: relative;
  flex-grow: 1;
}
.delivery-text {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: color-mix(in srgb, var(--red) 90%, transparent);
  color: white;
  padding: 15px;
}
.delivery-text h4 { font-size: 14px; margin-bottom: 5px; }
.delivery-text p { font-size: 13px; }

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}
.news-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  margin-bottom: 15px;
}
.news-card h3 { font-size: 14px; margin-bottom: 10px; }
.news-meta { font-size: 12px; color: var(--text-muted); margin-bottom: 10px; }
.news-excerpt { font-size: 13px; color: var(--text-muted); margin-bottom: 15px; }
.btn-readmore { display: inline-block; padding: 8px 15px; background: #f5f5f5; color: var(--text-main); font-size: 12px; }

/* Widget Sản phẩm mới */
.sidebar-widget { border: 1px solid var(--border); margin-bottom: 20px; padding: 15px; }
.widget-title { font-size: 16px; font-weight: bold; padding-bottom: 10px; border-bottom: 2px solid var(--red); margin-bottom: 20px; text-transform: uppercase; }

.mini-product-list { display: flex; flex-direction: column; gap: 20px; }
.mini-product-item { display: flex; gap: 15px; border-bottom: 1px dotted var(--border); padding-bottom: 15px; }
.mini-product-item:last-child { border-bottom: none; }
.mini-product-img { width: 80px; height: 60px; flex-shrink: 0; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; }
.mini-product-img img { max-height: 100%; object-fit: contain; }
.mini-product-info a { font-size: 13px; color: var(--text-main); display: block; margin-bottom: 5px; }
.mini-product-info a:hover { color: var(--red); }
.mini-product-info span { font-size: 14px; font-weight: bold; color: var(--red); }
/* ==========================================================================
   CUSTOM SLIDER (Testimonials & Delivery)
   ========================================================================== */
.ant-slider { position: relative; overflow: hidden; width: 100%; height: 100%; min-height: 250px; background: var(--red); color: #fff; border-radius: 3px; }
.ant-slide { position: absolute; top:0; left:0; width: 100%; height: 100%; opacity: 0; visibility: hidden; transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 20px 40px; }
.ant-slide.active { opacity: 1; visibility: visible; z-index: 1; }

.ant-slider.delivery-box .ant-slide { padding: 0; align-items: flex-end; justify-content: flex-start; }
.ant-slider.delivery-box .delivery-text { width: 100%; background: rgba(0,0,0,0.6); padding: 15px; text-align: left; }

.ant-prev, .ant-next { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.2); color: #fff; border: none; width: 30px; height: 30px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 10; transition: background 0.3s; }
.ant-prev:hover, .ant-next:hover { background: rgba(255,255,255,0.5); }
.ant-prev { left: 10px; }
.ant-next { right: 10px; }

.ant-dots { position: absolute; bottom: 15px; left: 0; width: 100%; display: flex; justify-content: center; gap: 8px; z-index: 10; }
.ant-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.4); cursor: pointer; transition: background 0.3s; }
.ant-dot.active { background: #fff; }

/* ==========================================================================
   RESPONSIVE – TABLET  (≤ 1024px)
   ========================================================================== */
@media (max-width: 1024px) {
  .container { padding: 0 20px; }

  /* Header */
  .header-policy { gap: 20px; }
  .policy-item { gap: 6px; }
  .policy-info strong { font-size: 12px; }

  /* Nav */
  .nav-menu { gap: 15px; }
  .nav-menu a { font-size: 13px; }

  /* Grids: 4-col → 3-col */
  .product-grid,
  .product-grid-4 { grid-template-columns: repeat(3, 1fr) !important; }
  .product-grid-5 { grid-template-columns: repeat(4, 1fr) !important; }
  .promo-banners { grid-template-columns: repeat(3, 1fr); }
  .sub-cat-row  { grid-template-columns: repeat(4, 1fr); }
  .news-grid    { grid-template-columns: repeat(2, 1fr); }

  /* Category archive */
  .category-layout { gap: 20px; }
  .sidebar-col { width: 220px; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 20px; }

  /* Product detail */
  .product-main-col { gap: 20px; }
  .product-sidebar-col { width: 240px; }
}

/* ==========================================================================
   RESPONSIVE – TABLET PORTRAIT  (≤ 768px)
   ========================================================================== */
@media (max-width: 768px) {
  /* --- Top bar --- */
  .top-bar { display: none; }

  /* --- Header --- */
  .header-main { flex-wrap: wrap; gap: 10px; padding: 12px 0; }
  .header-policy { display: none; }          /* hide policies on mobile */
  .header-cart { margin-left: auto; }
  .logo { font-size: 24px; }

  /* --- Hamburger (show/hide nav) --- */
  .nav-bar { position: relative; }
  .nav-menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--dark);
    z-index: 200;
    padding: 10px 0;
    gap: 0;
  }
  .nav-menu.open { display: flex; }
  .nav-menu > li > a { padding: 12px 20px; display: block; border-bottom: 1px solid rgba(255,255,255,0.08); }
  .hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    background: none;
    border: none;
  }
  .hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: #fff;
    transition: 0.3s;
  }

  /* --- Search bar --- */
  .search-box { width: 100%; }
  .search-box input { width: 100%; }

  /* --- Container --- */
  .container { padding: 0 15px; }

  /* --- Grids: → 2-col --- */
  .product-grid,
  .product-grid-4 { grid-template-columns: repeat(2, 1fr) !important; gap: 12px !important; }
  .product-grid-5 { grid-template-columns: repeat(2, 1fr) !important; gap: 12px !important; }
  .promo-banners  { grid-template-columns: 1fr; gap: 10px; }
  .sub-cat-row    { grid-template-columns: repeat(3, 1fr); }
  .news-grid      { grid-template-columns: 1fr; }
  .split-section  { grid-template-columns: 1fr; }
  .footer-grid    { grid-template-columns: 1fr; gap: 20px; }

  /* --- Category archive sidebar → collapse top --- */
  .category-layout { flex-direction: column; }
  .sidebar-col { width: 100%; }
  .sidebar { display: none; }                /* hide sidebar; show via toggle if needed */

  /* --- Sort bar wrap --- */
  .sort-bar { flex-wrap: wrap; gap: 10px; }
  .sort-options { flex-wrap: wrap; gap: 8px; }

  /* --- Breadcrumb --- */
  .breadcrumb { font-size: 12px; margin-bottom: 15px; }

  /* --- Product detail --- */
  .product-top-section  { flex-direction: column; }
  .product-main-col     { flex-direction: column; gap: 20px; }
  .product-images       { width: 100%; }
  .product-info-col     { width: 100%; }
  .product-sidebar-col  { width: 100%; }
  .product-bottom-section { flex-direction: column; }
  .product-price-large  { font-size: 22px; }
  .action-btns          { flex-direction: column; }
  .action-btns .btn-blue { width: 100%; }

  /* --- Single article --- */
  .article-layout,
  .news-layout    { flex-direction: column; }
  .featured-news-grid { grid-template-columns: 1fr; }
  .news-list-item { flex-direction: column; }
  .news-item-img  { width: 100%; }

  /* --- Contact --- */
  .contact-layout { flex-direction: column; }
  .contact-info-col { width: 100%; }

  /* --- Section header links --- */
  .section-header { flex-wrap: wrap; }
  .section-header .links { flex-wrap: wrap; gap: 8px; }

  /* --- Footer --- */
  .footer-bottom { flex-direction: column; text-align: center; gap: 10px; }
  .social-icons  { justify-content: center; }

  /* --- Pagination --- */
  .pagination { gap: 4px; }
  .pagination a.page-numbers,
  .pagination span.page-numbers { min-width: 28px; height: 28px; font-size: 12px; }
}

/* ==========================================================================
   RESPONSIVE – MOBILE  (≤ 480px)
   ========================================================================== */
@media (max-width: 480px) {
  /* Grids: → 1-col for very narrow */
  .product-grid,
  .product-grid-4 { grid-template-columns: repeat(1, 1fr) !important; }
  .product-grid-5 { grid-template-columns: repeat(2, 1fr) !important; }
  .sub-cat-row    { grid-template-columns: repeat(2, 1fr); }

  /* Tabs */
  .tabs-header { flex-wrap: wrap; }
  .tab-btn     { font-size: 11px; padding: 8px 12px; }

  /* Product detail actions */
  .buy-btn { font-size: 13px; padding: 12px; }

  /* Logo */
  .logo { font-size: 20px; }

  /* Section headings */
  .section-heading { font-size: 16px; }
  .page-title      { font-size: 18px; }

  /* Promo item height */
  .promo-item { height: 150px !important; font-size: 13px; }
}
