/* ===== Reset & Base ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: #333;
  line-height: 1.6;
  background: #fff;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s;
}

ul {
  list-style: none;
}

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

/* ===== Container ===== */
.container {
  width: 85%;
  max-width: 1600px;
  min-width: 320px;
  margin: 0 auto;
}

/* ===== Top Bar ===== */
.top-bar {
  background: #f5f5f5;
  font-size: 13px;
  color: #666;
  padding: 8px 0;
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.top-bar-left {
  display: flex;
  gap: 20px;
}

.top-bar-right {
  display: flex;
  gap: 20px;
}

.top-bar a {
  color: #666;
}

.top-bar a:hover {
  color: #b71c2a;
}

/* ===== Header / Navigation ===== */
.header {
  background: #fff;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  padding-bottom: 20px;
}

.logo img {
  height: 50px;
}

.nav-list {
  display: flex;
  gap: 0;
}

.nav-list li a {
  display: block;
  padding: 12px 20px;
  font-size: 16px;
  font-weight: 600;
  color: #333;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  transition: color 0.3s;
}

.nav-list li a::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 3px;
  background: #b71c2a;
  transition: width 0.3s;
}

.nav-list li a:hover,
.nav-list li a.active {
  color: #b71c2a;
}

.nav-list li a:hover::after,
.nav-list li a.active::after {
  width: 20px;
}

.has-dropdown {
  position: relative;
}

.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  min-width: 200px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border-top: 2px solid #b71c2a;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s;
  z-index: 1001;
}

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

.dropdown li {
  list-style: none;
}

.dropdown li a {
  display: block;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 400;
  color: #333;
  text-transform: none;
  letter-spacing: 0;
  transition: all 0.3s;
  border-bottom: 1px solid #f0f0f0;
}

.dropdown li a:hover {
  background: #f9f9f9;
  color: #b71c2a;
  padding-left: 25px;
}

.dropdown li:last-child a {
  border-bottom: none;
}

.dropdown li a::after {
  display: none;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
}

.hamburger span {
  display: block;
  width: 26px;
  height: 3px;
  background: #333;
  transition: all 0.3s;
  border-radius: 2px;
}

.hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 6px);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -6px);
}

/* ===== Page Banner (inner pages) ===== */
.page-banner {
  background: #f5f5f5;
  padding: 40px 0;
  border-bottom: 1px solid #eee;
}

.page-banner .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.page-banner h1 {
  font-size: 36px;
  font-weight: 700;
  color: #222;
  text-transform: uppercase;
}

.breadcrumb {
  font-size: 13px;
  color: #999;
}

.breadcrumb a {
  color: #999;
}

.breadcrumb a:hover {
  color: #b71c2a;
}

.breadcrumb span {
  margin: 0 6px;
}

/* ===== Main Content Layout ===== */
.main-content {
  padding: 50px 0 60px;
}

.content-layout {
  display: flex;
  gap: 40px;
}

/* ===== Sidebar ===== */
.sidebar {
  width: 220px;
  flex-shrink: 0;
}

.sidebar-title {
  background: #b71c2a;
  color: #fff;
  text-align: center;
  padding: 18px 16px;
  font-size: 24px;
  font-weight: 700;
  text-transform: uppercase;
}

.sidebar-list li a {
  display: block;
  padding: 14px 16px;
  font-size: 16px;
  color: #555;
  border-bottom: 1px solid #eee;
  transition: all 0.3s;
}

.sidebar-list li a:hover {
  color: #b71c2a;
  padding-left: 22px;
}

.sidebar-list li a.active {
  color: #b71c2a;
  font-weight: 600;
}

/* ===== Content Area ===== */
.content-area {
  flex: 1;
  min-width: 0;
}

.content-area p {
  margin-bottom: 20px;
  font-size: 16px;
  line-height: 1.8;
  color: #555;
}

/* ===== Banner Carousel (Home) ===== */
.banner-carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.banner-slides {
  display: flex;
  transition: transform 0.6s ease;
}

.banner-slide {
  min-width: 100%;
  position: relative;
  height: 520px;
}

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

.banner-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
}

.banner-overlay h2 {
  color: #fff;
  font-size: 42px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 10px;
}

.banner-overlay p {
  color: #fff;
  font-size: 28px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 30px;
}

.btn-read-more {
  display: inline-block;
  padding: 12px 32px;
  background: #b71c2a;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: none;
  cursor: pointer;
  transition: background 0.3s;
}

.btn-read-more:hover {
  background: #8e1520;
}

/* Carousel controls */
.carousel-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

.carousel-dots .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background 0.3s;
}

.carousel-dots .dot.active {
  background: #b71c2a;
}

/* ===== Product Categories (Home) ===== */
.product-categories {
  padding: 100px 0 50px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px 50px;
}

.category-card {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  aspect-ratio: 16 / 8.25;
}

.category-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.category-card:hover img {
  transform: scale(1.05);
}

.category-card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: flex-end;
  padding: 20px;
}

.category-card-overlay span {
  color: #fff;
  font-size: 26px;
  font-weight: 700;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}

.category-card-overlay span::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #bb2e32;
  flex-shrink: 0;
}

