/* 배송지관리 래퍼 */
.address-wrapper {
    background: #faf8f8;
    min-height: 100vh;
    padding: 60px 0;
}

.address-wrapper .container {
    max-width: 1024px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 페이지 헤더 */
.page-header {
    text-align: center;
    margin-bottom: 50px;
}

.page-title {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    margin-bottom: 12px;
}

.page-subtitle {
    font-size: 16px;
    color: #666;
}

/* 배송지 컨트롤 */
.address-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: #fff;
    border-radius: 12px;
    margin-bottom: 24px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.08);
}

.address-count {
    font-size: 15px;
    color: #666;
}

.address-count strong {
    font-size: 18px;
    font-weight: 700;
    color: #c76b52;
}

.btn-add-address {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #bb877a;
    color: #fff;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.btn-add-address:hover {
    background: #a27b6f; 
}

.btn-add-address svg {
    flex-shrink: 0;
}

/* 배송지 리스트 */
.address-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 40px;
}

/* 배송지 항목 */
.address-item {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s;
    border: 1px solid #efe0db;
}
 
.address-item.default {
    border-color: #bb877a; 
}

/* 배송지 헤더 */
.address-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: #fff;
    border-bottom: 1px solid #efe0db;
}

.address-item.default .address-header {
    background: #bb877a;
}

.address-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.address-name {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.address-item.default .address-name {
    color: #fff;
}

.default-badge {
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.3);
    color: #fff;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
}

.address-actions {
    display: flex;
    gap: 8px;
}

.btn-address-action {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.btn-address-action:hover {
    border-color: #c76b52;
    color: #c76b52;
}

.btn-address-action.delete:hover {
    border-color: #ff4444;
    color: #ff4444;
    background: #fff7f5;
}

.btn-address-action svg {
    flex-shrink: 0;
}

/* 배송지 내용 */
.address-content {
    padding: 24px;
}

.address-info-row {
    display: flex;
    gap: 20px;
    margin-bottom: 16px;
}

.address-info-row:last-child {
    margin-bottom: 0;
}

.address-info-label {
    min-width: 80px;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    flex-shrink: 0;
}

.address-info-value {
    font-size: 14px;
    color: #333;
    line-height: 1.6;
}

.address-info-value.memo {
    color: #c76b52;
}

/* 배송지 푸터 */
.address-footer {
    padding: 15px; 
    border-top: 1px solid #e5e5e5;
}

.btn-set-default {
    width: 100%;
    padding: 12px;
    background: #fff;
    border: 1px solid #c76b52;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #c76b52;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-set-default:hover {
    background: #fff8f4;
}

.btn-set-default:disabled {
    background: #eee;
    border-color: #eee;
    color: #aaa;
    cursor: not-allowed;
}

/* 안내 문구 */
.address-notice {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.notice-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin-bottom: 16px;
}

.notice-title svg {
    color: #c76b52;
    flex-shrink: 0;
}

.notice-list {
    padding-left: 20px;
    margin: 0;
}

.notice-list li {
    font-size: 14px;
    color: #666;
    line-height: 2;
}

/* 배송지 추가/수정 모달 */
#address-modal {
    display: none;
}

.address-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

#address-modal:checked ~ .address-modal-overlay {
    opacity: 1;
    visibility: visible;
}

.address-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 2001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

#address-modal:checked ~ .address-modal {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.address-modal-header {
    padding: 24px;
    border-bottom: 1px solid #e5e5e5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.address-modal-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.address-modal-close {
    font-size: 32px;
    color: #999;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: color 0.3s;
}

.address-modal-close:hover {
    color: #333;
}

.address-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

/* 폼 그룹 */
.address-form-group {
    margin-bottom: 20px;
}

.address-form-group:last-child {
    margin-bottom: 0;
}

.address-form-label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
}

.required {
    color: #ff4444;
    margin-left: 4px;
}

.address-form-input,
.address-form-select,
.address-form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    font-size: 14px;
    color: #333;
    font-family: 'Noto Sans KR', sans-serif;
    transition: border-color 0.3s;
}

.address-form-input:focus,
.address-form-select:focus,
.address-form-textarea:focus {
    outline: none;
    border-color: #c76b52;
}

.address-form-input::placeholder,
.address-form-textarea::placeholder {
    color: #999;
}

.address-form-input:read-only {
    background: #faf8f8;
    color: #666;
}

.address-form-input + .address-form-input {
    margin-top: 8px;
}

.address-form-textarea {
    resize: vertical;
    min-height: 80px;
    margin-top: 8px;
}

