/**
 * Product Styles for KangStore - BEM Methodology
 * 
 * @package KangStore
 */

/* ===========================
   Product Card Component
   =========================== */

/* Block: kang-product-card */
.kang-product-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Element: __image */
.kang-product-card__image {
    position: relative;
    overflow: hidden;
    background: #f5f5f5;
}

.kang-product-card__image-wrapper {
    position: relative;
    width: 100%;
    height: 0;
    padding-top: 100%; /* 1:1 Aspect Ratio */
    overflow: hidden;
}

.kang-product-card__image-img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
}

/* Element: __content */
.kang-product-card__content {
    padding: 20px 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
    text-align: center;
}

/* Element: __category */
.kang-product-card__category {
    margin-bottom: 8px;
}

.kang-product-card__category-text {
    display: inline-block;
    font-size: 12px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Element: __title */
.kang-product-card__title {
    margin-bottom: 10px;
}

.kang-product-card__title-text {
    margin: 0;
    font-size: 16px;
    line-height: 1.4;
    font-weight: 600;
    color: #333;
    /* Giới hạn 1 dòng */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Element: __price */
.kang-product-card__price {
    margin: 10px 0 15px;
}

.kang-product-card__price-amount {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: #d32f2f;
}

/* Element: __excerpt */
.kang-product-card__excerpt {
    margin: 10px 0 15px;
    font-size: 14px;
    line-height: 1.5;
    color: #666;
    flex: 1;
}

/* ===========================
   Wrapper Styles
   =========================== */

.kang-products-wrapper {
    margin-bottom: 30px;
}

.kang-products-wrapper .row {
    margin-left: -10px;
    margin-right: -10px;
}

.kang-products-wrapper .col {
    padding-left: 10px;
    padding-right: 10px;
    margin-bottom: 20px;
}

/* Empty State */
.kang-products-wrapper .text-center {
    padding: 40px 20px;
    color: #999;
    font-size: 16px;
}

/* ===========================
   Responsive Adjustments
   =========================== */

@media (max-width: 849px) {
    .kang-product-card__content {
        padding: 15px 12px;
    }
    
    .kang-product-card__title-text {
        font-size: 15px;
    }
    
    .kang-product-card__price-amount {
        font-size: 16px;
    }
}

@media (max-width: 549px) {
    .kang-product-card__content {
        padding: 12px 10px;
    }
    
    .kang-product-card__title-text {
        font-size: 14px;
    }
    
    .kang-product-card__price-amount {
        font-size: 15px;
    }
}

/* ===========================
   Archive & Single Product
   =========================== */

/* Archive product styles */
.post-type-archive-product .product-item,
.tax-product_category .product-item {
    margin-bottom: 30px;
}

/* Single product page */
.single-product .entry-content {
    padding: 30px 0;
}

.single-product .kang-product-card__price {
    margin: 20px 0;
}

.single-product .kang-product-card__price-amount {
    font-size: 28px;
}
