/* ======================
   Shop Reset & Base
   ====================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Malgun Gothic", sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ======================
   Shop Header
   ====================== */
.shop-header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.shop-header .container {
    position: relative;
}

.header-content,
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    position: relative;
    gap: 2rem;
}

.shop-logo {
    flex-shrink: 0;
}

/* 헤더 검색창 */
.header-search {
    flex: 1;
    max-width: 500px;
}

.header-search form {
    display: flex;
    align-items: center;
    background: #f3f4f6;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: all 0.3s;
}

.header-search form:focus-within {
    background: white;
    border-color: #2563eb;
}

.header-search input[type="text"] {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    background: transparent;
    font-size: 0.95rem;
    outline: none;
}

.header-search input[type="text"]::placeholder {
    color: #9ca3af;
}

.header-search button {
    padding: 0.75rem 1.25rem;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.25rem;
    transition: transform 0.2s;
}

.header-search button:hover {
    transform: scale(1.1);
}

/* 모바일에서 nav 숨기고 버튼만 보이게 */
@media (max-width: 768px) {
    .header-content,
    .header-inner {
        justify-content: space-between;
    }
}

.shop-logo a {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2563eb;
    text-decoration: none;
}

.shop-nav {
    display: flex;
    align-items: center;
}

.shop-nav ul,
.shop-nav .nav-list {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
    margin: 0;
    padding: 0;
}

.shop-nav a {
    color: #4b5563;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.shop-nav a:hover {
    color: #2563eb;
}

.cart-badge {
    background: #ef4444;
    color: white;
    border-radius: 50%;
    padding: 0.15rem 0.5rem;
    font-size: 0.75rem;
    font-weight: bold;
}

.user-name {
    color: #2563eb;
    font-weight: 600;
}

/* ======================
   Mobile Menu Toggle
   ====================== */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 3px;
    background-color: #333;
    border-radius: 3px;
    transition: all 0.3s ease;
    transform-origin: center;
}

/* 햄버거 → X 애니메이션 */
.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* ======================
   Responsive Header & Mobile Menu
   ====================== */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex !important;
    }
    
    .header-search {
        display: none;
    }
    
    .shop-nav {
        position: static;
    }
    
    .shop-nav ul,
    .shop-nav .nav-list {
        display: none;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        gap: 0;
        padding: 0;
        margin: 0;
        box-shadow: 0 4px 20px rgba(0,0,0,0.15);
        border-top: 1px solid #e5e7eb;
        z-index: 9999;
        max-height: calc(100vh - 60px);
        overflow-y: auto;
    }
    
    .shop-nav ul.active,
    .shop-nav .nav-list.active {
        display: flex !important;
        animation: slideDown 0.3s ease-out;
    }
    
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    .shop-nav ul li,
    .shop-nav .nav-list li {
        width: 100%;
        margin: 0;
    }
    
    .shop-nav ul a,
    .shop-nav .nav-list a {
        display: block;
        padding: 1rem 1.5rem;
        border-bottom: 1px solid #f3f4f6;
        color: #333;
        font-size: 1rem;
    }
    
    .shop-nav ul li:last-child a,
    .shop-nav .nav-list li:last-child a {
        border-bottom: none;
    }
    
    .shop-nav ul a:hover,
    .shop-nav ul a:active,
    .shop-nav .nav-list a:hover,
    .shop-nav .nav-list a:active {
        background-color: #f0f9ff;
        color: #2563eb;
    }
    
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

/* 태블릿 (769px ~ 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .shop-nav ul {
        gap: 1.5rem;
    }
    
    .shop-nav a {
        font-size: 0.9rem;
    }
}

/* 데스크톱에서 모바일 메뉴 버튼 숨김 */
@media (min-width: 769px) {
    .mobile-menu-toggle {
        display: none !important;
    }
    
    .shop-nav ul {
        display: flex !important;
    }
}

@media (max-width: 480px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
}

/* ======================
   Main Banner
   ====================== */
.main-banner {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.banner-content h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    margin-bottom: 1rem;
}

.banner-content p {
    font-size: clamp(1rem, 2vw, 1.25rem);
    margin-bottom: 2rem;
    opacity: 0.95;
}

.btn-banner {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: white;
    color: #2563eb;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
    transition: all 0.3s;
}

.btn-banner:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

/* ======================
   Categories Section
   ====================== */
.categories-section,
.products-section {
    padding: 4rem 0;
}

.section-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: 2rem;
    color: #1f2937;
    text-align: center;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
}

.category-card {
    background: white;
    padding: 2rem 1rem;
    border-radius: 12px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.15);
}

.category-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.category-card h3 {
    font-size: 1.1rem;
    color: #374151;
}

/* ======================
   Products Grid
   ====================== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.product-image {
    position: relative;
    width: 100%;
    padding-top: 100%;
    background: #f3f4f6;
    overflow: hidden;
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
}

.discount-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ef4444;
    color: white;
    padding: 0.5rem;
    border-radius: 6px;
    font-weight: bold;
    font-size: 0.9rem;
}

.product-info {
    padding: 1.5rem;
}

.product-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
    min-height: 2.8em;
}

.product-desc {
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.product-price {
    margin-bottom: 1rem;
}

.original-price {
    text-decoration: line-through;
    color: #9ca3af;
    font-size: 0.9rem;
    margin-right: 0.5rem;
}

.sale-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2563eb;
}

.product-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-detail {
    flex: 1;
    padding: 0.75rem;
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: white;
    text-decoration: none;
    text-align: center;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-detail:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.btn-cart {
    width: 50px;
    padding: 0.75rem;
    background: white;
    border: 2px solid #2563eb;
    color: #2563eb;
    border-radius: 6px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-cart:hover {
    background: #2563eb;
    color: white;
}

/* ======================
   상품 카드 별점 스타일
   ====================== */
.product-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    font-size: 15px;
}
.product-rating .stars {
    color: #ffa500;
    letter-spacing: 0px;
    font-size: 16px;
}
.product-rating .stars .empty {
    color: #ddd;
}
.product-rating .rating-count {
    color: #888;
    font-size: 13px;
}

/* ======================
   Notice Section
   ====================== */
.notice-section {
    padding: 2rem 0 4rem;
}

.notice-box {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.notice-box h3 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: #1f2937;
}

.notice-box .notice-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}
.notice-box .notice-header h3 {
    margin: 0;
}
.notice-more {
    color: #6b7280;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}
.notice-more:hover {
    color: #2563eb;
}

.notice-list {
    list-style: none;
}

.notice-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.notice-list li:last-child {
    border-bottom: none;
}

.notice-list li a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #374151;
    text-decoration: none;
    transition: color 0.3s;
}

