/* ===== Yatach New Style - Bootstrap 5 Based ===== */
/* This stylesheet extends Bootstrap 5 with custom Yatach styling */

/* ===== Base Overrides ===== */
:root {
  --yatach-primary: #0d6efd;
  --yatach-secondary: #6c757d;
  --yatach-success: #198754;
  --yatach-warning: #ffc107;
  --yatach-danger: #dc3545;
  --yatach-brown: #8b4513;
}

body {
  font-family: Arial, "Microsoft YaHei", sans-serif;
  background-color: #f5f5f5;
}

/* ===== Top Bar ===== */
.yatach-topbar {
  background: #333;
  color: #fff;
  padding: 8px 0;
  font-size: 14px;
}

.yatach-topbar a {
  color: #fff;
  text-decoration: none;
  transition: color 0.2s;
}

.yatach-topbar a:hover {
  color: #ffc107;
}

/* ===== Navigation ===== */
.yatach-navbar {
  background: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

.yatach-navbar .navbar-brand img {
  height: 50px;
  width: auto;
}

.yatach-navbar .nav-link {
  color: var(--yatach-brown) !important;
  font-weight: 500;
  padding: 12px 16px !important;
  transition: background-color 0.2s;
}

.yatach-navbar .nav-link:hover,
.yatach-navbar .nav-link.active {
  background-color: #f5f5f5;
}

/* Dropdown hover for desktop */
@media (min-width: 992px) {
  .yatach-navbar .dropdown:hover .dropdown-menu {
    display: block;
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
  }

  .yatach-navbar .dropdown-menu {
    display: block;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.2s ease-in-out;
    margin-top: 0;
  }
}

.yatach-navbar .dropdown-item {
  color: #333;
  padding: 10px 16px;
}

.yatach-navbar .dropdown-item:hover {
  background-color: #f5f5f5;
}

/* ===== Banner Carousel ===== */
.yatach-carousel {
  position: relative;
  overflow: hidden;
}

.yatach-carousel .carousel-item {
  height: 500px;
}

.yatach-carousel .carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 768px) {
  .yatach-carousel .carousel-item {
    height: 300px;
  }
}

@media (max-width: 480px) {
  .yatach-carousel .carousel-item {
    height: 220px;
  }
}

/* ===== Quick Action Buttons ===== */
.yatach-quick-btns {
  margin-top: -60px;
  position: relative;
  z-index: 10;
}

.yatach-quick-btns .btn {
  padding: 16px 24px;
  font-size: 16px;
  font-weight: 500;
  border-radius: 8px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.yatach-quick-btns .btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* ===== Product Category Quick Nav (Mobile) ===== */
.yatach-category-nav {
  background: #fff;
  padding: 15px 0;
  border-bottom: 1px solid #eee;
  display: none;
}

@media (max-width: 768px) {
  .yatach-category-nav {
    display: block;
  }
}

.yatach-category-nav .category-item {
  text-align: center;
  text-decoration: none;
  color: #333;
  transition: color 0.2s;
}

.yatach-category-nav .category-item:hover {
  color: var(--yatach-primary);
  text-decoration: none;
}

.yatach-category-nav .category-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 8px;
  font-size: 24px;
}

.yatach-category-nav .category-name {
  font-size: 12px;
  font-weight: 500;
}

/* ===== Main Content Sections ===== */
.yatach-section {
  padding: 50px 0;
}

.yatach-section-light {
  background: #f8f9fa;
}

.yatach-section-dark {
  background: #333;
  color: #fff;
}

/* ===== Welcome Section ===== */
.yatach-welcome {
  background: #fff;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.yatach-welcome h2 {
  color: var(--yatach-brown);
  font-size: 24px;
  margin-bottom: 15px;
}

.yatach-welcome p {
  line-height: 1.8;
  color: #555;
}

/* ===== Featured Product Card ===== */
.yatach-featured-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  transition: transform 0.3s, box-shadow 0.3s;
}

.yatach-featured-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.yatach-featured-card .card-img-top {
  height: 350px;
  object-fit: cover;
}

.yatach-featured-card .card-body {
  padding: 25px;
}

.yatach-featured-card .card-title {
  color: var(--yatach-brown);
  font-size: 20px;
  margin-bottom: 15px;
}

.yatach-featured-card .card-text {
  color: #666;
  line-height: 1.7;
}

