/*
 Theme Name:   Smart Mag Child
 Theme URI:    https://tencongty.vn/
 Description:  Child theme cho Smart Mag
 Author:       Tên của bạn
 Author URI:   https://tencongty.vn
 Template:     smart-mag
 Version:      1.0.3
 Text Domain:  smartmag-child
*/


/* ==================================================================
   1. GIAO DIỆN LƯỚI SẢN PHẨM (TRANG DANH MỤC / SHORTCODE)
   ================================================================== */
.auction-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.auction-item {
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.auction-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.auction-item .image-container a {
    display: block;
    aspect-ratio: 1/1;
    overflow: hidden;
    background-color: #f9f9f9;
}

.auction-item .image-container img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.auction-item .info-container {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.auction-item .info-container h2 {
    font-size: 1em;
    font-weight: bold;
    margin: 0 0 10px 0;
    height: 3.6em; /* Giới hạn 2 dòng */
    line-height: 1.2em;
    overflow: hidden;
}

.auction-item .info-container h2 a {
    text-decoration: none;
    color: #333;
}
.auction-item .info-container h2 a:hover {
    color: #0073aa;
}

.auction-item .info-container .price-jpy {
    color: #c00;
    font-weight: bold;
    font-size: 1.2em;
    margin: auto 0 5px 0;
}

.auction-item .info-container .price-vnd {
    color: #555;
    font-size: 0.9em;
    margin: 0 0 10px 0;
}

.auction-item .info-container .meta-info {
    font-size: 0.9em;
    color: #777;
    margin-bottom: 0;
    border-top: 1px solid #eee;
    padding-top: 10px;
}
.yhp-center-col {
	border-left: 1px solid #e4e4e4;
    padding-left: 15px;
}

/* ==================================================================
   2. GIAO DIỆN TRANG CHI TIẾT SẢN PHẨM (BẢN SỬA LỖI CUỐI CÙNG)
   ================================================================== */

/* Bỏ .entry-content, nhắm thẳng vào class của article */
.yhp-full-width-page { max-width: 1150px; margin: 0 auto;margin-top: 30px; }
.yhp-auction-single-v2 .yhp-main-layout-3col {
    display: grid;
    grid-template-columns: 3fr 2fr;  
    gap: 15px;
    margin-bottom: 30px;
}

/* Cột trái: Ảnh */
.yhp-auction-single-v2 .yhp-gallery-col .main-image img {
    width: 100%;
    height: 400px;
    aaspect-ratio: 1/1;
    object-fit: cover;
    border: 1px solid #eee;
    border-radius: 8px;
	object-fit: contain;
}
.yhp-auction-single-v2 .yhp-gallery-col .thumbnail-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 10px;
    margin-top: 10px;
}
.yhp-auction-single-v2 .yhp-gallery-col .thumbnail-images img {
    width: 100%;
    height: auto;
    aspect-ratio: 1/1;
    object-fit: cover;
    border: 2px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.2s;
}
.yhp-auction-single-v2 .yhp-gallery-col .thumbnail-images img:hover,
.yhp-auction-single-v2 .yhp-gallery-col .thumbnail-images img.active {
    opacity: 1;
    border-color: #0073aa;
}

/* Cột giữa: Thông tin chính */
.yhp-auction-single-v2 .yhp-center-col .entry-title { margin-top: 0; font-size: 28px; line-height: 1.3; }
.yhp-auction-single-v2 .yhp-highlight-box { display: flex; justify-content: space-between; align-items: center; background-color: #e4c41d; color: #333; padding: 10px 15px; border-radius: 8px; margin: 15px 0; }
.yhp-auction-single-v2 .yhp-highlight-box div { font-weight: bold; font-size: 16px; }
.yhp-auction-single-v2 .yhp-center-col .price-box { margin: 20px 0; }
.yhp-auction-single-v2 .yhp-center-col .vnd-price { font-size: 32px; font-weight: bold; color: #d00; }
.yhp-auction-single-v2 .yhp-center-col .jpy-price { font-size: 18px; color: #555; margin-left: 10px; }
.yhp-auction-single-v2 .yhp-center-col p { font-size: 16px; }
.yhp-auction-single-v2 .bidding-actions .buttons-row { display: flex; gap: 10px;margin-top: 15px; }
.yhp-auction-single-v2 .bidding-actions .buttons-row button { flex: 1; padding: 15px; font-size: 16px; font-weight: bold; cursor: pointer; border-radius: 5px; border: none; }
.yhp-auction-single-v2 .bidding-actions button#place-bid-button { background-color: #ff5722; color: white; }
.yhp-auction-single-v2 .bidding-actions button#sniper-bid-button { background-color: #4CAF50; color: white; }
.yhp-auction-single-v2 #bidding-message { margin-top: 15px; font-weight: bold; }

/* Cột phải: Thông tin gốc */
.yhp-auction-single-v2 .original-info-box, 
.yhp-auction-single-v2 .seller-info-box {
    background: #f7f7f7;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 13px; 
}
.yhp-auction-single-v2 .original-info-box h4, 
.yhp-auction-single-v2 .seller-info-box h4 { margin-top: 0; }


/* ==================================================================
   3. GIAO DIỆN TAB CHUNG
   ================================================================== */
.yhp-tabs-nav { list-style: none; padding-left: 0; margin-bottom: 0; border-bottom: 2px solid #ddd; display: flex; }
.yhp-tabs-nav li { margin-right: 5px; }
.yhp-tabs-nav a { display: block; padding: 10px 15px; text-decoration: none; color: #555; border: 1px solid transparent; border-bottom: 0; background: #f1f1f1; border-radius: 5px 5px 0 0; }
.yhp-tabs-nav li.active a { font-weight: bold; border-color: #ddd; border-bottom-color: white; background: white; position: relative; top: 2px; color: #000; }
.yhp-tab-content { display: none; padding: 20px; border: 1px solid #ddd; border-top: 0; background: #fff; }
.yhp-tab-content.active { display: block; }
.yhp-full-description { margin-top: 40px; }


/* ==================================================================
   4. RESPONSIVE
   ================================================================== */
@media (max-width: 992px) {
    .yhp-auction-single-v2 .yhp-main-layout-3col {
        grid-template-columns: 1fr 1fr;
		margin-left: 30px;
        margin-right: 30px;
    }
    .yhp-auction-single-v2 .yhp-right-col {
        grid-column: 1 / -1;
        margin-top: 20px;
		margin-left: 30px;
        margin-right: 30px;
    }
	.entry-title  {
		margin-left: 30px;
        margin-right: 30px;
    }
	.yhp-center-col {
	border-left: 0px solid #e4e4e4;
    padding-left: 0px;
		}
	.yhp-full-description { margin-left: 30px;margin-right: 30px; }
}
@media (max-width: 768px) {
    .yhp-auction-single-v2 .yhp-main-layout-3col {
        grid-template-columns: 1fr;
		margin-left: 30px;
        margin-right: 30px;
    }
	.entry-title  {
		margin-left: 30px;
        margin-right: 30px;
    }
	.yhp-center-col {
	border-left: 0px solid #e4e4e4;
    padding-left: 0px;
			}
	.yhp-full-description { margin-left: 30px;margin-right: 30px; }
}

.main-slider {
  width: 100%;
  height: 400px;
  margin-bottom: 20px;
}

.main-slider img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumbnail-slider {
  height: 100px;
}

.thumbnail-slider .swiper-slide {
  width: 100px;
  height: 100px;
  opacity: 0.4;
  cursor: pointer;
}

.thumbnail-slider .swiper-slide-thumb-active {
  opacity: 1;
}
.paginationz {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 14px;
  margin-top: 30px;
}

.paginationz a,
.paginationz span {
  display: inline-block;
  padding: 8px 12px;
  border: 1px solid #ccc;
  color: #333;
  text-decoration: none;
  border-radius: 5px;
  background-color: #f9f9f9;
  transition: all 0.2s ease;
}

.paginationz a:hover {
  background-color: #0073aa;
  color: white;
  border-color: #0073aa;
}

.paginationz .current {
  background-color: #0073aa;
  color: white;
  font-weight: bold;
  border-color: #0073aa;
  pointer-events: none;
}
/* Giao diện Pop-up Thông báo */
.yhp-modal {
    display: none; 
    position: fixed; 
    z-index: 9999; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%;
    overflow: auto; 
    background-color: rgba(0,0,0,0.6);
}
.yhp-modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 30px;
    border: 1px solid #888;
    width: 80%;
    max-width: 450px;
    border-radius: 8px;
    text-align: center;
    position: relative;
    font-size: 18px;
}
.yhp-modal-close {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}
.yhp-modal-content.success {
    border-left: 5px solid #4CAF50; /* Màu xanh lá cho thành công */
}
.yhp-modal-content.error {
    border-left: 5px solid #f44336; /* Màu đỏ cho lỗi */
}

/* ==================================================================
   GIAO DIỆN TRANG DANH MỤC ĐẤU GIÁ
   ================================================================== */
.yhp-auction-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* Hiển thị 4 cột trên màn hình lớn */
    gap: 20px;
    margin-top: 20px;
}

.yhp-auction-item {
    border: 1px solid #e9e9e9;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.yhp-auction-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.yhp-auction-item .item-image a {
    display: block;
    aspect-ratio: 1 / 1; /* Giữ ảnh luôn vuông */
    background-color: #f5f5f5;
}

.yhp-auction-item .item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Đảm bảo ảnh lấp đầy khung mà không bị méo */
}

.yhp-auction-item .item-details {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Giúp phần nội dung luôn giãn ra */
}

.yhp-auction-item .item-title {
    font-size: 16px;
    font-weight: bold;
    margin: 0 0 10px 0;
    line-height: 1.4;
    height: 4.2em; /* Giới hạn 3 dòng */
    overflow: hidden;
}

.yhp-auction-item .item-title a {
    text-decoration: none;
    color: #333;
}

.yhp-auction-item .item-price {
    margin-top: auto; /* Đẩy giá xuống dưới cùng */
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
}

.yhp-auction-item .price-jpy {
    display: block;
    font-size: 18px;
    font-weight: bold;
    color: #d00;
}

.yhp-auction-item .price-vnd {
    display: block;
    font-size: 14px;
    color: #666;
}

.yhp-auction-item .item-meta {
    margin-top: 10px;
    font-size: 13px;
    color: #777;
    display: flex;
    justify-content: space-between;
}

.yhp-auction-item .item-meta i {
    margin-right: 5px;
}

/* Responsive cho Tablet */
@media (max-width: 992px) {
    .yhp-auction-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Responsive cho Mobile */
@media (max-width: 580px) {
    .yhp-auction-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    .yhp-auction-item .item-title {
        font-size: 14px;
    }
    .yhp-auction-item .price-jpy {
        font-size: 16px;
    }
}
/* CSS cho Nút Yêu thích */
.yhp-favorite-button {
    width: 40px;
    height: 40px;
    border: 1px solid #ccc;
    background: transparent;
    color: #555;
    font-size: 18px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 15px;

    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-sizing: border-box;
}
.yhp-favorite-button i {
    pointer-events: none;
    font-size: 18px;
}
.yhp-favorite-button:hover {
    border-color: #ff6b6b;
    color: #ff6b6b;
}
.yhp-favorite-button.is-favorited {
    background-color: #ff6b6b;
    border-color: #ff6b6b;
    color: white;
}
/* share */
.share-and-favorite {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.favorite-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}
.favorite-wrap span {
  font-size: 14px;
  color: #333;
}
.social-share a img {
  width: 35px;
  height: 35px;
  object-fit: contain;
  transition: opacity 0.3s ease;
}
.social-share a:hover img {
  opacity: 0.7;
}

/* CSS cho flash đổi giá tức thời phiên đấu giá */

#product-current-price {
  /* Hiệu ứng chuyển đổi mượt mà trong 0.3 giây */
  transition: all 0.3s ease-in-out;
}

/* Đây là class sẽ được thêm vào tạm thời để tạo hiệu ứng */
#product-current-price.flash {
  background-color: #fff3cd; /* Màu nền vàng nhạt */
  transform: scale(1.1);      /* Phóng to chữ lên một chút */
  font-weight: bold;          /* In đậm chữ */
}

/* Đảm bảo sidebar bên trái có margin phù hợp trên mobile */
@media (max-width: 768px) {
  .left-sidebar {
    order: 2; /* Đưa sidebar xuống dưới nếu cần */
    margin-top: 20px;
  }

  .main-content {
    order: 1;
  }

  .main.wrap {
    flex-direction: column;
  }
}
/* --- CSS for Auction Search Results --- */
.auction-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); /* Tự động chia cột */
    gap: 15px; /* Khoảng cách giữa các sản phẩm */
}

.auction-item {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.3s ease;
}

.auction-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.auction-item a {
    text-decoration: none;
    color: #333;
}

.auction-item-image-wrap {
    aspect-ratio: 1/1; /* Giữ ảnh luôn vuông */
}

.auction-item-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.auction-item-details {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Đảm bảo phần text luôn lấp đầy */
}

.auction-item-title {
    font-size: 14px;
    line-height: 1.4;
    height: 3.9em; /* Giới hạn chiều cao cho 2-3 dòng */
    margin: 0 0 10px 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.auction-item-details p {
    margin: 0 0 5px 0;
    font-size: 14px;
}

.auction-item-price-original {
    font-size: 12px !important;
    color: #777;
    text-decoration: line-through;
}

.auction-item-price-jpy {
    color: #c00;
    font-weight: bold;
    font-size: 16px !important;
}
.auction-item-price-vnd {
    font-size: 13px !important;
    color: #555;
}
.auction-item-endtime, .auction-item-bids {
    font-size: 12px !important;
    color: #777;
}
.auction-item-endtime i {
    margin-right: 5px;
}
/* pop up hiện thông báo trạng thái đấu giá  */
.bid-status-message {
    font-size: 14px;
    font-weight: bold;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
    text-align: center;
}

.status-outbid {
    color: #a94442; /* Màu đỏ */
    background-color: #f2dede;
    border: 1px solid #ebccd1;
}

.status-success {
    color: #3c763d; /* Màu xanh lá */
    background-color: #dff0d8;
    border: 1px solid #d6e9c6;
}
/* === CSS cho trang Các Phiên Đã Thắng === */
.won-auctions-list {
    font-family: sans-serif;
    margin-top: 20px;
}

.won-auction-item {
    display: flex;
    align-items: center;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    background-color: #f9f9f9;
    flex-wrap: wrap;
}

.won-auction-thumbnail {
    flex-shrink: 0;
    margin-right: 15px;
}

.won-auction-thumbnail img {
    border-radius: 4px;
    max-width: 80px;
    height: auto;
}

.won-auction-details {
    flex-grow: 1;
}

.won-auction-title {
    margin: 0 0 10px 0;
    font-size: 16px;
}

.won-auction-title a {
    text-decoration: none;
    color: #333;
}
.won-auction-title a:hover {
    color: #c80000;
}

.won-auction-price {
    margin: 0;
    font-size: 14px;
    color: #555;
}

.won-auction-action {
    margin-left: auto;
    padding-left: 15px;
}

.won-auction-pay-button {
    display: inline-block;
    background-color: #c80000;
    color: #fff !important;
    padding: 12px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    text-align: center;
    transition: background-color 0.2s ease;
}

.won-auction-pay-button:hover {
    background-color: #a00000;
}

/* Responsive cho mobile */
@media (max-width: 600px) {
    .won-auction-item {
        flex-direction: column;
        align-items: flex-start;
    }
    .won-auction-action {
        margin-left: 0;
        margin-top: 15px;
        width: 100%;
    }
    .won-auction-pay-button {
        width: 100%;
        box-sizing: border-box;
    }
}