.product-page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
}

.product-page-head p {
    margin: 8px 0 0;
    color: #667085;
}

.product-category-tabs {
    display: inline-flex;
    gap: 8px;
    margin: 22px 0;
    padding: 6px;
    border: 1px solid #dfe7f2;
    border-radius: 15px;
    background: #fff;
}

.product-category-tabs a {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 11px 17px;
    border-radius: 11px;
    color: #526079;
    font-weight: 800;
}

.product-category-tabs a.active {
    color: #fff;
    background: #3775f5;
}

.product-category-tabs a span {
    min-width: 24px;
    padding: 3px 7px;
    border-radius: 999px;
    background: rgba(255,255,255,.16);
    text-align: center;
    font-size: 11px;
}

.product-category-tabs a:not(.active) span {
    background: #edf2fa;
}

.product-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.product-admin-card {
    min-width: 0;
    padding: 22px;
    border: 1px solid #dfe7f2;
    border-radius: 21px;
    background: #fff;
    transition: transform .18s ease, box-shadow .18s ease;
}

.product-admin-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 40px rgba(34, 72, 130, .08);
}

.product-admin-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.product-admin-card-head > div {
    min-width: 0;
}

.product-admin-status-tags {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
}

.product-category-label {
    display: inline-flex;
    padding: 5px 9px;
    border-radius: 999px;
    color: #3775f5;
    background: #eaf2ff;
    font-size: 11px;
    font-weight: 900;
}

.product-admin-card h2 {
    margin: 13px 0 0;
    font-size: 20px;
}

.product-admin-card p {
    min-height: 44px;
    margin: 8px 0 0;
    color: #667085;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.product-admin-price {
    margin-top: 20px;
    padding: 17px;
    border-radius: 15px;
    background: #f7faff;
}

.product-admin-price strong {
    font-size: 27px;
}

.product-admin-price span {
    color: #7a879c;
}

.product-admin-specs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
    margin-top: 15px;
}

.product-admin-specs div {
    min-width: 0;
    padding: 13px 10px;
    border: 1px solid #e5ebf4;
    border-radius: 13px;
    text-align: center;
}

.product-admin-specs small {
    display: block;
    color: #7a879c;
}

.product-admin-specs strong {
    display: block;
    margin-top: 5px;
    white-space: nowrap;
}

.product-admin-meta {
    display: grid;
    grid-template-columns: auto 1fr auto 1fr;
    gap: 8px;
    margin-top: 16px;
    color: #667085;
    font-size: 13px;
}

.product-admin-meta strong {
    color: #13213b;
}

.product-admin-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 20px;
}

.product-admin-actions form,
.product-admin-actions .btn {
    width: 100%;
}

.product-admin-actions .btn {
    white-space: nowrap;
    padding-left: 6px;
    padding-right: 6px;
}

.product-empty {
    grid-column: 1 / -1;
}

.product-modal[hidden] {
    display: none;
}

.product-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 20px;
}

.product-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(13,27,52,.55);
}

.product-modal-dialog {
    position: relative;
    width: min(760px, 100%);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding: 26px;
    border-radius: 22px;
    background: #fff;
}

.product-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.product-modal-close {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 10px;
    background: #eef2f7;
    font-size: 24px;
    cursor: pointer;
}

.product-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.service-category-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
    margin-bottom: 42px;
}

.service-category-tabs a {
    padding: 22px;
    border: 1px solid #dfe7f2;
    border-radius: 18px;
    background: #fff;
}

.service-category-tabs a strong {
    display: block;
    font-size: 19px;
}

.service-category-tabs a span {
    display: block;
    margin-top: 7px;
    color: #667085;
    line-height: 1.5;
}

.service-category-tabs a.active {
    border-color: #7da5f8;
    background: #f3f7ff;
    box-shadow: 0 12px 30px rgba(55,117,245,.08);
}

.service-category-heading {
    margin-bottom: 24px;
}

.service-category-heading > span {
    color: #3775f5;
    font-size: 13px;
    font-weight: 900;
}

.service-category-heading h2 {
    margin: 7px 0 0;
    font-size: 28px;
}

.service-series-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 40px 0 18px;
    padding: 15px 22px;
    border-radius: 12px;
    border-left: 4px solid #97aecf;
    background: #eef2f8;
    font-size: 16px;
    font-weight: 900;
    color: #45526b;
    letter-spacing: .5px;
    text-transform: uppercase;
}

.service-category-heading + .service-series-heading {
    margin-top: 0;
}