/* ===== News Cards ===== */
.yatach-news-card {
  background: #fff;
  border-radius: 12px;
  border: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: transform 0.2s, box-shadow 0.2s;
  height: 100%;
}

.yatach-news-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.yatach-news-card .card-body {
  padding: 20px;
}

.yatach-news-card .card-date {
  color: #999;
  font-size: 13px;
}

.yatach-news-card .card-title {
  color: #333;
  font-size: 16px;
  margin: 10px 0;
  line-height: 1.5;
}

.yatach-news-card .card-text {
  color: #666;
  font-size: 14px;
}

/* ===== Product List - Desktop Table ===== */
.yatach-product-table {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.yatach-product-table .table {
  margin-bottom: 0;
}

.yatach-product-table .table thead th {
  background: #f0e6d6;
  color: var(--yatach-brown);
  font-weight: 600;
  padding: 14px 12px;
  border: 1px solid #e0e0e0;
  font-size: 14px;
}

.yatach-product-table .table tbody td {
  padding: 14px 12px;
  border: 1px solid #e0e0e0;
  vertical-align: middle;
  font-size: 14px;
}

.yatach-product-table .table tbody tr {
  transition: background-color 0.2s;
}

.yatach-product-table .table tbody tr:hover {
  background-color: #f5f5f5;
}

.yatach-product-table .table tbody tr:nth-child(even) {
  background-color: #fafafa;
}

.yatach-product-table .product-thumb {
  width: 60px;
  height: 80px;
  object-fit: contain;
  border: 1px solid #ddd;
}

/* ===== Product List - Mobile Cards ===== */
.yatach-mobile-products {
  display: none;
}

@media (max-width: 768px) {
  .yatach-product-table {
    display: none;
  }

  .yatach-mobile-products {
    display: block;
  }
}

.yatach-product-card {
  background: #fff;
  border-radius: 12px;
  margin-bottom: 15px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  overflow: hidden;
}

.yatach-product-card-header {
  display: flex;
  align-items: center;
  padding: 15px;
  background: #fafafa;
  cursor: pointer;
}

.yatach-product-card-thumb {
  width: 60px;
  height: 80px;
  object-fit: contain;
  border: 1px solid #ddd;
  margin-right: 15px;
  flex-shrink: 0;
}

.yatach-product-card-title {
  flex: 1;
  font-weight: 600;
  color: var(--yatach-primary);
}

.yatach-product-card-toggle {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 50%;
  transition: transform 0.3s;
}

.yatach-product-card.expanded .yatach-product-card-toggle {
  transform: rotate(180deg);
}

.yatach-product-card-body {
  display: none;
  padding: 15px;
  border-top: 1px solid #eee;
}

.yatach-product-card.expanded .yatach-product-card-body {
  display: block;
}

.yatach-product-card-features {
  color: #555;
  line-height: 1.6;
  margin-bottom: 12px;
}

.yatach-product-card-date {
  color: #999;
  font-size: 13px;
  margin-bottom: 12px;
}

.yatach-product-card-link {
  display: inline-block;
  padding: 8px 16px;
  background: var(--yatach-primary);
  color: #fff;
  border-radius: 6px;
  font-size: 14px;
}

.yatach-product-card-link:hover {
  background: #0b5ed7;
  color: #fff;
}

/* ===== Product Detail ===== */
.yatach-detail-header {
  background: #6a7a7e;
  color: #fff;
  padding: 15px 20px;
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 20px;
  border-radius: 8px 8px 0 0;
}

.yatach-detail-images {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.yatach-detail-main-image {
  width: 100%;
  max-height: 500px;
  object-fit: contain;
  border: 1px solid #eee;
}

.yatach-detail-thumbnails {
  display: flex;
  gap: 10px;
  margin-top: 15px;
  flex-wrap: wrap;
}

.yatach-detail-thumb {
  width: 80px;
  height: 100px;
  object-fit: contain;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.2s;
}

.yatach-detail-thumb:hover,
.yatach-detail-thumb.active {
  border-color: var(--yatach-primary);
}

/* Product Detail - Desktop */
.yatach-detail-specs {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.yatach-detail-specs h3 {
  color: var(--yatach-brown);
  font-size: 18px;
  margin-bottom: 15px;
}

.yatach-detail-specs .table th {
  background: #f8f9fa;
  font-weight: 600;
  width: 35%;
}

.yatach-detail-specs .table td {
  padding: 12px;
}

.yatach-detail-specs .table-striped tbody tr:nth-child(odd) {
  background-color: #fafafa;
}

/* Product Detail - Mobile */
@media (max-width: 768px) {
  .yatach-detail-header {
    font-size: 18px;
  }

  .yatach-detail-images {
    margin-bottom: 20px;
  }

  .yatach-detail-thumb {
    width: 60px;
    height: 75px;
  }

  /* Mobile Spec Cards */
  .yatach-spec-cards {
    display: block;
  }

  .yatach-detail-specs {
    display: none;
  }

  .yatach-spec-card {
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  }

  .yatach-spec-card-title {
    font-weight: 600;
    color: var(--yatach-brown);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f0f0f0;
  }

  .yatach-spec-row {
    display: flex;
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
  }

  .yatach-spec-row:last-child {
    border-bottom: none;
  }

  .yatach-spec-key {
    width: 45%;
    color: #666;
    font-size: 13px;
  }

  .yatach-spec-value {
    width: 55%;
    color: #333;
    font-weight: 500;
    font-size: 13px;
  }

  .yatach-spec-icon {
    margin-right: 8px;
    color: var(--yatach-primary);
  }

  /* Collapsible More Params */
  .yatach-more-params {
    margin-top: 15px;
  }

  .yatach-more-params-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px;
    background: #f8f9fa;
    border: none;
    border-radius: 8px;
    color: var(--yatach-primary);
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
  }

  .yatach-more-params-toggle:hover {
    background: #e9ecef;
  }

  .yatach-more-params-content {
    display: none;
    padding-top: 15px;
  }

  .yatach-more-params.expanded .yatach-more-params-content {
    display: block;
  }
}

@media (min-width: 769px) {
  .yatach-spec-cards {
    display: none;
  }

  .yatach-detail-specs {
    display: block;
  }
}

/* ===== Product Detail Carousel (Mobile) ===== */
.yatach-mobile-carousel {
  display: none;
}

@media (max-width: 768px) {
  .yatach-mobile-carousel {
    display: block;
    margin-bottom: 20px;
  }

  .yatach-desktop-images {
    display: none;
  }
}

@media (min-width: 769px) {
  .yatach-mobile-carousel {
    display: none;
  }
}

/* ===== Breadcrumb ===== */
.yatach-breadcrumb {
  background: #f0f0f0;
  padding: 12px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 13px;
}

.yatach-breadcrumb a {
  color: var(--yatach-primary);
}

/* ===== Page Title ===== */
.yatach-page-title {
  color: var(--yatach-brown);
  font-size: 24px;
  font-weight: 600;
  padding: 20px 0;
}

@media (max-width: 768px) {
  .yatach-page-title {
    font-size: 20px;
  }
}

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

.yatach-pagination a,
.yatach-pagination span {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  color: #333;
  text-decoration: none;
  transition: all 0.2s;
}

.yatach-pagination a:hover {
  background: var(--yatach-primary);
  color: #fff;
  border-color: var(--yatach-primary);
}

.yatach-pagination .current {
  background: var(--yatach-primary);
  color: #fff;
  border-color: var(--yatach-primary);
}

/* ===== Footer ===== */
.yatach-footer {
  background: #333;
  color: #fff;
  padding: 40px 0 20px;
}

.yatach-footer h5 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 20px;
}

.yatach-footer a {
  color: #ccc;
  text-decoration: none;
  transition: color 0.2s;
}

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

.yatach-footer-links {
  list-style: none;
  padding: 0;
}

.yatach-footer-links li {
  margin-bottom: 10px;
}

.yatach-footer-contact p {
  margin-bottom: 10px;
  color: #ccc;
}

.yatach-footer-bottom {
  border-top: 1px solid #444;
  margin-top: 30px;
  padding-top: 20px;
  text-align: center;
  color: #999;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .yatach-section {
    padding: 30px 0;
  }

  .yatach-welcome {
    padding: 20px;
  }

  .yatach-welcome h2 {
    font-size: 20px;
  }

  .yatach-quick-btns {
    margin-top: -40px;
    padding: 0 10px;
  }

  .yatach-quick-btns .btn {
    padding: 12px 16px;
    font-size: 14px;
  }
}