.pbyo {
    font-family: 'Noah Text', 'Helvetica Neue', Arial, sans-serif;
    color: #111;
    margin: 0 auto 50px;
}

.pbyo-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 50px;
    align-items: start;
}

.pbyo-media {
    position: sticky;
    top: 80px;
    border-radius: 12px;
    overflow: hidden;
    background: #F2F3F0;
    aspect-ratio: 3 / 4;
}

.pbyo-hero-img {
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    display: block;
}

.pbyo-main {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

.pbyo-title {
    font-family: 'Noah Head', 'Helvetica Neue', Arial, sans-serif;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.1;
    margin: 0;
}

.pbyo-desc,
.pbyo-long {
    font-size: 15px;
    color: #747971;
    line-height: 1.6;
}

.pbyo-desc p,
.pbyo-long p {
    margin: 0 0 8px;
}

.pbyo-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #747971;
}

.pbyo-tiers {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.pbyo-tier {
    flex: 1 1 0;
    min-width: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 12px 10px;
    border: 1.5px solid #e0ddd8 !important;
    border-radius: 10px;
    background: #fff !important;
    color: #111 !important;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.pbyo-tier:hover {
    border-color: #b0ada8 !important;
}

.pbyo-tier.active {
    border-color: #d35228 !important;
    background: #fff8f5 !important;
}

.pbyo-tier-name {
    font-size: 15px;
    font-weight: 700;
}

.pbyo-tier-save {
    font-size: 12px;
    font-weight: 700;
    color: #d35228;
}

.pbyo-progress-text {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
}

.pbyo-progress-bar {
    height: 4px;
    background: #f0ede7;
    border-radius: 2px;
    overflow: hidden;
}

.pbyo-progress-bar span {
    display: block;
    height: 100%;
    width: 0;
    background: #d35228;
    transition: width 0.3s ease;
}

.pbyo-slots {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pbyo-slot {
    border: 1px solid #e0ddd8;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    transition: border-color 0.2s;
}

.pbyo-slot.is-open {
    border-color: #d35228;
}

.pbyo-slot.is-done {
    border-color: #111;
}

.pbyo-slot.is-warn {
    border-color: #d35228;
}

.pbyo-slot-head {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 12px;
    border: none !important;
    background: #f7f6f3 !important;
    color: #111 !important;
    text-align: left;
    cursor: pointer;
    box-shadow: none !important;
}

.pbyo-slot-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #e8e4dc;
    color: #747971;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pbyo-slot.is-done .pbyo-slot-num {
    background: #111;
    color: #fff;
}

.pbyo-slot-thumb {
    width: 44px;
    height: 44px;
    border-radius: 7px;
    background: #ece9e3;
    overflow: hidden;
    flex-shrink: 0;
}

.pbyo-slot-thumb img {
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    display: block;
}

.pbyo-slot-txt {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.pbyo-slot-name {
    font-family: 'Noah Head', 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pbyo-slot-sub {
    font-size: 12px;
    color: #747971;
    margin-top: 1px;
}

.pbyo-slot-price {
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}

.pbyo-slot-body {
    padding: 4px 14px 14px;
}

.pbyo-pick-btn {
    width: 100%;
    margin-top: 10px;
    padding: 14px;
    border: 1.5px dashed #d0cdc7 !important;
    border-radius: 8px;
    background: #fff !important;
    color: #111 !important;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.pbyo-pick-btn:hover {
    border-color: #d35228 !important;
    color: #d35228 !important;
}

.pbyo-attr {
    margin-top: 12px;
}

.pbyo-attr-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #747971;
    margin-bottom: 8px;
    font-family: 'Noah Head', 'Helvetica Neue', Arial, sans-serif;
}

.pbyo-attr-opts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pbyo-attr-opts.is-swatch {
    gap: 12px;
}

.pbyo-sw {
    width: 26px;
    height: 26px;
    padding: 0;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}

.pbyo-sw.on {
    box-shadow: 0 0 0 2.5px #111;
    transform: scale(1.12);
}

.pbyo-sw.oos {
    opacity: 0.25;
    cursor: not-allowed;
}

.pbyo-opt {
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid #e0ddd8 !important;
    background: #fff !important;
    color: #111 !important;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.pbyo-opt:hover {
    border-color: #111 !important;
}

.pbyo-opt.on {
    background: #111 !important;
    color: #fff !important;
    border-color: #111 !important;
}

.pbyo-opt.oos {
    opacity: 0.3;
    text-decoration: line-through;
    cursor: not-allowed;
}

.pbyo-warn {
    margin-top: 10px;
    font-size: 12px;
    font-weight: 700;
    color: #d35228;
}

.pbyo-slot-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.pbyo-link {
    padding: 0;
    border: none !important;
    background: none !important;
    color: #d35228 !important;
    font-size: 12px;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
    box-shadow: none !important;
}

.pbyo-loading {
    display: flex;
    justify-content: center;
    padding: 16px 0;
}

.pbyo-spinner {
    width: 22px;
    height: 22px;
    border: 2px solid #e0ddd8;
    border-top-color: #d35228;
    border-radius: 50%;
    animation: pbyo-spin 0.7s linear infinite;
}

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

.pbyo-summary {
    border: 1px solid #e0ddd8;
    border-radius: 10px;
    padding: 14px 16px;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pbyo-sum-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #747971;
}

.pbyo-sum-save {
    color: #d35228;
    font-weight: 700;
}

.pbyo-sum-total {
    color: #111;
    font-size: 18px;
    font-weight: 700;
    padding-top: 6px;
    border-top: 1px solid #f0ede7;
}

.pbyo-msg {
    font-size: 13px;
    color: #2e7d32;
    min-height: 0;
}

.pbyo-msg.is-error {
    color: #c62828;
}

.pbyo-msg:empty {
    display: none;
}

.pbyo-btns {
    display: flex;
    gap: 10px;
    margin-top: 6px;
}

.pbyo-atc,
.pbyo-buy {
    flex: 1;
    height: 46px;
    border: none !important;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    cursor: pointer;
    transition: opacity 0.2s;
    font-family: 'Noah Head', 'Helvetica Neue', Arial, sans-serif;
}

.pbyo-atc {
    background: #111 !important;
    color: #fff !important;
}

.pbyo-buy {
    background: #d35228 !important;
    color: #fff !important;
}

.pbyo-atc:disabled,
.pbyo-buy:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.pbyo-sheet-ov {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0);
    pointer-events: none;
    transition: background 0.25s;
    padding: 20px;
}

.pbyo-sheet-ov.is-open {
    background: rgba(0, 0, 0, 0.5);
    pointer-events: all;
}

.pbyo-sheet {
    width: 100%;
    max-width: 760px;
    max-height: 85vh;
    background: #fff;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.pbyo-sheet-ov.is-open .pbyo-sheet {
    transform: none;
    opacity: 1;
}

.pbyo-sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px 10px;
}

