/**
 * Shop-Bedding Theme - Common Styles
 * Reference: xn--hq1b59i39cj4n.com (꾸민)
 * Primary: #5671c0, Secondary: #7d8eb6
 *
 * @package shop-bedding
 */

/* ==========================================
   CSS Custom Properties
   ========================================== */
:root {
    --sb-primary: #5671c0;
    --sb-primary-dark: #4560a8;
    --sb-primary-light: #7d8eb6;
    --sb-primary-bg: #f0f3fa;
    --sb-accent: #e8513f;
    --sb-text: #333333;
    --sb-text-light: #777777;
    --sb-text-muted: #999999;
    --sb-border: #e5e5e5;
    --sb-border-light: #f0f0f0;
    --sb-bg: #ffffff;
    --sb-bg-gray: #f8f9fa;
    --sb-bg-dark: #2c3e50;
    --sb-success: #4caf50;
    --sb-warning: #ff9800;
    --sb-danger: #e8513f;
    --sb-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --sb-shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.12);
    --sb-radius: 0.5rem;
    --sb-radius-lg: 0.75rem;
    --sb-transition: 0.2s ease;
    --sb-container-max: 1280px;
    --sb-header-height: 60px;
    --sb-nav-height: 48px;
}

/* ==========================================
   Reset & Base
   ========================================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--sb-text);
    background-color: var(--sb-bg);
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--sb-transition);
}

a:hover {
    color: var(--sb-primary);
}

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

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

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

ul, ol {
    list-style: none;
}

/* ==========================================
   Layout
   ========================================== */
.sb-container {
    width: 100%;
    max-width: var(--sb-container-max);
    margin: 0 auto;
    padding: 0 1rem;
}

.sb-main {
    min-height: 60vh;
    padding-top: calc(var(--sb-header-height) + var(--sb-nav-height) + 40px);
}

/* ==========================================
   Header - Top Bar
   ========================================== */
.sb-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--sb-bg);
}

.sb-topbar {
    background: var(--sb-primary);
    color: #ffffff;
    font-size: 0.8125rem;
    height: 32px;
    display: flex;
    align-items: center;
}

.sb-topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.sb-topbar-text {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.sb-topbar-text i {
    font-size: 0.75rem;
}

.sb-topbar-links {
    display: flex;
    gap: 1rem;
}

.sb-topbar-links a {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.sb-topbar-links a:hover {
    color: #ffffff;
}

/* ==========================================
   Header - Main
   ========================================== */
.sb-header-main {
    background: var(--sb-bg);
    border-bottom: 1px solid var(--sb-border-light);
    height: var(--sb-header-height);
    display: flex;
    align-items: center;
}

.sb-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
}

.sb-logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.sb-logo-img {
    max-height: 40px;
    width: auto;
}

.sb-logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--sb-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

/* Search Bar */
.sb-search {
    flex: 1;
    max-width: 480px;
    margin: 0 2rem;
}

.sb-search-form {
    display: flex;
    border: 2px solid var(--sb-primary);
    border-radius: 2rem;
    overflow: hidden;
}

.sb-search-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    background: transparent;
}

.sb-search-btn {
    background: var(--sb-primary);
    color: #ffffff;
    border: none;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    transition: background var(--sb-transition);
}

.sb-search-btn:hover {
    background: var(--sb-primary-dark);
}

/* Header Actions */
.sb-header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sb-header-action {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    color: var(--sb-text);
    font-size: 1.125rem;
    transition: background var(--sb-transition);
}

.sb-header-action:hover {
    background: var(--sb-bg-gray);
}

/* Cart Badge */
.sb-header-cart {
    position: relative;
}
.sb-cart-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--sb-accent);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    line-height: 1;
    min-width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    padding: 0 4px;
}

.sb-search-toggle {
    display: none;
}

/* Hamburger */
.sb-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0.5rem;
}

.sb-hamburger-line {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--sb-text);
    border-radius: 1px;
    transition: all var(--sb-transition);
}

.sb-hamburger.active .sb-hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.sb-hamburger.active .sb-hamburger-line:nth-child(2) {
    opacity: 0;
}

.sb-hamburger.active .sb-hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ==========================================
   Header - Category Navigation
   ========================================== */
.sb-nav {
    background: var(--sb-bg);
    border-bottom: 2px solid var(--sb-primary);
    height: var(--sb-nav-height);
    scrollbar-width: none;
}

