/* 
 * KM Property Manager - Global Styles
 * Shared styles across all templates
 */

/* ==========================================================================
   Container
   ========================================================================== */
.km-template {
    padding: 20px 0;
}

.km-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ==========================================================================
   Typography
   ========================================================================== */
.km-page-title {
    font-family: 'FS Trajan Pro', serif;
    font-size: 32px;
    font-weight: bold;
    color: #223771;
    margin-bottom: 10px;
}

.km-page-subtitle {
    color: #666;
    font-size: 16px;
    margin-bottom: 30px;
}

.km-section-title {
    font-size: 24px;
    font-weight: bold;
    color: #223771;
    margin: 5px 0 20px;
}

/* ==========================================================================
   Products Grid (Archive /san-pham/)
   Re-uses .km-property-card from project.css via the shared product-card.php
   ========================================================================== */
.km-products-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 24px;
    margin-top: 20px;
    padding: 0px 24px 30px 24px;
}

.km-products-grid .km-property-card {
    border: 1px solid #f5f5f5;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
    padding: 5px;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    display: flex;
    flex-direction: column;
}



/* Image Wrapper */
.km-products-grid .km-property-card__image-wrapper {
    position: relative;
    overflow: hidden;
    background: #000;
    border-radius: 6px;
}

.km-products-grid .km-card-image-swiper {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.km-products-grid .km-card-image-swiper .swiper-slide {
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.km-products-grid .km-image-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.km-products-grid .km-property-card__image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform 0.5s ease;
}



/* Pagination dots hidden by default, show on hover */
.km-products-grid .km-card-pagination {
    bottom: 10px !important;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.km-products-grid .km-property-card:hover .km-card-pagination {
    opacity: 1;
}

.km-products-grid .km-card-pagination .swiper-pagination-bullet {
    width: 7px;
    height: 7px;
    background: rgba(255, 255, 255, 0.6);
    opacity: 1;
}

.km-products-grid .km-card-pagination .swiper-pagination-bullet-active {
    background: #fff;
    width: 20px;
    border-radius: 4px;
}

/* Badges */
.km-products-grid .km-property-card__badges {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    gap: 6px;
    z-index: 5;
    flex-wrap: wrap;
}

.km-products-grid .km-badge {
    padding: 3px 8px;
    font-size: 13px;
    font-weight: 400;
    border-radius: 4px;
    line-height: 1.4;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.km-products-grid .km-badge--orange {
    background: #e35200;
    color: #fff;
}

.km-products-grid .km-badge--blue {
    background: #2e438f;
    color: #fff;
}

.km-products-grid .km-badge--green {
    background: #059669;
    /* Emerald 600 */
    color: #fff;
}

/* Card Content */
.km-products-grid .km-property-card__content {
    padding: 6px 5px 2px 5px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.km-products-grid .km-property-card__content-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Price Row */
.km-products-grid .km-property-card__price-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 5px 0;
}

.km-products-grid .km-price-main {
    font-size: 18px;
    font-weight: 700;
    color: #1e2f6f;
    letter-spacing: -0.3px;
}

.km-products-grid .km-price-original {
    font-size: 13px;
    color: #ef4444;
    text-decoration: line-through;
    font-weight: 400;
}

.km-products-grid .km-price-original::before {
    content: '';
    display: inline-block;
    height: 4px;
    width: 4px;
    background-color: #8f95b2;
    border-radius: 50%;
    vertical-align: middle;
    margin-right: 8px;
}

/* Meta Row */
.km-products-grid .km-property-card__meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #64748b;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 10px;
}

.km-products-grid .km-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.km-products-grid .km-meta-item i {
    font-size: 13px;
    color: #334155;
}

.km-products-grid .km-meta-sep {
    color: #d1d5db;
    font-size: 11px;
}

/* Title */
.km-products-grid .km-property-card__title {
    font-size: 13px;
    font-weight: 400;
    margin: 0;
    color: #64748b;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

/* ==========================================================================
   Pagination
   ========================================================================== */
.km-pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 40px;
    padding-top: 20px;
}

.km-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.km-pagination .page-numbers.current {
    background: #223771;
    color: #fff;
    border-color: #223771;
}

.km-pagination .page-numbers:hover:not(.current) {
    background: #f59331;
    color: #fff;
    border-color: #f59331;
}

/* ==========================================================================
   No Results
   ========================================================================== */
.km-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 16px;
}

/* ==========================================================================
   Breadcrumb
   ========================================================================== */
.km-breadcrumb {
    font-size: 13px;
    margin-bottom: 25px;
    color: #999;
}

.km-breadcrumb a {
    color: #666;
    text-decoration: none;
}

.km-breadcrumb a:hover {
    color: #f59331;
}

.km-sep {
    margin: 0 8px;
}

.km-current {
    color: #333;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media screen and (max-width: 1024px) {
    .km-products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 600px) {
    .km-products-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
}

@media screen and (max-width: 849px) {
    .km-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin: 20px 0;
        padding: 0px 10px;
    }

    .km-page-title {
        font-size: 24px;
    }

    .km-container {
        padding: 0 10px;
    }
}

@media screen and (max-width: 549px) {
    .km-products-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
}