/* ============================================
   STYLE V — 지마켓형 와이드 레이아웃 (max 1600px)
   포인트 컬러: 보라 #7b2ff7
   ============================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif; color: #222; background: #fff; line-height: 1.5; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
.container { max-width: 1600px; margin: 0 auto; padding: 0 24px; }

/* ===== 상단 유틸바 ===== */
.topbar { background: #f7f7f7; border-bottom: 1px solid #eee; font-size: 12px; color: #777; }
.topbar .container { display: flex; justify-content: flex-end; gap: 16px; padding-top: 7px; padding-bottom: 7px; }
.topbar a:hover { color: #7b2ff7; }
.topbar .hello { color: #7b2ff7; font-weight: 600; }

/* ===== 헤더 메인 (로고 + 대형 검색) ===== */
.header-main { background: #fff; }
.header-main .container { display: flex; align-items: center; gap: 36px; padding-top: 20px; padding-bottom: 20px; }
.logo { font-size: 32px; font-weight: 900; letter-spacing: 1px; white-space: nowrap; }
.logo span { color: #7b2ff7; }
.search-form { flex: 1; display: flex; max-width: 720px; }
.search-form input { flex: 1; padding: 13px 20px; border: 3px solid #7b2ff7; border-right: none; border-radius: 26px 0 0 26px; outline: none; font-size: 15px; }
.search-form button { padding: 13px 28px; background: #7b2ff7; color: #fff; border: none; border-radius: 0 26px 26px 0; cursor: pointer; font-size: 15px; font-weight: 600; }
.search-form button:hover { background: #6620d6; }
.header-icons { display: flex; gap: 22px; margin-left: auto; }
.header-icons a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 12px; color: #555; position: relative; }
.header-icons a:hover { color: #7b2ff7; }
.header-icons .ico { font-size: 22px; line-height: 1; }
.cart-badge { position: absolute; top: -5px; right: -2px; background: #ff3b6b; color: #fff; font-size: 10px; border-radius: 9px; padding: 1px 5px; font-weight: 700; }

/* ===== GNB (카테고리 전체보기 + 메뉴) ===== */
.gnb { border-top: 2px solid #7b2ff7; border-bottom: 1px solid #e5e5e5; background: #fff; position: relative; }
.gnb .container { display: flex; align-items: stretch; gap: 28px; }
.allcat-btn { display: flex; align-items: center; gap: 10px; background: #7b2ff7; color: #fff; padding: 13px 26px; font-size: 15px; font-weight: 700; cursor: pointer; border: none; }
.allcat-btn .bars { display: inline-block; width: 18px; }
.allcat-btn .bars i { display: block; height: 2px; background: #fff; margin: 4px 0; }
.gnb-links { display: flex; align-items: center; gap: 26px; font-size: 15px; font-weight: 600; overflow-x: auto; white-space: nowrap; }
.gnb-links a:hover { color: #7b2ff7; }
.gnb-links a.hot { color: #ff3b6b; }

/* 카테고리 메가 드롭다운 */
.allcat-wrap { position: relative; }
.allcat-menu { display: none; position: absolute; top: 100%; left: 0; z-index: 1000; background: #fff; border: 1px solid #ddd; box-shadow: 0 8px 24px rgba(0,0,0,.12); min-width: 720px; padding: 18px 22px; }
.allcat-wrap:hover .allcat-menu, .allcat-menu:hover { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px 28px; }
.allcat-col { padding: 4px 0; }
.allcat-col > a { font-size: 14px; font-weight: 700; color: #222; display: block; padding: 5px 0; border-bottom: 1px solid #f0f0f0; margin-bottom: 4px; }
.allcat-col > a:hover { color: #7b2ff7; }
.allcat-col .sub a { display: block; font-size: 13px; color: #777; padding: 2.5px 0; }
.allcat-col .sub a:hover { color: #7b2ff7; text-decoration: underline; }

/* ===== 메인 히어로 (좌 슬라이더 + 우 패널) ===== */
main { padding: 24px 0 70px; min-height: 60vh; background: #fff; }
main > .container > * { }
.hero-row { display: grid; grid-template-columns: 1fr 300px; gap: 18px; margin-bottom: 40px; }
@media (max-width: 1000px) { .hero-row { grid-template-columns: 1fr; } }

.banner-slider { position: relative; border-radius: 10px; overflow: hidden; background: #f0f0f0; }
.banner-slider .slide { display: none; }
.banner-slider .slide.active { display: block; }
.banner-slider .slide img { width: 100%; display: block; height: 440px; object-fit: cover; }
.slider-btn { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,.35); color: #fff; border: none; width: 44px; height: 44px; border-radius: 50%; cursor: pointer; font-size: 17px; z-index: 5; }
.slider-btn:hover { background: rgba(0,0,0,.6); }
.slider-btn.prev { left: 14px; }
.slider-btn.next { right: 14px; }
.slider-dots { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; z-index: 5; }
.slider-dots .dot { display: inline-block; width: 10px; height: 10px; margin: 0 4px; border-radius: 50%; background: rgba(255,255,255,.55); cursor: pointer; }
.slider-dots .dot.active { background: #fff; }

.hero { background: linear-gradient(120deg, #7b2ff7, #b06ab3); color: #fff; border-radius: 10px; padding: 70px 48px; height: 440px; display: flex; flex-direction: column; justify-content: center; }
.hero h1 { font-size: 38px; margin-bottom: 10px; }
.hero p { font-size: 17px; opacity: .9; }

/* 우측 사이드 패널 */
.side-panel { display: flex; flex-direction: column; gap: 12px; }
.side-box { border: 1px solid #e5e5e5; border-radius: 10px; padding: 18px; background: #fff; }
.side-box h3 { font-size: 15px; margin-bottom: 10px; }
.side-box .btn { width: 100%; margin-bottom: 8px; }
.side-box ul { list-style: none; font-size: 13px; color: #666; }
.side-box ul li { padding: 5px 0; border-bottom: 1px dashed #f0f0f0; display: flex; justify-content: space-between; }
.side-box ul li:last-child { border-bottom: none; }
.side-box ul li a:hover { color: #7b2ff7; }
.side-notice { background: #f7f3ff; border: 1px solid #e4d6ff; border-radius: 10px; padding: 14px 18px; font-size: 13px; color: #5a3aa8; }

/* ===== 섹션 공통 ===== */
.main-section { margin-bottom: 56px; }
.section-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 18px; border-bottom: 2px solid #222; padding-bottom: 10px; }
.section-head .section-title { margin: 0; border: none; padding: 0; }
.section-title { font-size: 24px; font-weight: 800; margin: 28px 0 14px; }
.section-sub { color: #999; font-size: 14px; }
.more-link { margin-left: auto; font-size: 13px; color: #888; }
.more-link:hover { color: #7b2ff7; }

/* ===== 특가(슈퍼딜) 대형 카드 ===== */
.deal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.deal-card { border: 1px solid #e5e5e5; border-radius: 10px; overflow: hidden; display: block; transition: box-shadow .2s, transform .2s; background: #fff; }
.deal-card:hover { box-shadow: 0 10px 26px rgba(0,0,0,.1); transform: translateY(-3px); }
.deal-card .thumb { width: 100%; aspect-ratio: 1; object-fit: cover; background: #f4f4f4; }
.deal-card .info { padding: 16px; }
.deal-card .shop { font-size: 12px; color: #999; }
.deal-card .name { font-size: 15px; margin: 5px 0 10px; height: 2.9em; overflow: hidden; font-weight: 500; }
.deal-card .price-row { display: flex; align-items: baseline; gap: 8px; }
.deal-card .rate { font-size: 24px; font-weight: 900; color: #ff3b6b; }
.deal-card .now { font-size: 21px; font-weight: 800; }
.deal-card .was { font-size: 13px; color: #aaa; text-decoration: line-through; }

/* ===== 상품 그리드 (일반) ===== */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px; }
.product-card { background: #fff; border: 1px solid #ececec; border-radius: 10px; overflow: hidden; transition: box-shadow .2s; display: block; }
.product-card:hover { box-shadow: 0 6px 18px rgba(0,0,0,.09); }
.product-card .thumb { width: 100%; aspect-ratio: 1; object-fit: cover; background: #f4f4f4; }
.product-card .info { padding: 13px; }
.product-card .shop { font-size: 12px; color: #999; }
.product-card .name { font-size: 14px; margin: 4px 0; height: 2.8em; overflow: hidden; }
.price { font-weight: 700; font-size: 16px; }
.price .original { color: #aaa; text-decoration: line-through; font-weight: 400; font-size: 13px; margin-right: 6px; }
.price .sale { color: #222; }
.discount-rate { color: #ff3b6b; font-weight: 800; margin-right: 5px; }
.badge-soldout { color: #fff; background: #999; font-size: 12px; padding: 2px 8px; border-radius: 4px; }

/* ===== 중간 띠배너 ===== */
.strip-banner { margin: 10px 0 48px; border-radius: 10px; overflow: hidden; }
.strip-banner img { width: 100%; display: block; max-height: 170px; object-fit: cover; }

/* ===== 카테고리 베스트 탭 ===== */
.best-tabs { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.best-tab { padding: 10px 24px; border: 1px solid #ddd; background: #fff; border-radius: 24px; cursor: pointer; font-size: 15px; font-weight: 600; }
.best-tab.active { background: #7b2ff7; color: #fff; border-color: #7b2ff7; }
.best-panel { display: none; }
.best-panel.active { display: grid; }

/* ===== 상품 상세 ===== */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; background: #fff; padding: 28px; border-radius: 12px; border: 1px solid #ececec; max-width: 1200px; }
@media (max-width: 860px) { .product-detail { grid-template-columns: 1fr; } }
.product-detail .thumb { width: 100%; border-radius: 10px; aspect-ratio: 1; object-fit: cover; background: #f4f4f4; }
.product-detail h1 { font-size: 24px; margin-bottom: 10px; }
.product-detail .price { font-size: 28px; margin: 14px 0; }
.thumb-list { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.thumb-list img { width: 68px; height: 68px; object-fit: cover; border-radius: 8px; border: 2px solid #eee; cursor: pointer; }
.thumb-list img:hover { border-color: #7b2ff7; }
.detail-desc { background: #fff; border: 1px solid #ececec; border-radius: 12px; padding: 26px; margin-top: 20px; white-space: pre-wrap; max-width: 1200px; }

/* 리뷰 / QnA */
.stars { color: #f5a623; letter-spacing: 1px; }
.review-item, .qna-item { border-bottom: 1px solid #f0f0f0; padding: 12px 0; font-size: 14px; }
.review-item:last-child, .qna-item:last-child { border-bottom: none; }
.qna-answer { margin-top: 6px; background: #f7f3ff; border-left: 3px solid #7b2ff7; padding: 8px 12px; border-radius: 0 8px 8px 0; }

/* ===== 폼 ===== */
.form-box { max-width: 480px; margin: 30px auto; background: #fff; padding: 32px; border-radius: 12px; border: 1px solid #e5e5e5; }
.form-box.wide { max-width: 760px; }
.form-box h1 { font-size: 22px; margin-bottom: 20px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 8px; font-size: 14px; }
.form-group textarea { min-height: 120px; resize: vertical; }
.form-hint { font-size: 12px; color: #999; margin-top: 4px; }
.btn { display: inline-block; padding: 11px 22px; border-radius: 8px; border: none; cursor: pointer; font-size: 15px; font-weight: 600; text-align: center; }
.btn-primary { background: #7b2ff7; color: #fff; }
.btn-primary:hover { background: #6620d6; }
.btn-secondary { background: #f1f1f1; color: #333; }
.btn-danger { background: #ff3b6b; color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-block { width: 100%; }

/* ===== 테이블 ===== */
.table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid #e8e8e8; border-radius: 10px; overflow: hidden; }
.table th, .table td { padding: 11px 12px; border-bottom: 1px solid #f0f0f0; font-size: 14px; text-align: left; vertical-align: middle; }
.table th { background: #fafafa; font-size: 13px; }
.table tr:last-child td { border-bottom: none; }
.table .num { text-align: right; }
.table img.mini { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; }

/* ===== 상태 라벨 ===== */
.tag { display: inline-block; font-size: 12px; padding: 2px 9px; border-radius: 12px; background: #eee; }
.tag-green { background: #e3f6e8; color: #1b8a3e; }
.tag-blue { background: #e7efff; color: #2456d8; }
.tag-red { background: #ffe7ec; color: #d8244f; }
.tag-gray { background: #f0f0f0; color: #777; }

/* ===== 플래시 / 페이지네이션 ===== */
.flash-success { background: #e3f6e8; color: #1b8a3e; padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; }
.flash-error { background: #ffe7ec; color: #d8244f; padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; }
.pagination { display: flex; gap: 6px; justify-content: center; margin: 26px 0; }
.pagination a { padding: 7px 13px; border: 1px solid #ddd; border-radius: 6px; background: #fff; font-size: 14px; }
.pagination a.current { background: #7b2ff7; color: #fff; border-color: #7b2ff7; }

/* ===== 대시보드 (adm/seller 공용) ===== */
.dash-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 26px; }
.dash-card { background: #fff; border: 1px solid #e8e8e8; border-radius: 10px; padding: 18px; }
.dash-card .label { font-size: 13px; color: #888; }
.dash-card .value { font-size: 24px; font-weight: 700; margin-top: 4px; }
.admin-nav { display: flex; gap: 10px; margin-bottom: 22px; flex-wrap: wrap; }
.admin-nav a { background: #fff; border: 1px solid #ddd; padding: 8px 16px; border-radius: 20px; font-size: 14px; }
.admin-nav a.active, .admin-nav a:hover { background: #7b2ff7; color: #fff; border-color: #7b2ff7; }

/* ===== 푸터 ===== */
.site-footer { background: #2b2b33; color: #aaa; padding: 38px 0; font-size: 13px; }
.site-footer .copy { margin-top: 8px; color: #777; }
.site-footer a { text-decoration: underline; }

/* ===== 장바구니/주문 ===== */
.summary-box { background: #fff; border: 1px solid #e5e5e5; border-radius: 12px; padding: 20px; margin-top: 16px; }
.summary-box .row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; }
.summary-box .row.total { border-top: 1px solid #eee; margin-top: 8px; padding-top: 12px; font-size: 17px; font-weight: 700; }
.qty-input { width: 64px; padding: 6px; border: 1px solid #ddd; border-radius: 6px; text-align: center; }
.checkout-grid { max-width: 1200px; }
@media (max-width: 900px) { .checkout-grid { display: block !important; } }
