/* Cong Xep Custom Shortcodes CSS */

/* Cong Xep Grid - [cong_xep_list] */
.cong-xep-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin: 40px 0;
}

.cong-xep-item {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cong-xep-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.cong-xep-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: #f5f5f5;
}

.cong-xep-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.cong-xep-item:hover .cong-xep-image img {
    transform: scale(1.05);
}

.cong-xep-content {
    padding: 25px;
}

.cong-xep-content h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 15px 0;
    color: #1a1a1a;
}

.cong-xep-excerpt {
    color: #666;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.btn-order {
    display: inline-block;
    padding: 12px 30px;
    background: #DC2626;
    color: #fff !important;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: background 0.3s ease;
}

.btn-order:hover {
    background: #B91C1C;
}

/* Services Grid - [cong_xep_services] */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin: 40px 0;
}

.service-card {
    background: #fff;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    padding: 35px 25px;
    text-align: center;
    transition: all 0.3s ease;
}

.service-card:hover {
    border-color: #DC2626;
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(220, 38, 38, 0.1);
}

.service-icon {
    font-size: 48px;
    margin-bottom: 20px;
    line-height: 1;
}

.service-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 12px 0;
}

.service-card p {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

/* Contact CTA - [cong_xep_contact] */
.contact-cta {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 50px 40px;
    border-radius: 16px;
    text-align: center;
    margin: 40px 0;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.contact-cta h3 {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 15px 0;
    color: #fff;
}

/* Split layout: 1 col category card + 3 col products slider */
.congxepdtc-split-layout {
    display: grid !important;
    grid-template-columns: 1fr 3fr !important;
    gap: 16px;
    align-items: stretch;
    width: 100%;
}

.congxepdtc-split-left {
    min-width: 0;
}

.congxepdtc-split-right {
    min-width: 0;
}

.congxepdtc-split-card {
    display: block;
    height: 100%;
    text-decoration: none;
    color: inherit;
    background: #111;
    overflow: hidden;
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.congxepdtc-split-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.0) 20%, rgba(0,0,0,0.65) 65%, rgba(0,0,0,0.85) 100%);
    pointer-events: none;
}

.congxepdtc-split-content {
    position: absolute;
    inset: auto 0 0 0;
    padding: 18px 16px;
    z-index: 1;
}

.congxepdtc-split-title {
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.congxepdtc-split-desc {
    margin-top: 6px;
    font-size: 13px;
    color: rgba(255,255,255,0.9);
    line-height: 1.35;
}

.congxepdtc-split-link {
    margin-top: 10px;
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    border-bottom: 2px solid rgba(255,255,255,0.75);
    padding-bottom: 2px;
}

.congxepdtc-split-right .category-products-slider {
    padding: 0 50px;
}

/* Safety net: enforce 3x1 grid inside split layout */
.congxepdtc-split-right .products-container {
    grid-template-columns: repeat(3, 1fr) !important;
    grid-template-rows: repeat(1, 1fr) !important;
}

@media (max-width: 768px) {
    .congxepdtc-split-right .products-container {
        grid-template-columns: repeat(2, 1fr) !important;
        grid-template-rows: repeat(1, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .congxepdtc-split-right .category-products-slider {
        padding: 0 44px;
    }
}

@media (max-width: 480px) {
    .congxepdtc-split-right .category-products-slider {
        padding: 0 38px;
    }
}

@media (max-width: 992px) {
    .congxepdtc-split-layout {
        grid-template-columns: 1fr !important;
    }
    .congxepdtc-split-card {
        min-height: 220px;
    }
}

@media (min-width: 993px) {
    .congxepdtc-split-card {
        min-height: 420px;
    }
}

.contact-cta p {
    font-size: 18px;
    margin: 0 0 30px 0;
    color: #fff;
    opacity: 0.95;
}

.contact-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.contact-buttons a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 15px 35px;
    background: #fff;
    color: #667eea !important;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.contact-buttons a:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

/* Responsive Design */
@media (max-width: 992px) {
    .cong-xep-grid,
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .cong-xep-grid,
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .cong-xep-item:hover,
    .service-card:hover {
        transform: translateY(-3px);
    }
    
    .contact-cta {
        padding: 40px 25px;
    }
    
    .contact-cta h3 {
        font-size: 24px;
    }
    
    .contact-cta p {
        font-size: 16px;
    }
    
    .contact-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .contact-buttons a {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .cong-xep-grid,
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .cong-xep-image {
        height: 140px;
    }
    
    .cong-xep-content {
        padding: 15px;
    }
    
    .cong-xep-content h3 {
        font-size: 15px;
        margin-bottom: 10px;
    }
    
    .cong-xep-excerpt {
        font-size: 13px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        margin-bottom: 15px;
    }
    
    .btn-order {
        padding: 10px 20px;
        font-size: 13px;
    }
    
    .service-card {
        padding: 25px 15px;
    }
    
    .service-icon {
        font-size: 36px;
        margin-bottom: 15px;
    }
    
    .service-card h3 {
        font-size: 15px;
    }
    
    .service-card p {
        font-size: 13px;
    }
    
    .contact-cta {
        padding: 30px 20px;
    }
    
    .contact-cta h3 {
        font-size: 20px;
    }
    
    .contact-cta p {
        font-size: 14px;
        margin-bottom: 20px;
    }
}

/* Recently viewed products - [recently_viewed_products] */
.congxepdtc-recently-viewed {
    width: 100%;
}

.congxepdtc-rv-title {
    font-size: 34px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #222;
    margin: 0 0 14px 0;
    line-height: 1.1;
}

.congxepdtc-rv-list {
    display: grid;
    gap: 12px;
}

.congxepdtc-rv-item {
    display: grid;
    grid-template-columns: 84px 1fr;
    gap: 14px;
    align-items: center;
    text-decoration: none;
    background: #fff;
    border: 1px solid #e6e6e6;
    padding: 12px 14px;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.congxepdtc-rv-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

.congxepdtc-rv-thumb {
    width: 84px;
    height: 62px;
    overflow: hidden;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.congxepdtc-rv-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.congxepdtc-rv-info {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.congxepdtc-rv-name {
    font-size: 30px;
    font-weight: 900;
    color: #111;
    line-height: 1.05;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.congxepdtc-rv-price {
    font-size: 30px;
    font-weight: 900;
    color: #b91c1c;
    line-height: 1;
}

.congxepdtc-rv-price .woocommerce-Price-amount {
    color: #b91c1c;
}

.congxepdtc-rv-price del,
.congxepdtc-rv-price ins {
    text-decoration: none;
}

@media (max-width: 768px) {
    .congxepdtc-rv-title {
        font-size: 26px;
    }
    .congxepdtc-rv-name,
    .congxepdtc-rv-price {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .congxepdtc-rv-title {
        font-size: 22px;
    }
    .congxepdtc-rv-item {
        grid-template-columns: 72px 1fr;
    }
    .congxepdtc-rv-thumb {
        width: 72px;
        height: 54px;
    }
    .congxepdtc-rv-name,
    .congxepdtc-rv-price {
        font-size: 18px;
    }
}
