/* ===== NewPerMarket - Complete CSS ===== */
/* Exact color palette from original site */

:root {
    --scBlack: #222222;
    --scWhite: #fbfbfb;
    --scPoint: #314ad7;
    --scPointFont: #ffffff;
    --scMenu: #009eff;
    --scMenuFont: #ffffff;
    --scTitle: #001a51;
    --scBack: #f6f6f6;
    --scLine: #e7e7e7;
    --container-width: 1280px;
    --ctg-all-width: 280px;
    --main-slide-height: 430px;
    --gutter-x: 15px;
    --gutter-y: 15px;
    --red: #e74c3c;
    --orange: #f39c12;
    --green: #27ae60;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 14px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Malgun Gothic', '맑은 고딕', sans-serif;
    color: var(--scBlack);
    background: var(--scWhite);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

a:hover {
    color: var(--scPoint);
}

img {
    max-width: 100%;
    height: auto;
}

ul, ol {
    list-style: none;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

input, select, textarea {
    font-family: inherit;
    font-size: inherit;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

.clearfix::after {
    content: '';
    display: table;
    clear: both;
}

/* ===== HEADER ===== */
.main-header {
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.main-header-top {
    background: var(--scBack);
    border-bottom: 1px solid var(--scLine);
    font-size: 12px;
    color: #666;
}

.main-header-top .container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    height: 36px;
    gap: 15px;
}

.main-header-top a {
    color: #666;
    font-size: 12px;
}

.main-header-top a:hover {
    color: var(--scPoint);
}

.header-top-divider {
    width: 1px;
    height: 12px;
    background: #ccc;
}

.main-header-middle {
    padding: 15px 0;
    border-bottom: 1px solid var(--scLine);
}

.main-header-middle .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo {
    flex-shrink: 0;
}

.logo img {
    height: 40px;
}

.logo-text {
    font-size: 24px;
    font-weight: 800;
    color: var(--scPoint);
    letter-spacing: -1px;
}

.logo-text span {
    color: var(--scMenu);
}

.search-bar {
    flex: 1;
    max-width: 500px;
    position: relative;
}

.search-bar input {
    width: 100%;
    height: 48px;
    border: 2px solid var(--scPoint);
    border-radius: 25px;
    padding: 0 55px 0 22px;
    font-size: 15px;
    outline: none;
    transition: all 0.2s;
    background: #f8f9ff;
}

.search-bar input:focus {
    border-color: var(--scMenu);
}

.search-bar input::placeholder {
    color: #aaa;
}

.search-bar button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    background: var(--scPoint);
    border-radius: 50%;
    color: #fff;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-bar button:hover {
    background: var(--scMenu);
}

.header-icons {
    display: flex;
    gap: 20px;
    align-items: center;
}

.header-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #666;
    cursor: pointer;
    position: relative;
}

.header-icon i {
    font-size: 22px;
    color: var(--scBlack);
}

.header-icon .badge-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--red);
    color: #fff;
    font-size: 10px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Navigation */
.main-header-bottom {
    background: var(--scTitle);
}

.main-header-bottom .container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-all-btn {
    width: var(--ctg-all-width);
    height: 50px;
    background: var(--scPoint);
    color: #fff;
    display: none;
    align-items: center;
    padding: 0 20px;
    gap: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
}

.category-all-btn i {
    font-size: 20px;
}

.category-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: var(--ctg-all-width);
    background: #fff;
    border: 1px solid var(--scLine);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 100;
    display: none;
}

.category-dropdown.active {
    display: block;
}

.category-dropdown li {
    border-bottom: 1px solid var(--scLine);
}

.category-dropdown li a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    font-size: 14px;
    color: var(--scBlack);
    gap: 10px;
    transition: background 0.2s;
}

.category-dropdown li a:hover {
    background: var(--scBack);
    color: var(--scPoint);
}

.category-dropdown li a img {
    width: 28px;
    height: 28px;
    border-radius: 4px;
}

.gnb-nav {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50px;
}

.gnb-nav a {
    color: #fff;
    padding: 0 18px;
    height: 50px;
    display: flex;
    align-items: center;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    transition: background 0.2s;
}

