﻿/* ── SHARED: BREADCRUMB ─────────────────────────────────── */
.ps-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 24px;
    font-size: 13px;
}

.ps-breadcrumb__link {
    color: #0071e3;
    text-decoration: none;
}

    .ps-breadcrumb__link:hover {
        text-decoration: underline;
    }

.ps-breadcrumb__sep {
    color: #aeaeb2;
}

.ps-breadcrumb__current {
    color: #6e6e73;
}

/* ── SHARED: BUTTONS ────────────────────────────────────── */
.ps-btn {
    display: inline-block;
    font-size: 13px;
    font-weight: 500;
    border-radius: 8px;
    padding: 9px 18px;
    cursor: pointer;
    text-decoration: none;
    border: none;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    text-align: center;
    white-space: nowrap;
}

.ps-btn--primary {
    background: #0071e3;
    color: #fff;
}

    .ps-btn--primary:hover {
        background: #0077ed;
        color: #fff;
        text-decoration: none;
    }

    .ps-btn--primary.ps-btn--disabled,
    .ps-btn--primary:disabled {
        background: #aeaeb2;
        cursor: not-allowed;
    }

.ps-btn--outline {
    background: transparent;
    color: #0071e3;
    border: 1px solid #0071e3;
}

    .ps-btn--outline:hover {
        background: #0071e3;
        color: #fff;
        text-decoration: none;
    }

.ps-btn--ghost {
    background: #f5f5f7;
    color: #1d1d1f;
    border: 1px solid #e8e8ed;
}

    .ps-btn--ghost:hover {
        background: #e8e8ed;
        color: #1d1d1f;
        text-decoration: none;
    }

.ps-btn--danger {
    background: transparent;
    color: #ff3b30;
    border: 1px solid #ff3b30;
}

    .ps-btn--danger:hover {
        background: #ff3b30;
        color: #fff;
        text-decoration: none;
    }

.ps-btn--full {
    width: 100%;
    display: block;
}

/* ── INDEX: HEADER ──────────────────────────────────────── */
.ps-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.ps-header__title {
    font-size: 28px;
    font-weight: 600;
    color: #1d1d1f;
    letter-spacing: -0.4px;
    margin: 0 0 4px;
}

.ps-header__sub {
    font-size: 13px;
    color: #6e6e73;
    margin: 0;
}

/* ── INDEX: FILTER ──────────────────────────────────────── */
.ps-filter {
    margin-bottom: 24px;
}

.ps-filter__form {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ps-filter__label {
    font-size: 13px;
    font-weight: 500;
    color: #3a3a3c;
    white-space: nowrap;
}

.ps-filter__select {
    font-size: 13px;
    color: #1d1d1f;
    border: 1px solid #e8e8ed;
    border-radius: 8px;
    padding: 8px 12px;
    background: #fff;
    outline: none;
    cursor: pointer;
    min-width: 180px;
    transition: border-color 0.15s;
}

    .ps-filter__select:focus {
        border-color: #0071e3;
        box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.1);
    }

/* ── INDEX: EMPTY STATE ─────────────────────────────────── */
.ps-empty {
    text-align: center;
    padding: 60px 20px;
    color: #6e6e73;
}

.ps-empty__icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.ps-empty h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 8px;
}

.ps-empty p {
    font-size: 14px;
    margin-bottom: 20px;
}

/* ── INDEX: PRODUCT GRID ────────────────────────────────── */
.ps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

