.product-group-grid,
.product-variant-grid {
    grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
}

.product-group-grid .product-choice { min-height: 125px; }
.product-variant-grid .product-choice { min-height: 132px; }
.product-group-grid .product-price,
.product-variant-grid .product-price { margin-top: 5px; padding-top: 0; }
.commission-card-image { display: block; width: min(100%, 120px); aspect-ratio: 1; margin-top: 10px; border-radius: 11px; overflow: hidden; background: #edf1ef; }
.commission-card-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.bundle-savings { display: flex; flex-wrap: wrap; gap: 5px 9px; margin-top: 5px; font-size: .75rem; font-weight: 800; color: #397759; }
.bundle-savings s, .estimate-savings s { color: #88939a; font-weight: 500; }
.bundle-unit-price { margin-top: 3px; font-weight: 800; }
.product-group-grid .group-info { display: block; margin-top: 5px; font-size: .73rem; line-height: 1.4; color: #657887; }
.estimate-savings { color: #397759; font-weight: 800; }
.estimate-savings s { margin-right: 8px; }
.estimate-unit-price { color: #667c7b; }
.product-variant-heading {
    margin: 24px 0 13px;
    font-size: 1.05rem;
    color: #304e71;
}

.commission-group-editor {
    margin: 12px 0;
    padding: 18px;
    border: 1px solid #e5e9e9;
    border-radius: 15px;
    background: #fbfdfb;
}

.commission-group-editor .editor-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.commission-group-editor .editor-actions small { margin-right: auto; color: #687a89; }
.bundle-price-editor { margin-top: 12px; padding: 14px; background: #f8fbfa; border: 1px solid #e5eeeb; border-radius: 13px; }
.studio-addon-availability { margin: 14px 0 0; padding: 12px 15px 15px; border: 1px solid #dae7e2; border-radius: 13px; background: #f8fbfa; }
.studio-addon-availability legend { padding: 0 6px; color: #315172; font-size: .85rem; font-weight: 900; }
.studio-addon-availability p { margin: 0 0 11px; color: #677d88; font-size: .75rem; }
.studio-checkbox-grid { display: flex; flex-wrap: wrap; gap: 9px 17px; }
.studio-checkbox-grid label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.studio-checkbox-grid input { width: 17px; height: 17px; accent-color: #5b9883; }
.commission-example-editor { margin-top: 16px; padding: 20px; background: #f9fbfa; border: 1px solid #cdded6; border-radius: 17px; }
.commission-example-editor h4 { color: #315172; font-size: 1.1rem; margin: 0 0 4px; }
.commission-example-editor .muted-note { margin: 0 0 16px; }
.commission-example-editor .media-workspace-grid { gap: 20px; }
.commission-example-editor .media-controls { position: static; }
.commission-example-editor .media-controls > label:not(.media-file-picker) { display: grid; gap: 6px; }
.commission-example-editor .media-controls > label input { width: 100%; padding: 10px; border: 1px solid #d8dfe1; border-radius: 10px; }
.commission-example-editor .media-slider-list input[type=range] { padding: 0; }
.commission-example-picker { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 20px; }
.commission-example-picker button { display: flex; flex: 0 0 110px; flex-direction: column; align-items: stretch; gap: 5px; width: 110px; min-width: 0; padding: 5px; text-align: left; border: 2px solid #dfe6e2; border-radius: 11px; overflow: hidden; background: white; cursor: pointer; }
.commission-example-picker button.active { border-color: #75ae9d; }
.commission-example-picker img { display: block; flex: none; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 7px; }
.commission-example-picker span { display: block; width: 100%; padding: 4px; font-size: .72rem; overflow-wrap: anywhere; }
.commission-example-picker button.add-example { display: grid; place-items: center; min-height: 94px; text-align: center; color: #3a7966; }
.commission-example-editor .media-editor-actions button { padding: 8px 12px; border: 1px solid #cdd8d9; border-radius: 9px; background: #fafcfa; color: #52677b; font-weight: 800; cursor: pointer; }
.commission-example-editor .media-editor-actions button.small-primary { border-color: #9ec6b7; background: #e1f1e9; color: #306c60; }
.commission-example-editor .media-editor-actions button.small-danger,
.commission-example-editor .media-editor-actions button.text-danger { border-color: #e7b7c1; background: #fff2f4; color: #b24360; }
.commission-example-editor .media-editor-actions button:disabled { opacity: .5; cursor: not-allowed; }
.commission-example-preview { width: min(100%, 320px); aspect-ratio: 1; overflow: hidden; border-radius: 12px; background: #edf1f0; }
.commission-example-preview img { width: 100%; height: 100%; object-fit: cover; }
.commission-example-gallery { margin-top: 18px; }
.commission-example-gallery h4 { margin: 0 0 9px; color: #375777; font-size: .9rem; }
.commission-example-thumbnails { display: flex; flex-wrap: wrap; gap: 10px; }
.commission-example-thumbnails button { width: min(140px, 43%); text-align: left; padding: 5px; border: 1px solid #dce6e2; border-radius: 11px; background: #fbfdfc; color: #53657b; font-size: .75rem; font-weight: 800; }
.commission-example-crop { display: block; aspect-ratio: 1; border-radius: 7px; overflow: hidden; }
.commission-example-crop img { width: 100%; height: 100%; object-fit: cover; }
.commission-example-thumbnails button > span:last-child:not(.commission-example-crop) { display: block; padding: 5px 3px; }
.addon-entry { margin-bottom: 12px; }
.addon-entry .addon-row { margin-bottom: 4px; }
.addon-example-toggle { border: 0; background: transparent; color: #3c7968; font-size: .78rem; font-weight: 800; padding: 4px 9px; text-decoration: underline; }
.commission-example-lightbox { position: fixed; inset: 0; z-index: 100; background: #14243bdf; display: grid; place-items: center; padding: 20px; }
.commission-example-lightbox-content { position: relative; max-width: min(92vw, 1100px); max-height: 92vh; display: grid; justify-items: center; gap: 9px; color: white; }
.commission-example-lightbox-content img { max-width: 100%; max-height: 80vh; object-fit: contain; border-radius: 11px; }
.commission-example-lightbox-content p { margin: 0; }
.commission-example-close { position: absolute; right: 0; top: 0; transform: translate(35%, -35%); width: 35px; height: 35px; border: 0; border-radius: 50%; background: white; color: #38536d; font-size: 1.45rem; cursor: pointer; }
.price-editor-detail select {
    min-width: 150px;
    max-width: 100%;
    padding: 8px 10px;
    border: 1px solid #d8dfe1;
    border-radius: 9px;
    background: white;
}

@media (max-width: 560px) {
    .product-group-grid,
    .product-variant-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .price-editor-detail { flex-wrap: wrap; }
    .commission-example-editor { padding: 13px; }
    .commission-example-preview { width: min(100%, 240px); }
}

.studio-price-category { margin: 22px 0 30px; }
.studio-price-category h3 { margin: 0 0 10px; color: #365575; }
.studio-price-category h3 small { color: #728596; font-size: .78rem; font-weight: 600; }
.studio-price-group-list { display: grid; gap: 9px; }
.studio-price-group-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid #dce6e2; border-radius: 13px; background: #fafcfb; }
.studio-price-group-link { display: flex; flex: 1; flex-wrap: wrap; align-items: baseline; gap: 5px 15px; padding: 13px 17px; color: #365575; text-decoration: none; min-width: 0; }
.studio-price-group-link:hover { color: #39765e; }
.studio-price-group-link strong { font-size: 1.02rem; }
.studio-price-group-link span, .studio-price-group-link small { color: #647887; font-size: .79rem; }
.studio-price-group-link small { flex-basis: 100%; }
.studio-price-group-order { display: flex; gap: 5px; padding-right: 12px; }
.studio-price-group-order button { min-width: 34px; min-height: 34px; }
.studio-price-detail .studio-top { margin-top: 18px; }
.studio-price-detail .studio-panel { margin-top: 22px; }
.studio-price-option { padding: 22px 0; border-top: 1px solid #dbe5df; }
.studio-price-option:first-of-type { border-top: 0; }
.studio-price-option .studio-panel-head h3 { margin: 0; color: #355677; }
.studio-price-option .studio-panel-head p { margin: 3px 0 0; }
.studio-price-option .studio-addon-availability { margin-top: 17px; }
@media (max-width: 560px) {
    .studio-price-group-link { display: grid; gap: 3px; }
    .studio-price-group-order { padding-right: 7px; }
}

.studio-gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 13px; }
.studio-gallery-tile-wrap { min-width: 0; aspect-ratio: 1; }
.studio-panel .studio-gallery-tile { display: block; position: relative; width: 100%; height: 100%; padding: 0; border: 0; border-radius: 14px; overflow: hidden; background: #e9eeec; cursor: pointer; box-shadow: 0 3px 13px #263a4b16; }
.studio-panel .studio-gallery-tile img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .2s ease; }
.studio-panel .studio-gallery-tile:hover img { transform: scale(1.04); }
.studio-panel .studio-gallery-tile:focus-visible { outline: 3px solid #39765e; outline-offset: 3px; }
.studio-gallery-badge { position: absolute; bottom: 9px; display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid #ffffffc9; border-radius: 50%; background: #243747dc; color: white; box-shadow: 0 2px 8px #12253766; line-height: 1; }
.studio-gallery-hidden { left: 9px; }
.studio-gallery-home { right: 9px; background: #397a61ec; font-size: 1.1rem; font-weight: 900; }
.studio-gallery-overlay { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 20px; overflow-y: auto; background: #14243bc7; }
.studio-gallery-dialog { width: min(860px, 100%); max-height: calc(100dvh - 40px); overflow-y: auto; padding: clamp(18px, 3vw, 28px); border-radius: 18px; background: #fff; box-shadow: 0 18px 65px #07182769; }
.studio-gallery-dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 17px; }
.studio-gallery-dialog-head h2 { margin: 3px 0 0; color: #345473; }
.studio-gallery-close { width: 36px; height: 36px; padding: 0; flex: 0 0 auto; border: 0; border-radius: 50%; background: #edf3f0; color: #3a5b70; font-size: 1.5rem; line-height: 1; cursor: pointer; }
.studio-gallery-edit-layout { display: grid; grid-template-columns: minmax(150px, 240px) minmax(0, 1fr); gap: 23px; }
.studio-gallery-edit-preview { display: block; width: 100%; max-height: 360px; object-fit: contain; border-radius: 12px; background: #edf1f0; }
.studio-gallery-edit-fields { min-width: 0; }
.studio-gallery-flags { gap: 12px; margin-top: 18px; }
.studio-gallery-edit-actions { padding-top: 16px; margin-top: 18px; border-top: 1px solid #e4eae7; }
.studio-gallery-dialog button:not(.studio-gallery-close) { padding: 7px 11px; border: 1px solid #cdd8d9; border-radius: 9px; background: #fafcfa; color: #52677b; font-weight: 800; cursor: pointer; }
.studio-gallery-dialog button.small-primary { background: #e1f1e9; border-color: #9ec6b7; color: #306c60; }
.studio-gallery-dialog button.small-danger, .studio-gallery-dialog button.text-danger { background: #fff2f4; border-color: #e7b7c1; color: #b24360; }
@media (max-width: 640px) {
    .studio-gallery-grid { grid-template-columns: repeat(auto-fill, minmax(105px, 1fr)); gap: 9px; }
    .studio-gallery-overlay { padding: 10px; }
    .studio-gallery-dialog { max-height: calc(100dvh - 20px); }
    .studio-gallery-edit-layout { grid-template-columns: 1fr; gap: 15px; }
    .studio-gallery-edit-preview { max-height: 230px; }
}
@media (prefers-reduced-motion: reduce) {
    .studio-panel .studio-gallery-tile img { transition: none; }
}