/* ===== Section Header ===== */
.section-header {
  margin-bottom: 30px;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #b71c2a;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.section-label::before {
  content: '';
  display: inline-block;
  width: 12px;
  height: 3px;
  background: #b71c2a;
}

.section-header h2 {
  font-size: 32px;
  font-weight: 700;
  color: #222;
  text-transform: uppercase;
}

/* ===== Recommended Products (Home) ===== */
.recommended-products {
  padding: 60px 0 80px;
}

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

.product-card {
  position: relative;
  overflow: hidden;
  border: 1px solid #eee;
  border-radius: 4px;
  background: #fff;
}

.product-card-inner {
  display: block;
  position: relative;
}

.product-card-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #f9f9f9;
}

.product-card-title {
  text-align: center;
  padding: 14px 10px;
  font-size: 14px;
  font-weight: 600;
  color: #333;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-card-hover {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}

.product-card:hover .product-card-hover {
  opacity: 1;
}

.product-card-hover .btn-read-more {
  font-size: 13px;
  padding: 10px 24px;
}

/* ===== About Us Section (Home) ===== */
.home-about {
  padding: 80px 0;
  background: #f9f9f9;
}

.home-about-content {
  display: flex;
  align-items: center;
  gap: 40px;
}

.home-about-text {
  flex: 1;
}

.home-about-text p {
  font-size: 14px;
  line-height: 1.8;
  color: #666;
  margin-bottom: 12px;
}

.home-about-btn {
  flex-shrink: 0;
}

/* ===== News Center (Home) ===== */
.home-news {
  padding: 80px 0 100px;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px 40px;
}

.news-card {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
}

.news-card-inner {
  display: block;
  position: relative;
}

.news-card-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.news-card-hover {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}

.news-card:hover .news-card-hover {
  opacity: 1;
}

.news-card-title {
  padding: 12px 4px 0;
  font-size: 16px;
  color: #555;
  line-height: 1.5;
}

/* ===== Product List Page ===== */
.product-list-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.product-list-card {
  border: 1px solid #eee;
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
  transition: box-shadow 0.3s;
}

.product-list-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.product-list-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #f9f9f9;
}