.gnb-nav a:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.gnb-nav a.highlight {
    color: #ffeb3b;
    font-weight: 700;
}

/* ===== MAIN BANNER ===== */
.main-banner-section {
    position: relative;
    overflow: hidden;
}

.main-banner-slider {
    position: relative;
}

.banner-slide {
    width: 100%;
    height: 0;
    padding-top: 33.33%; /* 3:1 aspect ratio */
    display: none;
    position: relative;
}

.banner-slide.active {
    display: block;
}

.banner-slide img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-slide a {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.banner-slide a {
    display: block;
    width: 100%;
    height: 100%;
}

.banner-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.banner-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    border: none;
    transition: all 0.3s;
}

.banner-dot.active {
    background: #fff;
    width: 30px;
    border-radius: 5px;
}

.banner-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    background: rgba(0,0,0,0.3);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: background 0.3s;
}

.banner-arrow:hover {
    background: rgba(0,0,0,0.6);
}

.banner-arrow.prev {
    left: 20px;
}

.banner-arrow.next {
    right: 20px;
}

/* ===== CATEGORY ICONS ===== */
.category-section {
    padding: 30px 0;
    background: #fff;
}

.category-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
    text-align: center;
    flex-wrap: wrap;
}

.category-icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 15px 10px;
    border-radius: 12px;
    transition: all 0.2s;
    cursor: pointer;
    min-width: 90px;
}

.category-icon-item:hover {
    background: var(--scBack);
    transform: translateY(-2px);
}

.category-icon-item img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.category-icon-item span {
    font-size: 13px;
    font-weight: 500;
    color: var(--scBlack);
    white-space: nowrap;
}

/* ===== SECTION TITLES ===== */
.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 10px 0;
}

.section-title h2 {
    font-size: 22px;
    font-weight: 800;
    color: var(--scTitle);
    letter-spacing: -0.5px;
}

.section-title .more-link {
    font-size: 13px;
    color: var(--scPoint);
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
}

.section-title .more-link:hover {
    color: var(--scTitle);
}

/* ===== PRODUCT TABS ===== */
.product-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--scLine);
    padding-bottom: 0;
}

.product-tab {
    padding: 10px 20px;
    font-size: 15px;
    font-weight: 600;
    color: #999;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.product-tab.active {
    color: var(--scPoint);
    border-bottom-color: var(--scPoint);
}

.product-tab:hover {
    color: var(--scPoint);
}

/* ===== PRODUCT GRID ===== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.product-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s;
    border: 1px solid var(--scLine);
    position: relative;
}

.product-card:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    transform: translateY(-4px);
    border-color: var(--scPoint);
}

.product-card .thumbnail {
    position: relative;
    width: 100%;
    padding-top: 100%;
    overflow: hidden;
    background: #f8f8f8;
}

.product-card .thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

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

.product-card .badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    z-index: 2;
}

.badge {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
}

.badge-tmembership {
    background: #6c5ce7;
}

.badge-new {
    background: var(--green);
}

.badge-sgrade {
    background: var(--scPoint);
}

.badge-agrade {
    background: var(--scMenu);
}

.badge-value {
    background: var(--orange);
}

.badge-soldout {
    background: var(--red);
}

.badge-hot {
    background: #e74c3c;
}

.product-card .wishlist-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    font-size: 16px;
    color: #ccc;
    transition: all 0.2s;
}

.product-card .wishlist-btn:hover,
.product-card .wishlist-btn.active {
    color: var(--red);
}

.product-card .info {
    padding: 15px;
}

.product-card .product-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--scBlack);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 8px;
    min-height: 40px;
}

.product-card .price-box {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

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

.product-card .sale-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.product-card .discount-rate {
    font-size: 18px;
    font-weight: 800;
    color: var(--red);
}

.product-card .sale-price {
    font-size: 18px;
    font-weight: 800;
    color: var(--scBlack);
}

.product-card .sale-price small {
    font-size: 13px;
    font-weight: 400;
}

.product-card .sold-info {
    font-size: 12px;
    color: #999;
    margin-top: 6px;
}

/* ===== SECTION BANNER ===== */
.section-banner {
    margin: 40px 0;
    border-radius: 12px;
    overflow: hidden;
}