.notice-list a:hover {
    color: #2563eb;
}

.notice-date {
    color: #9ca3af;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.notice-badge {
    display: inline-block;
    padding: 0.15rem 0.4rem;
    background: #ef4444;
    color: white;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 600;
    flex-shrink: 0;
}

.notice-list .no-notice {
    color: #9ca3af;
    text-align: center;
    padding: 1rem 0;
}

/* ======================
   Empty Message
   ====================== */
.empty-message {
    text-align: center;
    padding: 4rem 0;
}

.empty-message p {
    font-size: 1.1rem;
    color: #6b7280;
    margin-bottom: 2rem;
}

.btn-primary {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.3);
}

/* ======================
   Footer
   ====================== */
.shop-footer {
    background: #1f2937;
    color: #d1d5db;
    padding: 2rem 0 1.5rem;
    margin-top: 4rem;
}

.footer-content {
    display: block;
    margin-bottom: 2rem;
}

.footer-info {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #374151;
}

.footer-info h3 {
    color: white;
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
}

.footer-info p {
    color: #9ca3af;
    line-height: 1.6;
}

.footer-links {
    display: block;
}

.footer-col {
    margin-bottom: 1.5rem;
}

.footer-col:last-child {
    margin-bottom: 0;
}

.footer-col h4 {
    color: white;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.footer-col p {
    color: #9ca3af;
    margin-bottom: 0.4rem;
    line-height: 1.6;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 0.5rem;
}

.footer-col a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-col a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 1.5rem;
    text-align: center;
}

.footer-bottom p {
    color: #9ca3af;
    font-size: 0.9rem;
}

/* 데스크톱에서만 가로 배치 */
@media (min-width: 769px) {
    .footer-content {
        display: grid;
        grid-template-columns: 1fr 2fr;
        gap: 3rem;
    }
    
    .footer-info {
        border-bottom: none;
        padding-bottom: 0;
        margin-bottom: 0;
    }
    
    .footer-links {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .footer-col {
        margin-bottom: 0;
    }
}

/* ======================
   Auth Pages (Login/Register)
   ====================== */
.auth-container {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 0;
}

.auth-box {
    background: white;
    padding: 3rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    max-width: 450px;
    width: 100%;
}

.auth-title {
    text-align: center;
    font-size: 1.75rem;
    margin-bottom: 2rem;
    color: #1f2937;
}

.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid #10b981;
}

.auth-form .form-group {
    margin-bottom: 1.5rem;
}

.auth-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #374151;
}

.auth-form input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
}

.auth-form input:focus {
    outline: none;
    border-color: #2563eb;
}

