/* Final Optimized UI for Lucky Tailor */

/* Performance Base */
* { box-sizing: border-box; }
img { max-width: 100%; height: auto; }

/* Professional Cards */
.single-offers, .single-cat {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
    overflow: hidden;
    height: 100%;
    margin-bottom: 20px;
}

.single-offers:hover, .single-cat:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

/* Image Containers */
.offers-img {
    height: 200px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
    border-radius: 12px 12px 0 0;
}

.offers-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.cat-icon {
    padding: 35px 30px 25px 30px;
    text-align: center;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px 12px 0 0;
    position: relative;
}

.cat-icon img {
    max-width: 60px;
    max-height: 60px;
    width: 60px;
    height: 60px;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin: 0 auto !important;
}

/* Content */
.offers-cap {
    padding: 20px;
    text-align: center !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.offers-cap h3, .offers-cap p {
    text-align: center !important;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

.cat-cap {
    padding: 20px;
    text-align: center;
}

.offers-cap span {
    background: linear-gradient(45deg, #007bff, #0056b3);
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin: 0 auto 15px auto;
    font-size: 16px;
    box-shadow: 0 3px 10px rgba(0,123,255,0.3);
    position: relative;
    top: -10px;
}

.offers-cap h3, .cat-cap h5 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 12px 0;
    color: #2c3e50;
    line-height: 1.3;
}

.offers-cap p, .cat-cap p {
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

/* Professional Buttons */
.btn {
    background: #007bff;
    border: none;
    border-radius: 4px;
    padding: 12px 24px;
    color: white;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
}

.btn:hover {
    background: #0056b3;
    color: white;
    text-decoration: none;
}

/* Typography */
h1, h2, h3, h4, h5 {
    font-weight: 600;
    color: #2c3e50;
}

.hero-caption h1 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    line-height: 1.2;
    margin-bottom: 20px;
}

/* Section Improvements */
.clients-area {
    background: #f8f9fa;
    padding: 80px 0;
}

.section-padding40 {
    padding: 80px 0;
}

.clients-area .container {
    max-width: 1200px;
}

.clients-area .row {
    justify-content: center;
    align-items: stretch;
}

/* Slick Carousel Layout Friendly */
.slick-list {
    overflow: visible !important;
    margin: 0 -10px;
}

.slick-track {
    display: flex !important;
    align-items: stretch;
    margin: 0;
}

.slick-slide {
    height: auto;
    opacity: 1 !important;
    visibility: visible !important;
    padding: 0 10px;
    box-sizing: border-box;
}

.slick-slide > div {
    height: 100%;
}

.slick-slide .single-offers,
.slick-slide .single-cat {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Ultra Small Screens */
@media (max-width: 320px) {
    .single-offers {
        margin: 0 auto 20px auto !important;
        width: 100% !important;
        max-width: 280px !important;
        text-align: center !important;
    }
    
    .offers-img {
        height: 140px !important;
        width: 100% !important;
        margin: 0 auto !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .offers-img img {
        margin: 0 auto !important;
        display: block !important;
    }
    
    .offers-cap {
        padding: 8px !important;
        text-align: center !important;
        display: block !important;
        width: 100% !important;
        margin: 0 auto !important;
        position: relative !important;
        left: 0 !important;
        right: 0 !important;
    }
    
    .offers-cap * {
        text-align: center !important;
        margin-left: auto !important;
        margin-right: auto !important;
        display: block !important;
        width: 100% !important;
    }
    
    .offers-cap h3 {
        font-size: 0.9rem !important;
    }
    
    .offers-cap p {
        font-size: 0.8rem !important;
    }
}

/* Ultra Small Screens - Remove all padding */
@media (max-width: 320px) {
    .single-offers {
        padding: 0 !important;
        margin: 0 auto 20px auto !important;
    }
    
    .offers-cap {
        padding: 0 !important;
        margin: 0 !important;
        text-align: center !important;
    }
    
    .offers-cap h3, .offers-cap p {
        padding: 0 8px !important;
        margin: 8px 0 !important;
        text-align: center !important;
    }
}

/* Extra Small Screens */
@media (max-width: 480px) {
    .slick-list.draggable {
        overflow: hidden !important;
        height: auto !important;
        width: 100% !important;
        margin: 0 !important;
    }
    
    .slick-track {
        transform: none !important;
        width: 100% !important;
        display: block !important;
    }
    
    .slick-slide {
        width: 100% !important;
        float: none !important;
        display: block !important;
        margin-bottom: 20px !important;
        padding: 0 15px !important;
    }
    
    .slick-slide:not(.slick-active) {
        display: none !important;
    }
    
    .offers-cap {
        padding: 10px !important;
        text-align: center !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .offers-cap span {
        width: 35px !important;
        height: 35px !important;
        font-size: 14px !important;
        margin: 0 auto 10px auto !important;
    }
    
    .offers-cap h3 {
        font-size: 1rem !important;
        text-align: center !important;
        margin: 10px 0 !important;
    }
    
    .offers-cap p {
        font-size: 0.85rem !important;
        text-align: center !important;
        line-height: 1.4 !important;
    }
    
    .offers-img {
        height: 150px !important;
    }
}

/* Mobile Slick Fix */
@media (max-width: 768px) {
    .slick-list.draggable {
        overflow: hidden !important;
        height: auto !important;
    }
    
    .slick-track {
        transform: none !important;
        width: 100% !important;
    }
    
    .slick-slide {
        width: 100% !important;
        float: none !important;
        display: block !important;
    }
    
    .slick-slide:not(.slick-active) {
        display: none !important;
    }
    
    .clients-area, .section-padding40 {
        padding: 50px 0;
    }
    
    .single-offers, .single-cat {
        margin-bottom: 25px;
    }
    
    .offers-img {
        height: 180px !important;
        display: flex !important;
        overflow: hidden !important;
        position: relative;
        z-index: 1;
        border-radius: 12px 12px 0 0;
    }
    
    .offers-img img {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 100% !important;
        height: 100% !important;
        object-fit: cover;
        border-radius: 12px 12px 0 0;
    }
    
    .cat-icon {
        height: 100px;
        padding: 25px;
        border-radius: 12px 12px 0 0;
    }
    
    .cat-icon img {
        max-width: 50px;
        max-height: 50px;
    }
    
    .cat-icon {
        height: 80px;
        padding: 20px;
    }
    
    .offers-cap {
        padding: 15px !important;
        text-align: center !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        min-height: auto !important;
    }
    
    .cat-cap {
        padding: 15px;
        text-align: center !important;
    }
    
    .offers-cap span {
        margin: 0 auto 15px auto !important;
    }
    
    .offers-cap h3, .offers-cap p {
        text-align: center !important;
        width: 100%;
    }
    
    .hero-caption {
        text-align: center;
        padding: 20px 0;
    }
}

/* Performance */
.container { contain: layout; }
.single-offers, .single-cat { contain: layout style paint; }

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * { transition-duration: 0.01ms !important; }
}

/* Loading States */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s;
}

img[loading="lazy"].loaded {
    opacity: 1;
}