/* ── INDEX: PRODUCT CARD ────────────────────────────────── */
.ps-card {
    background: #fff;
    border: 1px solid #e8e8ed;
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

    .ps-card:hover {
        border-color: #0071e3;
        box-shadow: 0 4px 20px rgba(0, 113, 227, 0.1);
        transform: translateY(-2px);
    }

.ps-card__img-link {
    display: block;
    text-decoration: none;
}

.ps-card__img {
    background: #f5f5f7;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

    .ps-card__img img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        padding: 16px;
        transition: transform 0.3s ease;
    }

.ps-card:hover .ps-card__img img {
    transform: scale(1.04);
}

.ps-card__no-img {
    font-size: 13px;
    color: #aeaeb2;
}

.ps-card__body {
    padding: 14px 16px 10px;
    flex: 1;
}

.ps-card__cat {
    font-size: 10px;
    font-weight: 600;
    color: #0071e3;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 5px;
}

.ps-card__name {
    font-size: 13.5px;
    font-weight: 500;
    color: #1d1d1f;
    line-height: 1.4;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ps-card__price {
    font-size: 17px;
    font-weight: 700;
    color: #1d1d1f;
    margin-bottom: 4px;
}

.ps-card__stock {
    font-size: 11px;
    font-weight: 500;
    color: #1a7f37;
    margin: 0;
}

.ps-card__stock--out {
    color: #ff3b30;
}

.ps-card__footer {
    padding: 12px 16px;
    border-top: 1px solid #f5f5f7;
    display: flex;
    gap: 8px;
}

/* ── DETAIL: LAYOUT ─────────────────────────────────────── */
.ps-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}

/* ── DETAIL: GALLERY ────────────────────────────────────── */
.ps-detail__gallery {
    position: sticky;
    top: 20px;
}

.ps-detail__img {
    background: #f5f5f7;
    border-radius: 16px;
    height: 440px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

    .ps-detail__img img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        padding: 24px;
    }

.ps-detail__no-img {
    font-size: 14px;
    color: #aeaeb2;
}

/* ── DETAIL: INFO ───────────────────────────────────────── */
.ps-detail__cat {
    font-size: 12px;
    font-weight: 600;
    color: #0071e3;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}

.ps-detail__name {
    font-size: 26px;
    font-weight: 600;
    color: #1d1d1f;
    letter-spacing: -0.4px;
    line-height: 1.2;
    margin-bottom: 16px;
}

.ps-detail__price {
    font-size: 28px;
    font-weight: 700;
    color: #1d1d1f;
    margin-bottom: 8px;
}

.ps-detail__stock {
    font-size: 13px;
    font-weight: 500;
    color: #1a7f37;
    margin-bottom: 0;
}

.ps-detail__stock--out {
    color: #ff3b30;
}

.ps-detail__divider {
    height: 1px;
    background: #f0f0f0;
    margin: 20px 0;
}

.ps-detail__desc {
    font-size: 14px;
    color: #3a3a3c;
    line-height: 1.65;
    margin: 0;
}

/* ── DETAIL: QTY CONTROL ────────────────────────────────── */
.ps-qty {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.ps-qty__label {
    font-size: 13px;
    font-weight: 500;
    color: #3a3a3c;
}

.ps-qty__control {
    display: flex;
    align-items: center;
    border: 1px solid #e8e8ed;
    border-radius: 8px;
    overflow: hidden;
}

.ps-qty__btn {
    background: #f5f5f7;
    border: none;
    width: 36px;
    height: 36px;
    font-size: 18px;
    cursor: pointer;
    color: #1d1d1f;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.1s;
}

    .ps-qty__btn:hover {
        background: #e8e8ed;
    }

.ps-qty__input {
    width: 52px;
    height: 36px;
    text-align: center;
    border: none;
    border-left: 1px solid #e8e8ed;
    border-right: 1px solid #e8e8ed;
    font-size: 14px;
    font-weight: 500;
    color: #1d1d1f;
    outline: none;
    background: #fff;
}

/* ── DETAIL: ADMIN ACTIONS ──────────────────────────────── */
.ps-detail__admin {
    display: flex;
    gap: 10px;
}

.ps-detail__login-prompt {
    margin-top: 4px;
}

/* ── FORM: LAYOUT ───────────────────────────────────────── */
.ps-form-layout {
    max-width: 680px;
}

.ps-form-card {
    background: #fff;
    border: 1px solid #e8e8ed;
    border-radius: 16px;
    overflow: hidden;
}

.ps-form-card__header {
    padding: 24px 28px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.ps-form-card__title {
    font-size: 20px;
    font-weight: 600;
    color: #1d1d1f;
    letter-spacing: -0.3px;
    margin-bottom: 4px;
}

.ps-form-card__sub {
    font-size: 13px;
    color: #6e6e73;
    margin: 0;
}

.ps-form {
    padding: 24px 28px 28px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ── FORM: FIELDS ───────────────────────────────────────── */
.ps-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ps-field__label {
    font-size: 13px;
    font-weight: 500;
    color: #3a3a3c;
}

.ps-field__input {
    font-size: 14px;
    color: #1d1d1f;
    background: #fff;
    border: 1px solid #e8e8ed;
    border-radius: 8px;
    padding: 10px 14px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    width: 100%;
    font-family: inherit;
}

    .ps-field__input:focus {
        border-color: #0071e3;
        box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.1);
    }

.ps-field__textarea {
    resize: vertical;
    min-height: 100px;
}

.ps-field__select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236e6e73' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
    cursor: pointer;
}

.ps-field__prefix-wrap {
    display: flex;
    align-items: center;
    border: 1px solid #e8e8ed;
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.15s, box-shadow 0.15s;
}

    .ps-field__prefix-wrap:focus-within {
        border-color: #0071e3;
        box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.1);
    }

.ps-field__prefix {
    padding: 10px 12px;
    background: #f5f5f7;
    color: #6e6e73;
    font-size: 14px;
    font-weight: 500;
    border-right: 1px solid #e8e8ed;
    white-space: nowrap;
}

.ps-field__input--prefixed {
    border: none;
    border-radius: 0;
    box-shadow: none !important;
    flex: 1;
}

    .ps-field__input--prefixed:focus {
        border: none;
        box-shadow: none;
    }

.ps-field__hint {
    font-size: 12px;
    color: #aeaeb2;
    margin: 2px 0 0;
}

.ps-field__error {
    font-size: 12px;
    color: #ff3b30;
}

.ps-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* ── FORM: IMAGE UPLOAD ─────────────────────────────────── */
.ps-upload {
    border: 1.5px dashed #e8e8ed;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.15s;
    position: relative;
}

    .ps-upload:hover {
        border-color: #0071e3;
    }

.ps-upload__input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
    width: 100%;
    height: 100%;
}

.ps-upload__placeholder {
    padding: 32px;
    text-align: center;
}

.ps-upload__icon {
    font-size: 32px;
    display: block;
    margin-bottom: 10px;
}

.ps-upload__text {
    font-size: 14px;
    font-weight: 500;
    color: #3a3a3c;
    margin-bottom: 4px;
}

.ps-upload__hint {
    font-size: 12px;
    color: #aeaeb2;
    margin: 0;
}

.ps-upload__preview {
    width: 100%;
    max-height: 240px;
    object-fit: contain;
    padding: 12px;
    background: #f5f5f7;
    display: block;
}

/* ── FORM: ACTIONS ──────────────────────────────────────── */
.ps-form__actions {
    display: flex;
    gap: 10px;
    padding-top: 4px;
}

.ps-form__error-summary {
    background: #fff2f2;
    border: 1px solid #ffcdd2;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 13px;
    color: #c62828;
}

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 1100px) {
    .ps-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .ps-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .ps-detail {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .ps-detail__gallery {
        position: static;
    }

    .ps-detail__img {
        height: 300px;
    }

    .ps-form-layout {
        max-width: 100%;
    }

    .ps-form-card__header,
    .ps-form {
        padding-left: 20px;
        padding-right: 20px;
    }

    .ps-field-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .ps-grid {
        grid-template-columns: 1fr;
    }

    .ps-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}