.section-banner img {
    width: 100%;
    display: block;
}

/* ===== TIMER SALE ===== */
.timer-sale {
    background: linear-gradient(135deg, var(--scTitle) 0%, var(--scPoint) 100%);
    padding: 40px 0;
    margin: 40px 0;
}

.timer-sale .section-title h2 {
    color: #fff;
}

.timer-sale .timer {
    display: flex;
    gap: 8px;
    align-items: center;
}

.timer-sale .timer span {
    background: rgba(255,255,255,0.2);
    color: #fff;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 18px;
    font-weight: 700;
    min-width: 40px;
    text-align: center;
}

.timer-sale .timer .separator {
    color: #fff;
    font-size: 18px;
    background: none;
    padding: 0;
    min-width: auto;
}

/* ===== HOT PRODUCTS ===== */
.hot-products-section {
    padding: 40px 0;
}

/* ===== PHOTO REVIEWS ===== */
.review-section {
    padding: 40px 0;
    background: var(--scBack);
}

.review-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.review-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--scLine);
}

.review-card .stars {
    color: #ffd700;
    font-size: 14px;
    margin-bottom: 8px;
}

.review-card .review-text {
    font-size: 13px;
    color: #555;
    line-height: 1.5;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.review-card .reviewer {
    font-size: 12px;
    color: #999;
    display: flex;
    justify-content: space-between;
}

.review-card .product-name-sm {
    font-size: 12px;
    color: var(--scPoint);
    margin-bottom: 5px;
}

/* ===== POPULAR KEYWORDS ===== */
.keywords-section {
    padding: 30px 0;
}

.keyword-list {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.keyword-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background: #fff;
    border: 1px solid var(--scLine);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.keyword-item:hover {
    border-color: var(--scPoint);
    background: #f0f2ff;
}

.keyword-item .rank {
    font-size: 16px;
    font-weight: 800;
    color: var(--scPoint);
    min-width: 24px;
}

.keyword-item .keyword-text {
    font-size: 14px;
    flex: 1;
}

.keyword-item .trend {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 3px;
}

.keyword-item .trend.up {
    color: var(--red);
}

.keyword-item .trend.new {
    color: var(--green);
    font-weight: 700;
}

.keyword-item .trend.down {
    color: var(--scMenu);
}

/* ===== FOOTER ===== */
.main-footer {
    background: #2c2c2c;
    color: #aaa;
    padding: 40px 0 20px;
    font-size: 13px;
    line-height: 1.8;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    padding-bottom: 30px;
    border-bottom: 1px solid #444;
    margin-bottom: 30px;
}

.footer-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #ccc;
    font-size: 13px;
    font-weight: 500;
}

.footer-links a:hover {
    color: #fff;
}

.footer-links a.privacy {
    color: #fff;
    font-weight: 700;
}

.footer-content {
    display: flex;
    gap: 60px;
}

.footer-info {
    flex: 1;
}

.footer-info h3 {
    color: #fff;
    font-size: 16px;
    margin-bottom: 15px;
}

.footer-info p {
    margin-bottom: 3px;
}

.footer-cs {
    width: 300px;
}

.footer-cs .cs-number {
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 5px;
}

.footer-cs .cs-time {
    font-size: 13px;
    color: #aaa;
    margin-bottom: 15px;
}

.footer-cs .cs-direct {
    font-size: 14px;
    color: #ccc;
}

.footer-sns {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.footer-sns a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #444;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    transition: all 0.2s;
}

.footer-sns a:hover {
    background: var(--scPoint);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #444;
    font-size: 12px;
    color: #777;
}

.footer-cert {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    align-items: center;
}

.footer-cert img {
    height: 40px;
    opacity: 0.7;
}

/* ===== CATEGORY PAGE ===== */
.category-page {
    padding: 30px 0;
}

.category-page-layout {
    display: flex;
    gap: 30px;
}

.category-sidebar {
    width: var(--ctg-all-width);
    flex-shrink: 0;
}

.category-sidebar .sidebar-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--scTitle);
    padding: 15px;
    border-bottom: 2px solid var(--scTitle);
}

