.greysole-creator,
.greysole-creator * {
    box-sizing: border-box;
}

.greysole-creator {
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
}

.greysole-creator__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.greysole-creator__eyebrow {
    margin: 0 0 4px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .12em;
}

.greysole-creator__header h2,
.greysole-creator-login h2 {
    margin: 0;
}

.greysole-creator__help {
    position: relative;
}

.greysole-creator__help > summary {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid currentColor;
    cursor: pointer;
    list-style: none;
    font-weight: 700;
}

.greysole-creator__help > summary::-webkit-details-marker {
    display: none;
}

.greysole-creator__help > div {
    position: absolute;
    z-index: 20;
    top: 44px;
    right: 0;
    width: min(320px, calc(100vw - 32px));
    padding: 16px;
    border: 1px solid currentColor;
    background: var(--bgcolor-white, #fff);
}

.greysole-creator__help p:last-child {
    margin-bottom: 0;
}

.greysole-creator__notice,
.greysole-creator-message {
    margin: 0 0 20px;
    padding: 12px 14px;
    border: 1px solid currentColor;
}

.greysole-creator__notice a {
    margin-left: 8px;
}

.greysole-creator__form {
    width: 100%;
}

.greysole-creator__field {
    margin: 0;
    padding: 20px 0;
    border: 0;
    border-bottom: 1px solid rgba(0, 0, 0, .14);
}

.greysole-creator__field > label,
.greysole-creator__field legend,
.greysole-creator__field-heading label {
    display: block;
    margin: 0 0 8px;
    padding: 0;
    font-weight: 700;
}

.greysole-creator__field-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.greysole-creator__field input[type="text"],
.greysole-creator__field input[type="search"],
.greysole-creator__field select,
.greysole-creator__field textarea,
.greysole-creator-login input[type="text"],
.greysole-creator-login input[type="password"] {
    width: 100%;
    max-width: none;
}

.greysole-creator__field textarea {
    min-height: 140px;
    resize: vertical;
}

.greysole-creator__hint {
    margin: 0 0 12px;
    opacity: .72;
    font-size: .92em;
}

.greysole-creator__file {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    white-space: nowrap !important;
}

.greysole-creator__image {
    display: grid !important;
    gap: 10px;
    min-height: 180px;
    padding: 12px;
    border: 1px dashed currentColor;
    overflow: hidden;
}
.greysole-creator__image-add {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 9px 12px;
    border: 1px solid currentColor;
    cursor: pointer;
    justify-self: start;
}

.greysole-creator__image-previews {
    display: flex;
    width: 100%;
    gap: 8px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
}
.greysole-creator__image-previews::-webkit-scrollbar { display: none; }
.greysole-creator__image-preview {
    position: relative;
    flex: 0 0 42%;
    max-width: 180px;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: #f2f2f2;
    scroll-snap-align: start;
}
.greysole-creator__image-preview img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.greysole-creator__image-preview small {
    position: absolute;
    left: 6px;
    bottom: 6px;
    padding: 4px 6px;
    background: #111;
    color: #fff;
    font-size: 10px;
    line-height: 1;
}
/* Keep photo remove control visible even when theme button styles are aggressive. */
[data-greysole-creator] .greysole-creator__image-preview .greysole-creator__image-remove {
    -webkit-appearance: none !important;
    appearance: none !important;
    position: absolute !important;
    z-index: 50 !important;
    top: 8px !important;
    right: 8px !important;
    width: 36px !important;
    min-width: 36px !important;
    max-width: 36px !important;
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 0 3px !important;
    border: 1px solid #fff !important;
    border-radius: 0 !important;
    background: #111 !important;
    color: #fff !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    box-shadow: 0 1px 5px rgba(0,0,0,.25) !important;
    font-family: Arial, sans-serif !important;
    font-size: 28px !important;
    font-weight: 400 !important;
    line-height: 1 !important;
    text-indent: 0 !important;
    text-transform: none !important;
    cursor: pointer !important;
}
[data-greysole-creator] .greysole-creator__image-preview .greysole-creator__image-remove:hover,
[data-greysole-creator] .greysole-creator__image-preview .greysole-creator__image-remove:focus-visible {
    background: #fff !important;
    color: #111 !important;
    border-color: #111 !important;
}

.greysole-creator__tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.greysole-creator__tag-list label {
    margin: 0;
    cursor: pointer;
}

.greysole-creator__tag-list input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.greysole-creator__tag-list span {
    display: inline-block;
    padding: 8px 12px;
    border: 1px solid currentColor;
}

.greysole-creator__tag-list input:checked + span {
    color: #fff;
    background: #111;
    border-color: #111;
}

.greysole-creator__tag-list input:disabled + span {
    opacity: .35;
    cursor: not-allowed;
}

.greysole-creator__tag-guide {
    margin-top: 14px;
}

.greysole-creator__tag-guide summary {
    cursor: pointer;
    font-weight: 600;
}

.greysole-creator__tag-guide > div {
    padding-top: 8px;
}

.greysole-creator__tag-guide p {
    margin: 0;
    padding: 9px 0;
    border-bottom: 1px solid rgba(0, 0, 0, .1);
}

.greysole-creator__tag-guide strong,
.greysole-creator__tag-guide span {
    display: block;
}

.greysole-creator__tag-guide span {
    margin-top: 2px;
    opacity: .75;
}

.greysole-creator__products {
    position: relative;
}

.greysole-creator__product-results {
    position: absolute;
    z-index: 30;
    left: 0;
    right: 0;
    max-height: 340px;
    overflow-y: auto;
    border: 1px solid currentColor;
    background: var(--bgcolor-white, #fff);
}

.greysole-creator__product-result {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px;
    border: 0;
    border-bottom: 1px solid rgba(0, 0, 0, .12);
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.greysole-creator__product-result img,
.greysole-creator__product-placeholder,
.greysole-creator__selected-product img {
    display: block;
    width: 52px;
    height: 52px;
    object-fit: cover;
    background: rgba(0, 0, 0, .08);
}

.greysole-creator__product-result strong,
.greysole-creator__product-result small,
.greysole-creator__selected-product strong,
.greysole-creator__selected-product small {
    display: block;
}

.greysole-creator__product-result small,
.greysole-creator__selected-product small {
    margin-top: 2px;
    opacity: .7;
}

.greysole-creator__product-state {
    padding: 14px;
}

.greysole-creator__selected-products {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.greysole-creator__selected-product {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) 36px;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border: 1px solid rgba(0, 0, 0, .14);
}

.greysole-creator__selected-product button {
    min-width: 36px;
    min-height: 36px;
    padding: 0;
}

.greysole-creator__actions {
    position: sticky;
    z-index: 10;
    bottom: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 14px 0;
    background: var(--bgcolor-white, #fff);
}

.greysole-creator__actions button {
    min-height: 48px;
}

.greysole-creator-login {
    padding: 20px 0;
}

.greysole-creator-login form {
    margin-top: 20px;
}

.greysole-creator-login label {
    display: block;
}

@media (max-width: 767px) {
    .greysole-creator {
        max-width: none;
        padding: 0 12px;
    }

    .greysole-creator__field {
        padding: 16px 0;
    }

    .greysole-creator__image {
        min-height: 280px;
    }
}

/* Creator 0.5.1: keep product search compact and readable on phones. */
.greysole-creator__product-result,
.greysole-creator__selected-product {
    font: inherit;
    line-height: 1.25;
    text-transform: none;
}

.greysole-creator__product-result {
    appearance: none;
    -webkit-appearance: none;
    min-height: 68px;
    box-shadow: none;
    border-radius: 0;
}

.greysole-creator__product-result strong,
.greysole-creator__selected-product strong {
    font-size: 14px;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.greysole-creator__product-result small,
.greysole-creator__selected-product small {
    font-size: 12px;
    line-height: 1.35;
    white-space: normal;
}

@media (max-width: 767px) {
    .greysole-creator__product-results {
        max-height: 300px;
    }

    .greysole-creator__product-result {
        grid-template-columns: 48px minmax(0, 1fr) 28px;
        gap: 8px;
        padding: 8px;
    }

    .greysole-creator__product-result img,
    .greysole-creator__product-placeholder,
    .greysole-creator__selected-product img {
        width: 48px;
        height: 48px;
    }
}

/* Creator 0.8.0: simple front-end post management. */
.greysole-creator__tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    margin: 0 0 24px;
    border: 1px solid #111;
}

.greysole-creator__tabs a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 10px 14px;
    color: inherit;
    text-decoration: none;
    font-weight: 600;
}

.greysole-creator__tabs a + a {
    border-left: 1px solid #111;
}

.greysole-creator__tabs a.is-active {
    background: #111;
    color: #fff;
}

.greysole-creator__edit-meta {
    margin: 6px 0 0;
    opacity: .65;
    font-size: 13px;
}

.greysole-creator__back {
    margin: 18px 0 0;
}

.greysole-creator__back a {
    color: inherit;
    font-weight: 600;
}

.greysole-creator__look-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.greysole-creator__look-card {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    min-width: 0;
    border: 1px solid rgba(0, 0, 0, .16);
    background: #fff;
}

.greysole-creator__look-thumb {
    display: block;
    min-height: 142px;
    background: #f0f0f0;
    overflow: hidden;
}

.greysole-creator__look-thumb img,
.greysole-creator__look-thumb > span {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 142px;
    object-fit: cover;
}

.greysole-creator__look-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 12px;
}

.greysole-creator__look-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    margin-bottom: 8px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .06em;
    opacity: .62;
}

.greysole-creator__look-body h3 {
    margin: 0;
    font-size: 16px;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.greysole-creator__look-body > p {
    margin: 6px 0 0;
    font-size: 13px;
    opacity: .7;
}

.greysole-creator__look-actions {
    display: flex;
    gap: 12px;
    margin-top: auto;
    padding-top: 12px;
}

.greysole-creator__look-actions a {
    color: inherit;
    font-size: 13px;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.greysole-creator__pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-top: 22px;
}

.greysole-creator__pagination .page-numbers {
    display: grid;
    place-items: center;
    min-width: 38px;
    min-height: 38px;
    padding: 6px;
    border: 1px solid #111;
    color: inherit;
    text-decoration: none;
}

.greysole-creator__pagination .current {
    background: #111;
    color: #fff;
}

.greysole-creator__empty {
    padding: 32px 18px;
    border: 1px solid rgba(0, 0, 0, .16);
    text-align: center;
}

.greysole-creator__empty p {
    margin-top: 0;
}

@media (max-width: 767px) {
    .greysole-creator__tabs {
        margin-bottom: 18px;
    }

    .greysole-creator__look-list {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .greysole-creator__look-card {
        grid-template-columns: 96px minmax(0, 1fr);
    }

    .greysole-creator__look-thumb,
    .greysole-creator__look-thumb img,
    .greysole-creator__look-thumb > span {
        min-height: 122px;
    }
}
