/* ============================================================
   nibango Product Detail (Clean & Minimalist)
   ============================================================ */

.pd-layout {
    display: flex;
    flex-direction: column;
    gap: var(--sp-lg);
}

.pd-gallery {
    display: flex;
    flex-direction: column;
    gap: var(--sp-sm);
}

.pd-gallery__main {
    width: 100%;
    aspect-ratio: 1;
    background-color: var(--system-gray-6);
    border-radius: var(--r-md);
    overflow: hidden;
    position: relative;
    border: 1px solid var(--separator);
}

.pd-gallery__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pd-gallery__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
}

.pd-gallery__thumbs {
    display: flex;
    gap: var(--sp-sm);
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: var(--sp-xs);
}

.pd-gallery__thumbs::-webkit-scrollbar {
    display: none;
}

.pd-thumb {
    width: 64px;
    height: 64px;
    border-radius: var(--r-sm);
    border: 2px solid transparent;
    overflow: hidden;
    opacity: 0.6;
    transition: opacity var(--t-fast), border-color var(--t-fast);
    flex-shrink: 0;
    cursor: pointer;
    background-color: var(--system-gray-6);
    padding: 0;
}

.pd-thumb:hover,
.pd-thumb.active {
    opacity: 1;
    border-color: var(--b-primary);
}

.pd-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pd-info {
    display: flex;
    flex-direction: column;
    gap: var(--sp-lg);
}

.pd-title {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 4px;
}

.pd-price {
    font-size: 28px;
    font-weight: 700;
    color: var(--b-primary);
}

.pd-price__note {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
}

.pd-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: var(--r-sm);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: white;
    margin-bottom: var(--sp-sm);
}

.pd-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-md);
    padding: var(--sp-md) 0;
    border-top: 1px solid var(--separator);
    border-bottom: 1px solid var(--separator);
}

.pd-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--text-secondary);
}

.pd-meta-item svg {
    color: var(--text-tertiary);
}

.pd-actions {
    display: flex;
    gap: var(--sp-sm);
    margin-top: var(--sp-sm);
}

.pd-actions .btn {
    flex: 1;
}

.pd-actions .btn-icon {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 1px solid var(--separator);
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

.pd-seller {
    display: flex;
    align-items: center;
    gap: var(--sp-md);
    padding: var(--sp-md);
    background-color: var(--bg-secondary);
    border-radius: var(--r-md);
    margin-top: var(--sp-md);
}

.pd-seller__avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: var(--b-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 600;
    overflow: hidden;
}

.pd-seller__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pd-seller__info {
    flex: 1;
}

.pd-seller__name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.pd-seller__details {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.pd-description__title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: var(--sp-sm);
}

.pd-description__text {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    white-space: pre-wrap;
}

/* Desktop layout */
@media (min-width: 768px) {
    .pd-layout {
        flex-direction: row;
        gap: var(--sp-2xl);
    }

    .pd-gallery {
        flex: 1;
        max-width: 50%;
        position: sticky;
        top: calc(60px + var(--sp-lg));
        /* Sticky nav height + spacing */
        align-self: flex-start;
    }

    .pd-info {
        flex: 1;
    }

    .pd-title {
        font-size: 32px;
    }
}