.auth-form small {
    display: block;
    margin-top: 0.25rem;
    color: #6b7280;
    font-size: 0.85rem;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.checkbox-label, .form-checkbox label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.forgot-link {
    color: #2563eb;
    text-decoration: none;
}

.forgot-link:hover {
    text-decoration: underline;
}

.btn-auth {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-auth:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.auth-footer a {
    color: #2563eb;
    font-weight: 600;
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.test-account {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #fef3c7;
    border-radius: 8px;
    text-align: center;
    font-size: 0.9rem;
}

.test-account strong {
    display: block;
    margin-bottom: 0.5rem;
    color: #92400e;
}

/* ======================
   Products List Page
   ====================== */
.page-header {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 1.75rem;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.breadcrumb {
    padding: 0.5rem 0;
    font-size: 0.85rem;
    color: #6b7280;
    background: transparent;
}

.breadcrumb a {
    color: #6b7280;
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb a:hover {
    color: #2563eb;
}

.products-page {
    padding: 0.5rem 0 2rem;
}

.products-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
}

.products-sidebar {
    position: sticky;
    top: 80px;
    align-self: start;
    min-width: 250px;
}

.sidebar-section {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.sidebar-section h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
}

.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list > li {
    margin: 0;
}

.category-list li a {
    display: block;
    padding: 0.6rem 0.75rem;
    color: #4b5563;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.category-list li a:hover {
    background: #f3f4f6;
    color: #2563eb;
}

.category-list li a.active {
    background: #eff6ff;
    color: #2563eb;
    font-weight: 700;
}

.category-list li.level-1 a {
    padding-left: 1.5rem;
    font-size: 0.85rem;
}

.category-list li.level-2 a {
    padding-left: 2.25rem;
    font-size: 0.85rem;
}

.category-list li.level-3 a {
    padding-left: 3rem;
    font-size: 0.85rem;
}

.category-list li.level-4 a {
    padding-left: 3.75rem;
    font-size: 0.85rem;
}

.category-list li.parent-active > a {
    font-weight: 600;
    color: #1f2937;
}

.search-form {
    display: flex;
    gap: 0.5rem;
}

.search-form input {
    flex: 1;
    padding: 0.5rem;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
}

.search-form button {
    padding: 0.5rem 1rem;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.products-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
}

.products-sort select {
    padding: 0.5rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
}

.soldout-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
}

/* ======================
   하위 카테고리 섹션
   ====================== */
.subcategories-section {
    background: white;
    padding: 1rem 0;
    margin-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.subcategories-section h3 {
    display: none;
}

.subcategories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
}

.subcategory-card {
    background: #f9fafb;
    padding: 0.75rem 0.5rem;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    color: #1f2937;
    transition: all 0.2s;
    border: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.subcategory-card:hover {
    border-color: #2563eb;
    background: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
}

.subcat-icon {
    font-size: 1.5rem;
    display: block;
}

.subcat-name {
    font-weight: 500;
    font-size: 0.85rem;
    color: #1f2937;
}

/* ======================
   Product Detail Page
   ====================== */
.product-detail-page {
    padding: 1rem 0 3rem;
}

.product-detail-page > .breadcrumb {
    margin-bottom: 1rem;
    padding: 0;
    background: transparent;
}

.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.product-images {
    position: relative;
}

.product-images .main-image {
    width: 100%;
    height: 500px;
    object-fit: contain;
    background: #f9fafb;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.product-placeholder-large {
    width: 100%;
    height: 500px;
    background: #f3f4f6;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.product-placeholder-large span {
    font-size: 5rem;
}

.product-placeholder-large p {
    color: #6b7280;
    font-size: 1rem;
}

.product-details .breadcrumb {
    margin-bottom: 1rem;
}

.product-title {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
    color: #1f2937;
    line-height: 1.3;
}

.product-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.category-badge {
    padding: 0.35rem 0.75rem;
    background: #dbeafe;
    color: #1e40af;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
}

.view-count {
    color: #6b7280;
    font-size: 0.9rem;
}

.product-price-box {
    background: #f9fafb;
    border-radius: 12px;
}

.discount-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.discount-badge-large {
    background: #ef4444;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 1.25rem;
    font-weight: bold;
}

.original-price-large {
    text-decoration: line-through;
    color: #9ca3af;
    font-size: 1.25rem;
}

.sale-price-large {
    font-size: 2rem;
    font-weight: bold;
    color: #2563eb;
}

.product-info-table table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
}

.product-info-table th, .product-info-table td {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
}

.product-info-table th {
    width: 120px;
    font-weight: 600;
    color: #374151;
}

.stock-available {
    color: #10b981;
    font-weight: 600;
}

.stock-soldout {
    color: #ef4444;
    font-weight: 600;
}

.product-order-form {
    border-top: 2px solid #e5e7eb;
    padding-top: 2rem;
}

.quantity-selector {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.quantity-controls {
    display: flex;
    gap: 0.5rem;
}

.quantity-controls button {
    width: 40px;
    height: 40px;
    border: 2px solid #e5e7eb;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.25rem;
}

.quantity-controls input {
    width: 60px;
    text-align: center;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
}

.total-price {
    display: flex;
    justify-content: space-between;
    padding: 1.5rem;
    background: #f0f9ff;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    font-weight: bold;
}

.total-amount {
    color: #2563eb;
}

.order-buttons {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 1rem;
}

.btn-cart-add {
    padding: 1rem;
    border: 2px solid #2563eb;
    background: white;
    color: #2563eb;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-cart-add:hover {
    background: #2563eb;
    color: white;
}

.btn-buy-now {
    padding: 1rem;
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-buy-now:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

.btn-soldout {
    padding: 1rem;
    background: #9ca3af;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    grid-column: 1 / -1;
}

.product-description {
    padding: 3rem;
    background: white;
    border-radius: 12px;
    margin-bottom: 3rem;
}

.description-content {
    line-height: 2;
    color: #374151;
}

.related-products {
    padding: 2rem 0;
}

/* ======================
   Product Detail - 별점 스타일
   ====================== */
.stars, .stars-large {
    color: #ffa500;
    letter-spacing: 1px;
}
.stars-large {
    font-size: 24px;
}
.stars .empty-star, .stars-large .empty-star {
    color: #ddd;
}
.stars .half-star {
    background: linear-gradient(90deg, #ffa500 50%, #ddd 50%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.review-summary-inline {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 12px 0;
    font-size: 14px;
}
.review-summary-inline .stars-inline {
    color: #ffa500;
    font-size: 14px;
    letter-spacing: -1px;
}
.review-summary-inline .review-count {
    color: #0073e9;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 2px;
}
.review-summary-inline .review-count:hover {
    text-decoration: underline;
}
.review-summary-inline .review-count strong {
    font-weight: bold;
}
.review-summary-inline .separator {
    color: #ddd;
    margin: 0 8px;
}
.purchase-info {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #666;
    font-size: 13px;
}
.purchase-info .icon {
    font-size: 14px;
}
.purchase-info strong {
    color: #f57c00;
    font-weight: bold;
}

/* ======================
   Product Detail - 탭 네비게이션
   ====================== */
.product-tabs {
    position: sticky;
    top: 60px;
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
    z-index: 100;
    margin-top: 40px;
}
.product-tabs .tabs-inner {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
}
.product-tabs .tab-btn {
    flex: 1;
    padding: 18px 20px;
    background: none;
    border: none;
    font-size: 15px;
    color: #666;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
}
.product-tabs .tab-btn:hover {
    color: #333;
    background: #f9f9f9;
}
.product-tabs .tab-btn.active {
    color: #333;
    font-weight: bold;
}
.product-tabs .tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #333;
}
.product-tabs .tab-btn .tab-count {
    color: #0073e9;
    font-weight: normal;
    margin-left: 4px;
}

.tab-content {
    display: none;
    padding: 40px 0;
    min-height: 400px;
}
.tab-content.active {
    display: block;
}

/* ======================
   Product Detail - 리뷰 섹션
   ====================== */
.review-section {
    display: flex;
    gap: 40px;
}
.review-stats {
    width: 280px;
    flex-shrink: 0;
}
.review-stats-box {
    background: #fafafa;
    border-radius: 8px;
    padding: 24px;
    text-align: center;
}
.review-stats-box .big-rating {
    font-size: 48px;
    font-weight: bold;
    color: #333;
    line-height: 1;
}
.review-stats-box .total-reviews {
    color: #888;
    font-size: 14px;
    margin-top: 8px;
}
.satisfaction-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5e5e5;
}
.satisfaction-box .sat-icon {
    font-size: 20px;
}
.satisfaction-box .sat-text {
    font-size: 14px;
    color: #333;
}
.satisfaction-box .sat-text strong {
    color: #0073e9;
}

.rating-distribution {
    margin-top: 20px;
}
.rating-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 13px;
}
.rating-bar .label {
    width: 30px;
    color: #666;
}
.rating-bar .bar-bg {
    flex: 1;
    height: 8px;
    background: #e5e5e5;
    border-radius: 4px;
    overflow: hidden;
}
.rating-bar .bar-fill {
    height: 100%;
    background: #ffa500;
    border-radius: 4px;
    transition: width 0.3s;
}
.rating-bar .percent {
    width: 35px;
    text-align: right;
    color: #888;
}

.review-list {
    flex: 1;
}
.review-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e5e5;
}
.review-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}
.review-search-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
}
.review-search-form {
    display: flex;
    gap: 8px;
}
.review-search-bar input[type="text"] {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 200px;
}
.review-search-bar .btn-search {
    padding: 8px 16px;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
.review-search-bar .btn-search:hover {
    background: #000;
}
.rating-filter {
    display: flex;
    gap: 4px;
}
.rating-filter-btn {
    padding: 6px 12px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}
.rating-filter-btn:hover {
    border-color: #0073e9;
    color: #0073e9;
}
.rating-filter-btn.active {
    background: #0073e9;
    border-color: #0073e9;
    color: #fff;
}
.filter-result-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #f5f5f5;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 14px;
}
.filter-result-info .btn-filter-reset {
    color: #666;
    text-decoration: none;
    font-size: 13px;
}
.filter-result-info .btn-filter-reset:hover {
    color: #0073e9;
    text-decoration: underline;
}
.already-reviewed-msg {
    color: #0073e9;
    font-size: 14px;
}
.review-sort {
    display: flex;
    gap: 16px;
}
.review-sort a {
    color: #888;
    text-decoration: none;
    font-size: 14px;
}
.review-sort a.active {
    color: #333;
    font-weight: bold;
}

