
/* แก้ปัญหาคอลัมน์ของ Flatsome ให้สูงเต็มพื้นที่ */
.woocommerce ul.products li.product .col-inner,
.products .product .col-inner {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* การ์ดสินค้าหลัก */
.fcpc-custom-card {
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* ขยายขนาดเพื่อถมพื้นที่ให้สูงเท่ากันในการ์ดที่สั้นกว่า */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    position: relative;
}
.fcpc-custom-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

/* ส่วนของรูปภาพสินค้า (ระบบ Aspect Ratio & Cover) */
.fcpc-image {
    position: relative;
    width: 100%;
    overflow: hidden;
    background-color: #f8f8f8; /* สีรองพื้นกรณีรูปรอโหลด */
}
.fcpc-image a {
    display: block;
    position: absolute;
    top: 0; 
    left: 0;
    width: 100%; 
    height: 100%;
}
.fcpc-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover; /* ครอบตัดรูปให้พอดีกรอบเป๊ะๆ */
    object-position: center;
    transition: transform 0.5s ease;
}
.fcpc-custom-card:hover .fcpc-image img {
    transform: scale(1.05); /* ซูมรูปเล็กน้อยเวลาโฮเวอร์ */
}

/* ส่วนรายละเอียดสินค้า */
.fcpc-details {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* สำคัญมาก: ดันส่วนนี้ให้ยืดออกเพื่อผลักปุ่มไปด้านล่าง */
}
.fcpc-title {
    margin: 0 0 10px 0;
    line-height: 1.4;
}
.fcpc-title a {
    color: #333;
    text-decoration: none;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}
.fcpc-price {
    font-weight: bold;
    margin-bottom: 15px;
}
.fcpc-price del {
    color: #999;
    font-size: 0.85em;
    margin-right: 5px;
    font-weight: normal;
}
.fcpc-price ins {
    text-decoration: none;
}

/* ส่วนปุ่มกด (ถูกดันลงมาล่างสุดเสมอ) */
.fcpc-action {
    margin-top: auto; /* ดันปุ่มชิดขอบล่างของการ์ด */
}
.fcpc-btn {
    display: block;
    text-align: center;
    padding: 10px;
    color: #fff !important;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: opacity 0.3s ease;
}
.fcpc-btn:hover {
    opacity: 0.85;
}
