/* ============================================
   main_shop.css - Barit 테마 구조 적용
   Basic 테마 메인페이지 전용 스타일
   ============================================ */

/* ----- Hero Slider (Swiper) ----- */
.main-hero-swiper {
    width: 100%;
    overflow: hidden;
}

.main-hero-swiper .swiper-slide {
    position: relative;
    height: 650px;
    overflow: hidden;
    width: auto;
    border-radius: 0;
}

.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);
}

.main-hero-swiper .slide-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    z-index: 2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.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: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

/* Hero Controls */
.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;
}

/* Hero Responsive */
.hero-slide-responsive {
    height: 400px;
}

@media (min-width: 768px) {
    .hero-slide-responsive {
        height: 500px;
    }
}

@media (min-width: 1024px) {
    .hero-slide-responsive {
        height: 650px;
    }
}

/* ===== Category Marquee ===== */
.category-marquee-wrapper {
    overflow: hidden;
    position: relative;
    padding: 10px 0;
}

.marquee-row {
    display: flex;
    width: 100%;
    overflow: hidden;
    margin-bottom: 12px;
}

.marquee-content {
    display: flex;
    gap: 16px;
    white-space: nowrap;
    animation-duration: 30s;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

.marquee-left-to-right .marquee-content {
    animation-name: marquee-ltr;
}

.marquee-right-to-left .marquee-content {
    animation-name: marquee-rtl;
}

@keyframes marquee-ltr {
    0% { transform: translateX(-33.33%); }
    100% { transform: translateX(0); }
}

@keyframes marquee-rtl {
    0% { transform: translateX(0); }
    100% { transform: translateX(-33.33%); }
}

.category-marquee-wrapper .category-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    border-radius: 50px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    flex-shrink: 0;
    min-width: 160px;
}