.review-item {
    padding: 24px 0;
    border-bottom: 1px solid #f0f0f0;
}
.review-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.reviewer-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e5e5e5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}
.reviewer-info {
    flex: 1;
}
.reviewer-name {
    font-weight: 500;
    color: #333;
}
.reviewer-name .verified {
    display: inline-block;
    background: #e8f4fd;
    color: #0073e9;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 6px;
    font-weight: normal;
}
.review-date {
    font-size: 13px;
    color: #999;
}
.review-rating {
    margin-bottom: 12px;
}
.review-content {
    line-height: 1.7;
    color: #333;
}
.review-images {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    flex-wrap: wrap;
}
.review-images img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
}
.review-helpful {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 16px;
}
.btn-helpful {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 20px;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    color: #666;
    transition: all 0.2s;
}
.btn-helpful:hover {
    border-color: #0073e9;
    color: #0073e9;
}
.btn-helpful.active {
    background: #e8f4fd;
    border-color: #0073e9;
    color: #0073e9;
}
.btn-edit-review {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 20px;
    background: #fff;
    font-size: 13px;
    color: #666;
    text-decoration: none;
    transition: all 0.2s;
}
.btn-edit-review:hover {
    border-color: #333;
    color: #333;
}

.no-reviews {
    text-align: center;
    padding: 60px 20px;
    color: #888;
}
.no-reviews .icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.btn-write-review {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 24px;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}
.btn-write-review:hover {
    background: #000;
}

/* ======================
   Product Detail - 상품 문의 섹션
   ====================== */
.question-list {
    border-top: 2px solid #333;
}
.question-item {
    border-bottom: 1px solid #e5e5e5;
}
.question-header {
    display: flex;
    align-items: center;
    padding: 16px 0;
    cursor: pointer;
}
.question-header:hover {
    background: #fafafa;
}
.question-type {
    width: 80px;
    text-align: center;
    font-size: 13px;
    color: #666;
}
.question-title-area {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}
.question-title {
    color: #333;
}
.question-title .secret-icon {
    color: #999;
}
.question-status {
    width: 80px;
    text-align: center;
}
.question-status .answered {
    color: #0073e9;
    font-size: 13px;
}
.question-status .waiting {
    color: #999;
    font-size: 13px;
}
.question-meta {
    width: 150px;
    text-align: right;
    font-size: 13px;
    color: #999;
}
.question-body {
    display: none;
    padding: 20px;
    background: #fafafa;
}
.question-body.show {
    display: block;
}
.question-content {
    padding: 16px;
    background: #fff;
    border-radius: 4px;
    margin-bottom: 16px;
}
.question-content-title {
    font-weight: bold;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}
.question-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #eee;
}
.btn-edit-question,
.btn-delete-question {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    font-size: 13px;
    color: #666;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-edit-question:hover {
    border-color: #333;
    color: #333;
}
.btn-delete-question:hover {
    border-color: #e53935;
    color: #e53935;
}
.question-answer {
    padding: 16px;
    background: #e8f4fd;
    border-radius: 4px;
}
.question-answer-label {
    font-weight: bold;
    color: #0073e9;
    margin-bottom: 8px;
}

.btn-write-question {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 24px;
    background: #fff;
    color: #333;
    border: 1px solid #333;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin-bottom: 20px;
}
.btn-write-question:hover {
    background: #333;
    color: #fff;
}

/* ======================
   Product Detail - 배송/교환/반품 안내
   ====================== */
.info-section {
    margin-bottom: 40px;
}
.info-section h3 {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #333;
}
.info-table {
    width: 100%;
    border-collapse: collapse;
}
.info-table th,
.info-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #e5e5e5;
    text-align: left;
    font-size: 14px;
}
.info-table th {
    background: #fafafa;
    width: 150px;
    color: #666;
    font-weight: normal;
}
.info-table td {
    color: #333;
    line-height: 1.6;
}

/* ======================
   Product Detail - 이미지 확대 보기 모달
   ====================== */
.image-viewer-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
}
.image-viewer-modal.show {
    display: block;
}
.image-viewer-close {
    position: fixed;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: #fff;
    font-size: 36px;
    cursor: pointer;
    padding: 8px;
    line-height: 1;
    z-index: 10002;
}
.image-viewer-close:hover {
    color: #ccc;
}
.image-viewer-main {
    position: fixed;
    top: 60px;
    left: 80px;
    right: 80px;
    bottom: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.image-viewer-main img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
}
.image-viewer-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: #333;
    z-index: 10001;
}
.image-viewer-nav:hover {
    background: #fff;
    transform: translateY(-50%) scale(1.1);
}
.image-viewer-nav.prev {
    left: 20px;
}
.image-viewer-nav.next {
    right: 20px;
}
.image-viewer-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}
.image-viewer-nav:disabled:hover {
    transform: translateY(-50%);
}
.image-viewer-bottom {
    position: fixed;
    bottom: 20px;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    z-index: 10001;
}
.image-viewer-counter {
    color: #fff;
    font-size: 14px;
}
.image-viewer-thumbnails {
    display: flex;
    gap: 8px;
    justify-content: center;
}
.image-viewer-thumbnails img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.5;
    transition: all 0.2s;
    border: 2px solid transparent;
}
.image-viewer-thumbnails img:hover {
    opacity: 0.8;
}
.image-viewer-thumbnails img.active {
    opacity: 1;
    border-color: #fff;
}

/* ======================
   Cart Page
   ====================== */
.cart-page {
    padding: 3rem 0;
}

.page-title {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #1f2937;
}

.cart-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
}

.cart-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 8px 8px 0 0;
    border-bottom: 2px solid #e5e7eb;
}

.btn-delete-selected {
    margin-left: auto;
    padding: 0.5rem 1rem;
    border: none;
    background: #ef4444;
    color: white;
    border-radius: 6px;
    cursor: pointer;
}

.cart-item {
    display: grid;
    grid-template-columns: auto 100px 3fr 150px 150px auto;
    gap: 1.5rem;
    align-items: center;
    padding: 1.5rem;
    background: white;
    border-bottom: 1px solid #e5e7eb;
}

.cart-item.unavailable {
    opacity: 0.5;
}