.pbyo-sheet-title {
    font-family: 'Noah Head', 'Helvetica Neue', Arial, sans-serif;
    font-size: 17px;
    font-weight: 700;
}

.pbyo-sheet-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none !important;
    background: #f5f2ec !important;
    color: #111 !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.pbyo-chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 0 18px 12px;
    border-bottom: 1px solid #f0ede7;
}

.pbyo-chips::-webkit-scrollbar {
    display: none;
}

.pbyo-chips:empty {
    display: none;
}

.pbyo-chip {
    flex-shrink: 0;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid #e0ddd8 !important;
    background: #fff !important;
    color: #111 !important;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.pbyo-chip.on {
    background: #111 !important;
    color: #fff !important;
    border-color: #111 !important;
}

.pbyo-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    padding: 14px 18px 20px;
    overflow-y: auto;
}

.pbyo-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0 0 10px;
    border: 1px solid #ece9e3 !important;
    border-radius: 10px;
    background: #fff !important;
    color: #111 !important;
    text-align: left;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.15s;
}

.pbyo-card:hover {
    border-color: #d35228 !important;
}

.pbyo-card-img {
    display: block;
    aspect-ratio: 1;
    background: #F2F3F0;
}

.pbyo-card-img img {
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    display: block;
}

.pbyo-card-name {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.25;
    padding: 4px 10px 0;
}

.pbyo-card-price {
    font-size: 13px;
    font-weight: 700;
    padding: 0 10px;
}

.pbyo-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: #747971;
}

body.pbyo-lock {
    overflow: hidden;
}