.subcategory-list {
    border: 1px solid var(--scLine);
    border-top: none;
}

.subcategory-list li a {
    display: block;
    padding: 10px 15px;
    font-size: 14px;
    color: #555;
    border-bottom: 1px solid var(--scLine);
    transition: all 0.2s;
}

.subcategory-list li a:hover,
.subcategory-list li a.active {
    background: #f0f2ff;
    color: var(--scPoint);
    font-weight: 600;
}

.category-main {
    flex: 1;
}

.sort-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--scLine);
}

.sort-options {
    display: flex;
    gap: 5px;
}

.sort-btn {
    padding: 6px 14px;
    font-size: 13px;
    color: #666;
    border: 1px solid var(--scLine);
    border-radius: 20px;
    transition: all 0.2s;
}

.sort-btn.active,
.sort-btn:hover {
    background: var(--scPoint);
    color: #fff;
    border-color: var(--scPoint);
}

.total-count {
    font-size: 14px;
    color: #999;
}

.total-count strong {
    color: var(--scPoint);
    font-weight: 700;
}

/* Filter */
.filter-section {
    padding: 15px;
    background: var(--scBack);
    border-radius: 8px;
    margin-bottom: 20px;
}

.filter-group {
    margin-bottom: 10px;
}

.filter-group label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    font-size: 13px;
    cursor: pointer;
    border: 1px solid var(--scLine);
    border-radius: 20px;
    margin: 3px;
    background: #fff;
    transition: all 0.2s;
}

.filter-group label:hover,
.filter-group label.active {
    border-color: var(--scPoint);
    color: var(--scPoint);
    background: #f0f2ff;
}

.filter-group label input[type="checkbox"] {
    display: none;
}

.filter-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--scTitle);
}

/* ===== PRODUCT DETAIL ===== */
.product-gallery .main-image img {
    cursor: zoom-in;
    transition: transform 0.3s;
}

.product-gallery .main-image:hover img {
    transform: scale(1.05);
}

.product-detail {
    padding: 30px 0;
}

.product-detail-top {
    display: flex;
    gap: 40px;
    margin-bottom: 40px;
}

.product-gallery {
    width: 500px;
    flex-shrink: 0;
}

.product-gallery .main-image {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--scLine);
    margin-bottom: 10px;
}

.product-gallery .main-image img {
    width: 100%;
    display: block;
}

.product-detail-info {
    flex: 1;
}

.product-detail-info .product-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--scTitle);
    margin-bottom: 15px;
    line-height: 1.4;
}

.product-detail-info .price-section {
    padding: 20px 0;
    border-top: 1px solid var(--scLine);
    border-bottom: 1px solid var(--scLine);
    margin-bottom: 20px;
}

.product-detail-info .original-price {
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
    margin-bottom: 5px;
}

.product-detail-info .current-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.product-detail-info .discount-rate {
    font-size: 28px;
    font-weight: 800;
    color: var(--red);
}

.product-detail-info .sale-price {
    font-size: 28px;
    font-weight: 800;
    color: var(--scBlack);
}

.detail-options {
    margin-bottom: 20px;
}

.detail-option-row {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.detail-option-row .option-label {
    width: 100px;
    font-size: 14px;
    color: #666;
}

.detail-option-row .option-value {
    flex: 1;
    font-size: 14px;
}

.detail-option-row select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--scLine);
    border-radius: 6px;
    font-size: 14px;
}

