/*
Theme Name: Astra Child Nam Long
Theme URI: https://namlongmobile.com
Description: Giao diện con tùy biến từ Astra cho website Nam Long Mobile.
Author: Tuân Trương
Author URI: https://namlongmobile.com
Template: astra
Version: 1.0.0
Text Domain: astra-child-namlong
*/

/* -------------------------
   Tuỳ biến giao diện Nam Long
-------------------------- */

body {
  font-family: Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #333;
}

a {
  color: #f7941d;
  text-decoration: none;
}
a:hover {
  color: #ff6600;
  text-decoration: underline;
}

button,
input[type="submit"] {
  background-color: #f7941d;
  border: none;
  color: white;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
}
button:hover,
input[type="submit"]:hover {
  background-color: #e67e00;
}

/* -------------------------
   Tùy biến sidebar trái cho template sản phẩm - MOST CSS MOVED TO TEMPLATE
-------------------------- */

/* Remove or comment out the old .custom-woo-banner and .product-filter-bar CSS
   if you no longer need it, as the main styling for the new layout is in the template.
   Keep these if you intend to reuse the banner for something else, but it's
   currently hidden by `display: none;` in the template's style block.
*/
.custom-woo-banner {
    background: linear-gradient(120deg, #fefcea, #f1da36);
    padding: 60px 30px 40px;
    text-align: center;
    color: #222;
    margin-bottom: 40px;
    border-bottom: 2px solid #eee;
}
.custom-woo-banner h1 {
    font-size: 2.8rem;
    margin-bottom: 10px;
    font-weight: bold;
}
.custom-woo-banner p {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 20px;
}
.product-filter-bar {
    max-width: 600px;
    margin: 0 auto;
}
.product-filter-bar form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}
.product-filter-bar select,
.product-filter-bar input[type="text"] {
    padding: 8px 12px;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    width: 200px;
}
.product-filter-bar button {
    background: #222;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
}
.product-filter-bar button:hover {
    background: #e91e63;
}
/* -------------------------
   Tùy biến nút tùy chọn sản phẩm
-------------------------- */
.woocommerce ul.products li.product .button {
  padding: 6px 12px;
  font-size: 14px;
  border-radius: 5px;
  height: auto;
  line-height: 1.2;
}
@media (max-width: 768px) {
  .woocommerce ul.products li.product .button {
    font-size: 13px;
    padding: 5px 10px;
  }
}

/* -------------------------
   Form tìm kiếm sản phẩm
-------------------------- */

.search-header {
  margin: 40px 0 20px;
  text-align: center;
}

.search-header h1 {
  font-size: 26px;
  color: #222;
}

.search-results-wrapper ul.products {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.no-results {
  text-align: center;
  padding: 60px 20px;
  color: #666;
}

.woocommerce-product-search .search-field:focus {
  outline: none;
  border-color: #007bff;
}

/* Nút thêm giỏ hàng trong kết quả tìm kiếm */
/* Target chính xác mọi nút thêm giỏ hàng dạng đơn giản */
a.button.product_type_simple.add_to_cart_button,
a.ajax_add_to_cart {
  padding: 5px 12px;
  font-size: 14px;
  border-radius: 20px;
  background-color: #ffbe2e;
  color: #000 !important;
  font-weight: 500;
  line-height: 1.3;
  text-transform: none;
  display: inline-block;
  transition: all 0.3s ease;
  border: none;
  box-shadow: none;
}

/* Hover */
a.button.product_type_simple.add_to_cart_button:hover,
a.ajax_add_to_cart:hover {
  background-color: #ffa500;
  color: #000 !important;
}

/* Responsive mobile */
@media (max-width: 768px) {
  a.button.product_type_simple.add_to_cart_button {
    font-size: 12px;
    padding: 4px 10px;
  }
}

/* --- CSS Ví dụ cho trang tìm kiếm --- */

/* Cấu trúc chung */
.search-page-template {
    padding: 30px 0; /* Khoảng cách trên dưới */
}

/* Tiêu đề trang tìm kiếm */
.search-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.search-title {
    font-size: 2.5em; /* Kích thước chữ lớn hơn */
    color: #333;
    margin-bottom: 0;
}

.search-title span {
    color: #0073e6; /* Màu nổi bật cho từ khóa */
    font-weight: bold;
}

/* Kết quả tìm kiếm (grid sản phẩm) */
.search-results-grid {
    margin-top: 20px;
}

.search-results-grid .products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); /* Responsive grid */
    gap: 30px; /* Khoảng cách giữa các sản phẩm */
    list-style: none; /* Xóa dấu chấm mặc định của ul */
    margin: 20px;
    padding: 20px;
}

.search-results-grid .product {
    text-align: center;
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.search-results-grid .product:hover {
    transform: translateY(-5px); /* Hiệu ứng di chuyển nhẹ khi hover */
}

/* Phân trang */
.woocommerce-pagination {
    text-align: center;
    margin-top: 40px;
}

/* Thông báo không có kết quả */
.no-results-found {
    text-align: center;
    padding: 50px 20px;
    border: 1px dashed #ccc;
    background-color: #f9f9f9;
    border-radius: 8px;
    margin-top: 30px;
}

.no-results-title {
    color: #d9534f; /* Màu đỏ cho tiêu đề không có kết quả */
    font-size: 1.8em;
    margin-bottom: 15px;
}

.no-results-message {
    color: #555;
    font-size: 1.1em;
    margin-bottom: 25px;
}

.search-form { /* Nếu bạn hiển thị lại form tìm kiếm */
    margin-top: 0px;
}
/* ---  --- */