.service-price-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.service-type-badge {
    padding: 5px 9px;
    border-radius: 999px;
    color: #526079;
    background: #eef2f7;
    font-size: 11px;
    font-weight: 900;
}

.service-spec-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
    margin: 18px 0;
}

.service-spec-grid div {
    padding: 13px 8px;
    border: 1px solid #e5ebf4;
    border-radius: 13px;
    text-align: center;
}

.service-spec-grid small {
    display: block;
    color: #7a879c;
}

.service-spec-grid strong {
    display: block;
    margin-top: 5px;
}

.service-hot-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 11px;
    border-radius: 999px;
    background: linear-gradient(90deg, #ff6b4a, #ff3d5a);
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    margin-bottom: 8px;
    box-shadow: 0 6px 14px rgba(255, 61, 90, .28);
}

.sold-out-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    background: #ffe9e9;
    color: #d92d20;
    font-size: 11px;
    font-weight: 900;
    margin-bottom: 8px;
}

.service-price-card.sold-out {
    opacity: .6;
}

.service-empty {
    grid-column: 1 / -1;
}

@media (max-width: 1050px) {
    .product-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .product-page-head {
        align-items: stretch;
        flex-direction: column;
    }

    .product-category-tabs {
        display: flex;
        width: 100%;
    }

    .product-category-tabs a {
        flex: 1;
        justify-content: center;
    }

    .product-card-grid,
    .service-category-tabs,
    .product-card-pricing-grid {
        grid-template-columns: 1fr;
    }

    .product-admin-actions {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   상품 추가/수정 모달 정리
========================================================= */

.product-modal-dialog {
    padding: 30px;
    border: 1px solid #dfe7f2;
    box-shadow: 0 30px 90px rgba(15, 29, 53, 0.24);
}

.product-modal-head {
    padding-bottom: 18px;
    margin-bottom: 24px;
    border-bottom: 1px solid #e5ebf4;
}

.product-modal-head h2 {
    margin: 0;
    color: #11213d;
    font-size: 26px;
    line-height: 1.3;
}

.product-modal-close {
    display: grid;
    place-items: center;
    line-height: 1;
}

.product-modal-close:hover {
    background: #e3e9f1;
}

.product-modal form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.product-modal .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.product-modal .form-grid > label {
    display: flex;
    flex-direction: column;
    gap: 9px;
    min-width: 0;
    margin: 0;
    color: #24324b;
    font-size: 14px;
    font-weight: 800;
}

.product-form-span-2 {
    grid-column: 1 / -1;
}

.product-form-label {
    display: block;
    margin: 0 0 9px;
    color: #24324b;
    font-size: 14px;
    font-weight: 800;
}

.product-modal input,
.product-modal select,
.product-modal textarea {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    margin: 0;
    padding: 13px 14px;
    border: 1px solid #d9e2ef;
    border-radius: 12px;
    outline: none;
    color: #11213d;
    background: #fff;
    font: inherit;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.product-modal input:focus,
.product-modal select:focus,
.product-modal textarea:focus {
    border-color: #6f9df8;
    box-shadow: 0 0 0 4px rgba(55, 117, 245, .11);
}

.product-os-check-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.product-os-check {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    min-height: 54px;
    padding: 14px 15px;
    margin: 0;
    border: 1px solid #dfe7f2;
    border-radius: 14px;
    color: #344054;
    background: #f9fbfe;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.product-os-check:hover {
    border-color: #b9cdf1;
    background: #f4f8ff;
}

.product-os-check input[type="checkbox"] {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #3775f5;
}

.product-modal-actions {
    padding-top: 20px;
    border-top: 1px solid #e5ebf4;
}

.product-modal-actions .btn {
    min-width: 96px;
}

.product-modal-dialog::-webkit-scrollbar {
    width: 9px;
}

.product-modal-dialog::-webkit-scrollbar-thumb {
    border: 2px solid #fff;
    border-radius: 999px;
    background: #c8d3e2;
}

.product-modal-dialog::-webkit-scrollbar-track {
    background: transparent;
}

@media (max-width: 720px) {
    .product-modal-dialog {
        padding: 22px 18px;
    }

    .product-modal-head h2 {
        font-size: 22px;
    }

    .product-modal .form-grid,
    .product-os-check-grid {
        grid-template-columns: 1fr;
    }

    .product-modal-actions {
        flex-direction: column-reverse;
    }

    .product-modal-actions .btn {
        width: 100%;
    }
}