.item-image {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-placeholder {
    width: 100%;
    height: 100%;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.item-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.item-name a {
    color: #1f2937;
    font-weight: 600;
    text-decoration: none;
}

.item-name a:hover {
    color: #2563eb;
}

.item-status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #ef4444;
    color: white;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.item-quantity {
    display: flex;
    gap: 0.5rem;
}

.item-quantity button {
    width: 35px;
    height: 35px;
    border: 2px solid #e5e7eb;
    background: white;
    border-radius: 6px;
    cursor: pointer;
}

.item-quantity input {
    width: 50px;
    text-align: center;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
}

.item-total {
    font-size: 1.25rem;
    font-weight: bold;
    color: #2563eb;
    text-align: right;
}

.btn-remove {
    width: 35px;
    height: 35px;
    border: none;
    background: #fee2e2;
    color: #ef4444;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.25rem;
}

.cart-summary {
    position: sticky;
    top: 100px;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.cart-summary h3 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    padding: 1.5rem 0;
    font-size: 1.25rem;
    font-weight: bold;
}

.btn-checkout {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.05rem;
    cursor: pointer;
    margin-bottom: 1rem;
}

.btn-continue {
    display: block;
    width: 100%;
    padding: 1rem;
    text-align: center;
    border: 2px solid #e5e7eb;
    color: #6b7280;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
}

.empty-cart {
    text-align: center;
    padding: 5rem 0;
}

.empty-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
}

.empty-cart p {
    font-size: 1.25rem;
    color: #6b7280;
    margin-bottom: 2rem;
}

/* ======================
   MyPage
   ====================== */
.mypage {
    padding: 3rem 0;
}

.mypage-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 3rem;
}

.user-info-box {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 1.5rem;
}

.user-avatar {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.user-info-box h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.user-email {
    color: #6b7280;
    font-size: 0.9rem;
}

.mypage-nav ul {
    list-style: none;
}

.mypage-nav a {
    display: block;
    padding: 1rem 1.5rem;
    background: white;
    color: #4b5563;
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    transition: all 0.3s;
}

.mypage-nav a:hover, .mypage-nav a.active {
    background: #f0f9ff;
    color: #2563eb;
}

.mypage-section {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
}

.btn-edit {
    margin-top: 1rem;
    padding: 0.75rem 2rem;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.orders-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.order-item {
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.5rem;
}

.order-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.order-number {
    font-weight: 600;
    color: #2563eb;
}

.order-date {
    color: #6b7280;
}

.order-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-badge {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
}

.status-pending { background: #fef3c7; color: #92400e; }
.status-paid { background: #dbeafe; color: #1e40af; }
.status-shipping { background: #d1fae5; color: #065f46; }
.status-completed { background: #e0e7ff; color: #3730a3; }
.status-cancelled { background: #fee2e2; color: #991b1b; }

.order-amount {
    font-size: 1.25rem;
    font-weight: bold;
    color: #2563eb;
}

.point-box {
    text-align: center;
    padding: 3rem;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 12px;
    margin-bottom: 2rem;
}

.point-amount {
    margin-bottom: 1rem;
}

.point-value {
    font-size: 3rem;
    font-weight: bold;
    color: #92400e;
}

.point-unit {
    font-size: 1.5rem;
    color: #92400e;
}

.point-desc {
    color: #78350f;
}

.point-notice {
    background: #f9fafb;
    padding: 1.5rem;
    border-radius: 8px;
}

.point-notice h4 {
    margin-bottom: 1rem;
    color: #1f2937;
}

.point-notice ul {
    list-style: none;
}

.point-notice li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.point-notice li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #2563eb;
}

/* ======================
   Enhanced Auth Pages
   ====================== */
.auth-page {
    min-height: 80vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    position: relative;
    overflow: hidden;
}

.auth-page::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.auth-page::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
}

.auth-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 500px;
}

.register-box {
    max-width: 600px;
}

.auth-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.auth-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.auth-subtitle {
    color: #6b7280;
    font-size: 1rem;
}

.alert-icon {
    font-size: 1.5rem;
}

.label-icon {
    font-size: 1.1rem;
}

.form-hint {
    display: block;
    margin-top: 0.5rem;
    color: #9ca3af;
    font-size: 0.85rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    display: inline-block;
    position: relative;
    transition: all 0.3s;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: bold;
}

.form-checkbox-group {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn-arrow {
    font-size: 1.25rem;
    transition: transform 0.3s;
}

.btn-auth:hover .btn-arrow {
    transform: translateX(5px);
}

.auth-divider {
    text-align: center;
    margin: 2rem 0;
    position: relative;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e5e7eb;
}

.auth-divider span {
    position: relative;
    background: white;
    padding: 0 1rem;
    color: #9ca3af;
    font-size: 0.9rem;
}

.btn-link {
    display: inline-block;
    color: #667eea;
    font-weight: 700;
    text-decoration: none;
    padding: 0.75rem 2rem;
    border: 2px solid #667eea;
    border-radius: 12px;
    transition: all 0.3s;
}

.btn-link:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.btn-link-secondary {
    display: inline-block;
    color: #6b7280;
    text-decoration: none;
    padding: 0.75rem 2rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    transition: all 0.3s;
    margin-top: 1rem;
}

.btn-link-secondary:hover {
    border-color: #667eea;
    color: #667eea;
}

.test-account-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.test-icon {
    font-size: 1.5rem;
}

.test-account-header strong {
    color: #92400e;
    font-size: 1.1rem;
}

.test-account-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.test-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
}

.test-label {
    font-weight: 600;
    color: #78350f;
    font-size: 0.9rem;
}

.test-value {
    font-family: 'Courier New', monospace;
    color: #92400e;
    font-weight: 600;
}

.btn-quick-login {
    width: 100%;
    padding: 0.75rem;
    background: white;
    border: 2px solid #f59e0b;
    color: #92400e;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-quick-login:hover {
    background: #f59e0b;
    color: white;
    transform: translateY(-2px);
}

/* Success Screen */
.success-screen {
    text-align: center;
    padding: 2rem 0;
}

.success-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    box-shadow: 0 10px 40px rgba(16, 185, 129, 0.3);
    animation: popIn 0.5s ease-out;
}

@keyframes popIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.success-title {
    font-size: 2rem;
    color: #1f2937;
    margin-bottom: 1rem;
    font-weight: 800;
}

.success-message {
    color: #6b7280;
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 2rem;
}

.success-benefits {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.benefit-item {
    padding: 1.5rem 1rem;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.benefit-icon {
    font-size: 2rem;
}

.benefit-text {
    font-weight: 600;
    color: #0c4a6e;
    font-size: 0.9rem;
}

/* ======================
   Checkout Page
   ====================== */
.checkout-page {
    background: #f8f9fa;
    padding: 3rem 0;
    min-height: 80vh;
}

.checkout-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
}

.checkout-section {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
}

.checkout-section .section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1.5rem;
    text-align: left;
}

.checkout-section .title-icon {
    font-size: 1.5rem;
}

.checkout-section .item-count {
    font-size: 1rem;
    font-weight: 400;
    color: #6b7280;
}

.section-header-with-button {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-header-with-button .section-title {
    margin-bottom: 0;
}

.btn-change-address {
    padding: 0.625rem 1.25rem;
    background: white;
    border: 2px solid #2563eb;
    color: #2563eb;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-change-address:hover {
    background: #2563eb;
    color: white;
}

.selected-address-display {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
}

.address-badge-group {
    margin-bottom: 1rem;
}

.address-badge {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
}

.address-badge-default {
    background: #dbeafe;
    color: #1e40af;
}

.address-badge-recent {
    background: #fef3c7;
    color: #92400e;
}

.address-info-row {
    display: flex;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.address-info-row:last-child {
    border-bottom: none;
}

.address-label {
    width: 80px;
    font-weight: 600;
    color: #6b7280;
    flex-shrink: 0;
}

.address-value {
    flex: 1;
    color: #1f2937;
    word-break: keep-all;
}

.address-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.address-modal.active {
    display: flex;
}

.address-modal-content {
    background: white;
    border-radius: 20px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.address-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e5e7eb;
}

.address-modal-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

.btn-close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6b7280;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
}

.btn-close-modal:hover {
    color: #1f2937;
}

.address-modal-body {
    padding: 2rem;
}

.address-quick-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.btn-quick-address {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.25rem;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
    color: #374151;
}

.btn-quick-address:hover {
    background: #f3f4f6;
    border-color: #2563eb;
    color: #2563eb;
}

.quick-icon {
    font-size: 1.5rem;
}

.new-address-form {
    background: #f9fafb;
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.new-address-form h4 {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    font-weight: 700;
}

.modal-form-group {
    margin-bottom: 1rem;
}

.modal-form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #374151;
}

.modal-form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
}

.modal-form-group input:focus {
    outline: none;
    border-color: #2563eb;
}

.modal-postcode-group {
    display: flex;
    gap: 0.5rem;
}

.modal-postcode-group input {
    flex: 1;
}

.btn-modal-postcode {
    padding: 0.75rem 1rem;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.btn-modal-postcode:hover {
    background: #1d4ed8;
}

.modal-form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.modal-form-actions button {
    flex: 1;
    padding: 0.875rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    border: none;
}

.btn-cancel {
    background: #f3f4f6;
    color: #374151;
}

.btn-cancel:hover {
    background: #e5e7eb;
}

.btn-apply {
    background: #2563eb;
    color: white;
}

.btn-apply:hover {
    background: #1d4ed8;
}

.shipping-memo-select {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    font-size: 1rem;
    cursor: pointer;
}

.shipping-memo-select:focus {
    outline: none;
    border-color: #2563eb;
}

.order-items-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.order-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 8px;
}

.order-item .item-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
}

.order-item .item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.checkout-sidebar {
    position: sticky;
    top: 100px;
    align-self: start;
}

.payment-section {
    background: white;
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 1.5rem;
}

.payment-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.point-info {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem;
    background: #f0f9ff;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.point-input-group {
    display: flex;
    gap: 0.5rem;
}

.point-input-group input {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
}

.btn-all-point {
    padding: 0.75rem 1rem;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
}

.payment-detail {
    margin-bottom: 1rem;
}

.payment-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.discount-row {
    color: #ef4444;
}

.free-shipping {
    color: #10b981;
    font-weight: 600;
}

.payment-total {
    display: flex;
    justify-content: space-between;
    padding: 1.5rem;
    background: #f0f9ff;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.payment-total strong {
    color: #0c4a6e;
    font-size: 1.5rem;
}

.earn-point-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: #fef3c7;
    border-radius: 8px;
    font-size: 0.9rem;
}

.earn-icon {
    font-size: 1.25rem;
}

.payment-method-info {
    padding: 1rem;
    background: #f9fafb;
    border-radius: 8px;
    color: #6b7280;
    font-size: 0.9rem;
}

.btn-order {
    width: 100%;
    padding: 1.25rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    transition: all 0.3s;
}

.btn-order:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
}

