/* Modern index styles extracted from index.php */

body {
    background-color: #f8f9fa;
    color: #333;
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.search-container {
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.search-input {
    border: 1px solid #ddd;
    border-radius: 50px;
    padding: 12px 20px;
    width: 100%;
    font-size: 16px;
}

.search-button {
    background-color: #FF6666;
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 12px 25px;
    font-weight: 600;
    transition: all 0.3s;
}

.search-button:hover {
    background-color: #CC4444;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.category-container {
    margin-bottom: 20px;
}

.category-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
}

.category-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-button {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 50px;
    padding: 8px 15px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
}

.category-button.active {
    background-color: #FF6666;
    border-color: #CC4444;
    color: #fff;
}

.category-button:hover {
    background-color: #f8f8f8;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    text-decoration: none;
    color: #333;
}

.category-button.active:hover {
    background-color: #CC4444;
}

.category-icon {
    font-size: 16px;
}

/* Header danh mục */
.site-header {
    background-color: #FF6666;
    border-radius: 10px;
    padding: 15px 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.site-header-icon {
    width: 40px;
    height: 40px;
    background-color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.site-header-icon i {
    color: #FF6666;
    font-size: 20px;
}

.site-header-title {
    font-size: 20px;
    font-weight: 600;
    color: #fff;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

@media (min-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Product Card - New Style */
.product-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid #eee;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.product-card-inner {
    display: flex;
    padding: 15px;
    flex-grow: 1;
}

.product-image-container {
    position: relative;
    width: 120px;
    height: 120px;
    flex-shrink: 0;
    margin-right: 15px;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.product-category-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background-color: #FF6666;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 5px;
}

.product-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-height: 90px;
}

.product-title {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
    line-height: 1.3;
    min-height: 42px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 38px;
    line-height: 1.35;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    border-top: 1px solid #f0f0f0;
    min-height: 50px;
}

.product-stats {
    display: flex;
    gap: 15px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: #666;
}

.product-price {
    font-weight: 700;
    font-size: 18px;
    color: #FF0000;
    text-align: right;
}

/* No products message */
.no-products {
    text-align: center;
    padding: 40px 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.no-products i {
    font-size: 48px;
    color: #ddd;
    margin-bottom: 15px;
}

.no-products h4 {
    font-weight: 600;
    margin-bottom: 10px;
}

/* Popular Search Keywords */
.popular-searches {
    margin-bottom: 10px;
}

.popular-searches-title {
    font-size: 14px;
    font-weight: 500;
    color: #666;
    margin-bottom: 8px;
}

.popular-searches-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.popular-search-tag {
    display: flex;
    align-items: center;
    gap: 5px;
    background-color: #f0f0f0;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 13px;
    color: #333;
    text-decoration: none;
    transition: all 0.2s ease;
}

.popular-search-tag:hover {
    background-color: #FF6666;
    border-color: #CC4444;
    color: #fff;
    transform: translateY(-2px);
    text-decoration: none;
}

.tag-icon {
    font-size: 11px;
    color: #666;
}

.popular-search-tag:hover .tag-icon {
    color: #000;
}

@media (max-width: 576px) {
    .popular-searches-tags {
        gap: 6px;
    }

    .popular-search-tag {
        padding: 3px 10px;
        font-size: 12px;
    }
}

/* Pagination styling */
.pagination {
    margin-top: 30px;
}

.pagination .page-link {
    color: #333;
    border-color: #ddd;
    background-color: #fff;
    font-weight: 500;
    padding: 8px 16px;
    transition: all 0.2s;
}

.pagination .page-item.active .page-link {
    background-color: #FF6666;
    border-color: #CC4444;
    color: #fff;
}

.pagination .page-link:hover {
    background-color: #f8f8f8;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    z-index: 1;
}

.pagination .page-item.active .page-link:hover {
    background-color: #CC4444;
}

.pagination .page-item.disabled .page-link {
    color: #999;
    pointer-events: none;
    background-color: #f8f8f8;
}

/* Featured Products Section - Mobile Optimized */
.featured-products-section {
    margin-bottom: 25px;
    background: linear-gradient(135deg, #fff5f5 0%, #ffffff 100%);
    border-radius: 12px;
    padding: 20px 15px;
    box-shadow: 0 2px 8px rgba(255, 102, 102, 0.1);
}

.featured-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #FF6666;
}

.featured-title {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    display: flex;
    align-items: center;
    margin: 0;
}

.featured-title i {
    color: #FF6600;
    margin-right: 8px;
    font-size: 20px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

.featured-subtitle {
    font-size: 12px;
    color: #666;
    font-weight: 400;
    margin-left: auto;
    background: #FF6666;
    padding: 2px 8px;
    border-radius: 10px;
    color: #fff;
}

.featured-products {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (min-width: 576px) {
    .featured-products {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 768px) {
    .featured-products {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 992px) {
    .featured-products {
        grid-template-columns: repeat(5, 1fr);
    }
}

.featured-product-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    border: 1px solid #f0f0f0;
}

.featured-product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 102, 0, 0.15);
    border-color: #FF6666;
}

.featured-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(45deg, #FF6600, #FF8800);
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 3px 6px;
    border-radius: 8px;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(255, 102, 0, 0.3);
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-3px);
    }

    60% {
        transform: translateY(-2px);
    }
}

.featured-image-container {
    position: relative;
    width: 100%;
    height: 120px;
    overflow: hidden;
}

.featured-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.featured-product-card:hover .featured-image {
    transform: scale(1.05);
}

.featured-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 24px;
}

.featured-content {
    padding: 12px;
    display: flex;
    flex-direction: column;
    height: 85px;
}

.featured-product-title {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 32px;
}

.featured-product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.featured-product-price {
    font-weight: 700;
    font-size: 14px;
    color: #FF0000;
}

.featured-product-sold {
    font-size: 10px;
    color: #666;
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 8px;
}

/* Mobile specific adjustments */
@media (max-width: 575.98px) {
    .featured-products-section {
        margin: 0 -12px 20px -12px;
        border-radius: 0;
        padding: 15px 12px;
    }

    .featured-header {
        margin-bottom: 12px;
    }

    .featured-title {
        font-size: 16px;
    }

    .featured-title i {
        font-size: 18px;
    }

    .featured-products {
        gap: 10px;
    }

    .featured-image-container {
        height: 100px;
    }

    .featured-content {
        padding: 10px;
        height: 75px;
    }

    .featured-product-title {
        font-size: 12px;
        height: 28px;
    }

    .featured-product-price {
        font-size: 13px;
    }

    .featured-product-sold {
        font-size: 9px;
    }
}

/* Loading skeleton for featured products */
.featured-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.featured-skeleton .featured-image-container {
    background: #f0f0f0;
}

.featured-skeleton .featured-product-title,
.featured-skeleton .featured-product-price {
    background: #f0f0f0;
    color: transparent;
    border-radius: 4px;
}