/* 주소 검색 그룹 */
.address-search-group {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.address-search-group .address-form-input {
    flex: 1;
    margin: 0;
}

.btn-search-address {
    padding: 12px 20px;
    background: #c76b52;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-search-address:hover {
    background: #bb877a;
}

/* 체크박스 */
.address-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.address-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid #e5e5e5;
    border-radius: 4px;
    cursor: pointer;
    appearance: none;
    position: relative;
    transition: all 0.3s;
}

.address-checkbox:checked {
    background: #c76b52;
    border-color: #c76b52;
}

.address-checkbox:checked::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 6px;
    width: 5px;
    height: 10px;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(45deg);
}

.checkbox-text {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

/* 모달 푸터 */
.address-modal-footer {
    padding: 20px 24px;
    border-top: 1px solid #e5e5e5;
    background: #faf8f8;
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.btn-cancel-address,
.btn-save-address {
    flex: 1;
    padding: 14px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-cancel-address {
    background: #fff;
    color: #666;
    border: 2px solid #e5e5e5;
}

.btn-cancel-address:hover {
    background: #faf8f8;
    border-color: #d0d0d0;
}

.btn-save-address {
    background: #c76b52;
    color: #fff;
    border: 2px solid #c76b52;
}

.btn-save-address:hover {
    background: #bb877a;
}

/* Responsive */
@media (max-width: 1024px) {

    .address-list {grid-template-columns: 1fr;}

}



@media (max-width: 768px) {
    .address-wrapper {
        padding: 40px 0;
    }

    .address-wrapper .container {
        padding: 0 20px;
    }

    .page-title {
        font-size: 28px;
    }

    .page-subtitle {
        font-size: 14px;
    }

    .address-controls {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
        padding: 16px 20px;
    }

    .btn-add-address {
        width: 100%;
        justify-content: center;
    }

    .address-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
        padding: 16px 20px;
    }

    .address-actions {
        width: 100%;
    }

    .btn-address-action {
        flex: 1;
        justify-content: center;
    }

    .address-content {
        padding: 20px;
    }

    .address-info-row {
        flex-direction: column;
        gap: 6px;
        margin-bottom: 14px;
    }

    .address-info-label {
        min-width: auto;
        font-size: 13px;
    }

    .address-info-value {
        font-size: 13px;
    }

    .address-footer {
        padding: 14px 20px;
    }

    .address-modal {
        width: 95%;
        max-height: 85vh;
    }

    .address-modal-header {
        padding: 20px;
    }

    .address-modal-header h3 {
        font-size: 18px;
    }

    .address-modal-body {
        padding: 20px;
    }

    .address-modal-footer {
        padding: 16px 20px;
    }
}

@media (max-width: 480px) {
    .address-wrapper .container {
        padding: 0 16px;
    }

    .page-title {
        font-size: 24px;
    }

    .address-controls {
        padding: 14px 16px;
    }

    .address-count {
        font-size: 14px;
    }

    .address-count strong {
        font-size: 16px;
    }

    .btn-add-address {
        padding: 10px 20px;
        font-size: 13px;
    }

    .address-header {
        padding: 14px 16px;
    }

    .address-name {
        font-size: 16px;
    }

    .default-badge {
        font-size: 11px;
        padding: 3px 10px;
    }

    .btn-address-action {
        padding: 6px 12px;
        font-size: 12px;
    }

    .btn-address-action svg {
        width: 16px;
        height: 16px;
    }

    .address-content {
        padding: 16px;
    }

    .address-info-label {
        font-size: 12px;
    }

    .address-info-value {
        font-size: 12px;
    }

    .address-footer {
        padding: 12px 16px;
    }

    .btn-set-default {
        padding: 10px;
        font-size: 13px;
    }

    .address-notice {
        padding: 20px 16px;
    }

    .notice-title {
        font-size: 15px;
    }

    .notice-list li {
        font-size: 13px;
    }

    .address-modal-header {
        padding: 16px;
    }

    .address-modal-header h3 {
        font-size: 17px;
    }

    .address-modal-body {
        padding: 16px;
    }

    .address-form-label {
        font-size: 13px;
    }

    .address-form-input,
    .address-form-select,
    .address-form-textarea {
        padding: 10px 14px;
        font-size: 13px;
    }

    .btn-search-address {
        padding: 10px 16px;
        font-size: 13px;
    }

    .checkbox-text {
        font-size: 13px;
    }

    .address-modal-footer {
        padding: 14px 16px;
    }

    .btn-cancel-address,
    .btn-save-address {
        padding: 12px 14px;
        font-size: 13px;
    }
}
