/* 기본 세팅 */
body {
    font-family: 'SUIT', 'Noto Sans KR', sans-serif;
    margin: 0;
    background-color: #f9f9f9;
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
}

/* 텍스트 요소 기본 마진 제거 */
h1, h2, h3, h4, h5, h6,
p, ul, ol, dl,
figure, blockquote {
    margin: 0;
    padding: 0;
}

a {
    text-decoration: none;
    color: inherit;
}

.main-title {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  text-align: center;
}

.main-title h2 {
  font-size: 28px;
  font-weight: 800;
  color: #000;
  margin: 0 0 8px 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.main-title p {
  font-size: 18px;
  color: #666;
  font-weight: 500;
  margin: 0;
}



.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px 10px;
}

/* 헤더 */
.site-header {
    color: white;
    padding: 16px 0;
    font-size: 24px;
    font-weight: bold;
	border-bottom: 0.5px solid #BDBDBD;
	position: sticky;
	top: 0px;
	background-color: #ffffff;
	z-index: 100;
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn-register {
    background-color: #ff5722;
    color: white;
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    transition: 0.2s;
}

.btn-register:hover {
    background-color: #e64a19;
}

/* 푸터 */
.site-footer {
    background-color: #222;
    color: #aaa;
    text-align: center;
    padding: 20px 0;
    margin-top: auto;
    flex-shrink: 0;
}


.product-detail {
    max-width: 1000px;
    margin: 0 auto;
	padding: 10px;	
    display: flex;
    flex-wrap: wrap;
	background: #fff;
}

.product-image-box {
    flex: 1 1 300px;
	padding: 10px;
}

.product-image-box img {
    width: 100%;
    max-width: 600px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
}

.product-info-box {
    flex: 1 1 400px;
	padding: 10px;
}

.product-info-box h1 {
    font-size: 24px;
    margin-bottom: 10px;
	margin-top: 10px;
}

.product-description {
    font-size: 15px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 20px;
    white-space: pre-line;
}

/* 수량 + 장바구니 한 줄 */
.quantity-row {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

/* 수량 조절 */
.quantity-control {
    display: flex;
    align-items: center;
    gap: 6px;
}

.quantity-control input[type="number"] {
    width: 70px;
    font-size: 16px;
    text-align: center;
    padding: 8px;
    border: 0.5px solid #ccc;
    border-radius: 6px;
    appearance: textfield;
    -moz-appearance: textfield;
    -webkit-appearance: none;
}

.btn-qty {
    font-size: 18px;
    font-weight: bold;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 6px;
	border: 0.5px solid #ccc;
    cursor: pointer;
    transition: background 0.2s ease;
	background-color: white;
}

.btn-cart {
    background-color: #007bff;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
}

.btn-cart:hover {
    background-color: #0056b3;
}

/* 구매 / 네이버페이 */
.purchase-buttons {
    margin-top: 20px;
}

.btn-buy {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 15px;
    cursor: pointer;
    width: 100%;
    max-width: 310px;
    display: block;
}

.btn-buy:hover {
    background-color: #218838;
}

.btn-npay {
    margin-top: 12px;
    background-color: #03c75a;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 15px;
    cursor: pointer;
    width: 100%;
    max-width: 310px;
    display: block;
}

.btn-npay:hover {
    background-color: #02b24c;
}

@media (max-width: 768px) {
    .product-detail {
        flex-direction: column;
    }

    .product-info-box h1 {
        font-size: 20px;
    }

    .btn-cart {
        width: 100%;
        text-align: center;
		padding: 16px 16px;
    }

    .btn-buy,
    .btn-npay {
        max-width: 100%;
        font-size: 14px;
        padding: 16px;
    }
}

.back-link {
    display: block;
    margin: 40px auto 0;
    text-align: center;
    color: #333;
    text-decoration: underline;
}

.product-detail-html img {
    max-width: 100%;
    height: auto !important;
    display: block;
    margin: 10px 0;
}

.product-detail-html {
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.8;
    font-size: 15px;
    color: #444;
}

/* 상품 리스트 */
.product-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* PC 기준 3개씩 */
    gap: 25px;
    padding: 0;
}

@media (max-width: 1024px) {
    .product-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .product-list {
        grid-template-columns: 1fr;
    }
}

/* 🔹 공통 텍스트 스타일 */
.product-text {
  font-size: 14px;
  color: #555;
  line-height: 1.5;
}

/* 🔹 상품 카드 전체 */
.product-card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.25s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.product-card a {
  display: block;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

/* 상품 이미지 랩퍼 */
.product-image-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    aspect-ratio: 1;
}

/* 품절 오버레이 */
.sold-out-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    font-size: 24px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

/* 상품 이미지 */
.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

/* 상품 뱃지 */
.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #F39801;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    z-index: 2;
}

