@charset "utf-8";

/* Nsmall Theme Custom CSS */

/* 1. Global & Reset */
body {
    background-color: #f5f6fa;
    font-family: 'Noto Sans KR', sans-serif;
    color: #333;
    margin: 0;
    padding: 0;
}

a {
    text-decoration: none;
    color: inherit;
}

h2 {
    font-size: 1.8em;
    font-weight: 700;
    margin-bottom: 20px;
}

/* 2. Layout */
.ns-main {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.ns-section {
    margin-bottom: 50px;
}


/* 3. Header (PC) - ns-header-pc */
.ns-header-pc {
    width: 100%;
    background-color: #fff;
    border-bottom: 1px solid #eee;
    padding: 0 20px;
    box-sizing: border-box;
    position: sticky;
    top: 0;
    z-index: 999;
}

.ns-header-inner {
    max-width: 1280px;
    margin: 0 auto;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ns-logo a {
    font-size: 2em;
    font-weight: 900;
}

.ns-logo-ns {
    color: #111;
}

.ns-logo-mall {
    color: #e60012;
    margin-left: 2px;
}

.ns-search-form {
    position: relative;
    width: 100%;
    max-width: 450px;
    margin: 0 40px;
}

.ns-search-input {
    width: 100%;
    height: 44px;
    border: 2px solid #333;
    border-radius: 30px;
    padding: 0 50px 0 20px;
    font-size: 1.1em;
    box-sizing: border-box;
}

.ns-search-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.4em;
    color: #333;
    cursor: pointer;
}

.ns-header-icons {
    display: flex;
    align-items: center;
    gap: 20px;
}

.ns-header-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 0.9em;
    color: #555;
    font-weight: 700;
}

.ns-header-icon:hover {
    color: #e60012;
}

.ns-header-icon i {
    font-size: 1.5em;
}

/* 4. Main Banner */
.ns-main-banner {
    margin-top: 30px;
    margin-bottom: 30px;
}

.ns-main-banner img {
    width: 100%;
    height: auto;
    border-radius: 10px;
}

/* 5. Category Navigation */
.ns-category-nav {
    margin-bottom: 50px;
}

.ns-category-nav ul {
    display: flex;
    justify-content: space-around;
    list-style: none;
    padding: 20px 0;
    margin: 0;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.ns-category-nav li a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}

.ns-cat-icon {
    font-size: 2em;
    color: #0052cc;
}

.ns-category-nav li a:hover .ns-cat-icon {
    color: #e60012;
}


/* 6. Product Grid */
.ns-product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.ns-product-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.ns-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.ns-product-image img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.ns-product-info {
    padding: 15px;
}

.ns-product-title {
    font-weight: 700;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ns-product-price {
    font-weight: 900;
    font-size: 1.2em;
    color: #e60012;
}


/* 7. Responsive Styles */
@media (max-width: 1024px) {
    .ns-product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .ns-search-form {
        margin: 0 20px;
    }
}

@media (max-width: 768px) {
    h2 {
        font-size: 1.5em;
    }
    .ns-product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .ns-header-inner {
        height: auto;
        flex-direction: column;
        padding: 15px 0;
        gap: 15px;
    }
    .ns-category-nav ul {
        flex-wrap: wrap;
        gap: 20px;
    }
}

@media (max-width: 480px) {
    body {
        /* On mobile, remove side padding to use full width */
        padding: 0;
    }
     .ns-main {
        padding: 0 10px;
    }
    .ns-product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .ns-category-nav ul {
        justify-content: center;
        gap: 15px;
    }
    .ns-category-nav li {
        flex-basis: 25%; /* 4 items per row */
    }
    .ns-cat-icon {
        font-size: 1.5em;
    }
    .ns-category-nav li a span:last-child {
        font-size: 0.9em;
    }
}
