/* ----- 슬라이더 컨테이너 ----- */
.webpublic-banner-area {
    width: 100%;
    margin: 40px auto;
    position: relative;
}

.items-swiper {
    width: 100%;
    overflow: hidden;
}

/* ----- 개별 슬라이드 (아이템) - Hero Only ----- */
.main-hero-swiper .swiper-slide {
    height: 650px;
    background-color: #eee;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.main-hero-swiper .swiper-slide a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: white;
}

/* ----- 이미지 (배경) ----- */
.swiper-slide .img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 어두운 오버레이 (텍스트 가독성) */
.swiper-slide .img::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
}

/* ----- 텍스트 ----- */
.txt {
    position: absolute;
    bottom: 40px;
    left: 30px;
    z-index: 2;
    right: 30px;
}

.txt .p1,
.txt .p2 {
    display: block;
    opacity: 1;
    word-break: keep-all;
}

.txt .p1 {
    font-size: 2em;
    font-weight: bold;
    line-height: 1.2;
    margin-bottom: 10px;
    color: #ffffff;
}

.txt .p2 {
    font-size: 1.1em;
    font-weight: normal;
    color: #efefef;
}

/* 활성화된 슬라이드의 텍스트만 애니메이션 적용 */
.swiper-slide-active .txt .p1,
.swiper-slide-active .txt .p2 {
    opacity: 1;
}

.swiper-slide-active .txt .p1 {
    animation-delay: 0.2s;
}

.swiper-slide-active .txt .p2 {
    animation-delay: 0.4s;
}

/* ----- 컨트롤 패널 (페이지네이션, 버튼) ----- */
.pannel {
    width: 100%;
    max-width: 1200px;
    margin: 20px auto 0;
    display: flex;
    align-items: center;
    padding: 0 10px;
    box-sizing: border-box;
}

/* 프로그레스바 */
.swiper-pagination {
    position: relative !important;
    flex-grow: 1;
    background-color: #d0d0d0;
    height: 2px;
}

.swiper-pagination .swiper-pagination-progressbar-fill {
    background-color: #111;
    height: 2px;
}

/* 좌우 화살표 (기본 스타일) */
.swiper-button-next,
.swiper-button-prev {
    position: relative !important;
    top: auto !important;
    margin-top: 0 !important;
    width: 24px;
    height: 24px;
    margin-left: 15px;
    color: #111;
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 18px !important;
    font-weight: bold;
}

.swiper-button-prev {
    order: -1;
    margin-left: 0;
    margin-right: 15px;
}

/* 재생/일시정지 버튼 */
.autoplay {
    width: 24px;
    height: 24px;
    cursor: pointer;
    margin-left: 15px;
}

.autoplay svg {
    width: 100%;
    height: 100%;
    fill: #111;
}

.autoplay .play {
    display: none;
}

.autoplay.is-paused .pause {
    display: none;
}

.autoplay.is-paused .play {
    display: block;
}

/* ===== Our Bestseller Styles ===== */
.our-best-seller-4 {
    position: relative;
    padding-bottom: 40px;
}

/* Our Bestseller 강제 노출 (Slick 높이 문제 해결) */
.our-best-seller-4 .slick-slide {
    display: block !important;
    height: 100% !important;
    min-height: 100px;
    visibility: visible !important;
    opacity: 1 !important;
}

.our-best-seller-4 .slick-track {
    display: flex !important;
}

.our-best-seller-4 .arl,
.our-best-seller-4 .arr {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: #fff;
    border: 1px solid #ddd;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    color: #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.our-best-seller-4 .arl {
    left: -20px;
}

.our-best-seller-4 .arr {
    right: -20px;
}

.our-best-seller-4 .arl:hover,
.our-best-seller-4 .arr:hover {
    background: #56ab55;
    color: #fff;
    border-color: #56ab55;
}

.our-best-seller-4 .slick-dots {
    position: absolute;
    bottom: -20px;
    display: flex !important;
    justify-content: center;
    width: 100%;
    padding: 0;
    margin: 0;
    list-style: none;
    text-align: center;
    height: 30px;
    z-index: 5;
}

.our-best-seller-4 .slick-dots li {
    position: relative;
    display: inline-block;
    width: 20px;
    height: 20px;
    margin: 0 5px;
    padding: 0;
    cursor: pointer;
}

.our-best-seller-4 .slick-dots li button {
    font-size: 0;
    line-height: 0;
    display: block;
    width: 20px;
    height: 20px;
    padding: 5px;
    cursor: pointer;
    color: transparent;
    border: 0;
    outline: none;
    background: transparent;
}

.our-best-seller-4 .slick-dots li button:before {
    font-family: 'slick';
    font-size: 10px;
    line-height: 20px;
    position: absolute;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    content: '•';
    text-align: center;
    opacity: .25;
    color: black;
}

.our-best-seller-4 .slick-dots li.slick-active button:before {
    opacity: .75;
    color: #56ab55;
}