/* 🔹 정보 영역 */
.product-info {
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* 제목 */
.product-title {
  font-size: 18px;
  font-weight: 700;
  color: #111;
  background: linear-gradient(transparent 70%, #fff7b8 70%);
  display: inline-block;
  align-self: flex-start;
}

/* 부가 설명 */
.product-sub {
  font-size: 14px;
  color: #555;
  line-height: 1.4;
}

/* 가격 관련 */
.product-price-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.product-discount {

  color: #388e3c;
}

.product-original {
  font-size: 15px;
  color: #999;
  text-decoration: line-through;
}

.product-price {
  font-size: 22px;
  font-weight: bold;
  color: #d32f2f;
    margin-top: -8px;
}

.line-through {
    text-decoration: line-through;
    color: #999;
	font-weight: 300;
}

.product-discount {
    color: #191919;
    margin-left: 6px;
}


.product-hint {
    display: inline-block;
	align-self: flex-start; 
    font-size: 13px;
    background-color: #e3fceb;
    color: #198754;
    padding: 4px 10px;
    border-radius: 20px;
    border: 0.5px solid #ddd;
    font-weight: 500;
}

.shipping-box {
	margin-top: 20px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #333;
}

.shipping-row {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 8px;
    gap: 20px;
}

.shipping-label {
    font-weight: normal;
    min-width: 80px;
    color: #555;
}

.shipping-value {
    font-weight: bold;
    color: #111;
    text-align: left; /* ✅ 오른쪽 정렬 제거 */
}

.shipping-note {
    font-size: 13px;
    color: #888;
    font-weight: normal;
}



.logo-img {
	width: 140px;
    height: auto;
    display: block;
}

@media (max-width: 768px) {
    .logo-img {
		width: 100px;
        height: auto;
    }

    .btn-register {
        padding: 8px 12px;
        font-size: 13px;
    }
}

.header-buttons {
    display: flex;
    gap: 10px;
}

.btn-register, .btn-auth {
    background-color: #ff5722;
    color: white;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    transition: 0.2s;
}

.btn-register:hover,
.btn-auth:hover {
    background-color: #e64a19;
}

.cart-icon {
    position: relative;
    display: inline-block;
    color: #333;
    font-size: 18px;
    margin-left: 12px;
	margin-top: 6px;
    text-decoration: none;
}

.cart-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: #dc3545;
    color: white;
    font-size: 12px;
    font-weight: bold;
    border-radius: 50%;
    padding: 2px 7px;
    text-align: center;
}

/* 메인 배너 */
.main-banner {
    width: 100%;
    margin-bottom: 2rem;
    background: #fff;
}

.banner-slider {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    height: 400px;
}

.banner-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-content {
    position: absolute;
    bottom: 40px;
    left: 40px;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    z-index: 1;
}

.banner-content h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.banner-content p {
    font-size: 1.2rem;
}

/* Swiper 네비게이션 버튼 스타일 */
.swiper-button-next,
.swiper-button-prev {
    color: #fff;
    background: rgba(0,0,0,0.3);
    width: 44px;
    height: 44px;
    border-radius: 50%;
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 20px;
}

.swiper-pagination-bullet {
    background: #fff;
    opacity: 0.5;
}

.swiper-pagination-bullet-active {
    opacity: 1;
}

/* 카테고리 네비게이션 */
.category-nav {
    padding: 0.75rem 0;
    background: #F39801;  /* 부드러운 주황색으로 변경 */
    border-bottom: none;
    margin-bottom: 1rem;
}

.category-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 0.5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.category-item {
    text-align: center;
    text-decoration: none;
    color: #fff;
    transition: transform 0.2s;
    padding: 0.25rem;
}

.category-item:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.15);  /* 호버 효과 약간 더 밝게 */
    border-radius: 8px;
}

.category-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 0.25rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.08));  /* 그림자 더 연하게 */
}

.category-item span {
    display: block;
    font-size: 0.9rem;
    color: #fff;
    text-shadow: 0 1px 1px rgba(0,0,0,0.08);  /* 텍스트 그림자 더 연하게 */
    font-weight: 500;
}

/* 섹션 타이틀 */
.section-title {
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 상품 그리드 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    padding: 1rem;
}

/* 반응형 스타일 */
@media (max-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .banner-slider {
        height: 300px;
    }

    .banner-content h2 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .category-nav {
        padding: 0.5rem 0;
    }

    .category-list {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.25rem;
    }

    .banner-slider {
        height: 250px;
    }

    .banner-content {
        left: 20px;
        bottom: 20px;
    }

    .banner-content h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .category-nav {
        padding: 0.5rem 0;
    }

    .category-list {
        grid-template-columns: repeat(4, 1fr);
        overflow-x: auto;
        gap: 0.25rem;
        padding: 0 0.5rem;
    }

    .section-title {
        font-size: 1.25rem;
    }

    .banner-content h2 {
        font-size: 1.2rem;
    }

    .banner-content p {
        font-size: 0.9rem;
    }

    .category-icon {
        width: 36px;
        height: 36px;
    }

    .category-item span {
        font-size: 0.8rem;
    }
}

/* 상품 목록 컨테이너 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    padding: 1rem;
}

@media (max-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .product-grid {
        display: flex;
        overflow-x: auto;
        gap: 1rem;
        padding: 1rem;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE and Edge */
    }

    .product-grid::-webkit-scrollbar {
        display: none; /* Chrome, Safari, Opera */
    }

    .product-card {
        flex: 0 0 auto;
        width: 200px; /* 모바일에서 카드 너비 고정 */
        scroll-snap-align: start;
    }

    /* 스크롤 표시기 */
    .scroll-indicator {
        display: flex;
        justify-content: center;
        gap: 0.5rem;
        margin: 1rem 0;
    }

    .scroll-indicator span {
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: #ddd;
    }

    .scroll-indicator span.active {
        background: #F39801;
    }
}