.sb-nav::-webkit-scrollbar {
    display: none;
}

.sb-nav-list {
    display: flex;
    align-items: center;
    height: 100%;
    gap: 0;
    white-space: nowrap;
}

.sb-nav-item {
    flex-shrink: 0;
}

.sb-nav-link {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0 1rem;
    height: var(--sb-nav-height);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--sb-text);
    transition: all var(--sb-transition);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.sb-nav-link:hover,
.sb-nav-item.active .sb-nav-link {
    color: var(--sb-primary);
    border-bottom-color: var(--sb-primary);
}

.sb-nav-link i {
    font-size: 0.8125rem;
}

/* Nav Dropdown (크기별) */
.sb-nav-dropdown {
    position: relative;
}

.sb-nav-arrow {
    font-size: 0.625rem;
    transition: transform 0.2s ease;
}

.sb-nav-sub {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 180px;
    background: var(--sb-bg);
    border: 1px solid var(--sb-border-light);
    border-radius: 0 0 var(--sb-radius) var(--sb-radius);
    box-shadow: var(--sb-shadow);
    z-index: 100;
    padding: 0.375rem 0;
}

.sb-nav-dropdown:hover .sb-nav-sub {
    display: block;
}

.sb-nav-dropdown:hover .sb-nav-arrow {
    transform: rotate(180deg);
}

.sb-nav-sub li a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    color: var(--sb-text);
    transition: all var(--sb-transition);
}

.sb-nav-sub li a:hover,
.sb-nav-sub li.active a {
    background: var(--sb-primary-bg);
    color: var(--sb-primary);
}

.sb-nav-sub-desc {
    color: var(--sb-text-muted);
    font-size: 0.75rem;
}

.sb-nav-sub li.active a .sb-nav-sub-desc,
.sb-nav-sub li a:hover .sb-nav-sub-desc {
    color: var(--sb-primary);
    opacity: 0.7;
}

/* Mobile menu - size section */
.sb-mobile-menu-divider {
    height: 1px;
    background: var(--sb-border-light);
    margin: 0.5rem 1rem;
}

.sb-mobile-menu-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--sb-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ==========================================
   Mobile Sidebar Menu
   ========================================== */
.sb-mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    opacity: 0;
    transition: opacity var(--sb-transition);
}

.sb-mobile-overlay.active {
    display: block;
    opacity: 1;
}

.sb-mobile-menu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background: var(--sb-bg);
    z-index: 2001;
    overflow-y: auto;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.sb-mobile-menu.active {
    right: 0;
}

.sb-mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--sb-border);
    background: var(--sb-primary);
    color: #ffffff;
}

.sb-mobile-menu-title {
    font-size: 1rem;
    font-weight: 600;
}

.sb-mobile-menu-close {
    color: #ffffff;
    font-size: 1.25rem;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sb-mobile-menu-search {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--sb-border-light);
}

.sb-mobile-menu-search form {
    display: flex;
    border: 1px solid var(--sb-border);
    border-radius: var(--sb-radius);
    overflow: hidden;
}

.sb-mobile-search-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

.sb-mobile-search-btn {
    background: var(--sb-primary);
    color: #ffffff;
    border: none;
    padding: 0.5rem 0.75rem;
}

.sb-mobile-menu-nav {
    flex: 1;
    padding: 0.5rem 0;
}

.sb-mobile-menu-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    font-size: 0.9375rem;
    color: var(--sb-text);
    transition: background var(--sb-transition);
}

.sb-mobile-menu-link:hover,
.sb-mobile-menu-link.active {
    background: var(--sb-primary-bg);
    color: var(--sb-primary);
}

.sb-mobile-menu-link i {
    width: 1.25rem;
    text-align: center;
    font-size: 0.875rem;
}

.sb-mobile-menu-footer {
    padding: 1rem;
    border-top: 1px solid var(--sb-border-light);
}

.sb-mobile-menu-tel {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--sb-primary);
    color: #ffffff;
    border-radius: var(--sb-radius);
    font-weight: 500;
}

/* ==========================================
   Buttons
   ========================================== */
.sb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--sb-radius);
    transition: all var(--sb-transition);
    cursor: pointer;
    border: none;
}

.sb-btn-primary {
    background: var(--sb-primary);
    color: #ffffff;
}

.sb-btn-primary:hover {
    background: var(--sb-primary-dark);
    color: #ffffff;
}

