/**
 * Dorocraft Category Carousel Styles
 * Version: 1.0.5
 */

/* ========== Container & Layout ========== */
.dorocraft-category-carousel-wrapper {
    position: relative;
    width: 100%;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    overflow: visible;
}

.dorocraft-cat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.dorocraft-cat-title {
    font-size: 28px;
    font-weight: 600;
    margin: 0;
    color: #333;
}

/* ========== View All Button ========== */
.dorocraft-cat-btn {
    display: inline-block;
    font-size: 14px;
    font-weight: 500;
    color: #ffffff;
    background-color: #c75a3a;
    text-decoration: none;
    padding: 12px 30px;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.dorocraft-cat-btn:hover {
    background-color: #a94a2e;
    color: #ffffff;
}

/* ========== Carousel Container ========== */
.dorocraft-cat-carousel-container {
    position: relative;
    padding: 0 60px;
    overflow: visible;
}

.dorocraft-cat-swiper {
    overflow: hidden;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Smooth transitions */
.dorocraft-cat-swiper .swiper-wrapper {
    transition-timing-function: cubic-bezier(0.25, 0.1, 0.25, 1) !important;
}

/* ========== Equal Height Slides ========== */
.dorocraft-cat-swiper .swiper-wrapper {
    align-items: stretch;
}

.dorocraft-cat-swiper .swiper-slide {
    height: auto;
    display: flex;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
}

/* ========== Category Card ========== */
.dorocraft-cat-card {
    background: transparent !important;
    background-color: transparent !important;
    transition: all 0.3s ease;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    opacity: 1 !important;
    visibility: visible !important;
}

.dorocraft-cat-image {
    display: block;
    position: relative;
    overflow: hidden;
    height: 280px;
    border-radius: 10px 10px 0 0;
    flex-shrink: 0;
}

.dorocraft-cat-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

/* Ensure content area fills remaining space */
.dorocraft-cat-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    padding: 16px 8px;
    text-align: center;
    background: transparent !important;
    background-color: transparent !important;
}

/* Force transparent backgrounds on slides */
.dorocraft-cat-swiper .swiper-slide {
    background: transparent !important;
    background-color: transparent !important;
}

/* ========== Hover Effects ========== */
.dorocraft-category-carousel-wrapper.hover-zoom .dorocraft-cat-card:hover .dorocraft-cat-image img {
    transform: scale(1.05);
}

.dorocraft-category-carousel-wrapper.hover-lift .dorocraft-cat-card:hover {
    transform: translateY(-8px);
}

.dorocraft-category-carousel-wrapper.hover-shadow .dorocraft-cat-card:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.dorocraft-category-carousel-wrapper.hover-zoom-lift .dorocraft-cat-card:hover {
    transform: translateY(-8px);
}

.dorocraft-category-carousel-wrapper.hover-zoom-lift .dorocraft-cat-card:hover .dorocraft-cat-image img {
    transform: scale(1.05);
}

/* ========== Category Content ========== */
.dorocraft-cat-name {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    text-decoration: none;
    margin-bottom: 0;
    transition: color 0.3s ease;
    line-height: 1.4;
}

.dorocraft-cat-name:hover {
    color: #c75a3a;
}

.dorocraft-cat-count {
    display: block;
    font-size: 13px;
    color: #888;
    margin-top: 3px;
}

.dorocraft-cat-desc {
    font-size: 13px;
    color: #666;
    margin: 8px 0 0 0;
    line-height: 1.5;
}

/* ========== Navigation Arrows ========== */
.dorocraft-cat-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: #666;
    background: rgba(255, 255, 255, 0.95);
    width: 50px;
    height: 50px;
    padding: 0;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    visibility: visible !important;
    opacity: 1 !important;
}

