/* ====================================================================== */
/* កូដដែលបានកែតម្រូវ: ដក !important ចេញទាំងអស់ */
/* ====================================================================== */

/* ១. IMAGE STYLES - រូបភាពធំ (បង្ខំទំហំ 1:1) */

.product-card .product-image-wrapper {
    width: 100%;
    /* បង្ខំ Aspect Ratio 1:1 សម្រាប់រូបភាព */
    padding-bottom: 100%;
    position: relative;
    overflow: hidden;
    margin-bottom: 5px;
    border: none;
    box-shadow: none;
    line-height: 0;
}

.product-card .product-image-wrapper img {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    object-fit: cover;
    transform: none;
    transition: none;
    max-width: 100%;
}


/* ២. PRODUCT CARD & GRID - 6 ជួរថេរ និង Responsive */

.tab-pane .row {
    display: flex;
    justify-content: center;
    padding: 0;
    margin: 0;
}

.product-grid-container {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    padding: 5px;
    max-width: 1200px;
}

/* Media Queries សម្រាប់ Tablet និង Mobile */

@media (max-width: 1200px) {
    .product-grid-container {
        grid-template-columns: repeat(4, 1fr); /* 4 columns on medium desktop/large tablet */
    }
}

@media (max-width: 992px) {
    .product-grid-container {
        grid-template-columns: repeat(3, 1fr); /* 3 columns on tablet */
    }
}

@media (max-width: 767px) {
    .product-grid-container {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on mobile */
        gap: 5px; /* កាត់បន្ថយគម្លាតបន្ថែមលើ Mobile */
        padding: 0 5px; /* បន្ថែម padding ឆ្វេងស្តាំបន្តិច */
    }
}

/* Product Card Base Style (Card នីមួយៗ) */
.product-card {
    background-color: #ffffff;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
    height: 100%;
    width: 100%;
    margin: 0;
    max-width: none;
    text-align: center;
    transition: box-shadow 0.2s;
}

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


/* ៣. ព័ត៌មានលម្អិត (តម្រឹមចំកណ្តាល) */

/* Category/Description */
.product_content .category a {
    font-size: 0.75em;
    line-height: 1.1;
    margin: 3px 0 2px 0;
    text-align: center;
    display: block;
}
/* Product Name */
.product-name a {
    font-size: 14px;
    line-height: 1.2;
    font-weight: 700;
    margin: 4px 0 6px 0;
    display: block;
    text-align: center;
    min-height: 34px;
}

/* Price */
.price-original {
    font-size: 1em;
    font-weight: bold;
    margin-top: 5px;
    display: block;
    text-align: center;
}

/* តម្រឹម Action Links ឲ្យនៅចំកណ្តាល */
.action_links ul {
    display: flex;
    justify-content: center;
    padding: 0;
    margin-top: 8px;
}


/* Button to open the chat form - positioned fixed at bottom right */
.open-chat-button {
  background-color: #0084ff; /* Messenger blue */
  color: white;
  padding: 15px;
  border: none;
  border-radius: 50%; /* Circular button */
  cursor: pointer;
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  opacity: 0.8;
  z-index: 1000;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  transition: opacity 0.3s;
}

.open-chat-button:hover {
  opacity: 1;
}

.chat-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    padding: 3px 7px;
    border-radius: 50%;
    background-color: red;
    color: white;
    font-size: 10px;
}

/* The actual chat form pop-up */
.chat-popup {
  display: none; /* Hidden by default */
  position: fixed;
  bottom: 90px; /* Position above the chat button */
  right: 20px;
  border: 1px solid #ccc;
  z-index: 999;
  width: 320px; /* Typical messenger width */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  border-radius: 10px;
  overflow: hidden;
  background-color: white;
}

/* Styling for the form container */
.chat-form-container {
  padding: 0;
  max-width: 100%;
}

/* Chat Header (like a title bar) */
.chat-header-style {
    background-color: #0084ff; /* Messenger blue */
    color: white;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.chat-header-style h3 {
    margin: 0;
    font-size: 18px;
}

.btn-close-chat {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
}

/* Chat Body (where the form fields are) */
.chat-body-style {
    padding: 15px;
}

.chat-body-style p {
    color: #606770;
    font-size: 14px;
    margin-bottom: 15px;
}

/* Submit button */
.btn-chat-submit {
    background-color: #0084ff;
    color: white;
    padding: 10px 15px;
    border: none;
    cursor: pointer;
    width: 100%;
    margin: 0;
    opacity: 0.9;
    font-size: 16px;
}

.btn-chat-submit:hover {
    opacity: 1;
}

/* Reusing Bootstrap form-control class */
.chat-body-style .form-control {
    width: 100%;
    padding: 10px;
    margin: 5px 0 10px 0;
    display: inline-block;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.chat-body-style textarea.form-control {
    resize: none;
}

.no-li-flex {
    list-style: none; /* លុបចំនុច ul ចេញ */
    padding: 0;
    margin: 0;

    /* ** កូដសំខាន់សម្រាប់រៀបជាជួរដេក ** */
    display: flex;

    /* តម្រៀបធាតុទាំងអស់នៅចំកណ្តាលតាមអ័ក្សមេ (ផ្ដេក) */
    justify-content: center;

    /* តម្រៀបធាតុទាំងអស់ឲ្យស្មើគ្នាតាមកម្ពស់ (បញ្ឈរ) */
    align-items: center;
}

/* 2. បន្ថែមគម្លាតនៅចន្លោះរូបតំណាងនីមួយៗ */
/* កំណត់គម្លាតលើ Anchor Tags (<a>) ទាំងអស់ដែលជាកូនផ្ទាល់ */
.no-li-flex > a {
    margin: 0 15px; /* ដាក់គម្លាត 15px នៅខាងឆ្វេង និងស្តាំរវាង links */
    display: inline-block;
}


.facebook img, .telegram img, .whatsapp img {
    transition: transform 0.3s ease-in-out, opacity 0.3s;
    cursor: pointer; /* ប្តូរ Cursor ទៅជា Pointer នៅពេលដាក់ Mouse ពីលើ */
}


.facebook:hover img, .telegram:hover img, .whatsapp:hover img {
    transform: scale(1.1); /* ពង្រីករូបភាព 10% */
    opacity: 0.85; /* ធ្វើឲ្យមានតម្លាភាពបន្តិច */
}