.sb-btn-outline {
    background: transparent;
    color: var(--sb-primary);
    border: 1px solid var(--sb-primary);
}

.sb-btn-outline:hover {
    background: var(--sb-primary);
    color: #ffffff;
}

.sb-btn-lg {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
}

.sb-btn-inquiry {
    width: 100%;
}

/* ==========================================
   Badges
   ========================================== */
.sb-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.125rem 0.5rem;
    font-size: 0.6875rem;
    font-weight: 700;
    border-radius: 0.25rem;
    letter-spacing: 0.025em;
    line-height: 1.4;
}

.sb-badge-best {
    background: var(--sb-accent);
    color: #ffffff;
}

.sb-badge-new {
    background: var(--sb-primary);
    color: #ffffff;
}

.sb-badge-sale {
    background: var(--sb-success);
    color: #ffffff;
}

.sb-badge-discount {
    background: var(--sb-accent);
    color: #ffffff;
    font-size: 0.75rem;
}

/* ==========================================
   Product Card
   ========================================== */
.sb-product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

.sb-product-card {
    background: var(--sb-bg);
    border-radius: var(--sb-radius-lg);
    overflow: hidden;
    transition: box-shadow var(--sb-transition), transform var(--sb-transition);
    border: 1px solid var(--sb-border-light);
}

.sb-product-card:hover {
    box-shadow: var(--sb-shadow-lg);
    transform: translateY(-2px);
}

.sb-product-card-link {
    display: block;
    color: inherit;
}

.sb-product-card-link:hover {
    color: inherit;
}

.sb-product-card-image {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--sb-bg-gray);
}

.sb-product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.sb-card-img-hover {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
}

.sb-product-card:hover .sb-card-img-hover {
    opacity: 1;
}

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

.sb-product-card-noimg {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--sb-text-muted);
    font-size: 2.5rem;
    background: var(--sb-bg-gray);
}

/* Wishlist Heart Button on Card */
.sb-wishlist-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 2;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.85);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--sb-text-muted, #bbb);
    transition: color 0.2s, background 0.2s, transform 0.15s;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.sb-wishlist-btn:hover {
    color: #e74c3c;
    background: #fff;
    transform: scale(1.1);
}

.sb-wishlist-btn.sb-wished {
    color: #e74c3c;
}

.sb-wishlist-btn.sb-wished:hover {
    color: #c0392b;
}

.sb-product-card-badges {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.sb-product-card-info {
    padding: 0.75rem;
}

.sb-product-card-category {
    display: inline-block;
    font-size: 0.6875rem;
    color: var(--sb-primary);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.sb-product-card-name {
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.4;
    color: var(--sb-text);
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.5em;
}

.sb-product-card-prices {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.375rem;
    margin-bottom: 0.375rem;
}

.sb-product-card-retail {
    font-size: 0.75rem;
    color: var(--sb-text-muted);
    text-decoration: line-through;
}

.sb-product-card-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--sb-text);
}

.sb-product-card-shipping {
    display: block;
    font-size: 0.6875rem;
    color: var(--sb-text-muted);
    margin-top: 0.25rem;
}

.sb-product-card-shipping i {
    font-size: 0.625rem;
    margin-right: 0.125rem;
}

.sb-product-card-shipping-free {
    color: var(--sb-primary);
    font-weight: 500;
}

/* Color Swatches */
.sb-product-card-swatches {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.375rem;
    flex-wrap: wrap;
}

.sb-swatch {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
}

.sb-swatch-more {
    font-size: 0.625rem;
    color: var(--sb-text-muted, #bbb);
    padding-left: 0.125rem;
}

/* ==========================================
   Section
   ========================================== */
.sb-section {
    padding: 2rem 0;
}

.sb-section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.sb-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--sb-text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sb-section-title i {
    color: var(--sb-primary);
}

.sb-section-desc {
    font-size: 0.875rem;
    color: var(--sb-text-light);
    margin-top: 0.25rem;
}

.sb-section-toolbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sb-total-count {
    font-size: 0.875rem;
    color: var(--sb-text-light);
}

.sb-total-count strong {
    color: var(--sb-primary);
    font-weight: 600;
}

.sb-sort-select {
    padding: 0.5rem 2.25rem 0.5rem 0.875rem;
    border: 1.5px solid var(--sb-border);
    border-radius: var(--sb-radius);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--sb-text);
    background-color: var(--sb-bg);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%235671c0' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.625rem center;
    background-size: 0.875rem;
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    transition: border-color var(--sb-transition), box-shadow var(--sb-transition), background-color var(--sb-transition);
}