.terms-check {
    margin-top: 1rem;
}

/* Order Complete Page */
.order-complete-page {
    background: #f8f9fa;
    padding: 3rem 0;
    min-height: 80vh;
}

.complete-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 3rem;
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.complete-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    box-shadow: 0 10px 40px rgba(16, 185, 129, 0.3);
    animation: popIn 0.5s ease-out;
}

.complete-title {
    font-size: 2rem;
    color: #1f2937;
    margin-bottom: 1rem;
}

.complete-subtitle {
    color: #6b7280;
    font-size: 1.1rem;
}

.complete-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
}

.complete-section {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
}

.amount-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2563eb;
}

.ordered-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ordered-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 8px;
}

.complete-sidebar {
    position: sticky;
    top: 100px;
    align-self: start;
}

.info-box {
    background: white;
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 1.5rem;
    text-align: center;
}

.box-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.info-box h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: #1f2937;
}

.info-box ul {
    text-align: left;
    list-style: none;
    padding-left: 0;
}

.info-box li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.info-box li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #667eea;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn-action {
    padding: 1rem;
    text-align: center;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
}

.btn-tertiary {
    background: #f3f4f6;
    color: #6b7280;
}

.btn-tertiary:hover {
    background: #e5e7eb;
}

.complete-notice {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-top: 2rem;
}

.complete-notice h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: #1f2937;
}

.complete-notice ul {
    list-style: none;
}

.complete-notice li {
    padding: 0.75rem 0;
    padding-left: 2rem;
    position: relative;
    line-height: 1.6;
}

.complete-notice li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: bold;
}

/* ============================================
   저장된 배송지 목록 스타일 (checkout.php)
   ============================================ */
.saved-addresses-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e0e0e0;
}

.saved-addresses-title {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
}

.saved-addresses-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.saved-address-item {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
}

.saved-address-item:hover {
    border-color: #4285f4;
    background: #f8f9ff;
    box-shadow: 0 2px 8px rgba(66, 133, 244, 0.1);
}

.saved-address-header {
    margin-bottom: 0.5rem;
}

.saved-address-badges {
    display: flex;
    gap: 0.5rem;
}

.saved-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 4px;
    background: #f0f0f0;
    color: #666;
}

.saved-badge-default {
    background: #e8f0fe;
    color: #1967d2;
}

.saved-address-info {
    flex: 1;
}

.saved-address-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
}