.product-list-card-title {
  text-align: center;
  padding: 16px 10px;
  font-size: 14px;
  font-weight: 600;
  color: #333;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== News List Page ===== */
.news-list-item {
  display: flex;
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid #eee;
  align-items: flex-start;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
}

.news-list-item:last-child {
  border-bottom: none;
}

.news-list-thumb {
  width: 200px;
  height: 140px;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 4px;
}

.news-list-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-list-thumb-placeholder {
  width: 100%;
  height: 100%;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.news-list-thumb-placeholder svg {
  width: 60px;
  height: 60px;
  opacity: 0.15;
}

.news-list-info {
  flex: 1;
  min-width: 0;
}

.news-list-info h3 {
  font-size: 24px;
  font-weight: 700;
  color: #b71c2a;
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.news-list-info h3 a:hover {
  color: #8e1520;
}

.news-list-info p {
  font-size: 14px;
  color: #777;
  line-height: 1.6;
  margin-bottom: 8px;
}

.news-list-info .news-date {
  font-size: 13px;
  color: #999;
}

/* ===== Product Detail Page ===== */
.product-detail-top {
  display: flex;
  gap: 40px;
  margin-bottom: 40px;
}

.product-detail-img {
  width: 400px;
  flex-shrink: 0;
}

.product-detail-img img {
  width: 100%;
  border-radius: 4px;
}

.product-detail-info {
  flex: 1;
}

.product-detail-info h2 {
  font-size: 32px;
  font-weight: 700;
  color: #222;
  margin-bottom: 20px;
}

.product-detail-info p {
  font-size: 14px;
  line-height: 1.8;
  color: #666;
  margin-bottom: 24px;
}

.btn-inquiry {
  display: inline-block;
  padding: 12px 32px;
  background: #b71c2a;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: background 0.3s;
}

.btn-inquiry:hover {
  background: #8e1520;
}

.product-intro-section {
  margin-top: 40px;
}

.product-intro-title {
  background: #f5f5f5;
  padding: 16px 20px;
  font-size: 18px;
  font-weight: 700;
  color: #b71c2a;
  text-transform: uppercase;
  border-left: 4px solid #b71c2a;
  margin-bottom: 24px;
}

/* ===== News Detail Page ===== */
.news-detail-header {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
}

.news-detail-header h2 {
  font-size: 36px;
  font-weight: 700;
  color: #222;
  margin-bottom: 8px;
  line-height: 38px;
}

.news-detail-header .news-date {
  font-size: 13px;
  color: #999;
}

/* ===== Contact Page ===== */
.contact-info-block {
  margin-bottom: 40px;
}

.contact-info-block h3 {
  font-size: 32px;
  font-weight: 700;
  color: #222;
  margin-bottom: 16px;
}

.contact-info-block p {
  font-size: 16px;
  color: #555;
  line-height: 2;
}

.contact-form {
  border-top: 1px solid #eee;
  padding-top: 30px;
}

.form-row {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

.form-group {
  flex: 1;
}

.form-mess {
  margin-bottom:20px;
}

.form-group label {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
  font-family: inherit;
  transition: border-color 0.3s;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: #b71c2a;
}

.error-tip { color: #dc3545; font-size: 13px; min-height: 18px; margin-top: 6px; display: none; }
.contact-form input.is-invalid,.contact-form textarea.is-invalid { border-color: #dc3545; }
.contact-form input:focus.is-invalid,.contact-form textarea:focus.is-invalid { border-color: #dc3545; }

.form-group textarea {
  height: 120px;
  resize: vertical;
}

.captcha-row {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  margin-bottom:20px;
}

.captcha-row .form-group {
  flex: 1;
}

.captcha-img {
  height: 42px;
  border-radius: 4px;
  cursor: pointer;
}

.btn-submit {
  display: inline-block;
  padding: 12px 36px;
  background: #b71c2a;
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: background 0.3s;
  margin-top: 10px;
}

.btn-submit:hover {
  background: #8e1520;
}

/* ===== Pagination ===== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  color: #555;
  transition: all 0.3s;
}

.pagination a:hover {
  border-color: #b71c2a;
  color: #b71c2a;
}

.pagination .active {
  background: #b71c2a;
  border-color: #b71c2a;
  color: #fff;
}

.pagination .nav-btn {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 13px;
}

/* ===== Footer ===== */
.footer {
  background: #1a1a1a;
  color: #ccc;
  padding: 80px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 80px;
}

.footer-col h3 {
  color: #fff;
  font-size: 26px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.footer-col h3::before {
    content: '';
    display: inline-block;
    width: 5px;
    height: 18px;
    background: #bb2e32;
    flex-shrink: 0;
    margin-right: 12px;
    vertical-align: middle;
}

.footer-col p,
.footer-col li {
  font-size: 16px;
  line-height: 2;
  color: #aaa;
}

.footer-col a {
  color: #aaa;
  transition: color 0.3s;
}

.footer-col a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid #333;
  text-align: center;
  padding: 20px 0;
  font-size: 13px;
  color: #777;
}

/* ===== Responsive: Tablet ===== */
@media (max-width: 1199px) {
  .container {
    width: 92%;
    min-width: auto;
  }
  
  .nav-list li a {
    font-size: 16px;
  }
  
  .banner-slide {
    height: 400px;
  }

  .banner-overlay h2 {
    font-size: 32px;
  }

  .banner-overlay p {
    font-size: 22px;
  }

  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .product-grid,
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .product-list-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .product-detail-top {
    flex-direction: column;
  }

  .product-detail-img {
    width: 100%;
    max-width: 400px;
  }

  .home-about-content {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ===== Responsive: Mobile ===== */
@media (max-width: 767px) {
  .top-bar .container {
    justify-content: center;
    text-align: center;
  }

  .top-bar-right {
    display: none;
  }

  .top-bar-left {
    justify-content: center;
  }

  .hamburger {
    display: flex;
  }

  .nav-list {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    border-top: 1px solid #eee;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }

  .nav-list.open {
    display: flex;
  }

  .nav-list li a {
    padding: 14px 20px;
    border-bottom: 1px solid #f0f0f0;
  }

  .nav-list li a::after {
    display: none;
  }

  .has-dropdown > a {
    display: flex;
    align-items: center;
    position: relative;
  }

  .has-dropdown:has(.dropdown) > a {
    padding-right: 40px;
  }

  .has-dropdown:has(.dropdown) > a::before {
    content: '';
    position: absolute;
    right: 20px;
    top: 50%;
    width: 10px;
    height: 10px;
    border-right: 2px solid #666;
    border-bottom: 2px solid #666;
    transform: translateY(-50%) rotate(45deg);
    transition: transform 0.3s ease;
  }

  .has-dropdown.open > a::before {
    transform: translateY(-50%) rotate(-135deg);
  }

  .dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border-top: none;
    background: #f9f9f9;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .has-dropdown.open .dropdown {
    max-height: 500px;
  }

  .dropdown li a {
    padding: 13px 20px 13px 40px;
    font-size: 16px;
    border-bottom: 1px solid #eee;
  }

  .dropdown li a:hover {
    padding-left: 45px;
  }

  .header .container {
    position: relative;
  }

  .banner-slide {
    height: 320px;
  }

  .banner-overlay h2 {
    font-size: 22px;
  }

  .banner-overlay p {
    font-size: 16px;
  }

  .page-banner h1 {
    font-size: 30px;
  }

  .page-banner .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .content-layout {
    flex-direction: column;
    gap: 24px;
  }

  .sidebar {
    width: 100%;
  }

  .category-grid {
    grid-template-columns: 1fr;
  }

  .product-grid,
  .news-grid {
    grid-template-columns: 1fr;
  }

  .product-list-grid {
    grid-template-columns: 1fr;
  }

  .news-list-item {
    flex-direction: column;
  }

  .news-list-thumb {
    width: 100%;
    height: 200px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .captcha-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .section-header h2 {
    font-size: 28px;
  }

  .main-content {
    padding: 30px 0 40px;
  }
}