.buy-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-buy {
    flex: 1;
    height: 52px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-buy.primary {
    background: var(--scPoint);
    color: #fff;
}

.btn-buy.primary:hover {
    background: #2538a8;
}

.btn-buy.secondary {
    background: #fff;
    color: var(--scPoint);
    border: 2px solid var(--scPoint);
}

.btn-buy.secondary:hover {
    background: #f0f2ff;
}

.btn-buy.cart {
    background: var(--scTitle);
    color: #fff;
}

.btn-buy.cart:hover {
    background: #002a75;
}

/* ===== PAGINATION ===== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    padding: 30px 0;
}

.pagination a,
.pagination span {
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--scLine);
    border-radius: 6px;
    font-size: 14px;
    color: #666;
    transition: all 0.2s;
}

.pagination a:hover,
.pagination span.active {
    background: var(--scPoint);
    color: #fff;
    border-color: var(--scPoint);
}

/* ===== LOGIN MODAL ===== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    max-width: 440px;
    width: 100%;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    color: #999;
    cursor: pointer;
}

.modal h2 {
    font-size: 24px;
    color: var(--scTitle);
    margin-bottom: 25px;
    text-align: center;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-size: 13px;
    color: #666;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    height: 44px;
    border: 1px solid var(--scLine);
    border-radius: 8px;
    padding: 0 15px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-group input:focus {
    border-color: var(--scPoint);
    outline: none;
}

.form-group textarea {
    width: 100%;
    border: 1px solid var(--scLine);
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 14px;
    resize: vertical;
    min-height: 100px;
}

.form-group select {
    width: 100%;
    height: 44px;
    border: 1px solid var(--scLine);
    border-radius: 8px;
    padding: 0 15px;
    font-size: 14px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn-primary {
    background: var(--scPoint);
    color: #fff;
}

.btn-primary:hover {
    background: #2538a8;
}

.btn-full {
    width: 100%;
    height: 48px;
    font-size: 16px;
}

.btn-kakao {
    background: #fee500;
    color: #3c1e1e;
}

.btn-naver {
    background: #03c75a;
    color: #fff;
}

.social-login {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.social-login button {
    flex: 1;
    height: 44px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--scLine);
    cursor: pointer;
}

/* ===== CUSTOMER CENTER ===== */
.cs-page {
    padding: 40px 0;
}

.cs-tabs {
    display: flex;
    border-bottom: 2px solid var(--scTitle);
    margin-bottom: 30px;
}

.cs-tab {
    padding: 12px 25px;
    font-size: 15px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
    border-bottom: none;
    margin-bottom: -2px;
}

.cs-tab.active {
    color: var(--scTitle);
    background: #fff;
    border-color: var(--scTitle) var(--scTitle) #fff;
}

.faq-list .faq-item {
    border-bottom: 1px solid var(--scLine);
}

.faq-item .faq-question {
    display: flex;
    align-items: center;
    padding: 15px 0;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
}

.faq-item .faq-question .q-mark {
    color: var(--scPoint);
    font-weight: 800;
    margin-right: 10px;
    font-size: 16px;
}

.faq-item .faq-question .arrow {
    margin-left: auto;
    transition: transform 0.3s;
}

.faq-item.open .faq-question .arrow {
    transform: rotate(180deg);
}

.faq-item .faq-answer {
    display: none;
    padding: 15px 30px;
    background: var(--scBack);
    font-size: 14px;
    color: #555;
    line-height: 1.8;
    border-radius: 8px;
    margin-bottom: 10px;
}

.faq-item.open .faq-answer {
    display: block;
}

/* Notice List */
.notice-list {
    width: 100%;
    border-top: 2px solid var(--scTitle);
}

.notice-list .notice-item {
    display: flex;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--scLine);
    font-size: 14px;
}

.notice-list .notice-num {
    width: 60px;
    text-align: center;
    color: #999;
}

.notice-list .notice-title-text {
    flex: 1;
    color: var(--scBlack);
}

.notice-list .notice-title-text.important {
    font-weight: 700;
}

.notice-list .notice-date {
    width: 100px;
    text-align: center;
    color: #999;
    font-size: 13px;
}

/* ===== MY PAGE ===== */
.mypage {
    padding: 40px 0;
}

.mypage-layout {
    display: flex;
    gap: 30px;
}

.mypage-sidebar {
    width: 220px;
    flex-shrink: 0;
}

.mypage-sidebar .menu-item {
    display: block;
    padding: 12px 15px;
    font-size: 14px;
    color: #555;
    border-bottom: 1px solid var(--scLine);
    transition: all 0.2s;
}