@media (max-width: 768px) {
    .pbyo-inner {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }

    .pbyo-media {
        position: static;
        aspect-ratio: 4 / 3;
    }

    .pbyo-title {
        font-size: 22px;
    }

    .pbyo-summary {
        position: sticky;
        bottom: 0;
        z-index: 50;
        border-radius: 12px 12px 0 0;
        box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.08);
        margin: 0 -4px;
    }

    .pbyo-sheet-ov {
        align-items: flex-end;
        padding: 0;
    }

    .pbyo-sheet {
        max-width: 100%;
        max-height: 88vh;
        border-radius: 16px 16px 0 0;
        transform: translateY(100%);
    }

    .pbyo-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

html[dir="rtl"] .pbyo-slot-head,
html[dir="rtl"] .pbyo-card {
    text-align: right;
}

.pbyo-sheet .pbyo-chips {
    flex-shrink: 0;
    align-items: center;
    padding-top: 2px;
}

.pbyo-sheet .pbyo-chip {
    height: auto !important;
    min-height: 0 !important;
    line-height: 1.2 !important;
    padding: 7px 14px !important;
    display: inline-flex;
    align-items: center;
    margin: 0 !important;
}

.pbyo-sheet .pbyo-grid {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    align-content: start;
    grid-auto-rows: 240px;
    -webkit-overflow-scrolling: touch;
}

.pbyo-sheet .pbyo-card {
    height: 240px !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 0 0 10px !important;
    margin: 0 !important;
    line-height: 1.25 !important;
    justify-content: flex-start;
    white-space: normal;
}

.pbyo-sheet .pbyo-card-img {
    flex: 0 0 160px;
    height: 160px;
    aspect-ratio: auto;
    overflow: hidden;
}

.pbyo-sheet .pbyo-card-img img {
    object-fit: contain;
}

.pbyo-sheet .pbyo-card-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    padding-top: 8px;
}

.pbyo-sheet .pbyo-card-price {
    margin-top: auto;
}

.pbyo-sheet .pbyo-tabs {
    flex-shrink: 0;
    display: inline-flex;
    align-self: flex-start;
    gap: 4px;
    margin: 0 18px 12px;
    padding: 4px;
    background: #111;
    border-radius: 999px;
}

.pbyo-sheet .pbyo-tabs:empty {
    display: none;
}

.pbyo-sheet .pbyo-tab {
    height: auto !important;
    min-height: 0 !important;
    line-height: 1.2 !important;
    margin: 0 !important;
    padding: 8px 20px !important;
    border: none !important;
    border-radius: 999px;
    background: transparent !important;
    color: #fff !important;
    font-family: 'Noah Head', 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: none !important;
    transition: background 0.15s, color 0.15s;
}

.pbyo-sheet .pbyo-tab.on {
    background: #fff !important;
    color: #111 !important;
}

@media (max-width: 768px) {
    .pbyo-sheet .pbyo-grid {
        grid-auto-rows: 210px;
    }

    .pbyo-sheet .pbyo-card {
        height: 210px !important;
    }

    .pbyo-sheet .pbyo-card-img {
        flex-basis: 135px;
        height: 135px;
    }

    .pbyo-sheet .pbyo-tabs {
        margin: 0 14px 10px;
    }

    .pbyo-sheet .pbyo-tab {
        padding: 7px 16px !important;
    }
}

.pbyo-sheet .pbyo-chips,
.pbyo-sheet .pbyo-tabs {
    user-select: none;
    -webkit-user-select: none;
}

@media (min-width: 769px) {
    .pbyo-sheet .pbyo-chips {
        flex-wrap: wrap;
        overflow-x: visible;
        row-gap: 8px;
    }
}

.pbyo-add-slot {
    width: 100%;
    height: auto !important;
    padding: 13px 14px !important;
    margin: 0 !important;
    border: 1.5px dashed #d0cdc7 !important;
    border-radius: 10px;
    background: #fff !important;
    color: #111 !important;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3 !important;
    cursor: pointer;
    box-shadow: none !important;
    transition: border-color 0.15s, color 0.15s;
}

.pbyo-add-slot span {
    font-weight: 400;
    color: #747971;
}

.pbyo-add-slot:hover {
    border-color: #d35228 !important;
    color: #d35228 !important;
}

.pbyo-add-slot.pbyo-upgrade {
    border-style: solid !important;
    border-color: #d35228 !important;
    background: #fff8f5 !important;
    color: #d35228 !important;
}

.pbyo-link.pbyo-link-muted {
    color: #747971 !important;
}