.category-marquee-wrapper .category-card.glassmorphism {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.category-marquee-wrapper .category-card:hover {
    background: rgba(86, 171, 85, 0.1);
    border-color: rgba(86, 171, 85, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(86, 171, 85, 0.15);
}

.category-marquee-wrapper .category-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.category-marquee-wrapper .category-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-marquee-wrapper .category-name {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

/* ===== Our Bestsellers (Swiper) ===== */
.best-sellers-swiper .swiper-slide {
    transition: opacity 0.3s ease;
}

.best-sellers-swiper .card-product.our_best {
    border: none;
}

.best-sellers-swiper .card-product.our_best .card-body {
    padding: 0;
}

.best-sellers-swiper .card-product.our_best figure {
    border-radius: 12px;
    overflow: hidden;
}

.best-sellers-swiper .card-product.our_best figure img {
    border-radius: 12px;
    transition: transform 0.3s ease;
}

.best-sellers-swiper .card-product.our_best:hover figure img {
    transform: scale(1.05);
}

/* ===== Customer Choice Swiper ===== */
.customer-choice-swiper .swiper-slide {
    transition: transform 0.3s ease;
}

.customer-choice-swiper .swiper-slide:hover {
    transform: scale(1.02);
}

.customer-choice-swiper .type01_group {
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Choice Navigation */
.choice-nav-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    transition: all 0.2s;
}

.choice-nav-btn:hover {
    background: #333;
    color: #fff;
    border-color: #333;
}

.choice-page-info {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.choice-divider {
    color: #999;
    margin: 0 4px;
}

/* ===== Popular Categories Grid ===== */
.popular-categories-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}

.popular-category-card {
    position: relative;
    display: block;
    text-decoration: none;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.popular-category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.popular-category-card .category-image-wrapper {
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.popular-category-card .category-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.popular-category-card:hover .category-image {
    transform: scale(1.05);
}

.popular-category-card .category-title {
    padding: 12px 14px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    text-align: center;
}

.popular-category-card .category-hover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.popular-category-card:hover .category-hover-overlay {
    opacity: 1;
}

.popular-category-card .view-more {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}

/* ===== Mobile Products (3-column desktop / swiper mobile) ===== */
@media (min-width: 992px) {
    .mobile-products-swiper.swiper .swiper-wrapper {
        display: flex !important;
        flex-wrap: wrap !important;
        transform: none !important;
        box-sizing: border-box;
    }

    .mobile-products-swiper.swiper .swiper-slide {
        width: 33.33333333% !important;
        flex: 0 0 33.33333333% !important;
        max-width: 33.33333333% !important;
        height: auto !important;
        margin-right: 0 !important;
        flex-shrink: 0 !important;
        display: block;
    }
}

/* ===== Review Slider ===== */
.review-area {
    background: #fafafa;
}

.review-header {
    margin-bottom: 20px;
}

.review-header h2 a {
    text-decoration: none;
    color: #1a1a1a;
}

.review-header .re-desc {
    font-size: 14px;
    color: #888;
}

.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);
}

.recent-slider-item .bodys {
    display: flex;
    flex-direction: column;
}

.recent-slider-item .qa_img img {
    width: 100%;
    display: block;
    border-radius: 12px 12px 0 0;
}

.recent-slider-item .qa_con {
    padding: 12px 14px;
}

.recent-slider-item .qa_subject {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    line-height: 1.4;
}

.recent-slider-item .qa_subject a {
    text-decoration: none;
    color: #333;
}

.recent-slider-item .sit_use_star {
    margin-bottom: 6px;
}

.recent-slider-item .qa_memo {
    font-size: 12px;
    color: #888;
    margin-bottom: 8px;
    line-height: 1.4;
}

.recent-slider-item .qa_date {
    font-size: 11px;
    color: #aaa;
}

.recent-slider-item .pro-name {
    font-size: 11px;
    color: #666;
    padding: 8px 14px;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
    margin: 0;
}

/* ===== Promo Banner Section ===== */
.promo-banner-section .card.banner-01 {
    border-radius: 12px;
    overflow: hidden;
}

.promo-banner-section .card.banner-01 img {
    transition: transform 0.4s ease;
}

.promo-banner-section .card.banner-01:hover img {
    transform: scale(1.05);
}

/* ===== Swiper Performance ===== */
.swiper {
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.swiper-slide {
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.swiper-lazy {
    opacity: 0;
    transition: opacity 0.4s ease;
}

.swiper-lazy-loaded {
    opacity: 1;
}

/* ===== Product Card Shared ===== */
.card-product .card-img-tops img {
    border-radius: 8px;
    overflow: hidden;
}

.card-product .product-title a {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-product .product-flash .badge {
    font-size: 11px;
    padding: 3px 5px;
}

.sct_noitem {
    text-align: center;
    padding: 40px 0;
    color: #999;
}

/* ===== Responsive ===== */

/* Tablet */
@media (max-width: 991px) {
    .popular-categories-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .main-hero-swiper .swiper-slide {
        height: 400px;
    }

    .hero-progress {
        width: 120px;
    }

    .popular-categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .popular-category-card .category-title {
        font-size: 12px;
        padding: 8px 10px;
    }

    .category-marquee-wrapper .category-card {
        padding: 8px 16px;
        min-width: 130px;
    }

    .category-marquee-wrapper .category-name {
        font-size: 12px;
    }

    .recent-slider-item .qa_subject {
        font-size: 12px;
    }
}

@media (max-width: 767px) {
    .swiper-button-next,
    .swiper-button-prev {
        display: none !important;
    }
}

/* ===== Barit 유틸리티 클래스 (basic 테마에 누락) ===== */

/* Font family */
.font-primary {
    font-family: var(--bs-body-font-family, sans-serif) !important;
}

/* Font sizes */
.fs-12px {
    font-size: 0.75rem !important;
}

.fs-13px {
    font-size: 0.8125rem !important;
}

.fs-14px {
    font-size: 0.875rem !important;
}

.fs-15px {
    font-size: 0.9375rem !important;
}

.fs-16px {
    font-size: 1rem !important;
}

.fs-18px {
    font-size: 1.125rem !important;
}

.fs-20px {
    font-size: 1.25rem !important;
}

.fs-24px {
    font-size: 1.5rem !important;
}

.fs-28px {
    font-size: 1.75rem !important;
}

.fs-30px {
    font-size: 1.875rem !important;
}

.fs-32px {
    font-size: 2rem !important;
}

/* Font weights */
.fw-400 {
    font-weight: 400 !important;
}

.fw-500 {
    font-weight: 500 !important;
}

.fw-600 {
    font-weight: 600 !important;
}

.fw-700 {
    font-weight: 700 !important;
}

.fw-900 {
    font-weight: 900 !important;
}

/* ===== Crafto 프레임워크 오버라이드 (메인페이지) ===== */

/* Crafto 기본 section padding 110px 제거 (inline style로 개별 지정 가능) */
#content section,
main#content section {
    padding-top: 0;
    padding-bottom: 0;
}

/* Line-height 오버라이드 (Crafto 기본값 과대) */
#content h2 { line-height: 1.3; }
#content h3 { line-height: 1.4; }
#content h4 { line-height: 1.4; }
#content p { line-height: 1.5; }
#content .product-title,
#content .card-title { line-height: 1.4; }
#content .price { line-height: 1.4; }
#content .fs-14px { line-height: 1.5; }
#content .fs-16px { line-height: 1.5; }
#content .fs-18px { line-height: 1.4; }
#content .fs-24px { line-height: 1.3; }

/* Responsive font overrides */
@media (max-width: 768px) {
    .fs-18px {
        font-size: 14px !important;
    }

    .fs-24px {
        font-size: 1.125rem !important;
    }
}
