/* WooCommerce 마이페이지 스타일 오버라이드 */
.woocommerce-MyAccount-navigation {
    float: left;
    width: 25%;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    padding: 0;
    overflow: hidden;
    margin-right: 30px;
}

.woocommerce-MyAccount-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.woocommerce-MyAccount-navigation-link {
    border-bottom: 1px solid #f3f4f6;
}

.woocommerce-MyAccount-navigation-link:last-child {
    border-bottom: none;
}

.woocommerce-MyAccount-navigation-link a {
    display: block;
    padding: 20px 25px;
    color: #374151;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.woocommerce-MyAccount-navigation-link a:hover {
    background: #f9fafb;
    color: #6B46C1;
    padding-left: 30px;
}

.woocommerce-MyAccount-navigation-link.is-active a {
    background: linear-gradient(135deg, #6B46C1 0%, #8B5CF6 100%);
    color: #fff;
}

.woocommerce-MyAccount-navigation-link.is-active a:after {
    content: '';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 24px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.woocommerce-MyAccount-content {
    float: right;
    width: calc(75% - 30px);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    padding: 40px;
}

/* 대시보드 스타일 */
.woocommerce-MyAccount-content > p:first-child {
    font-size: 18px;
    color: #1f2937;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f3f4f6;
}

.woocommerce-MyAccount-content strong {
    color: #6B46C1;
    font-weight: 600;
}

/* 마이페이지 공통 스타일 */
.sts-myaccount-login {
    max-width: 500px;
    margin: 0 auto;
    padding: 40px 20px;
}

.sts-myaccount-login h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 28px;
    color: #333;
}

.sts-login-divider {
    text-align: center;
    margin: 30px 0;
    position: relative;
}

.sts-login-divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background: #e0e0e0;
}

.sts-login-divider span {
    background: #fff;
    padding: 0 20px;
    position: relative;
    color: #666;
    font-size: 14px;
}

/* 주문 조회 페이지 스타일 */
.sts-order-tracking,
.sts-order-tracking-page {
    max-width: 600px;
    margin: 0 auto;
    padding: 40px 20px;
}

.sts-order-tracking h2,
.sts-order-tracking-page h2 {
    margin-bottom: 20px;
    font-size: 24px;
    color: #333;
}

.sts-tracking-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.sts-tracking-info p {
    margin: 0;
    color: #666;
}

.sts-tracking-form {
    background: #fff;
    padding: 30px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 30px;
}

.sts-tracking-form .form-group {
    margin-bottom: 20px;
}

.sts-tracking-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.sts-tracking-form label .required {
    color: #e74c3c;
}

.sts-tracking-form input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.sts-tracking-form input:focus {
    outline: none;
    border-color: #3498db;
}

.sts-tracking-form small {
    display: block;
    margin-top: 5px;
    color: #777;
    font-size: 13px;
}