.saved-address-phone {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.saved-address-text {
    font-size: 0.875rem;
    color: #666;
    line-height: 1.5;
}

.saved-address-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.btn-select-address {
    flex: 1;
    padding: 0.625rem 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.btn-delete-address {
    padding: 0.625rem 1rem;
    background: linear-gradient(135deg, #868e96 0%, #495057 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-delete-address:hover {
    background: linear-gradient(135deg, #f03e3e 0%, #c92a2a 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(240, 62, 62, 0.3);
}

.saved-address-item:hover .btn-select-address {
    background: linear-gradient(135deg, #5a67d8 0%, #6b3fa0 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.modal-form-group input[type="text"]#modal-address-name {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
}

.modal-form-group input[type="text"]#modal-address-name:focus {
    background: white;
    border-color: #667eea;
}

/* ========================================
   배송 요청사항 스타일 (쿠팡 스타일)
   ======================================== */
.selected-shipping-memo-display {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    font-size: 0.95rem;
    color: #333;
}

.shipping-memo-modal-content {
    max-width: 560px;
    width: 90%;
}

.shipping-memo-notice {
    background: #fffde7;
    border: 1px solid #fff59d;
    border-radius: 4px;
    padding: 1rem;
    font-size: 0.85rem;
    color: #5d4037;
    line-height: 1.5;
    margin-bottom: 1.5rem;
    text-align: center;
}

.shipping-memo-options {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 1.5rem;
}

.shipping-memo-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 0;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.2s;
}

.shipping-memo-option:hover {
    background: #f8f9fa;
    margin: 0 -1.5rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.shipping-memo-option:last-of-type {
    border-bottom: none;
}

.shipping-memo-option input[type="radio"] {
    display: none;
}

.shipping-memo-option .radio-custom {
    width: 22px;
    height: 22px;
    border: 2px solid #ccc;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}

.shipping-memo-option input[type="radio"]:checked + .radio-custom {
    border-color: #346aff;
    background: #346aff;
}

.shipping-memo-option input[type="radio"]:checked + .radio-custom::after {
    content: '';
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

.shipping-memo-option .option-text {
    font-size: 0.95rem;
    color: #333;
}

.entrance-code-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.entrance-code-section h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 0.75rem 0;
}

.entrance-code-input-wrap {
    margin-bottom: 0.75rem;
}

.entrance-code-input-wrap input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.95rem;
    box-sizing: border-box;
}

.entrance-code-input-wrap input:focus {
    outline: none;
    border-color: #346aff;
}

.entrance-code-input-wrap input:disabled {
    background: #f0f0f0;
    color: #999;
}

.no-code-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    margin-bottom: 0.75rem;
}

.no-code-option input[type="checkbox"] {
    display: none;
}

.no-code-option .checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #346aff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}

.no-code-option input[type="checkbox"]:checked + .checkbox-custom {
    background: #346aff;
}

.no-code-option input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '';
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

.no-code-option span:last-child {
    font-size: 0.9rem;
    color: #333;
}

.entrance-code-notice {
    font-size: 0.8rem;
    color: #888;
    line-height: 1.4;
    margin: 0;
}

.other-memo-section {
    padding: 0.75rem 0 0.5rem 2rem;
    margin-left: 0.75rem;
    border-left: 2px solid #e0e0e0;
}

.other-memo-section textarea {
    width: 100%;
    height: 70px;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.95rem;
    resize: none;
    box-sizing: border-box;
    font-family: inherit;
}

.other-memo-section textarea:focus {
    outline: none;
    border-color: #346aff;
}

.btn-save-shipping-memo {
    width: 100%;
    padding: 1rem;
    background: #346aff;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-save-shipping-memo:hover {
    background: #2554cc;
}

/* ======================
   Responsive for Shop Pages
   ====================== */
@media (max-width: 1024px) {
    .products-layout {
        grid-template-columns: 200px 1fr;
        gap: 2rem;
    }
    
    .product-detail {
        grid-template-columns: 1fr;
    }
    
    .product-images .main-image,
    .product-placeholder-large {
        height: 400px;
    }
    
    .cart-layout {
        grid-template-columns: 1fr;
    }
    
    .cart-summary {
        position: static;
    }
    
    .checkout-layout,
    .complete-layout {
        grid-template-columns: 1fr;
    }
    
    .checkout-sidebar,
    .complete-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    /* ★★★ 오버플로우 강제 방지 ★★★ */
    *, *::before, *::after {
        box-sizing: border-box !important;
    }
    
    html {
        overflow-x: hidden !important;
    }
    
    body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }
    
    .container {
        max-width: 100% !important;
        overflow-x: hidden !important;
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
    
    .products-layout {
        grid-template-columns: 1fr;
    }
    
    .products-sidebar {
        position: static;
        min-width: auto;
        width: 100%;
        margin-bottom: 2rem;
    }
    
    .product-images .main-image,
    .product-placeholder-large {
        height: 300px;
    }
    
    /* ★ 상품 상세 페이지 오버플로우 수정 ★ */
    .product-detail-page {
        padding: 0.5rem 0 2rem !important;
        overflow-x: hidden !important;
        max-width: 100% !important;
    }
    
    .product-detail {
        gap: 1rem !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }
    
    .product-images {
        max-width: 100% !important;
        overflow: hidden !important;
    }
    
    .product-details {
        padding: 0 16px !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }
    
    /* 이미지 갤러리 */
    .product-gallery {
        max-width: 100% !important;
        overflow: hidden !important;
    }
    
    .gallery-thumbnails {
        max-width: 100% !important;
        overflow: hidden !important;
        padding: 8px 12px !important;
    }
    
    .thumb-slider {
        max-width: 100% !important;
        overflow: hidden !important;
    }
    
    .thumb-track {
        max-width: 100% !important;
    }
    
    .thumb-item {
        width: 50px !important;
        height: 50px !important;
    }
    
    .thumb-nav {
        width: 24px !important;
        height: 24px !important;
    }
    
    /* 주문 폼 */
    .product-order-form {
        padding-top: 1rem !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .quantity-selector {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        margin-bottom: 1rem !important;
        max-width: 100% !important;
    }
    
    .quantity-controls {
        display: flex !important;
        gap: 4px !important;
    }
    
    .quantity-controls button {
        width: 32px !important;
        height: 32px !important;
        font-size: 1rem !important;
        flex-shrink: 0 !important;
    }
    
    .quantity-controls input {
        width: 40px !important;
        height: 32px !important;
        flex-shrink: 0 !important;
    }
    
    .total-price {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 1rem !important;
        margin-bottom: 1rem !important;
        font-size: 1rem !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .total-amount {
        font-size: 16px !important;
    }
    
    /* 수량별 가격 모바일 */
    .quantity-pricing-container {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .quantity-pricing-item {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .quantity-pricing-badge {
        margin-left: 28px !important;
        margin-top: 8px !important;
    }
    
    /* 탭 네비게이션 모바일 */
    .product-tabs {
        max-width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    .tabs-inner {
        display: flex !important;
        min-width: max-content !important;
        padding: 0 12px !important;
    }
    
    .tab-btn {
        flex-shrink: 0 !important;
        white-space: nowrap !important;
    }
    
    .cart-item {
        grid-template-columns: auto 1fr auto;
        grid-template-rows: auto auto;
    }
    
    .item-image {
        grid-row: 1 / 3;
    }
    
    .item-info {
        grid-column: 2;
    }
    
    .item-quantity {
        grid-column: 2;
    }
    
    .item-total {
        grid-column: 3;
        grid-row: 1;
    }
    
    .btn-remove {
        grid-column: 3;
        grid-row: 2;
    }
    
    .mypage-layout {
        grid-template-columns: 1fr;
    }
    
    .subcategories-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
    }
    
    .subcategory-card {
        padding: 1rem 0.5rem;
    }
    
    .subcat-icon {
        font-size: 1.5rem;
    }
    
    .subcat-name {
        font-size: 0.8rem;
    }
    
    .order-item {
        flex-wrap: wrap;
    }
    
    .order-item .item-image {
        width: 60px;
        height: 60px;
    }
    
    .address-quick-buttons {
        grid-template-columns: 1fr;
    }
    
    /* Product Detail - 모바일 */
    .product-tabs .tab-btn {
        padding: 14px 10px;
        font-size: 13px;
    }
    .review-section {
        flex-direction: column;
    }
    .review-stats {
        width: 100%;
    }
    .review-list-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
    .review-search-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .review-search-form {
        width: 100%;
    }
    .review-search-bar input[type="text"] {
        flex: 1;
        width: auto;
    }
    .rating-filter {
        flex-wrap: wrap;
    }
    .rating-filter-btn {
        padding: 6px 10px;
        font-size: 12px;
    }
    .filter-result-info {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    .question-type,
    .question-status,
    .question-meta {
        display: none;
    }
    
    /* 이미지 뷰어 모바일 */
    .image-viewer-main {
        left: 50px;
        right: 50px;
        bottom: 80px;
    }
    .image-viewer-nav {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    .image-viewer-nav.prev {
        left: 5px;
    }
    .image-viewer-nav.next {
        right: 5px;
    }
    .image-viewer-thumbnails {
        display: none;
    }
    
    /* Auth 모바일 */
    .auth-box {
        padding: 2rem 1.5rem;
    }
    
    .register-box {
        padding: 2rem 1.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .success-benefits {
        grid-template-columns: 1fr;
    }
    
    .test-account-info {
        font-size: 0.9rem;
    }
    
    /* 배송지 버튼 */
    .saved-address-actions {
        flex-direction: column;
    }
    
    .btn-select-address,
    .btn-delete-address {
        width: 100%;
    }
    
    /* 배송 요청사항 모바일 */
    .shipping-memo-modal-content {
        max-width: 100%;
        margin: 0;
        border-radius: 16px 16px 0 0;
        max-height: 90vh;
    }
    
    .shipping-memo-option:hover {
        margin: 0;
        padding-left: 0;
        padding-right: 0;
    }
}

@media (max-width: 480px) {
    .subcategories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .breadcrumb {
        font-size: 0.8rem;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .auth-title {
        font-size: 1.5rem;
    }
    
    .auth-logo {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .product-title {
        font-size: 1rem;
    }
    
    .sale-price-large {
        font-size: 1.25rem;
    }
    
    .tab-btn {
        padding: 10px 6px;
        font-size: 12px;
    }
}
/* ======================
   수량별 가격 (묶음 할인) 스타일
   ====================== */

/* 상품명 옆 수량 표시 (목록) */
.product-name .bundle-qty {
    color: #0073e9;
    font-weight: 600;
}

/* 상품명 옆 수량 표시 (상세) */
.bundle-qty-title {
    color: #0073e9;
    font-weight: 600;
}

/* 개당 가격 표시 (목록) */
.unit-price-info {
    display: block;
    font-size: 12px;
    color: #888;
    margin-top: 2px;
}

/* 개당 가격 표시 (상세) */
.unit-price-display {
    font-size: 14px;
    color: #888;
    margin-top: 4px;
}

/* 상품 카드 가격 영역 높이 조정 */
.product-card .product-price {
    min-height: 45px;
}

/* ======================
   쿠팡 스타일 이미지 갤러리
   ====================== */

.product-gallery {
    position: relative;
}

/* 메인 이미지 영역 */
.gallery-main {
    position: relative;
    width: 100%;
    margin-bottom: 15px;
}

.image-zoom-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 12px;
    background: #f8f9fa;
    cursor: crosshair;
}

.image-zoom-container .main-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: opacity 0.2s;
}

/* 줌 렌즈 (마우스 따라다니는 사각형) */
.zoom-lens {
    position: absolute;
    width: 150px;
    height: 150px;
    border: 2px solid #0073e9;
    background: rgba(0, 115, 233, 0.1);
    cursor: crosshair;
    display: none;
    pointer-events: none;
    z-index: 10;
}

/* 확대된 이미지 결과 */
.zoom-result {
    position: absolute;
    top: 0;
    left: calc(100% + 20px);
    width: 450px;
    height: 450px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background-repeat: no-repeat;
    background-color: #fff;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    display: none;
    z-index: 100;
    pointer-events: none;
}

.image-zoom-container:hover .zoom-lens {
    display: block;
}

.image-zoom-container:hover + .zoom-result {
    display: block;
}

/* 하단 썸네일 슬라이더 */
.gallery-thumbnails {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 5px;
}

.thumb-nav {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border: 1px solid #e5e7eb;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: all 0.2s;
}

.thumb-nav:hover {
    border-color: #0073e9;
    color: #0073e9;
    background: #f0f7ff;
}

.thumb-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.thumb-slider {
    flex: 1;
    overflow: hidden;
}

.thumb-track {
    display: flex;
    gap: 8px;
    transition: transform 0.3s ease;
}

.thumb-item {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    background: #f8f9fa;
    transition: all 0.2s;
}

.thumb-item:hover {
    border-color: #ccc;
}

.thumb-item.active {
    border-color: #0073e9;
}

.thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: #f3f4f6;
}

/* 모바일 대응 */
@media (max-width: 1024px) {
    .zoom-result {
        display: none !important;
    }
    
    .zoom-lens {
        display: none !important;
    }
    
    .image-zoom-container {
        cursor: pointer;
    }
}

@media (max-width: 768px) {
    .thumb-item {
        width: 56px;
        height: 56px;
    }
    
    .thumb-nav {
        width: 28px;
        height: 28px;
    }
    
    .gallery-thumbnails {
        gap: 6px;
    }
}