.sb-sort-select:hover {
    border-color: var(--sb-primary-light);
    background-color: var(--sb-bg-gray);
}

.sb-sort-select:focus {
    border-color: var(--sb-primary);
    box-shadow: 0 0 0 3px rgba(86, 113, 192, 0.12);
    background-color: var(--sb-bg);
}

/* ==========================================
   Load More
   ========================================== */
.sb-load-more {
    text-align: center;
    margin-top: 2rem;
}

/* ==========================================
   Breadcrumb
   ========================================== */
.sb-breadcrumb {
    background: var(--sb-bg-gray);
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--sb-border-light);
}

.sb-breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--sb-text-muted);
}

.sb-breadcrumb-list li:not(:last-child)::after {
    content: '/';
    margin-left: 0.5rem;
    color: var(--sb-border);
}

.sb-breadcrumb-list a {
    color: var(--sb-text-light);
}

.sb-breadcrumb-list a:hover {
    color: var(--sb-primary);
}

.sb-breadcrumb-active {
    color: var(--sb-text);
    font-weight: 500;
}

/* ==========================================
   Footer
   ========================================== */
.sb-footer {
    background: var(--sb-bg-dark);
    color: rgba(255, 255, 255, 0.8);
    padding: 2.5rem 0 1.5rem;
    margin-top: 3rem;
}

.sb-footer-top {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sb-footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.75rem;
}

.sb-footer-logo i {
    color: var(--sb-primary-light);
}

.sb-footer-desc {
    font-size: 0.8125rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.6);
}

.sb-footer-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.sb-footer-col-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.75rem;
}

.sb-footer-col-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sb-footer-col-list li {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sb-footer-col-list li i {
    width: 1rem;
    text-align: center;
    font-size: 0.75rem;
    color: var(--sb-primary-light);
}

.sb-footer-bottom {
    padding-top: 1.5rem;
    text-align: center;
}

.sb-footer-copyright {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
}

/* ==========================================
   Responsive: Tablet Landscape (1024px~1279px)
   ========================================== */
@media (min-width: 1024px) and (max-width: 1279px) {
    .sb-product-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .sb-search {
        max-width: 360px;
        margin: 0 1rem;
    }
}

/* ==========================================
   Responsive: Tablet Portrait (768px~1023px)
   ========================================== */
@media (min-width: 768px) and (max-width: 1023px) {
    html {
        font-size: 15px;
    }

    .sb-product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }

    .sb-search {
        max-width: 280px;
        margin: 0 1rem;
    }

    .sb-footer-top {
        grid-template-columns: 1fr;
    }

    .sb-footer-columns {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ==========================================
   Responsive: Mobile (360px~767px)
   ========================================== */
@media (max-width: 767px) {
    html {
        font-size: 14px;
    }

    .sb-topbar {
        display: none;
    }

    .sb-main {
        padding-top: calc(var(--sb-header-height) + var(--sb-nav-height));
    }

    .sb-search {
        display: none;
    }

    .sb-search-toggle {
        display: flex;
    }

    .sb-hamburger {
        display: flex;
    }

    .sb-header-actions {
        gap: 0.25rem;
    }

    .sb-nav {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .sb-nav-link {
        padding: 0 0.75rem;
        font-size: 0.8125rem;
    }

    .sb-nav-dropdown .sb-nav-sub {
        display: none !important;
    }

    .sb-product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .sb-product-card-info {
        padding: 0.5rem;
    }

    .sb-product-card-name {
        font-size: 0.8125rem;
    }

    .sb-product-card-price {
        font-size: 0.875rem;
    }

    .sb-section {
        padding: 1.5rem 0;
    }

    .sb-section-title {
        font-size: 1.125rem;
    }

    .sb-footer-top {
        grid-template-columns: 1fr;
    }

    .sb-footer-columns {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .sb-footer {
        padding: 2rem 0 1rem;
    }
}

/* ==========================================
   Responsive: Fold/Flip (~359px)
   ========================================== */
@media (max-width: 359px) {
    html {
        font-size: 13px;
    }

    .sb-product-card-name {
        font-size: 0.75rem;
        -webkit-line-clamp: 1;
    }
}

/* ==========================================
   Search Autocomplete Dropdown
   ========================================== */
.sb-search-wrap {
    position: relative;
}

.sb-search-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--sb-bg);
    border: 1px solid var(--sb-border);
    border-radius: var(--sb-radius);
    box-shadow: var(--sb-shadow-lg);
    z-index: 1000;
    max-height: 25rem;
    overflow-y: auto;
    margin-top: 0.25rem;
}

.sb-ac-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.875rem;
    text-decoration: none;
    color: var(--sb-text);
    transition: background var(--sb-transition);
}

.sb-ac-item:hover {
    background: var(--sb-bg-gray);
}

.sb-ac-item:not(:last-child) {
    border-bottom: 1px solid var(--sb-border-light);
}

.sb-ac-item-img {
    width: 3rem;
    height: 3rem;
    flex-shrink: 0;
    border-radius: 0.375rem;
    overflow: hidden;
    background: var(--sb-bg-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--sb-text-muted);
    font-size: 0.875rem;
}

.sb-ac-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sb-ac-item-info {
    display: flex;
    flex-direction: column;
    gap: 0.1875rem;
    min-width: 0;
}

.sb-ac-item-name {
    font-size: 0.8125rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--sb-text);
}