.mypage-sidebar .menu-item:hover,
.mypage-sidebar .menu-item.active {
    color: var(--scPoint);
    font-weight: 600;
    background: #f0f2ff;
}

.mypage-content {
    flex: 1;
}

/* ===== MOBILE BOTTOM NAV ===== */
.mo-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: #fff;
    border-top: 1px solid var(--scLine);
    z-index: 1000;
}

.mo-bottom-nav .nav-items {
    display: flex;
    height: 100%;
}

.mo-bottom-nav .nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-size: 10px;
    color: #888;
}

.mo-bottom-nav .nav-item.active {
    color: var(--scPoint);
}

.mo-bottom-nav .nav-item i {
    font-size: 20px;
}

/* ===== SCROLL TO TOP ===== */
.scroll-top {
    position: fixed;
    right: 20px;
    bottom: 80px;
    width: 45px;
    height: 45px;
    background: var(--scPoint);
    color: #fff;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    z-index: 100;
    box-shadow: 0 3px 10px rgba(49,74,215,0.3);
    transition: all 0.3s;
}

.scroll-top.visible {
    display: flex;
}

.scroll-top:hover {
    background: var(--scTitle);
    transform: translateY(-3px);
}

/* ===== EVENT PAGE ===== */
.event-page {
    padding: 30px 0;
}

.event-banner {
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 30px;
}

.event-product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* ===== COMPANY INFO ===== */
.company-page {
    padding: 40px 0;
}

.company-info-box {
    background: var(--scBack);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
}

.company-form {
    max-width: 700px;
    margin: 0 auto;
}

.company-form .form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.company-form .form-row .form-group {
    flex: 1;
}

/* ===== CART ===== */
.cart-page {
    padding: 40px 0;
}

.cart-table {
    width: 100%;
    border-top: 2px solid var(--scTitle);
    margin-bottom: 30px;
}

.cart-table th {
    background: var(--scBack);
    padding: 12px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    border-bottom: 1px solid var(--scLine);
}

.cart-table td {
    padding: 15px 12px;
    text-align: center;
    border-bottom: 1px solid var(--scLine);
    font-size: 14px;
}

.cart-table .product-info-cell {
    display: flex;
    align-items: center;
    gap: 15px;
    text-align: left;
}

.cart-table .product-info-cell img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

.cart-summary {
    background: var(--scBack);
    border-radius: 12px;
    padding: 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cart-summary .summary-item {
    text-align: center;
}

.cart-summary .summary-item .label {
    font-size: 13px;
    color: #666;
    margin-bottom: 5px;
}

.cart-summary .summary-item .amount {
    font-size: 22px;
    font-weight: 800;
    color: var(--scTitle);
}

.cart-summary .summary-item .amount.total {
    color: var(--red);
}

.quantity-control {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--scLine);
    border-radius: 6px;
}

.quantity-control button {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #666;
    border: none;
    background: none;
    cursor: pointer;
}

.quantity-control input {
    width: 40px;
    height: 32px;
    text-align: center;
    border: none;
    border-left: 1px solid var(--scLine);
    border-right: 1px solid var(--scLine);
    font-size: 14px;
}

/* ===== ORDER/CHECKOUT ===== */
.checkout-page {
    padding: 40px 0;
}

.checkout-section {
    margin-bottom: 30px;
}

.checkout-section h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--scTitle);
    padding-bottom: 10px;
    border-bottom: 2px solid var(--scTitle);
    margin-bottom: 20px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1280px) {
    .container {
        padding: 0 15px;
    }
}

