/* 상품 목록·상세·폼, 장바구니·주문에서 공유하는 스타일 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.product-card.panel {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    padding: 0;
    margin: 0;
    color: var(--ink);
    text-decoration: none;
}

.product-card:hover {
    background: var(--surface);
}

.product-image, .product-cover {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--surface);
}

.product-image {
    border-bottom: 1px solid #000;
}

.product-image img, .product-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-cover {
    border-radius: var(--frame-radius);
}

.product-info {
    padding: 12px;
}

.product-name {
    overflow-wrap: anywhere;
    font-weight: 600;
}

.product-price {
    margin-top: 4px;
}

.product-meta, .cart-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    margin-top: 8px;
}

.product-meta, .cart-meta, .no-image {
    color: var(--muted);
    font-size: .85rem;
}

/* 상품 상세 */
.product-overview {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 20px;
}

.detail-row {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.detail-row:last-child {
    border-bottom: 0;
}

.detail-label {
    flex: 0 0 56px;
    color: var(--muted);
}

.detail-value {
    min-width: 0;
    overflow-wrap: anywhere;
}

/* 구매·주문 입력 */
.purchase-row, .item-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.purchase-label {
    font-size: .9rem;
}

.theme .field.quantity {
    width: 80px;
    height: 40px;
    padding: 4px 8px;
    text-align: center;
}

/* 상품 등록·수정 */
.shop-page .form-check-input {
    border-color: #000;
    accent-color: #000;
}

.shop-page .form-check-input:checked {
    background-color: #000;
    border-color: #000;
}

.shop-page .form-check-input:focus {
    border-color: #000;
    box-shadow: none;
    outline: 1px solid #000;
}

/* 장바구니·주문 */
.section-title {
    margin: 24px 0 12px;
    font-size: 1.1rem;
}

.cart-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
}

.cart-item-link {
    color: var(--ink);
    font-weight: 600;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.cart-item-link:hover {
    text-decoration: underline;
}


@media (max-width: 600px) {
    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
    .product-overview {
        grid-template-columns: minmax(0, 1fr);
    }
}