.sts-button,
.sts-track-button {
    background: #3498db;
    color: #fff;
    border: none;
    padding: 14px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.sts-button:hover,
.sts-track-button:hover {
    background: #2980b9;
}

/* 주문 조회 결과 */
.sts-order-result {
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    margin-top: 30px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sts-order-result.loading {
    text-align: center;
    color: #6B7280;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sts-order-result.loading:before {
    content: '';
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid #E5E7EB;
    border-top-color: #6B46C1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 15px;
}

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

.sts-order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #F3F4F6;
    padding-bottom: 25px;
    margin-bottom: 30px;
}

.sts-order-header h3 {
    margin: 0;
    font-size: 24px;
    color: #1F2937;
    font-weight: 600;
}

.sts-order-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.sts-order-info-item {
    background: linear-gradient(135deg, #F9FAFB 0%, #F3F4F6 100%);
    padding: 24px;
    border-radius: 12px;
    border: 1px solid #E5E7EB;
    transition: all 0.3s ease;
}

.sts-order-info-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.sts-order-info-item label {
    display: block;
    font-size: 13px;
    color: #6B7280;
    margin-bottom: 8px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sts-order-info-item span {
    font-size: 18px;
    font-weight: 600;
    color: #1F2937;
}

/* 주문 상품 목록 */
.sts-order-items {
    margin-top: 40px;
}

.sts-order-items h4 {
    font-size: 20px;
    font-weight: 600;
    color: #1F2937;
    margin-bottom: 20px;
}

.sts-order-items-table {
    width: 100%;
    border-collapse: collapse;
}

.sts-order-items-table tr {
    border-bottom: 1px solid #F3F4F6;
}

.sts-order-items-table tr:last-child {
    border-bottom: none;
}

.sts-order-items-table td {
    padding: 20px 10px;
    vertical-align: middle;
}

.sts-order-items-table .item-image img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #E5E7EB;
}

.sts-order-items-table .item-name {
    font-weight: 500;
    color: #374151;
}

.sts-order-items-table .item-quantity {
    color: #6B7280;
    font-size: 14px;
}

.sts-order-items-table .item-subtotal {
    font-weight: 600;
    color: #1F2937;
    text-align: right;
}

.sts-order-status {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.sts-order-status.processing {
    background: #3498db;
    color: #fff;
}

.sts-order-status.completed {
    background: #27ae60;
    color: #fff;
}

.sts-order-status.on-hold {
    background: #f39c12;
    color: #fff;
}

/* 프로필 페이지 스타일 */
.sts-profile-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

.sts-profile-header {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
}

.sts-profile-image {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #e0e0e0;
}

.sts-profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sts-profile-info h3 {
    margin: 0 0 10px 0;
    font-size: 24px;
    color: #333;
}

.sts-profile-info .email {
    margin: 0 0 10px 0;
    color: #666;
}

.sts-profile-info .kakao-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #fee500;
    color: #000;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

/* 통계 박스 */
.sts-profile-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-box {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    text-align: center;
}

.stat-box h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #666;
    font-weight: 400;
}

.stat-box .stat-value {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    color: #333;
}

/* 프로필 상세 정보 */
.sts-profile-details {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
}

.sts-profile-details h3 {
    margin: 0 0 20px 0;
    font-size: 20px;
    color: #333;
}

.sts-profile-table {
    width: 100%;
    border-collapse: collapse;
}

.sts-profile-table tr {
    border-bottom: 1px solid #f0f0f0;
}

.sts-profile-table tr:last-child {
    border-bottom: none;
}

.sts-profile-table th,
.sts-profile-table td {
    padding: 15px 0;
    text-align: left;
}

.sts-profile-table th {
    width: 30%;
    color: #666;
    font-weight: 400;
}

.sts-profile-table td {
    color: #333;
    font-weight: 600;
}

/* 프로필 액션 버튼 */
.sts-profile-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.sts-profile-actions .button {
    background: #3498db;
    color: #fff;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
    transition: background 0.3s;
}

.sts-profile-actions .button:hover {
    background: #2980b9;
}

/* 도움말 섹션 */
.sts-tracking-help {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
}

.sts-tracking-help h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    color: #333;
}

.sts-tracking-help ul {
    margin: 0;
    padding-left: 20px;
}

.sts-tracking-help li {
    margin-bottom: 10px;
    color: #666;
}

.sts-tracking-help a {
    color: #3498db;
    text-decoration: none;
}

.sts-tracking-help a:hover {
    text-decoration: underline;
}

/* 주문 내역 컨테이너 */
.sts-order-tracking {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 40px 20px !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

.sts-order-tracking.logged-in {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 40px 20px !important;
}

.sts-order-tracking.logged-in h2 {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 40px;
    text-align: center;
    position: relative;
    padding-bottom: 20px;
}

.sts-order-tracking.logged-in h2:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: #6B46C1;
    border-radius: 2px;
}

/* 주문 내역 테이블 */
.sts-orders-list {
    margin-bottom: 60px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.sts-orders-table {
    width: 100%;
    border-collapse: collapse;
}

.sts-orders-table thead {
    background: linear-gradient(135deg, #6B46C1 0%, #8B5CF6 100%);
}

.sts-orders-table th {
    padding: 20px;
    text-align: left;
    font-weight: 600;
    color: #fff;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sts-orders-table td {
    padding: 20px;
    text-align: left;
    border-bottom: 1px solid #f5f5f5;
    color: #4a4a4a;
    font-size: 15px;
}

.sts-orders-table tbody tr {
    transition: all 0.3s ease;
}

.sts-orders-table tbody tr:hover {
    background: #fafafa;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.sts-orders-table tbody tr:last-child td {
    border-bottom: none;
}

/* 주문 번호 스타일 */
.sts-orders-table td:first-child {
    font-weight: 600;
    color: #6B46C1;
}

/* 주문 상태 배지 */
.sts-order-status {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.sts-order-status.processing {
    background: #E0E7FF;
    color: #4338CA;
}

.sts-order-status.completed {
    background: #D1FAE5;
    color: #065F46;
}

.sts-order-status.on-hold {
    background: #FEF3C7;
    color: #92400E;
}

.sts-order-status.pending {
    background: #FEE2E2;
    color: #991B1B;
}

.sts-order-status.cancelled,
.sts-order-status.refunded,
.sts-order-status.failed {
    background: #F3F4F6;
    color: #6B7280;
}

/* 상세보기 버튼 */
.sts-view-order {
    display: inline-block;
    padding: 8px 20px;
    background: #6B46C1;
    color: #fff !important;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
}

.sts-view-order:hover {
    background: #553C9A;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(107, 70, 193, 0.3);
    text-decoration: none;
}

/* 주문 없음 메시지 */
.sts-no-orders {
    text-align: center;
    padding: 80px 40px;
    background: #F9FAFB;
    border-radius: 16px;
    color: #6B7280;
    font-size: 16px;
    line-height: 1.6;
}

.sts-no-orders:before {
    content: '📦';
    display: block;
    font-size: 48px;
    margin-bottom: 20px;
    opacity: 0.5;
}

/* 비회원 주문 조회 섹션 */
.sts-guest-tracking {
    margin-top: 60px;
    padding: 40px;
    background: #F9FAFB;
    border-radius: 16px;
    border: 2px dashed #E5E7EB;
}

.sts-guest-tracking h3 {
    margin-bottom: 10px;
    font-size: 24px;
    color: #374151;
    font-weight: 600;
}

.sts-guest-tracking p {
    color: #6B7280;
    margin-bottom: 30px;
}

.sts-guest-tracking .sts-tracking-form {
    background: #fff;
    border: 1px solid #E5E7EB;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.sts-login-prompt {
    margin-top: 20px;
    padding: 20px;
    background: #e3f2fd;
    border-radius: 8px;
    text-align: center;
}

.sts-login-prompt p {
    margin: 0;
    color: #1976d2;
}

.sts-login-prompt a {
    color: #1565c0;
    font-weight: 600;
}

/* 알림 메시지 */
.sts-alert {
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.sts-alert-error {
    background: #fee;
    border: 1px solid #fcc;
    color: #c33;
}

.sts-alert-success {
    background: #efe;
    border: 1px solid #cfc;
    color: #3c3;
}

/* WooCommerce 주문 테이블 스타일 */
.woocommerce-orders-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

.woocommerce-orders-table thead {
    background: linear-gradient(135deg, #6B46C1 0%, #8B5CF6 100%);
}

.woocommerce-orders-table th {
    padding: 15px;
    color: #fff;
    font-weight: 600;
    text-align: left;
}

.woocommerce-orders-table td {
    padding: 15px;
    border-bottom: 1px solid #f3f4f6;
}

.woocommerce-orders-table tbody tr:hover {
    background: #f9fafb;
}

/* WooCommerce 버튼 스타일 */
.woocommerce .button,
.woocommerce button.button {
    background: #6B46C1;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.woocommerce .button:hover,
.woocommerce button.button:hover {
    background: #553C9A;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(107, 70, 193, 0.3);
}

/* Clear float for layout */
.woocommerce:after,
.woocommerce-MyAccount-content:after {
    content: "";
    display: table;
    clear: both;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    /* WooCommerce 마이페이지 반응형 */
    .woocommerce-MyAccount-navigation {
        float: none;
        width: 100%;
        margin-bottom: 30px;
        margin-right: 0;
    }
    
    .woocommerce-MyAccount-content {
        float: none;
        width: 100%;
    }
    
    .woocommerce-MyAccount-navigation-link a {
        padding: 15px 20px;
    }
    .sts-profile-header {
        flex-direction: column;
        text-align: center;
    }
    
    .sts-profile-stats {
        grid-template-columns: 1fr;
    }
    
    .sts-profile-actions {
        flex-direction: column;
    }
    
    .sts-profile-actions .button {
        width: 100%;
        text-align: center;
    }
    
    /* 주문 테이블 반응형 */
    .sts-orders-list {
        border-radius: 12px;
        overflow: visible;
        box-shadow: none;
    }
    
    .sts-orders-table thead {
        display: none;
    }
    
    .sts-orders-table tbody tr {
        display: block;
        margin-bottom: 20px;
        background: #fff;
        border-radius: 12px;
        padding: 20px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
        border: 1px solid #E5E7EB;
    }
    
    .sts-orders-table tbody tr:hover {
        transform: none;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    }
    
    .sts-orders-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 0;
        border: none;
        text-align: left;
    }
    
    .sts-orders-table td:before {
        content: attr(data-label);
        font-weight: 600;
        color: #6B7280;
        font-size: 13px;
    }
    
    .sts-orders-table td:first-child {
        font-size: 18px;
        padding-bottom: 15px;
        margin-bottom: 15px;
        border-bottom: 1px solid #F3F4F6;
    }
    
    .sts-view-order {
        padding: 10px 20px;
        width: auto;
        font-size: 14px;
    }
    
    /* 주문 조회 결과 반응형 */
    .sts-order-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .sts-order-info {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .sts-order-result {
        padding: 20px;
    }
}