.dorocraft-cat-nav-btn:hover {
    color: #333;
    background: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.dorocraft-cat-nav-prev {
    left: 0;
}

.dorocraft-cat-nav-next {
    right: 0;
}

.dorocraft-cat-nav-btn i,
.dorocraft-cat-nav-btn svg {
    font-size: 20px;
    width: 20px;
    height: 20px;
    line-height: 1;
}

.dorocraft-cat-nav-btn img {
    width: 20px;
    height: auto;
}

.dorocraft-cat-nav-btn.swiper-button-disabled {
    opacity: 0.3 !important;
    cursor: not-allowed;
}

/* ========== Pagination Dots ========== */
.dorocraft-cat-pagination {
    margin-top: 25px;
    text-align: center;
}

.dorocraft-cat-pagination .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background: #ccc;
    opacity: 1;
    margin: 0 5px;
    transition: all 0.3s ease;
}

.dorocraft-cat-pagination .swiper-pagination-bullet-active {
    background: #333;
}

/* ========== Responsive ========== */
@media (max-width: 1024px) {
    .dorocraft-cat-carousel-container {
        padding: 0 50px;
    }
    
    .dorocraft-cat-title {
        font-size: 24px;
    }
    
    .dorocraft-cat-image {
        height: 220px;
    }
}

@media (max-width: 767px) {
    .dorocraft-cat-carousel-container {
        padding: 0;
        overflow: visible;
    }
    
    .dorocraft-cat-swiper {
        overflow: visible;
        padding: 0 40px;
    }
    
    .dorocraft-cat-header {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 20px;
    }
    
    .dorocraft-cat-title {
        font-size: 20px;
    }
    
    .dorocraft-cat-image {
        height: 160px;
        border-radius: 8px;
    }
    
    .dorocraft-cat-card {
        border-radius: 8px;
    }
    
    .dorocraft-cat-name {
        font-size: 14px;
    }
    
    .dorocraft-cat-content {
        padding: 12px 6px;
    }
    
    /* Mobile arrow positioning */
    .dorocraft-cat-nav-prev {
        left: 0;
    }
    
    .dorocraft-cat-nav-next {
        right: 0;
    }
    
    .dorocraft-cat-btn {
        padding: 10px 20px;
        font-size: 13px;
    }
    
    .dorocraft-cat-count {
        font-size: 12px;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .dorocraft-cat-swiper {
        padding: 0 35px;
    }
    
    .dorocraft-cat-image {
        height: 140px;
    }
    
    .dorocraft-cat-nav-prev {
        left: 0;
    }
    
    .dorocraft-cat-nav-next {
        right: 0;
    }
    
    .dorocraft-cat-content {
        padding: 10px 4px;
    }
    
    .dorocraft-cat-name {
        font-size: 13px;
    }
}

/* ========== Prevent any hiding/zoom out ========== */
.dorocraft-category-carousel-wrapper,
.dorocraft-category-carousel-wrapper *,
.dorocraft-cat-swiper,
.dorocraft-cat-swiper * {
    animation: none !important;
}

/* Loading state fix */
.dorocraft-cat-swiper:not(.swiper-initialized) {
    opacity: 1 !important;
    visibility: visible !important;
}

.dorocraft-cat-swiper:not(.swiper-initialized) .swiper-slide {
    width: calc(25% - 15px);
    margin-right: 20px;
    opacity: 1 !important;
    visibility: visible !important;
}

@media (max-width: 1024px) {
    .dorocraft-cat-swiper:not(.swiper-initialized) .swiper-slide {
        width: calc(33.333% - 10px);
        margin-right: 15px;
    }
}

@media (max-width: 767px) {
    .dorocraft-cat-swiper:not(.swiper-initialized) .swiper-slide {
        width: calc(50% - 5px);
        margin-right: 10px;
    }
}

@media (max-width: 480px) {
    .dorocraft-cat-swiper:not(.swiper-initialized) .swiper-slide {
        width: calc(50% - 5px);
        margin-right: 10px;
    }
}