.sb-ac-item-price {
    font-size: 0.8125rem;
    color: var(--sb-primary);
    font-weight: 600;
}

.sb-ac-free {
    display: inline-block;
    font-size: 0.6875rem;
    background: #e8f5e9;
    color: #2e7d32;
    padding: 0.0625rem 0.375rem;
    border-radius: 0.25rem;
    font-weight: 500;
    margin-left: 0.25rem;
    vertical-align: middle;
}

/* Search Panel: Popular & Recent Keywords */
.sb-search-section {
    padding: 0.75rem;
}

.sb-search-section + .sb-search-section {
    border-top: 1px solid var(--sb-border-light);
}

.sb-search-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.sb-search-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--sb-text-light);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.sb-recent-clear-btn {
    border: none;
    background: none;
    font-size: 0.6875rem;
    color: var(--sb-text-muted);
    cursor: pointer;
    padding: 0;
}

.sb-recent-clear-btn:hover {
    color: var(--sb-accent);
}

.sb-kw-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.sb-kw-item {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.625rem;
    font-size: 0.8125rem;
    border-radius: 1rem;
    cursor: pointer;
    transition: background var(--sb-transition), color var(--sb-transition);
    white-space: nowrap;
}

.sb-kw-recent {
    background: var(--sb-bg-gray);
    color: var(--sb-text);
}

.sb-kw-recent:hover {
    background: var(--sb-primary);
    color: #ffffff;
}

.sb-recent-delete {
    border: none;
    background: none;
    font-size: 0.875rem;
    color: var(--sb-text-muted);
    cursor: pointer;
    padding: 0;
    margin-left: 0.125rem;
    line-height: 1;
}

.sb-recent-delete:hover {
    color: var(--sb-accent);
}

.sb-kw-popular {
    background: transparent;
    color: var(--sb-text);
    padding: 0.25rem 0.5rem;
}

.sb-kw-popular:hover {
    color: var(--sb-primary);
}

.sb-kw-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    font-size: 0.6875rem;
    font-weight: 700;
    border-radius: 0.25rem;
    background: var(--sb-bg-gray);
    color: var(--sb-text-light);
    flex-shrink: 0;
}

.sb-kw-top .sb-kw-rank {
    background: var(--sb-primary);
    color: #ffffff;
}

/* Mobile sidebar search dropdown position */
.sb-mobile-menu-search.sb-search-wrap .sb-search-dropdown {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    margin-top: 0.5rem;
    border-radius: var(--sb-radius);
    max-height: 20rem;
}

/* ==========================================
   Responsive: FHD (1920px~2559px)
   ========================================== */
@media (min-width: 1920px) and (max-width: 2559px) {
    html {
        font-size: 17px;
    }

    :root {
        --sb-container-max: 1440px;
    }
}

/* ==========================================
   Responsive: QHD (2560px~3839px)
   ========================================== */
@media (min-width: 2560px) and (max-width: 3839px) {
    html {
        font-size: 19px;
    }

    :root {
        --sb-container-max: 1600px;
    }
}

/* ==========================================
   Responsive: UHD (3840px+)
   ========================================== */
@media (min-width: 3840px) {
    html {
        font-size: 22px;
    }

    :root {
        --sb-container-max: 1920px;
    }
}