@media (max-width: 991px) {
    .main-header-top {
        display: none;
    }

    .main-header-middle .container {
        gap: 15px;
    }

    .logo-text {
        font-size: 20px;
    }

    .header-icons .header-icon span {
        display: none;
    }

    .category-all-btn {
        display: none;
    }

    .gnb-nav {
        flex-wrap: wrap;
        justify-content: center;
        height: auto;
    }

    .gnb-nav a {
        padding: 0 10px;
        font-size: 12px;
        white-space: nowrap;
        height: 36px;
    }

    .main-header-bottom .container::after {
        display: none;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .category-icons {
        justify-content: center;
        gap: 8px;
    }

    .category-icon-item {
        min-width: 70px;
        padding: 10px 5px;
    }

    .category-icon-item img {
        width: 50px;
        height: 50px;
    }

    .category-icon-item span {
        font-size: 11px;
    }

    .review-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .banner-slide {
        padding-top: 40%; /* taller ratio on mobile */
    }

    .category-page-layout {
        flex-direction: column;
    }

    .category-sidebar {
        width: 100%;
    }

    .product-detail-top {
        flex-direction: column;
    }

    .product-gallery {
        width: 100%;
    }

    .footer-content {
        flex-direction: column;
        gap: 30px;
    }

    .footer-cs {
        width: 100%;
    }

    .mo-bottom-nav {
        display: block;
    }

    body {
        padding-bottom: 60px;
    }

    .modal {
        margin: 20px;
        padding: 25px;
    }

    .event-product-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cart-summary {
        flex-direction: column;
        gap: 15px;
    }

    .mypage-layout {
        flex-direction: column;
    }

    .mypage-sidebar {
        width: 100%;
    }
}

@media (max-width: 576px) {
    html {
        font-size: 13px;
    }

    .container {
        padding: 0 12px;
    }

    /* 모바일 헤더: 2단 구성 */
    .main-header-middle .container {
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px 12px;
    }

    .logo {
        order: 1;
    }

    .logo img {
        height: 28px !important;
    }

    .header-icons {
        order: 2;
        gap: 15px;
        margin-left: auto;
    }

    .header-icon i {
        font-size: 18px;
    }

    .search-bar {
        order: 3;
        max-width: 100%;
        width: 100%;
        flex-basis: 100%;
    }

    .search-bar input {
        height: 38px;
        font-size: 13px;
        padding: 0 40px 0 14px;
    }

    .search-bar button {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .product-card {
        border-radius: 8px;
    }

    .product-card .info {
        padding: 8px;
    }

    .product-card .product-name {
        font-size: 12px;
        min-height: 32px;
        -webkit-line-clamp: 2;
    }

    .product-card .sale-price {
        font-size: 14px;
    }

    .product-card .discount-rate {
        font-size: 14px;
    }

    .product-card .original-price {
        font-size: 11px;
    }

    .product-card .sold-info {
        font-size: 10px;
    }

    .product-card .badges {
        top: 5px;
        left: 5px;
    }

    .badge {
        font-size: 9px;
        padding: 2px 5px;
    }

    .product-card .wishlist-btn {
        width: 26px;
        height: 26px;
        font-size: 12px;
        top: 5px;
        right: 5px;
    }

    /* 카테고리: 가로 스크롤 */
    .category-icons {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        justify-content: flex-start;
        gap: 8px;
        padding-bottom: 5px;
    }

    .category-icons::-webkit-scrollbar {
        display: none;
    }

    .category-icon-item {
        min-width: 65px;
        flex-shrink: 0;
        padding: 8px 4px;
    }

    .category-icon-item div {
        width: 48px !important;
        height: 48px !important;
        font-size: 22px !important;
    }

    .category-icon-item span {
        font-size: 11px;
        word-break: keep-all;
        white-space: nowrap;
    }

    .category-icon-item img {
        width: 38px;
        height: 38px;
    }

    .category-icon-item span {
        font-size: 10px;
        word-break: keep-all;
    }

    .section-title h2 {
        font-size: 18px;
    }

    .buy-buttons {
        flex-direction: column;
    }

    .social-login {
        flex-direction: column;
    }

    .section-title h2 {
        font-size: 16px;
    }

    .section-title .more-link {
        font-size: 12px;
    }

    .review-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .review-card {
        padding: 15px;
    }

    .footer-top {
        padding-bottom: 15px;
    }

    .footer-links {
        gap: 12px;
    }

    .footer-links a {
        font-size: 12px;
    }

    .footer-info h3 {
        font-size: 14px;
    }

    .footer-info p {
        font-size: 12px;
    }

    .footer-cs {
        padding-top: 15px;
    }

    .footer-cs h3 {
        font-size: 14px;
    }

    .cs-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
    }

    .cs-tab {
        white-space: nowrap;
        padding: 10px 15px;
        font-size: 13px;
    }

    .sort-bar {
        flex-direction: column;
        gap: 10px;
    }

    .sort-options {
        flex-wrap: wrap;
    }

    .sort-btn {
        font-size: 12px;
        padding: 5px 10px;
    }

    .pagination a,
    .pagination span {
        min-width: 30px;
        height: 30px;
        font-size: 12px;
    }

    .cart-table th,
    .cart-table td {
        padding: 8px 5px;
        font-size: 12px;
    }

    .cart-table .product-info-cell img {
        width: 50px;
        height: 50px;
    }

    .product-detail-info .product-title {
        font-size: 18px;
    }

    .product-detail-info .discount-rate,
    .product-detail-info .sale-price {
        font-size: 22px;
    }

    .buy-buttons .btn-buy {
        height: 46px;
        font-size: 14px;
    }

    .mypage-sidebar {
        display: flex;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 0;
        border-bottom: 1px solid var(--scLine);
        margin-bottom: 20px;
    }

    .mypage-sidebar .menu-item {
        white-space: nowrap;
        border-bottom: none;
        border-right: 1px solid var(--scLine);
        padding: 10px 14px;
        font-size: 13px;
    }

    .checkout-section h3 {
        font-size: 16px;
    }

    .cart-summary .summary-item .amount {
        font-size: 16px;
    }

    .empty-state i {
        font-size: 36px;
    }

    .empty-state p {
        font-size: 14px;
    }

    /* 히어로 섹션 */
    .main-banner-section + section,
    section[style*="linear-gradient"] {
        padding: 25px 0 !important;
    }

    section[style*="linear-gradient"] h1 {
        font-size: 22px !important;
    }

    section[style*="linear-gradient"] p {
        font-size: 13px !important;
    }

    /* 상품 상세 */
    .product-detail-info .product-title {
        font-size: 16px;
    }

    .detail-option-row {
        flex-direction: column;
        gap: 5px;
    }

    .detail-option-row .option-label {
        width: auto;
        font-size: 12px;
    }

    /* 카트 테이블 모바일 */
    .cart-table {
        font-size: 12px;
    }

    .cart-table .product-info-cell {
        flex-direction: column;
        gap: 5px;
    }

    .quantity-control button {
        width: 28px;
        height: 28px;
    }

    .quantity-control input {
        width: 35px;
        height: 28px;
    }

    /* 결제 페이지 모바일 */
    .checkout-page {
        padding: 20px 0;
    }

    .checkout-section {
        margin-bottom: 20px;
    }

    .checkout-section h3 {
        font-size: 15px;
        padding-bottom: 8px;
        margin-bottom: 15px;
    }

    .form-group label {
        font-size: 12px;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 13px;
        height: 40px;
    }

    .form-group textarea {
        height: auto;
    }

    /* 결제 요약 모바일 */
    .cart-summary {
        padding: 15px;
        gap: 10px;
    }

    .cart-summary .summary-item .label {
        font-size: 11px;
    }

    .cart-summary .summary-item .amount {
        font-size: 14px;
    }

    .cart-summary .summary-item .amount.total {
        font-size: 18px;
    }

    /* 결제 버튼 */
    .checkout-page [type="submit"].btn-primary {
        padding: 12px 30px !important;
        font-size: 15px !important;
    }
}

/* ===== LOADING ===== */
.loading-spinner {
    display: flex;
    justify-content: center;
    padding: 40px;
}

.loading-spinner::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 3px solid var(--scLine);
    border-top-color: var(--scPoint);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== TOAST ===== */
.toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(0,0,0,0.8);
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 3000;
    opacity: 0;
    transition: all 0.3s;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state i {
    font-size: 48px;
    color: #ddd;
    margin-bottom: 15px;
}

.empty-state p {
    font-size: 16px;
}
