/* ==========================================
   데크샵 - 메인 스타일시트
   ========================================== */

:root {
    --primary: #5c6bc0;
    --primary-dark: #3949ab;
    --wood-brown: #8d6e63;
    --wood-light: #d7ccc8;
    --deck-green: #4caf50;
    --bg-warm: #fafaf8;
}

* { box-sizing: border-box; }
body { font-family: 'Noto Sans KR', sans-serif; background: var(--bg-warm); color: #333; }

/* ==========================================
   네비게이션
   ========================================== */
.top-bar { background: #2c3e50; color: #fff; font-size: .8rem; }
.top-bar a { color: rgba(255,255,255,.8); }
.top-bar a:hover { color: #fff; }

.navbar { padding: .75rem 0; }
.brand-logo { display: flex; align-items: center; gap: 6px; }
.brand-icon { font-size: 1.4rem; color: var(--primary); }
.brand-text { font-size: 1.3rem; font-weight: 800; letter-spacing: -0.5px; color: #222; }
.brand-text .text-primary { color: var(--primary) !important; }
.cart-badge { font-size: .65rem; min-width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; }

/* ==========================================
   히어로 섹션
   ========================================== */
.hero-section { position: relative; }
.hero-slide { position: relative; height: 560px; background-size: cover; background-position: center; display: flex; align-items: center; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(0,0,0,.6) 0%, rgba(0,0,0,.2) 100%); }
.default-hero { background: linear-gradient(135deg, #2c3e50, #3498db); }
.hero-content { position: relative; z-index: 2; }
.hero-title { font-size: clamp(1.8rem, 4vw, 3.2rem); font-weight: 800; line-height: 1.2; margin-bottom: .5rem; }
.hero-subtitle { font-size: 1.1rem; opacity: .9; margin-bottom: 1rem; }

@media (max-width: 768px) {
    .hero-slide { height: 380px; }
    .hero-title { font-size: 1.6rem; }
}

/* Swiper 커스텀 */
.hero-swiper .swiper-button-prev,
.hero-swiper .swiper-button-next { color: #fff; }
.hero-swiper .swiper-pagination-bullet { background: rgba(255,255,255,.6); }
.hero-swiper .swiper-pagination-bullet-active { background: #fff; }

/* ==========================================
   특징 배너
   ========================================== */
.feature-item { padding: 1rem; display: flex; flex-direction: column; align-items: center; border-right: 1px solid #eee; }
.feature-item:last-child { border-right: none; }
@media (max-width: 576px) { .feature-item { border-right: none; border-bottom: 1px solid #eee; } }

/* ==========================================
   섹션 공통
   ========================================== */
.section-title { font-size: 1.6rem; font-weight: 700; color: #222; }
.section-subtitle { font-size: .95rem; }

/* ==========================================
   카테고리 카드
   ========================================== */
.col-lg-2-4 { flex: 0 0 auto; width: 20%; padding: 0 .5rem; }
@media (max-width: 992px) { .col-lg-2-4 { width: 33.333%; } }
@media (max-width: 576px) { .col-lg-2-4 { width: 50%; } }

.category-card {
    display: block;
    background: #fff;
    border-radius: 16px;
    padding: 1.5rem 1rem;
    text-align: center;
    transition: all .3s;
    border: 2px solid transparent;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.category-card:hover { border-color: var(--primary); transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.category-all { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); }
.category-icon { width: 60px; height: 60px; border-radius: 50%; background: #f0f4ff; display: flex; align-items: center; justify-content: center; margin: 0 auto 10px; overflow: hidden; }
.category-icon img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.category-name { font-size: .85rem; font-weight: 600; color: #444; }
.category-all .category-icon { background: rgba(255,255,255,.2); }

/* ==========================================
   상품 카드
   ========================================== */
.product-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    transition: all .3s;
    height: 100%;
}
.product-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(0,0,0,.12); }
.product-card-image { position: relative; overflow: hidden; padding-top: 75%; background: #f8f8f8; }
.product-card-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.product-card:hover .product-card-image img { transform: scale(1.06); }
.badge-discount { position: absolute; top: 8px; left: 8px; background: #e53e3e; color: #fff; padding: 4px 8px; border-radius: 6px; font-size: .75rem; font-weight: 700; }
.badge-install { position: absolute; bottom: 8px; left: 8px; background: rgba(0,0,0,.6); color: #fff; padding: 3px 8px; border-radius: 6px; font-size: .7rem; }
.product-card-actions { position: absolute; top: 8px; right: 8px; display: flex; flex-direction: column; gap: 4px; opacity: 0; transition: opacity .3s; }
.product-card:hover .product-card-actions { opacity: 1; }
.btn-wishlist, .btn-quickview { width: 32px; height: 32px; border-radius: 50%; border: none; background: rgba(255,255,255,.9); color: #555; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: .85rem; transition: all .2s; }
.btn-wishlist:hover { background: #e53e3e; color: #fff; }
.btn-quickview:hover { background: var(--primary); color: #fff; }
.product-card-body { padding: .9rem; }
.product-name { font-size: .9rem; font-weight: 600; margin-bottom: .3rem; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.price-sale { font-size: 1rem; }
.price-normal { font-size: 1rem; }
.btn-add-cart { font-size: .82rem; padding: .4rem; border-radius: 8px; }

/* ==========================================
   설치 섹션
   ========================================== */
.installation-banner { background: linear-gradient(135deg, #fef9f0, #fff8ef); }
.stat-box { background: #fff; border-radius: 12px; padding: 1.2rem; text-align: center; box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.stat-number { font-size: 1.6rem; font-weight: 800; color: var(--primary); }
.stat-label { font-size: .82rem; color: #777; }

.review-grid { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, 150px); gap: 8px; border-radius: 16px; overflow: hidden; }
.review-grid-item { position: relative; overflow: hidden; border-radius: 8px; }
.review-grid-large { grid-row: span 2; grid-column: span 1; }
.review-grid-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.review-grid-item:hover img { transform: scale(1.05); }
.review-overlay { position: absolute; bottom: 0; left: 0; right: 0; padding: 6px; background: linear-gradient(transparent, rgba(0,0,0,.5)); }
.review-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: #f0f0f0; }

/* ==========================================
   CTA 섹션
   ========================================== */
.cta-section { background: linear-gradient(135deg, var(--primary), var(--primary-dark)) !important; }

/* ==========================================
   상품 목록 페이지
   ========================================== */
.filter-sidebar { background: #fff; border-radius: 12px; padding: 1.5rem; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.filter-title { color: #444; font-size: .9rem; }
.filter-section { border-bottom: 1px solid #f0f0f0; padding-bottom: 1rem; }
.filter-section:last-child { border-bottom: none; }

/* ==========================================
   상품 상세 페이지
   ========================================== */
.gallery-main-img { border-radius: 12px; aspect-ratio: 1; object-fit: cover; }
.gallery-thumb-img { width: 70px; height: 70px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; transition: border-color .2s; }
.swiper-slide-thumb-active .gallery-thumb-img { border-color: var(--primary); }

.product-detail-name { font-size: 1.5rem; font-weight: 700; }
.price-box { border-radius: 12px; }
.spec-table th { font-weight: 500; font-size: .85rem; }
.spec-table td { font-size: .85rem; }
.installation-option { background: #f0f4ff; border-color: #c5cae9 !important; }
.btn-naverpay { border: none; background: transparent; padding: 0; width: 100%; }

/* ==========================================
   장바구니
   ========================================== */
.cart-item:last-child { border-bottom: none !important; }

/* ==========================================
   시공후기
   ========================================== */
.review-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    transition: all .3s;
    height: 100%;
}
.review-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(0,0,0,.12); }
.review-card-image { position: relative; overflow: hidden; padding-top: 65%; background: #f8f8f8; }
.review-card-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.review-card:hover .review-card-image img { transform: scale(1.05); }
.review-img-count { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,.6); color: #fff; padding: 2px 8px; border-radius: 12px; font-size: .75rem; }
.review-best-badge { position: absolute; top: 8px; left: 8px; background: #f59e0b; color: #fff; padding: 2px 8px; border-radius: 6px; font-size: .75rem; font-weight: 700; }
.review-card-body { padding: 1rem; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ==========================================
   페이지네이션
   ========================================== */
.pagination .page-link { border-radius: 8px; margin: 0 2px; border: 1px solid #e0e0e0; color: #555; }
.pagination .page-item.active .page-link { background: var(--primary); border-color: var(--primary); }

/* ==========================================
   푸터
   ========================================== */
.footer { font-size: .85rem; }

/* ==========================================
   플로팅 버튼
   ========================================== */
.floating-buttons { position: fixed; right: 20px; bottom: 30px; z-index: 999; display: flex; flex-direction: column; gap: 10px; }
.floating-btn {
    width: 48px; height: 48px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    border: none; cursor: pointer; font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(0,0,0,.2); transition: all .3s;
}
.kakao-btn { background: #fee500; color: #333; }
.top-btn { background: #fff; color: #555; opacity: 0; visibility: hidden; }
.top-btn.visible { opacity: 1; visibility: visible; }
.floating-btn:hover { transform: translateY(-3px); }

/* ==========================================
   Bootstrap 오버라이드
   ========================================== */
.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-outline-primary { color: var(--primary); border-color: var(--primary); }
.btn-outline-primary:hover { background: var(--primary); border-color: var(--primary); }
.text-primary { color: var(--primary) !important; }
.bg-primary { background-color: var(--primary) !important; }
.bg-primary-light { background-color: #e8eaf6 !important; }

/* ==========================================
   반응형
   ========================================== */
@media (max-width: 768px) {
    .product-card-body { padding: .7rem; }
    .product-name { font-size: .82rem; }
    .filter-sidebar { display: none; }
    .section-title { font-size: 1.3rem; }
}

/* 결제 방법 버튼 */
.payment-method-btn { padding: .6rem; }
.payment-method-btn i { font-size: 1.5rem !important; }