/* ===== Main Hero Slider Styles ===== */
/* ===== Main Hero Slider Styles (Swiper) ===== */
.main-hero-swiper {
    width: 100%;
    overflow: visible;
    /* Changed to visible for debugging */
    min-height: 400px;
    /* Ensure container has minimum height */
}

.main-hero-swiper .swiper-wrapper {
    display: flex;
    min-height: 400px;
    /* Ensure wrapper has height */
}

.main-hero-swiper .swiper-slide {
    position: relative;
    /* width controlled by Swiper slidesPerView */
    height: 500px;
    overflow: hidden;
    flex-shrink: 0;
    border-radius: 12px;
}

.main-hero-swiper .slide-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.main-hero-swiper .swiper-slide:hover .slide-img {
    transform: scale(1.05);
    /* Zoom effect on hover */
}

.main-hero-swiper .slide-content {
    position: absolute;
    bottom: 30px;
    left: 30px;
    right: 30px;
    color: #fff;
    z-index: 2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.main-hero-swiper .slide-content h3,
.main-hero-swiper .slide-content p {
    color: #fff !important;
}

.main-hero-swiper .slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, transparent 50%);
    z-index: 1;
}

/* Custom Progress Bar & Nav */
.hero-slider-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
    gap: 15px;
}

.hero-progress {
    width: 200px;
    height: 2px;
    background: #e0e0e0;
    position: relative;
    border-radius: 2px;
    overflow: hidden;
}

.hero-progress-bar {
    height: 100%;
    background: #000;
    width: 0;
    transition: width 0.3s ease;
}

.hero-arrow {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    padding: 0 5px;
}

.hero-page-info {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    min-width: 40px;
    text-align: center;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .main-hero-swiper .swiper-slide {
        height: 400px;
        /* Adjust height for mobile */
    }

    .txt .p1 {
        font-size: 1.5em;
        /* Smaller font on mobile */
    }

    .hero-progress {
        width: 120px;
        /* Smaller progress bar */
    }
}

/* ----- Mobile Products Swiper / Desktop Grid Reset ----- */
@media (min-width: 992px) {
    .mobile-products-swiper.swiper .swiper-wrapper {
        display: flex !important;
        flex-wrap: wrap !important;
        transform: none !important;
        /* Disable Swiper transform */
        box-sizing: border-box;
    }

    .mobile-products-swiper.swiper .swiper-slide {
        width: 33.33333333% !important;
        flex: 0 0 33.33333333% !important;
        /* Bootstrap-like flex sizing */
        max-width: 33.33333333% !important;
        height: auto !important;
        margin-right: 0 !important;
        flex-shrink: 0 !important;
        display: block;
    }
}

/* ===== Swiper Performance Optimizations ===== */
.swiper {
    /* GPU acceleration for smooth animations */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.swiper-slide {
    /* Optimize rendering */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Lazy loading preloader styling */
.swiper-lazy-preloader {
    width: 42px;
    height: 42px;
    position: absolute;
    left: 50%;
    top: 50%;
    margin-left: -21px;
    margin-top: -21px;
    z-index: 10;
    transform-origin: 50%;
    box-sizing: border-box;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #000;
    animation: swiper-preloader-spin 1s infinite linear;
}

@keyframes swiper-preloader-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Smooth image transitions */
.swiper-lazy {
    opacity: 0;
    transition: opacity 0.4s ease;
}

.swiper-lazy-loaded {
    opacity: 1;
}

/* ===== Review Slider Specific Styles ===== */
.recent-slider-review {
    width: 100%;
    overflow: hidden;
    padding: 20px 0;
}

.recent-slider-review .swiper-slide {
    height: auto;
    min-height: 200px;
}

.recent-slider-item {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.recent-slider-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* Customer Choice Swiper hover effects */
.customer-choice-swiper .swiper-slide {
    transition: transform 0.3s ease;
}

.customer-choice-swiper .swiper-slide:hover {
    transform: scale(1.02);
}

/* Best Sellers smooth transitions */
.best-sellers-swiper .swiper-slide {
    transition: opacity 0.3s ease;
}

/* Disable transitions during resize for performance */
.swiper.swiper-resize-observer {
    transition: none !important;
}

.swiper-resize-observer .swiper-slide {
    transition: none !important;
}

/* ===== Mobile Navigation Button Hide ===== */
@media (max-width: 767px) {

    .swiper-button-next,
    .swiper-button-prev {
        display: none !important;
    }
}

/* ===== MD's Pick Tabs ===== */
.md-pick-tab-buttons {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
}

.md-pick-tab-btn {
    border: 1px solid #d8dde3;
    border-radius: 999px;
    background-color: #fff;
    color: #374151;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    padding: 9px 16px;
    transition: all 0.2s ease;
}

.md-pick-tab-btn:hover {
    border-color: #56ab55;
    color: #2f7a2f;
}

.md-pick-tab-btn.is-active {
    border-color: #56ab55;
    background-color: #56ab55;
    color: #fff;
}

.md-pick-tab-pane {
    display: none;
}

.md-pick-tab-pane.is-active {
    display: block;
}
